diff --git a/assets/IconRssLine-BqBzMn_a.js b/assets/IconRssLine-Cd1K2zy4.js similarity index 95% rename from assets/IconRssLine-BqBzMn_a.js rename to assets/IconRssLine-Cd1K2zy4.js index 87c85df..88f78fe 100644 --- a/assets/IconRssLine-BqBzMn_a.js +++ b/assets/IconRssLine-Cd1K2zy4.js @@ -1 +1 @@ -import{r as c,R as r,S as s}from"./index-DCzcanBz.js";var o;class e extends c.Component{constructor(...a){super(...a),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}render(){return r.createElement(s,Object.assign({},this.props,{name:"IconRss",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),o||(o=r.createElement("path",{d:"M1616.875 1813.333c-27.627-820.266-689.92-1482.56-1510.187-1510.186V107.52c928.213 27.733 1678.08 777.6 1705.813 1705.813h-195.626ZM53.355 0H.02v408.853h53.334c803.733 0 1457.706 653.974 1457.706 1457.814V1920h408.96v-53.333C1920.021 837.44 1082.581 0 53.355 0Zm933.984 1813.333c-26.667-473.493-407.147-853.973-880.64-880.746V736.853c581.226 27.094 1049.28 495.254 1076.373 1076.48H987.339ZM53.365 628.907H.032v408.853h53.333c456.96 0 828.8 371.947 828.8 828.907V1920h408.854v-53.333c0-682.454-555.2-1237.76-1237.654-1237.76ZM267.19 1812.288c-88 0-159.573-71.573-159.573-159.467 0-87.893 71.573-159.466 159.573-159.466 87.894 0 159.467 71.573 159.467 159.466 0 87.894-71.573 159.467-159.467 159.467m0-425.6c-146.773 0-266.24 119.36-266.24 266.133 0 146.774 119.467 266.134 266.24 266.134 146.774 0 266.134-119.36 266.134-266.134 0-146.773-119.36-266.133-266.134-266.133",fillRule:"evenodd"})))}}e.glyphName="rss";e.variant="Line";e.displayName="IconRssLine";e.propTypes={...s.propTypes};e.allowedProps=[...s.allowedProps];export{e as I}; +import{r as c,R as r,S as s}from"./index-C3XQCywa.js";var o;class e extends c.Component{constructor(...a){super(...a),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}render(){return r.createElement(s,Object.assign({},this.props,{name:"IconRss",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),o||(o=r.createElement("path",{d:"M1616.875 1813.333c-27.627-820.266-689.92-1482.56-1510.187-1510.186V107.52c928.213 27.733 1678.08 777.6 1705.813 1705.813h-195.626ZM53.355 0H.02v408.853h53.334c803.733 0 1457.706 653.974 1457.706 1457.814V1920h408.96v-53.333C1920.021 837.44 1082.581 0 53.355 0Zm933.984 1813.333c-26.667-473.493-407.147-853.973-880.64-880.746V736.853c581.226 27.094 1049.28 495.254 1076.373 1076.48H987.339ZM53.365 628.907H.032v408.853h53.333c456.96 0 828.8 371.947 828.8 828.907V1920h408.854v-53.333c0-682.454-555.2-1237.76-1237.654-1237.76ZM267.19 1812.288c-88 0-159.573-71.573-159.573-159.467 0-87.893 71.573-159.466 159.573-159.466 87.894 0 159.467 71.573 159.467 159.466 0 87.894-71.573 159.467-159.467 159.467m0-425.6c-146.773 0-266.24 119.36-266.24 266.133 0 146.774 119.467 266.134 266.24 266.134 146.774 0 266.134-119.36 266.134-266.134 0-146.773-119.36-266.133-266.134-266.133",fillRule:"evenodd"})))}}e.glyphName="rss";e.variant="Line";e.displayName="IconRssLine";e.propTypes={...s.propTypes};e.allowedProps=[...s.allowedProps];export{e as I}; diff --git a/assets/Mdtoui-B81NOHR9.js b/assets/Mdtoui-yQNCxW-t.js similarity index 99% rename from assets/Mdtoui-B81NOHR9.js rename to assets/Mdtoui-yQNCxW-t.js index 657bd39..5fceec9 100644 --- a/assets/Mdtoui-B81NOHR9.js +++ b/assets/Mdtoui-yQNCxW-t.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Bj2M0RvR.js","assets/index-C5yFM9ST.js","assets/index-DCzcanBz.js","assets/index-dyNilIOc.css","assets/RenderTopNavBar-CILoEAmM.js","assets/index-CTDsjRCP.js","assets/index-De3kK20J.js","assets/index-C1tjm6wA.js","assets/index-2_RebUFS.js","assets/IconRssLine-BqBzMn_a.js"])))=>i.map(i=>d[i]); -import{f as fs,P as be,T as Qn,w as ta,t as na,r as te,h as ra,i as ia,p as aa,V as ua,k as Br,l as ds,j as z,_ as ke,R as ms}from"./index-DCzcanBz.js";import{C as ps,s as _s}from"./RenderTopNavBar-CILoEAmM.js";import{a as $e}from"./index-C5yFM9ST.js";const Es=(e,t)=>{const n=t.size,r=t.delimiter,i=t.spacing,u=r!=="none",a=i!=="none";fs(!(u&&a),"[List] `itemSpacing` has no effect inside Lists with the `delimiter` prop set to anything other than `none`.");const o={small:{fontSize:e.fontSizeSmall},medium:{fontSize:e.fontSizeMedium},large:{fontSize:e.fontSizeLarge}},l={"xxx-small":{marginTop:e.spacingXXXSmall,marginBottom:e.spacingXXXSmall},"xx-small":{marginTop:e.spacingXXSmall,marginBottom:e.spacingXXSmall},"x-small":{marginTop:e.spacingXSmall,marginBottom:e.spacingXSmall},small:{marginTop:e.spacingSmall,marginBottom:e.spacingSmall},medium:{marginTop:e.spacingMedium,marginBottom:e.spacingMedium},large:{marginTop:e.spacingLarge,marginBottom:e.spacingLarge},"x-large":{marginTop:e.spacingXLarge,marginBottom:e.spacingXLarge},"xx-large":{marginTop:e.spacingXXLarge,marginBottom:e.spacingXXLarge},none:{}},c={dashed:{listStylePosition:"inside","&:not(:first-of-type)":{borderTop:e.delimiterDashedBorder}},solid:{listStylePosition:"inside","&:not(:first-of-type)":{borderTop:e.delimiterSolidBorder}},none:{}};return{listItem:{label:"listItem",fontWeight:e.fontWeight,fontFamily:e.fontFamily,lineHeight:e.lineHeight,color:e.color,padding:0,...o[n],...a&&!u&&l[i],...u&&c[r],"&:first-of-type":{marginTop:"0"},"&:last-of-type":{marginBottom:"0"}}}},gs=e=>{const t=e.borders,n=e.colors,r=e.spacing,i=e.typography,u=e.key,a={canvas:{color:e["ic-brand-font-color-dark"]}};return{...{fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,lineHeight:i==null?void 0:i.lineHeight,fontSizeSmall:i==null?void 0:i.fontSizeSmall,fontSizeMedium:i==null?void 0:i.fontSizeMedium,fontSizeLarge:i==null?void 0:i.fontSizeLarge,color:n==null?void 0:n.textDarkest,spacingXXXSmall:r==null?void 0:r.xxxSmall,spacingXXSmall:r==null?void 0:r.xxSmall,spacingXSmall:r==null?void 0:r.xSmall,spacingSmall:r==null?void 0:r.small,spacingMedium:r==null?void 0:r.medium,spacingLarge:r==null?void 0:r.large,spacingXLarge:r==null?void 0:r.xLarge,spacingXXLarge:r==null?void 0:r.xxLarge,delimiterDashedBorder:`${t==null?void 0:t.widthSmall} dashed ${n==null?void 0:n.borderMedium}`,delimiterSolidBorder:`${t==null?void 0:t.widthSmall} solid ${n==null?void 0:n.borderMedium}`},...a[u]}},bs={children:be.oneOfType([be.node,be.func]).isRequired,delimiter:be.oneOf(["none","dashed","solid"]),size:be.oneOf(["small","medium","large"]),margin:Qn.spacing,padding:Qn.spacing,spacing:be.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:be.func},Ts=["children","delimiter","size","margin","padding","spacing","elementRef"],As=["delimiter","spacing","size","margin","padding","elementRef","children","styles"];var Fr,Hr,Kt,Je;let sa=(Fr=ta(Es,gs),Hr=na(),Fr(Kt=Hr(Kt=(Je=class extends te.Component{constructor(...t){super(...t),this.ref=null,this.handleRef=n=>{const r=this.props.elementRef;this.ref=n,typeof r=="function"&&r(n)}}componentDidMount(){var t,n;(t=(n=this.props).makeStyles)===null||t===void 0||t.call(n)}componentDidUpdate(){var t,n;(t=(n=this.props).makeStyles)===null||t===void 0||t.call(n)}render(){const t=this.props;t.delimiter,t.spacing,t.size;const n=t.margin,r=t.padding;t.elementRef;const i=t.children,u=t.styles,a=ra(t,As);return ia(ua,Object.assign({},aa(a),{css:u==null?void 0:u.listItem,as:"li",margin:n,padding:r,maxWidth:"100%",elementRef:this.handleRef}),i)}},Je.displayName="ListItem",Je.componentId="List.Item",Je.propTypes=bs,Je.allowedProps=Ts,Je.defaultProps={padding:"none",spacing:"none",delimiter:"none",size:"medium"},Je))||Kt)||Kt);const Cs=(e,t)=>{const n=t.isUnstyled,i=t.as==="ol";return{list:{label:"list",paddingInlineStart:e.listPadding,paddingInlineEnd:0,...i&&{listStyleType:"none",paddingInlineStart:`calc(${e.listPadding} / 2)`,paddingInlineEnd:0,counterReset:"ol-counter","&>li::before":{fontWeight:e.orderedNumberFontWeight,counterIncrement:"ol-counter",content:'counters(ol-counter, ".") "."',marginInlineEnd:e.orderedNumberMargin,marginInlineStart:0}},...n&&{listStyleType:"none",paddingInlineStart:0}}}},ks=e=>{const t=e.spacing,n=e.typography;return{...{listPadding:t==null?void 0:t.large,orderedNumberFontWeight:n==null?void 0:n.fontWeightBold,orderedNumberMargin:t==null?void 0:t.xSmall}}},Is={children:ps.oneOf([sa]),as:be.oneOf(["ul","ol"]),delimiter:be.oneOf(["none","dashed","solid"]),isUnstyled:be.bool,margin:Qn.spacing,size:be.oneOf(["small","medium","large"]),itemSpacing:be.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:be.func},ys=["children","as","delimiter","isUnstyled","margin","size","itemSpacing","elementRef"],Ns=["as","margin","isUnstyled","elementRef","styles"];var Ur,vr,$t,Ye;let Nt=(Ur=ta(Cs,ks),vr=na(),Ur($t=vr($t=(Ye=class extends te.Component{constructor(...t){super(...t),this.ref=null,this.handleRef=n=>{const r=this.props.elementRef;this.ref=n,typeof r=="function"&&r(n)}}componentDidMount(){var t,n;(t=(n=this.props).makeStyles)===null||t===void 0||t.call(n)}componentDidUpdate(){var t,n;(t=(n=this.props).makeStyles)===null||t===void 0||t.call(n)}renderChildren(){return te.Children.map(this.props.children,t=>{if(t)return _s(t,{isUnstyled:this.props.isUnstyled,delimiter:this.props.delimiter,size:this.props.size,spacing:this.props.itemSpacing})})}render(){const t=this.props,n=t.as,r=t.margin;t.isUnstyled,t.elementRef;const i=t.styles,u=ra(t,Ns);return ia(ua,Object.assign({},aa(u),{css:i==null?void 0:i.list,as:n,margin:r,elementRef:this.handleRef,display:"block"}),this.renderChildren())}},Ye.displayName="List",Ye.componentId="List",Ye.propTypes=Is,Ye.allowedProps=ys,Ye.defaultProps={as:"ul",delimiter:"none",isUnstyled:!1,size:"medium",itemSpacing:"none"},Ye.Item=sa,Ye))||$t)||$t);function zr(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,u=!1;for(;!u;){r===-1&&(r=n.length,u=!0);const a=n.slice(i,r).trim();(a||!u)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function oa(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const xs=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ss=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Rs={};function Yr(e,t){return(Rs.jsx?Ss:xs).test(e)}const Ls=/[ \t\n\f\r]/g;function Os(e){return typeof e=="object"?e.type==="text"?qr(e.value):!1:qr(e)}function qr(e){return e.replace(Ls,"")===""}class qt{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}qt.prototype.property={};qt.prototype.normal={};qt.prototype.space=null;function la(e,t){const n={},r={};let i=-1;for(;++i4&&n.slice(0,4)==="data"&&Bs.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(Vr,Us);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!Vr.test(u)){let a=u.replace(Fs,Hs);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=cr}return new i(r,t)}function Hs(e){return"-"+e.toLowerCase()}function Us(e){return e.charAt(1).toUpperCase()}const vs={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},jt=la([fa,ha,pa,_a,Ps],"html"),Xe=la([fa,ha,pa,_a,Ms],"svg");function Wr(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ea(e){return e.join(" ").trim()}var ga={},Xr=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,zs=/\n/g,Ys=/^\s*/,qs=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,js=/^:\s*/,Vs=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Ws=/^[;\s]*/,Xs=/^\s+|\s+$/g,Qs=` +const __vite__fileDeps=["assets/index-fv86SrDU.js","assets/index-CuKaSjpf.js","assets/index-C3XQCywa.js","assets/index-dyNilIOc.css","assets/RenderTopNavBar-D2dLV4g_.js","assets/index-ykr1wfg1.js","assets/index-BfwAAv1n.js","assets/index-D14ZWBB_.js","assets/index-B7tEZKBe.js","assets/IconRssLine-Cd1K2zy4.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +import{f as fs,P as be,T as Qn,w as ta,t as na,r as te,h as ra,i as ia,p as aa,V as ua,k as Br,l as ds,j as z,_ as ke,R as ms}from"./index-C3XQCywa.js";import{C as ps,s as _s}from"./RenderTopNavBar-D2dLV4g_.js";import{a as $e}from"./index-CuKaSjpf.js";const Es=(e,t)=>{const n=t.size,r=t.delimiter,i=t.spacing,u=r!=="none",a=i!=="none";fs(!(u&&a),"[List] `itemSpacing` has no effect inside Lists with the `delimiter` prop set to anything other than `none`.");const o={small:{fontSize:e.fontSizeSmall},medium:{fontSize:e.fontSizeMedium},large:{fontSize:e.fontSizeLarge}},l={"xxx-small":{marginTop:e.spacingXXXSmall,marginBottom:e.spacingXXXSmall},"xx-small":{marginTop:e.spacingXXSmall,marginBottom:e.spacingXXSmall},"x-small":{marginTop:e.spacingXSmall,marginBottom:e.spacingXSmall},small:{marginTop:e.spacingSmall,marginBottom:e.spacingSmall},medium:{marginTop:e.spacingMedium,marginBottom:e.spacingMedium},large:{marginTop:e.spacingLarge,marginBottom:e.spacingLarge},"x-large":{marginTop:e.spacingXLarge,marginBottom:e.spacingXLarge},"xx-large":{marginTop:e.spacingXXLarge,marginBottom:e.spacingXXLarge},none:{}},c={dashed:{listStylePosition:"inside","&:not(:first-of-type)":{borderTop:e.delimiterDashedBorder}},solid:{listStylePosition:"inside","&:not(:first-of-type)":{borderTop:e.delimiterSolidBorder}},none:{}};return{listItem:{label:"listItem",fontWeight:e.fontWeight,fontFamily:e.fontFamily,lineHeight:e.lineHeight,color:e.color,padding:0,...o[n],...a&&!u&&l[i],...u&&c[r],"&:first-of-type":{marginTop:"0"},"&:last-of-type":{marginBottom:"0"}}}},gs=e=>{const t=e.borders,n=e.colors,r=e.spacing,i=e.typography,u=e.key,a={canvas:{color:e["ic-brand-font-color-dark"]}};return{...{fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,lineHeight:i==null?void 0:i.lineHeight,fontSizeSmall:i==null?void 0:i.fontSizeSmall,fontSizeMedium:i==null?void 0:i.fontSizeMedium,fontSizeLarge:i==null?void 0:i.fontSizeLarge,color:n==null?void 0:n.textDarkest,spacingXXXSmall:r==null?void 0:r.xxxSmall,spacingXXSmall:r==null?void 0:r.xxSmall,spacingXSmall:r==null?void 0:r.xSmall,spacingSmall:r==null?void 0:r.small,spacingMedium:r==null?void 0:r.medium,spacingLarge:r==null?void 0:r.large,spacingXLarge:r==null?void 0:r.xLarge,spacingXXLarge:r==null?void 0:r.xxLarge,delimiterDashedBorder:`${t==null?void 0:t.widthSmall} dashed ${n==null?void 0:n.borderMedium}`,delimiterSolidBorder:`${t==null?void 0:t.widthSmall} solid ${n==null?void 0:n.borderMedium}`},...a[u]}},bs={children:be.oneOfType([be.node,be.func]).isRequired,delimiter:be.oneOf(["none","dashed","solid"]),size:be.oneOf(["small","medium","large"]),margin:Qn.spacing,padding:Qn.spacing,spacing:be.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:be.func},Ts=["children","delimiter","size","margin","padding","spacing","elementRef"],As=["delimiter","spacing","size","margin","padding","elementRef","children","styles"];var Fr,Hr,Kt,Je;let sa=(Fr=ta(Es,gs),Hr=na(),Fr(Kt=Hr(Kt=(Je=class extends te.Component{constructor(...t){super(...t),this.ref=null,this.handleRef=n=>{const r=this.props.elementRef;this.ref=n,typeof r=="function"&&r(n)}}componentDidMount(){var t,n;(t=(n=this.props).makeStyles)===null||t===void 0||t.call(n)}componentDidUpdate(){var t,n;(t=(n=this.props).makeStyles)===null||t===void 0||t.call(n)}render(){const t=this.props;t.delimiter,t.spacing,t.size;const n=t.margin,r=t.padding;t.elementRef;const i=t.children,u=t.styles,a=ra(t,As);return ia(ua,Object.assign({},aa(a),{css:u==null?void 0:u.listItem,as:"li",margin:n,padding:r,maxWidth:"100%",elementRef:this.handleRef}),i)}},Je.displayName="ListItem",Je.componentId="List.Item",Je.propTypes=bs,Je.allowedProps=Ts,Je.defaultProps={padding:"none",spacing:"none",delimiter:"none",size:"medium"},Je))||Kt)||Kt);const Cs=(e,t)=>{const n=t.isUnstyled,i=t.as==="ol";return{list:{label:"list",paddingInlineStart:e.listPadding,paddingInlineEnd:0,...i&&{listStyleType:"none",paddingInlineStart:`calc(${e.listPadding} / 2)`,paddingInlineEnd:0,counterReset:"ol-counter","&>li::before":{fontWeight:e.orderedNumberFontWeight,counterIncrement:"ol-counter",content:'counters(ol-counter, ".") "."',marginInlineEnd:e.orderedNumberMargin,marginInlineStart:0}},...n&&{listStyleType:"none",paddingInlineStart:0}}}},ks=e=>{const t=e.spacing,n=e.typography;return{...{listPadding:t==null?void 0:t.large,orderedNumberFontWeight:n==null?void 0:n.fontWeightBold,orderedNumberMargin:t==null?void 0:t.xSmall}}},Is={children:ps.oneOf([sa]),as:be.oneOf(["ul","ol"]),delimiter:be.oneOf(["none","dashed","solid"]),isUnstyled:be.bool,margin:Qn.spacing,size:be.oneOf(["small","medium","large"]),itemSpacing:be.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:be.func},ys=["children","as","delimiter","isUnstyled","margin","size","itemSpacing","elementRef"],Ns=["as","margin","isUnstyled","elementRef","styles"];var Ur,vr,$t,Ye;let Nt=(Ur=ta(Cs,ks),vr=na(),Ur($t=vr($t=(Ye=class extends te.Component{constructor(...t){super(...t),this.ref=null,this.handleRef=n=>{const r=this.props.elementRef;this.ref=n,typeof r=="function"&&r(n)}}componentDidMount(){var t,n;(t=(n=this.props).makeStyles)===null||t===void 0||t.call(n)}componentDidUpdate(){var t,n;(t=(n=this.props).makeStyles)===null||t===void 0||t.call(n)}renderChildren(){return te.Children.map(this.props.children,t=>{if(t)return _s(t,{isUnstyled:this.props.isUnstyled,delimiter:this.props.delimiter,size:this.props.size,spacing:this.props.itemSpacing})})}render(){const t=this.props,n=t.as,r=t.margin;t.isUnstyled,t.elementRef;const i=t.styles,u=ra(t,Ns);return ia(ua,Object.assign({},aa(u),{css:i==null?void 0:i.list,as:n,margin:r,elementRef:this.handleRef,display:"block"}),this.renderChildren())}},Ye.displayName="List",Ye.componentId="List",Ye.propTypes=Is,Ye.allowedProps=ys,Ye.defaultProps={as:"ul",delimiter:"none",isUnstyled:!1,size:"medium",itemSpacing:"none"},Ye.Item=sa,Ye))||$t)||$t);function zr(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,u=!1;for(;!u;){r===-1&&(r=n.length,u=!0);const a=n.slice(i,r).trim();(a||!u)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function oa(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const xs=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ss=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Rs={};function Yr(e,t){return(Rs.jsx?Ss:xs).test(e)}const Ls=/[ \t\n\f\r]/g;function Os(e){return typeof e=="object"?e.type==="text"?qr(e.value):!1:qr(e)}function qr(e){return e.replace(Ls,"")===""}class qt{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}qt.prototype.property={};qt.prototype.normal={};qt.prototype.space=null;function la(e,t){const n={},r={};let i=-1;for(;++i4&&n.slice(0,4)==="data"&&Bs.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(Vr,Us);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!Vr.test(u)){let a=u.replace(Fs,Hs);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=cr}return new i(r,t)}function Hs(e){return"-"+e.toLowerCase()}function Us(e){return e.charAt(1).toUpperCase()}const vs={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},jt=la([fa,ha,pa,_a,Ps],"html"),Xe=la([fa,ha,pa,_a,Ms],"svg");function Wr(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ea(e){return e.join(" ").trim()}var ga={},Xr=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,zs=/\n/g,Ys=/^\s*/,qs=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,js=/^:\s*/,Vs=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Ws=/^[;\s]*/,Xs=/^\s+|\s+$/g,Qs=` `,Qr="/",Gr="*",et="",Gs="comment",Ks="declaration",$s=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(T){var I=T.match(zs);I&&(n+=I.length);var R=T.lastIndexOf(Qs);r=~R?T.length-R:r+T.length}function u(){var T={line:n,column:r};return function(I){return I.position=new a(T),c(),I}}function a(T){this.start=T,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function o(T){var I=new Error(t.source+":"+n+":"+r+": "+T);if(I.reason=T,I.filename=t.source,I.line=n,I.column=r,I.source=e,!t.silent)throw I}function l(T){var I=T.exec(e);if(I){var R=I[0];return i(R),e=e.slice(R.length),I}}function c(){l(Ys)}function f(T){var I;for(T=T||[];I=h();)I!==!1&&T.push(I);return T}function h(){var T=u();if(!(Qr!=e.charAt(0)||Gr!=e.charAt(1))){for(var I=2;et!=e.charAt(I)&&(Gr!=e.charAt(I)||Qr!=e.charAt(I+1));)++I;if(I+=2,et===e.charAt(I-1))return o("End of comment missing");var R=e.slice(2,I-2);return r+=2,i(R),e=e.slice(I),r+=2,T({type:Gs,comment:R})}}function E(){var T=u(),I=l(qs);if(I){if(h(),!l(js))return o("property missing ':'");var R=l(Vs),y=T({type:Ks,property:Kr(I[0].replace(Xr,et)),value:R?Kr(R[0].replace(Xr,et)):et});return l(Ws),y}}function p(){var T=[];f(T);for(var I;I=E();)I!==!1&&(T.push(I),f(T));return T}return c(),p()};function Kr(e){return e?e.replace(Xs,et):et}var Js=Br&&Br.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ga,"__esModule",{value:!0});var Zs=Js($s);function eo(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,Zs.default)(e),i=typeof t=="function";return r.forEach(function(u){if(u.type==="declaration"){var a=u.property,o=u.value;i?t(a,o,u):o&&(n=n||{},n[a]=o)}}),n}var $r=ga.default=eo;const to=$r.default||$r,gn=ba("end"),Pe=ba("start");function ba(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function no(e){const t=Pe(e),n=gn(e);if(t&&n)return{start:t,end:n}}function wt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Jr(e.position):"start"in e||"end"in e?Jr(e):"line"in e||"column"in e?Kn(e):""}function Kn(e){return Zr(e&&e.line)+":"+Zr(e&&e.column)}function Jr(e){return Kn(e&&e.start)+"-"+Kn(e&&e.end)}function Zr(e){return e&&typeof e=="number"?e:1}class fe extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",u={},a=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u={...n}),typeof t=="string"?i=t:!u.cause&&t&&(a=!0,i=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?u.ruleId=r:(u.source=r.slice(0,l),u.ruleId=r.slice(l+1))}if(!u.place&&u.ancestors&&u.ancestors){const l=u.ancestors[u.ancestors.length-1];l&&(u.place=l.position)}const o=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=o?o.line:void 0,this.name=wt(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=a&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual,this.expected,this.note,this.url}}fe.prototype.file="";fe.prototype.name="";fe.prototype.reason="";fe.prototype.message="";fe.prototype.stack="";fe.prototype.column=void 0;fe.prototype.line=void 0;fe.prototype.ancestors=void 0;fe.prototype.cause=void 0;fe.prototype.fatal=void 0;fe.prototype.place=void 0;fe.prototype.ruleId=void 0;fe.prototype.source=void 0;const hr={}.hasOwnProperty,ro=new Map,io=/[A-Z]/g,ao=/-([a-z])/g,uo=new Set(["table","tbody","thead","tfoot","tr"]),so=new Set(["td","th"]),Ta="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function oo(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Eo(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=_o(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Xe:jt,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=Aa(i,e,void 0);return u&&typeof u!="string"?u:i.create(e,i.Fragment,{children:u||void 0},void 0)}function Aa(e,t,n){if(t.type==="element")return lo(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return co(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return fo(e,t,n);if(t.type==="mdxjsEsm")return ho(e,t);if(t.type==="root")return mo(e,t,n);if(t.type==="text")return po(e,t)}function lo(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Xe,e.schema=i),e.ancestors.push(t);const u=ka(e,t.tagName,!1),a=go(e,t);let o=dr(e,t);return uo.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!Os(l):!0})),Ca(e,a,u,t),fr(a,o),e.ancestors.pop(),e.schema=r,e.create(t,u,a,n)}function co(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}zt(e,t.position)}function ho(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);zt(e,t.position)}function fo(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Xe,e.schema=i),e.ancestors.push(t);const u=t.name===null?e.Fragment:ka(e,t.name,!0),a=bo(e,t),o=dr(e,t);return Ca(e,a,u,t),fr(a,o),e.ancestors.pop(),e.schema=r,e.create(t,u,a,n)}function mo(e,t,n){const r={};return fr(r,dr(e,t)),e.create(t,e.Fragment,r,n)}function po(e,t){return t.value}function Ca(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function fr(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function _o(e,t,n){return r;function r(i,u,a,o){const c=Array.isArray(a.children)?n:t;return o?c(u,a,o):c(u,a)}}function Eo(e,t){return n;function n(r,i,u,a){const o=Array.isArray(u.children),l=Pe(r);return t(i,u,a,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function go(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&hr.call(t.properties,i)){const u=To(e,i,t.properties[i]);if(u){const[a,o]=u;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&so.has(t.tagName)?r=o:n[a]=o}}if(r){const u=n.style||(n.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function bo(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const u=r.data.estree.body[0];u.type;const a=u.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else zt(e,t.position);else{const i=r.name;let u;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,u=e.evaluater.evaluateExpression(o.expression)}else zt(e,t.position);else u=r.value===null?!0:r.value;n[i]=u}return n}function dr(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:ro;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);u0?(Ce(e,e.length,0,t),e):t}const ni={}.hasOwnProperty;function ya(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Le(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const me=Qe(/[A-Za-z]/),he=Qe(/[\dA-Za-z]/),Lo=Qe(/[#-'*+\--9=?A-Z^-~]/);function hn(e){return e!==null&&(e<32||e===127)}const $n=Qe(/\d/),Oo=Qe(/[\dA-Fa-f]/),wo=Qe(/[!-/:-@[-`{-~]/);function F(e){return e!==null&&e<-2}function J(e){return e!==null&&(e<0||e===32)}function j(e){return e===-2||e===-1||e===32}const bn=Qe(new RegExp("\\p{P}|\\p{S}","u")),rt=Qe(/\s/);function Qe(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function bt(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&u<57344){const o=e.charCodeAt(n+1);u<56320&&o>56319&&o<57344?(a=String.fromCharCode(u,o),i=1):a="�"}else a=String.fromCharCode(u);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function X(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let u=0;return a;function a(l){return j(l)?(e.enter(n),o(l)):t(l)}function o(l){return j(l)&&u++a))return;const V=t.events.length;let ee=V,G,k;for(;ee--;)if(t.events[ee][0]==="exit"&&t.events[ee][1].type==="chunkFlow"){if(G){k=t.events[ee][1].end;break}G=!0}for(y(r),S=V;SD;){const U=n[H];t.containerState=U[1],U[0].exit.call(t,e)}n.length=D}function w(){i.write([null]),u=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Fo(e,t,n){return X(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function fn(e){if(e===null||J(e)||rt(e))return 1;if(bn(e))return 2}function Tn(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h=Object.assign({},e[r][1].end),E=Object.assign({},e[n][1].start);ii(h,-l),ii(E,l),a={type:l>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[r][1].end)},o={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:E},u={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},o.end)},e[r][1].end=Object.assign({},a.start),e[n][1].start=Object.assign({},o.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Ae(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Ae(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",u,t]]),c=Ae(c,Tn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Ae(c,[["exit",u,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=Ae(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Ce(e,r-1,n-r+3,c),n=r+c.length-f-2;break}}for(n=-1;++n0&&j(S)?X(e,w,"linePrefix",u+1)(S):w(S)}function w(S){return S===null||F(S)?e.check(ai,I,H)(S):(e.enter("codeFlowValue"),D(S))}function D(S){return S===null||F(S)?(e.exit("codeFlowValue"),w(S)):(e.consume(S),D)}function H(S){return e.exit("codeFenced"),t(S)}function U(S,V,ee){let G=0;return k;function k(Q){return S.enter("lineEnding"),S.consume(Q),S.exit("lineEnding"),M}function M(Q){return S.enter("codeFencedFence"),j(Q)?X(S,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):B(Q)}function B(Q){return Q===o?(S.enter("codeFencedFenceSequence"),K(Q)):ee(Q)}function K(Q){return Q===o?(G++,S.consume(Q),K):G>=a?(S.exit("codeFencedFenceSequence"),j(Q)?X(S,re,"whitespace")(Q):re(Q)):ee(Q)}function re(Q){return Q===null||F(Q)?(S.exit("codeFencedFence"),V(Q)):ee(Q)}}}function Go(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),u)}function u(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const On={name:"codeIndented",tokenize:$o},Ko={tokenize:Jo,partial:!0};function $o(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),X(e,u,"linePrefix",5)(c)}function u(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):F(c)?e.attempt(Ko,a,l)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||F(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),o)}function l(c){return e.exit("codeIndented"),t(c)}}function Jo(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):F(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):X(e,u,"linePrefix",5)(a)}function u(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):F(a)?i(a):n(a)}}const Zo={name:"codeText",tokenize:nl,resolve:el,previous:tl};function el(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&xt(this.left,r),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),xt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),xt(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Oa(e,t,n,r,i,u,a,o,l){const c=l||Number.POSITIVE_INFINITY;let f=0;return h;function h(y){return y===60?(e.enter(r),e.enter(i),e.enter(u),e.consume(y),e.exit(u),E):y===null||y===32||y===41||hn(y)?n(y):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),I(y))}function E(y){return y===62?(e.enter(u),e.consume(y),e.exit(u),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(o),E(y)):y===null||y===60||F(y)?n(y):(e.consume(y),y===92?T:p)}function T(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function I(y){return!f&&(y===null||y===41||J(y))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(y)):f999||p===null||p===91||p===93&&!l||p===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(u),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):F(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||F(p)||o++>999?(e.exit("chunkString"),f(p)):(e.consume(p),l||(l=!j(p)),p===92?E:h)}function E(p){return p===91||p===92||p===93?(e.consume(p),o++,h):h(p)}}function Da(e,t,n,r,i,u){let a;return o;function o(E){return E===34||E===39||E===40?(e.enter(r),e.enter(i),e.consume(E),e.exit(i),a=E===40?41:E,l):n(E)}function l(E){return E===a?(e.enter(i),e.consume(E),e.exit(i),e.exit(r),t):(e.enter(u),c(E))}function c(E){return E===a?(e.exit(u),l(a)):E===null?n(E):F(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),X(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(E))}function f(E){return E===a||E===null||F(E)?(e.exit("chunkString"),c(E)):(e.consume(E),E===92?h:f)}function h(E){return E===a||E===92?(e.consume(E),f):f(E)}}function Dt(e,t){let n;return r;function r(i){return F(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):j(i)?X(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const cl={name:"definition",tokenize:fl},hl={tokenize:dl,partial:!0};function fl(e,t,n){const r=this;let i;return u;function u(p){return e.enter("definition"),a(p)}function a(p){return wa.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function o(p){return i=Le(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return J(p)?Dt(e,c)(p):c(p)}function c(p){return Oa(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(hl,h,h)(p)}function h(p){return j(p)?X(e,E,"whitespace")(p):E(p)}function E(p){return p===null||F(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function dl(e,t,n){return r;function r(o){return J(o)?Dt(e,i)(o):n(o)}function i(o){return Da(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function u(o){return j(o)?X(e,a,"whitespace")(o):a(o)}function a(o){return o===null||F(o)?t(o):n(o)}}const ml={name:"hardBreakEscape",tokenize:pl};function pl(e,t,n){return r;function r(u){return e.enter("hardBreakEscape"),e.consume(u),i}function i(u){return F(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const _l={name:"headingAtx",tokenize:gl,resolve:El};function El(e,t){let n=e.length-2,r=3,i,u;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},u={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ce(e,r,n-r+1,[["enter",i,t],["enter",u,t],["exit",u,t],["exit",i,t]])),e}function gl(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),u(f)}function u(f){return e.enter("atxHeadingSequence"),a(f)}function a(f){return f===35&&r++<6?(e.consume(f),a):f===null||J(f)?(e.exit("atxHeadingSequence"),o(f)):n(f)}function o(f){return f===35?(e.enter("atxHeadingSequence"),l(f)):f===null||F(f)?(e.exit("atxHeading"),t(f)):j(f)?X(e,o,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function l(f){return f===35?(e.consume(f),l):(e.exit("atxHeadingSequence"),o(f))}function c(f){return f===null||f===35||J(f)?(e.exit("atxHeadingText"),o(f)):(e.consume(f),c)}}const bl=["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","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],si=["pre","script","style","textarea"],Tl={name:"htmlFlow",tokenize:Il,resolveTo:kl,concrete:!0},Al={tokenize:Nl,partial:!0},Cl={tokenize:yl,partial:!0};function kl(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Il(e,t,n){const r=this;let i,u,a,o,l;return c;function c(b){return f(b)}function f(b){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(b),h}function h(b){return b===33?(e.consume(b),E):b===47?(e.consume(b),u=!0,I):b===63?(e.consume(b),i=3,r.interrupt?t:g):me(b)?(e.consume(b),a=String.fromCharCode(b),R):n(b)}function E(b){return b===45?(e.consume(b),i=2,p):b===91?(e.consume(b),i=5,o=0,T):me(b)?(e.consume(b),i=4,r.interrupt?t:g):n(b)}function p(b){return b===45?(e.consume(b),r.interrupt?t:g):n(b)}function T(b){const xe="CDATA[";return b===xe.charCodeAt(o++)?(e.consume(b),o===xe.length?r.interrupt?t:B:T):n(b)}function I(b){return me(b)?(e.consume(b),a=String.fromCharCode(b),R):n(b)}function R(b){if(b===null||b===47||b===62||J(b)){const xe=b===47,Ge=a.toLowerCase();return!xe&&!u&&si.includes(Ge)?(i=1,r.interrupt?t(b):B(b)):bl.includes(a.toLowerCase())?(i=6,xe?(e.consume(b),y):r.interrupt?t(b):B(b)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(b):u?w(b):D(b))}return b===45||he(b)?(e.consume(b),a+=String.fromCharCode(b),R):n(b)}function y(b){return b===62?(e.consume(b),r.interrupt?t:B):n(b)}function w(b){return j(b)?(e.consume(b),w):k(b)}function D(b){return b===47?(e.consume(b),k):b===58||b===95||me(b)?(e.consume(b),H):j(b)?(e.consume(b),D):k(b)}function H(b){return b===45||b===46||b===58||b===95||he(b)?(e.consume(b),H):U(b)}function U(b){return b===61?(e.consume(b),S):j(b)?(e.consume(b),U):D(b)}function S(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),l=b,V):j(b)?(e.consume(b),S):ee(b)}function V(b){return b===l?(e.consume(b),l=null,G):b===null||F(b)?n(b):(e.consume(b),V)}function ee(b){return b===null||b===34||b===39||b===47||b===60||b===61||b===62||b===96||J(b)?U(b):(e.consume(b),ee)}function G(b){return b===47||b===62||j(b)?D(b):n(b)}function k(b){return b===62?(e.consume(b),M):n(b)}function M(b){return b===null||F(b)?B(b):j(b)?(e.consume(b),M):n(b)}function B(b){return b===45&&i===2?(e.consume(b),ce):b===60&&i===1?(e.consume(b),oe):b===62&&i===4?(e.consume(b),Ne):b===63&&i===3?(e.consume(b),g):b===93&&i===5?(e.consume(b),Be):F(b)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Al,Fe,K)(b)):b===null||F(b)?(e.exit("htmlFlowData"),K(b)):(e.consume(b),B)}function K(b){return e.check(Cl,re,Fe)(b)}function re(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Q}function Q(b){return b===null||F(b)?K(b):(e.enter("htmlFlowData"),B(b))}function ce(b){return b===45?(e.consume(b),g):B(b)}function oe(b){return b===47?(e.consume(b),a="",ye):B(b)}function ye(b){if(b===62){const xe=a.toLowerCase();return si.includes(xe)?(e.consume(b),Ne):B(b)}return me(b)&&a.length<8?(e.consume(b),a+=String.fromCharCode(b),ye):B(b)}function Be(b){return b===93?(e.consume(b),g):B(b)}function g(b){return b===62?(e.consume(b),Ne):b===45&&i===2?(e.consume(b),g):B(b)}function Ne(b){return b===null||F(b)?(e.exit("htmlFlowData"),Fe(b)):(e.consume(b),Ne)}function Fe(b){return e.exit("htmlFlow"),t(b)}}function yl(e,t,n){const r=this;return i;function i(a){return F(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),u):n(a)}function u(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function Nl(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Vt,t,n)}}const xl={name:"htmlText",tokenize:Sl};function Sl(e,t,n){const r=this;let i,u,a;return o;function o(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),l}function l(g){return g===33?(e.consume(g),c):g===47?(e.consume(g),U):g===63?(e.consume(g),D):me(g)?(e.consume(g),ee):n(g)}function c(g){return g===45?(e.consume(g),f):g===91?(e.consume(g),u=0,T):me(g)?(e.consume(g),w):n(g)}function f(g){return g===45?(e.consume(g),p):n(g)}function h(g){return g===null?n(g):g===45?(e.consume(g),E):F(g)?(a=h,oe(g)):(e.consume(g),h)}function E(g){return g===45?(e.consume(g),p):h(g)}function p(g){return g===62?ce(g):g===45?E(g):h(g)}function T(g){const Ne="CDATA[";return g===Ne.charCodeAt(u++)?(e.consume(g),u===Ne.length?I:T):n(g)}function I(g){return g===null?n(g):g===93?(e.consume(g),R):F(g)?(a=I,oe(g)):(e.consume(g),I)}function R(g){return g===93?(e.consume(g),y):I(g)}function y(g){return g===62?ce(g):g===93?(e.consume(g),y):I(g)}function w(g){return g===null||g===62?ce(g):F(g)?(a=w,oe(g)):(e.consume(g),w)}function D(g){return g===null?n(g):g===63?(e.consume(g),H):F(g)?(a=D,oe(g)):(e.consume(g),D)}function H(g){return g===62?ce(g):D(g)}function U(g){return me(g)?(e.consume(g),S):n(g)}function S(g){return g===45||he(g)?(e.consume(g),S):V(g)}function V(g){return F(g)?(a=V,oe(g)):j(g)?(e.consume(g),V):ce(g)}function ee(g){return g===45||he(g)?(e.consume(g),ee):g===47||g===62||J(g)?G(g):n(g)}function G(g){return g===47?(e.consume(g),ce):g===58||g===95||me(g)?(e.consume(g),k):F(g)?(a=G,oe(g)):j(g)?(e.consume(g),G):ce(g)}function k(g){return g===45||g===46||g===58||g===95||he(g)?(e.consume(g),k):M(g)}function M(g){return g===61?(e.consume(g),B):F(g)?(a=M,oe(g)):j(g)?(e.consume(g),M):G(g)}function B(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,K):F(g)?(a=B,oe(g)):j(g)?(e.consume(g),B):(e.consume(g),re)}function K(g){return g===i?(e.consume(g),i=void 0,Q):g===null?n(g):F(g)?(a=K,oe(g)):(e.consume(g),K)}function re(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||J(g)?G(g):(e.consume(g),re)}function Q(g){return g===47||g===62||J(g)?G(g):n(g)}function ce(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function oe(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),ye}function ye(g){return j(g)?X(e,Be,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):Be(g)}function Be(g){return e.enter("htmlTextData"),a(g)}}const _r={name:"labelEnd",tokenize:Pl,resolveTo:Dl,resolveAll:wl},Rl={tokenize:Ml},Ll={tokenize:Bl},Ol={tokenize:Fl};function wl(e){let t=-1;for(;++t=3&&(c===null||F(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),j(c)?X(e,o,"whitespace")(c):o(c))}}const _e={name:"list",tokenize:Wl,continuation:{tokenize:Xl},exit:Gl},jl={tokenize:Kl,partial:!0},Vl={tokenize:Ql,partial:!0};function Wl(e,t,n){const r=this,i=r.events[r.events.length-1];let u=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(p){const T=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(T==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:$n(p)){if(r.containerState.type||(r.containerState.type=T,e.enter(T,{_container:!0})),T==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(sn,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return $n(p)&&++a<10?(e.consume(p),l):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Vt,r.interrupt?n:f,e.attempt(jl,E,h))}function f(p){return r.containerState.initialBlankLine=!0,u++,E(p)}function h(p){return j(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),E):n(p)}function E(p){return r.containerState.size=u+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Xl(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Vt,i,u);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,X(e,t,"listItemIndent",r.containerState.size+1)(o)}function u(o){return r.containerState.furtherBlankLines||!j(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Vl,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,X(e,e.attempt(_e,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Ql(e,t,n){const r=this;return X(e,i,"listItemIndent",r.containerState.size+1);function i(u){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(u):n(u)}}function Gl(e){e.exit(this.containerState.type)}function Kl(e,t,n){const r=this;return X(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(u){const a=r.events[r.events.length-1];return!j(u)&&a&&a[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const oi={name:"setextUnderline",tokenize:Jl,resolveTo:$l};function $l(e,t){let n=e.length,r,i,u;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!u&&e[n][1].type==="definition"&&(u=n);const a={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",u?(e.splice(i,0,["enter",a,t]),e.splice(u+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[u][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function Jl(e,t,n){const r=this;let i;return u;function u(c){let f=r.events.length,h;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){h=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),j(c)?X(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||F(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Zl={tokenize:ec};function ec(e){const t=this,n=e.attempt(Vt,r,e.attempt(this.parser.constructs.flowInitial,i,X(e,e.attempt(this.parser.constructs.flow,i,e.attempt(al,i)),"linePrefix")));return n;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const tc={resolveAll:Ma()},nc=Pa("string"),rc=Pa("text");function Pa(e){return{tokenize:t,resolveAll:Ma(e==="text"?ic:void 0)};function t(n){const r=this,i=this.parser.constructs[e],u=n.attempt(i,a,o);return a;function a(f){return c(f)?u(f):o(f)}function o(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),l}function l(f){return c(f)?(n.exit("data"),u(f)):(n.consume(f),l)}function c(f){if(f===null)return!0;const h=i[f];let E=-1;if(h)for(;++E-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}u>0&&a.push(e[i].slice(0,u))}return a}function sc(e,t){let n=-1;const r=[];let i;for(;++n0){const Se=v.tokenStack[v.tokenStack.length-1];(Se[1]||ci).call(v,void 0,Se[0])}for(P.position={start:qe(x.length>0?x[0][1].start:{line:1,column:1,offset:0}),end:qe(x.length>0?x[x.length-2][1].end:{line:1,column:1,offset:0})},$=-1;++$",...l.current()})),c+=l.move(">")):(o=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=n.enter(`title${u}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),o()),c+=l.move(")"),a(),c}function np(){return"!"}zu.peek=rp;function zu(e,t,n,r){const i=e.referenceType,u=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("![");const c=n.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const h=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=f,u(),i==="full"||!c||c!==h?l+=o.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function rp(){return"!"}Yu.peek=ip;function Yu(e,t,n){let r=e.value||"",i="`",u=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++u\u007F]/.test(e.url))}ju.peek=ap;function ju(e,t,n,r){const i=Sr(n),u=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let o,l;if(qu(e,n)){const f=n.stack;n.stack=[],o=n.enter("autolink");let h=a.move("<");return h+=a.move(n.containerPhrasing(e,{before:h,after:">",...a.current()})),h+=a.move(">"),o(),n.stack=f,h}o=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${u}`),c+=a.move(" "+i),c+=a.move(n.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),c+=a.move(")"),o(),c}function ap(e,t,n){return qu(e,n)?"<":"["}Vu.peek=up;function Vu(e,t,n,r){const i=e.referenceType,u=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const h=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=f,u(),i==="full"||!c||c!==h?l+=o.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function up(){return"["}function Rr(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function sp(e){const t=Rr(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function op(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Wu(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function lp(e,t,n,r){const i=n.enter("list"),u=n.bulletCurrent;let a=e.ordered?op(n):Rr(n);const o=e.ordered?a==="."?")":".":sp(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Wu(n)===a&&f){let h=-1;for(;++h-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+u);let a=u.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=n.createTracker(r);o.move(u+" ".repeat(a-u.length)),o.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,o.current()),f);return l(),c;function f(h,E,p){return E?(p?"":" ".repeat(a))+h:(p?u:u+" ".repeat(a-u.length))+h}}function fp(e,t,n,r){const i=n.enter("paragraph"),u=n.enter("phrasing"),a=n.containerPhrasing(e,r);return u(),i(),a}const dp=Cn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function mp(e,t,n,r){return(e.children.some(function(a){return dp(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function pp(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Xu.peek=_p;function Xu(e,t,n,r){const i=pp(n),u=n.enter("strong"),a=n.createTracker(r);let o=a.move(i+i);return o+=a.move(n.containerPhrasing(e,{before:o,after:i,...a.current()})),o+=a.move(i+i),u(),o}function _p(e,t,n){return n.options.strong||"*"}function Ep(e,t,n,r){return n.safe(e.value,r)}function gp(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function bp(e,t,n){const r=(Wu(n)+(n.options.ruleSpaces?" ":"")).repeat(gp(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Qu={blockquote:Ym,break:Ki,code:Qm,definition:Km,emphasis:Hu,hardBreak:Ki,heading:ep,html:Uu,image:vu,imageReference:zu,inlineCode:Yu,link:ju,linkReference:Vu,list:lp,listItem:hp,paragraph:fp,root:mp,strong:Xu,text:Ep,thematicBreak:bp};function Tp(){return{enter:{table:Ap,tableData:$i,tableHeader:$i,tableRow:kp},exit:{codeText:Ip,table:Cp,tableData:Xn,tableHeader:Xn,tableRow:Xn}}}function Ap(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Cp(e){this.exit(e),this.data.inTable=void 0}function kp(e){this.enter({type:"tableRow",children:[]},e)}function Xn(e){this.exit(e)}function $i(e){this.enter({type:"tableCell",children:[]},e)}function Ip(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,yp));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function yp(e,t){return t==="|"?t:e}function Np(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,u=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:E,table:a,tableCell:l,tableRow:o}};function a(p,T,I,R){return c(f(p,I,R),p.align)}function o(p,T,I,R){const y=h(p,I,R),w=c([y]);return w.slice(0,w.indexOf(` -`))}function l(p,T,I,R){const y=I.enter("tableCell"),w=I.enter("phrasing"),D=I.containerPhrasing(p,{...R,before:u,after:u});return w(),y(),D}function c(p,T){return Um(p,{align:T,alignDelimiters:r,padding:n,stringLength:i})}function f(p,T,I){const R=p.children;let y=-1;const w=[],D=T.enter("table");for(;++y0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const jp={tokenize:Jp,partial:!0};function Vp(){return{document:{91:{tokenize:Gp,continuation:{tokenize:Kp},exit:$p}},text:{91:{tokenize:Qp},93:{add:"after",tokenize:Wp,resolveTo:Xp}}}}function Wp(e,t,n){const r=this;let i=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return n(l);const c=Le(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!u.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Xp(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",u,t],["enter",a,t],["exit",a,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function Qp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,a;return o;function o(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(h){if(u>999||h===93&&!a||h===null||h===91||J(h))return n(h);if(h===93){e.exit("chunkString");const E=e.exit("gfmFootnoteCallString");return i.includes(Le(r.sliceSerialize(E)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return J(h)||(a=!0),u++,e.consume(h),h===92?f:c}function f(h){return h===91||h===92||h===93?(e.consume(h),u++,c):c(h)}}function Gp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,a=0,o;return l;function l(T){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(T){return T===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(T)}function f(T){if(a>999||T===93&&!o||T===null||T===91||J(T))return n(T);if(T===93){e.exit("chunkString");const I=e.exit("gfmFootnoteDefinitionLabelString");return u=Le(r.sliceSerialize(I)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),E}return J(T)||(o=!0),a++,e.consume(T),T===92?h:f}function h(T){return T===91||T===92||T===93?(e.consume(T),a++,f):f(T)}function E(T){return T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),i.includes(u)||i.push(u),X(e,p,"gfmFootnoteDefinitionWhitespace")):n(T)}function p(T){return t(T)}}function Kp(e,t,n){return e.check(Vt,t,e.attempt(jp,t,n))}function $p(e){e.exit("gfmFootnoteDefinition")}function Jp(e,t,n){const r=this;return X(e,i,"gfmFootnoteDefinitionIndent",5);function i(u){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(u):n(u)}}function Zp(e){let n=(e||{}).singleTilde;const r={tokenize:u,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){let l=-1;for(;++l1?l(T):(a.consume(T),h++,p);if(h<2&&!n)return l(T);const R=a.exit("strikethroughSequenceTemporary"),y=fn(T);return R._open=!y||y===2&&!!I,R._close=!I||I===2&&!!y,o(T)}}}class e1{constructor(){this.map=[]}add(t,n,r){t1(this,t,n,r)}consume(t){if(this.map.sort(function(u,a){return u[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function t1(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i-1;){const re=r.events[M][1].type;if(re==="lineEnding"||re==="linePrefix")M--;else break}const B=M>-1?r.events[M][1].type:null,K=B==="tableHead"||B==="tableRow"?S:l;return K===S&&r.parser.lazy[r.now().line]?n(k):K(k)}function l(k){return e.enter("tableHead"),e.enter("tableRow"),c(k)}function c(k){return k===124||(a=!0,u+=1),f(k)}function f(k){return k===null?n(k):F(k)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),p):n(k):j(k)?X(e,f,"whitespace")(k):(u+=1,a&&(a=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),a=!0,f):(e.enter("data"),h(k)))}function h(k){return k===null||k===124||J(k)?(e.exit("data"),f(k)):(e.consume(k),k===92?E:h)}function E(k){return k===92||k===124?(e.consume(k),h):h(k)}function p(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),a=!1,j(k)?X(e,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):T(k))}function T(k){return k===45||k===58?R(k):k===124?(a=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),I):U(k)}function I(k){return j(k)?X(e,R,"whitespace")(k):R(k)}function R(k){return k===58?(u+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),y):k===45?(u+=1,y(k)):k===null||F(k)?H(k):U(k)}function y(k){return k===45?(e.enter("tableDelimiterFiller"),w(k)):U(k)}function w(k){return k===45?(e.consume(k),w):k===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),D):(e.exit("tableDelimiterFiller"),D(k))}function D(k){return j(k)?X(e,H,"whitespace")(k):H(k)}function H(k){return k===124?T(k):k===null||F(k)?!a||i!==u?U(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):U(k)}function U(k){return n(k)}function S(k){return e.enter("tableRow"),V(k)}function V(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),V):k===null||F(k)?(e.exit("tableRow"),t(k)):j(k)?X(e,V,"whitespace")(k):(e.enter("data"),ee(k))}function ee(k){return k===null||k===124||J(k)?(e.exit("data"),V(k)):(e.consume(k),k===92?G:ee)}function G(k){return k===92||k===124?(e.consume(k),ee):ee(k)}}function a1(e,t){let n=-1,r=!0,i=0,u=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,c,f,h;const E=new e1;for(;++nn[2]+1){const T=n[2]+1,I=n[3]-n[2]-1;e.add(T,I,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(u.end=Object.assign({},dt(t.events,i)),e.add(i,0,[["exit",u,t]]),u=void 0),u}function Zi(e,t,n,r,i){const u=[],a=dt(t.events,n);i&&(i.end=Object.assign({},a),u.push(["exit",i,t])),r.end=Object.assign({},a),u.push(["exit",r,t]),e.add(n+1,0,u)}function dt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const u1={tokenize:o1};function s1(){return{text:{91:u1}}}function o1(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),u)}function u(l){return J(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(l)}function o(l){return F(l)?t(l):j(l)?e.check({tokenize:l1},t,n)(l):n(l)}}function l1(e,t,n){return X(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function c1(e){return ya([Mp(),Vp(),Zp(e),r1(),s1()])}const h1={};function R1(e){const t=this,n=e||h1,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(c1(n)),u.push(Op()),a.push(wp(n))}const L1=["strong","summary","blockquote","details","table","tbody","thead","h1","h2","h3","h4","h5","h6","input","ul","li","div","pre","ul","ol","li","br","em","hr","td","th","tr","a","img","p","del","span","code","button"],f1=te.lazy(()=>ke(()=>import("./index-Bj2M0RvR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.Alert}))),d1=te.lazy(()=>ke(()=>import("./index-Bj2M0RvR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.Avatar}))),m1=te.lazy(()=>ke(()=>import("./index-Bj2M0RvR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.Button}))),p1=te.lazy(()=>ke(()=>import("./index-Bj2M0RvR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.Byline}))),_1=te.lazy(()=>ke(()=>import("./index-Bj2M0RvR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.Checkbox}))),ct=te.lazy(()=>ke(()=>import("./index-Bj2M0RvR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.Heading}))),E1=te.lazy(()=>ke(()=>import("./index-Bj2M0RvR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.Img}))),g1=te.lazy(()=>ke(()=>import("./index-Bj2M0RvR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.Link}))),b1=te.lazy(()=>ke(()=>import("./index-Bj2M0RvR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.SourceCodeEditor}))),ht=te.lazy(()=>ke(()=>import("./index-Bj2M0RvR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.Text}))),T1=te.lazy(()=>ke(()=>import("./index-Bj2M0RvR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.ToggleDetails}))),an=te.lazy(()=>ke(()=>import("./index-Bj2M0RvR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.View}))),un=e=>te.Children.map(e.children,t=>typeof t!="string"?t:null),ea=e=>{var t,n;return((n=(t=e==null?void 0:e.style)==null?void 0:t.textAlign)==null?void 0:n.replace(/\b(left|right)\b/,r=>r==="left"?"start":"end"))??"start"},O1={hr:({node:e,...t})=>z.jsx(an,{as:e==null?void 0:e.tagName,shadow:"topmost",borderWidth:"small",margin:"small none",padding:"none",borderColor:"primary",...t}),a:({node:e,...t})=>z.jsx(g1,{to:e.href,...t}),button:({node:e,...t})=>z.jsx(m1,{withBackground:!1,...t}),p:({node:e,...t})=>z.jsx(ht,{as:e.tagName,...t}),em:({node:e,...t})=>z.jsx(ht,{fontStyle:"italic",...t}),strong:({node:e,...t})=>z.jsx(ht,{weight:"bold",...t}),span:({node:e,...t})=>z.jsx(ht,{as:e.tagName,...t}),code:({node:e,...t})=>z.jsx(ht,{as:e.tagName,...t}),del:({node:e,...t})=>z.jsx(ht,{as:e.tagName,...t}),blockquote:({node:e,...t})=>{t={...t,children:un(t)};const n=/\[\!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/,r={NOTE:"info",TIP:"success",IMPORTANT:"info",WARNING:"warning",CAUTION:"error"},i=te.Children.toArray(t.children)[0];let u,a;ms.isValidElement(i)?[u,a]=i.props.children.split("--",2):[u,a]=i.toString().split("--",2);const o=u.match(n);return o?z.jsx(f1,{variant:r[o[1]],children:u.replace(`${o[0]}`,"")}):z.jsx(p1,{description:u,title:a,margin:"medium 0",...t,children:a?z.jsx(d1,{name:a}):z.jsx(z.Fragment,{})})},h1:({node:e,...t})=>z.jsx(ct,{margin:"none none medium",level:e.tagName,...t}),h2:({node:e,...t})=>z.jsx(ct,{margin:"small none",level:e.tagName,...t}),h3:({node:e,...t})=>z.jsx(ct,{margin:"small none",level:e.tagName,...t}),h4:({node:e,...t})=>z.jsx(ct,{level:e.tagName,...t}),h5:({node:e,...t})=>z.jsx(ct,{level:e.tagName,...t}),h6:({node:e,...t})=>z.jsx(ct,{as:"h6",...t}),img:({node:e,...t})=>z.jsx(E1,{src:e.src,...t}),div:({node:e,...t})=>z.jsx(an,{as:e.tagName,...t}),pre:({node:e,...t})=>{if(e.children.length===1&&e.children[0].tagName==="code"){let n=e.children[0].children[0].value;return n.endsWith(` +`))}function l(p,T,I,R){const y=I.enter("tableCell"),w=I.enter("phrasing"),D=I.containerPhrasing(p,{...R,before:u,after:u});return w(),y(),D}function c(p,T){return Um(p,{align:T,alignDelimiters:r,padding:n,stringLength:i})}function f(p,T,I){const R=p.children;let y=-1;const w=[],D=T.enter("table");for(;++y0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const jp={tokenize:Jp,partial:!0};function Vp(){return{document:{91:{tokenize:Gp,continuation:{tokenize:Kp},exit:$p}},text:{91:{tokenize:Qp},93:{add:"after",tokenize:Wp,resolveTo:Xp}}}}function Wp(e,t,n){const r=this;let i=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return n(l);const c=Le(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!u.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Xp(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",u,t],["enter",a,t],["exit",a,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function Qp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,a;return o;function o(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(h){if(u>999||h===93&&!a||h===null||h===91||J(h))return n(h);if(h===93){e.exit("chunkString");const E=e.exit("gfmFootnoteCallString");return i.includes(Le(r.sliceSerialize(E)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return J(h)||(a=!0),u++,e.consume(h),h===92?f:c}function f(h){return h===91||h===92||h===93?(e.consume(h),u++,c):c(h)}}function Gp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,a=0,o;return l;function l(T){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(T){return T===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(T)}function f(T){if(a>999||T===93&&!o||T===null||T===91||J(T))return n(T);if(T===93){e.exit("chunkString");const I=e.exit("gfmFootnoteDefinitionLabelString");return u=Le(r.sliceSerialize(I)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),E}return J(T)||(o=!0),a++,e.consume(T),T===92?h:f}function h(T){return T===91||T===92||T===93?(e.consume(T),a++,f):f(T)}function E(T){return T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),i.includes(u)||i.push(u),X(e,p,"gfmFootnoteDefinitionWhitespace")):n(T)}function p(T){return t(T)}}function Kp(e,t,n){return e.check(Vt,t,e.attempt(jp,t,n))}function $p(e){e.exit("gfmFootnoteDefinition")}function Jp(e,t,n){const r=this;return X(e,i,"gfmFootnoteDefinitionIndent",5);function i(u){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(u):n(u)}}function Zp(e){let n=(e||{}).singleTilde;const r={tokenize:u,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){let l=-1;for(;++l1?l(T):(a.consume(T),h++,p);if(h<2&&!n)return l(T);const R=a.exit("strikethroughSequenceTemporary"),y=fn(T);return R._open=!y||y===2&&!!I,R._close=!I||I===2&&!!y,o(T)}}}class e1{constructor(){this.map=[]}add(t,n,r){t1(this,t,n,r)}consume(t){if(this.map.sort(function(u,a){return u[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function t1(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i-1;){const re=r.events[M][1].type;if(re==="lineEnding"||re==="linePrefix")M--;else break}const B=M>-1?r.events[M][1].type:null,K=B==="tableHead"||B==="tableRow"?S:l;return K===S&&r.parser.lazy[r.now().line]?n(k):K(k)}function l(k){return e.enter("tableHead"),e.enter("tableRow"),c(k)}function c(k){return k===124||(a=!0,u+=1),f(k)}function f(k){return k===null?n(k):F(k)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),p):n(k):j(k)?X(e,f,"whitespace")(k):(u+=1,a&&(a=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),a=!0,f):(e.enter("data"),h(k)))}function h(k){return k===null||k===124||J(k)?(e.exit("data"),f(k)):(e.consume(k),k===92?E:h)}function E(k){return k===92||k===124?(e.consume(k),h):h(k)}function p(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),a=!1,j(k)?X(e,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):T(k))}function T(k){return k===45||k===58?R(k):k===124?(a=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),I):U(k)}function I(k){return j(k)?X(e,R,"whitespace")(k):R(k)}function R(k){return k===58?(u+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),y):k===45?(u+=1,y(k)):k===null||F(k)?H(k):U(k)}function y(k){return k===45?(e.enter("tableDelimiterFiller"),w(k)):U(k)}function w(k){return k===45?(e.consume(k),w):k===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),D):(e.exit("tableDelimiterFiller"),D(k))}function D(k){return j(k)?X(e,H,"whitespace")(k):H(k)}function H(k){return k===124?T(k):k===null||F(k)?!a||i!==u?U(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):U(k)}function U(k){return n(k)}function S(k){return e.enter("tableRow"),V(k)}function V(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),V):k===null||F(k)?(e.exit("tableRow"),t(k)):j(k)?X(e,V,"whitespace")(k):(e.enter("data"),ee(k))}function ee(k){return k===null||k===124||J(k)?(e.exit("data"),V(k)):(e.consume(k),k===92?G:ee)}function G(k){return k===92||k===124?(e.consume(k),ee):ee(k)}}function a1(e,t){let n=-1,r=!0,i=0,u=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,c,f,h;const E=new e1;for(;++nn[2]+1){const T=n[2]+1,I=n[3]-n[2]-1;e.add(T,I,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(u.end=Object.assign({},dt(t.events,i)),e.add(i,0,[["exit",u,t]]),u=void 0),u}function Zi(e,t,n,r,i){const u=[],a=dt(t.events,n);i&&(i.end=Object.assign({},a),u.push(["exit",i,t])),r.end=Object.assign({},a),u.push(["exit",r,t]),e.add(n+1,0,u)}function dt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const u1={tokenize:o1};function s1(){return{text:{91:u1}}}function o1(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),u)}function u(l){return J(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(l)}function o(l){return F(l)?t(l):j(l)?e.check({tokenize:l1},t,n)(l):n(l)}}function l1(e,t,n){return X(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function c1(e){return ya([Mp(),Vp(),Zp(e),r1(),s1()])}const h1={};function R1(e){const t=this,n=e||h1,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(c1(n)),u.push(Op()),a.push(wp(n))}const L1=["strong","summary","blockquote","details","table","tbody","thead","h1","h2","h3","h4","h5","h6","input","ul","li","div","pre","ul","ol","li","br","em","hr","td","th","tr","a","img","p","del","span","code","button"],f1=te.lazy(()=>ke(()=>import("./index-fv86SrDU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.Alert}))),d1=te.lazy(()=>ke(()=>import("./index-fv86SrDU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.Avatar}))),m1=te.lazy(()=>ke(()=>import("./index-fv86SrDU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.Button}))),p1=te.lazy(()=>ke(()=>import("./index-fv86SrDU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.Byline}))),_1=te.lazy(()=>ke(()=>import("./index-fv86SrDU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.Checkbox}))),ct=te.lazy(()=>ke(()=>import("./index-fv86SrDU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.Heading}))),E1=te.lazy(()=>ke(()=>import("./index-fv86SrDU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.Img}))),g1=te.lazy(()=>ke(()=>import("./index-fv86SrDU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.Link}))),b1=te.lazy(()=>ke(()=>import("./index-fv86SrDU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.SourceCodeEditor}))),ht=te.lazy(()=>ke(()=>import("./index-fv86SrDU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.Text}))),T1=te.lazy(()=>ke(()=>import("./index-fv86SrDU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.ToggleDetails}))),an=te.lazy(()=>ke(()=>import("./index-fv86SrDU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.View}))),un=e=>te.Children.map(e.children,t=>typeof t!="string"?t:null),ea=e=>{var t,n;return((n=(t=e==null?void 0:e.style)==null?void 0:t.textAlign)==null?void 0:n.replace(/\b(left|right)\b/,r=>r==="left"?"start":"end"))??"start"},O1={hr:({node:e,...t})=>z.jsx(an,{as:e==null?void 0:e.tagName,shadow:"topmost",borderWidth:"small",margin:"small none",padding:"none",borderColor:"primary",...t}),a:({node:e,...t})=>z.jsx(g1,{to:e.href,...t}),button:({node:e,...t})=>z.jsx(m1,{withBackground:!1,...t}),p:({node:e,...t})=>z.jsx(ht,{as:e.tagName,...t}),em:({node:e,...t})=>z.jsx(ht,{fontStyle:"italic",...t}),strong:({node:e,...t})=>z.jsx(ht,{weight:"bold",...t}),span:({node:e,...t})=>z.jsx(ht,{as:e.tagName,...t}),code:({node:e,...t})=>z.jsx(ht,{as:e.tagName,...t}),del:({node:e,...t})=>z.jsx(ht,{as:e.tagName,...t}),blockquote:({node:e,...t})=>{t={...t,children:un(t)};const n=/\[\!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/,r={NOTE:"info",TIP:"success",IMPORTANT:"info",WARNING:"warning",CAUTION:"error"},i=te.Children.toArray(t.children)[0];let u,a;ms.isValidElement(i)?[u,a]=i.props.children.split("--",2):[u,a]=i.toString().split("--",2);const o=u.match(n);return o?z.jsx(f1,{variant:r[o[1]],children:u.replace(`${o[0]}`,"")}):z.jsx(p1,{description:u,title:a,margin:"medium 0",...t,children:a?z.jsx(d1,{name:a}):z.jsx(z.Fragment,{})})},h1:({node:e,...t})=>z.jsx(ct,{margin:"none none medium",level:e.tagName,...t}),h2:({node:e,...t})=>z.jsx(ct,{margin:"small none",level:e.tagName,...t}),h3:({node:e,...t})=>z.jsx(ct,{margin:"small none",level:e.tagName,...t}),h4:({node:e,...t})=>z.jsx(ct,{level:e.tagName,...t}),h5:({node:e,...t})=>z.jsx(ct,{level:e.tagName,...t}),h6:({node:e,...t})=>z.jsx(ct,{as:"h6",...t}),img:({node:e,...t})=>z.jsx(E1,{src:e.src,...t}),div:({node:e,...t})=>z.jsx(an,{as:e.tagName,...t}),pre:({node:e,...t})=>{if(e.children.length===1&&e.children[0].tagName==="code"){let n=e.children[0].children[0].value;return n.endsWith(` `)&&(n=n.slice(0,-1)),z.jsx(b1,{label:"Code",lineNumbers:!0,foldGutter:!0,editable:!0,readOnly:!0,defaultValue:n})}return z.jsx(an,{as:e.tagName,...t})},ul:({node:e,...t})=>{t={...t,children:un(t)};const{children:n,...r}=t,i=(r==null?void 0:r.className)==="contains-task-list"||!1;return z.jsx(Nt,{isUnstyled:i,...r,children:te.Children.map(n,u=>{const{children:a,...o}=u.props;if(i&&a){let l=!1;return z.jsx(Nt.Item,{margin:"0 0 small small",...o,children:te.Children.map(a,c=>{var f,h,E;if(((f=c==null?void 0:c.props)==null?void 0:f.type)==="checkbox"&&(l=((h=c==null?void 0:c.props)==null?void 0:h.checked)??!1),((E=c==null?void 0:c.props)==null?void 0:E.type)!=="checkbox"&&c!==" "&&c!=="[ ]"&&c!=="[X]")return z.jsx(_1,{label:c,disabled:!0,defaultChecked:l})})},u.key)}return z.jsx(Nt.Item,{...u.props},u.key)})})},ol:({node:e,...t})=>{t={...t,children:un(t)};const{children:n,...r}=t;return z.jsx(Nt,{as:e.tagName,...r,children:te.Children.map(n,i=>z.jsx(Nt.Item,{...i.props},i.key))})},input:({node:e,...t})=>z.jsx(e.tagName,{...t}),details:({node:e,...t})=>{t={...t,children:un(t)};const n=t.children.shift();return z.jsx(T1,{summary:n,children:z.jsx(an,{display:"block",padding:"small",...t})})},table:({node:e,...t})=>{const{children:n,...r}=t;return z.jsx($e,{margin:"medium none",hover:!0,caption:"",...r,children:te.Children.map(n,i=>{const{children:u,...a}=i.props;return i.type==="thead"?z.jsx($e.Head,{...a,children:te.Children.map(u,o=>{const{children:l,...c}=o.props;return z.jsx($e.Row,{...c,children:te.Children.map(l,f=>z.jsx($e.ColHeader,{id:f.key,textAlign:ea(f.props),...f.props},f.key))})})}):z.jsx($e.Body,{...a,children:te.Children.map(u,o=>{const{children:l,...c}=o.props;return z.jsx($e.Row,{...c,children:te.Children.map(l,f=>z.jsx($e.Cell,{textAlign:ea(f.props),...f.props}))})})})})})}};export{Nt as L,N1 as M,S1 as a,x1 as b,L1 as c,O1 as d,sa as e,R1 as r}; diff --git a/assets/RenderTopNavBar-CILoEAmM.js b/assets/RenderTopNavBar-D2dLV4g_.js similarity index 99% rename from assets/RenderTopNavBar-CILoEAmM.js rename to assets/RenderTopNavBar-D2dLV4g_.js index b1b90a7..dc7b352 100644 --- a/assets/RenderTopNavBar-CILoEAmM.js +++ b/assets/RenderTopNavBar-D2dLV4g_.js @@ -1,4 +1,4 @@ -import{R as v,v as Zt,z as M,A as Z,B as Ie,C as ve,D as qt,m as $,r as w,P as s,w as P,h as V,q as ye,i as h,p as oe,l as Rr,f as N,E as dt,F as Ps,s as pe,t as A,G as Br,T as ee,V as H,o as j,S as R,H as Er,I as Bn,J as Ts,K as Ms,j as O,M as Qn,N as As}from"./index-DCzcanBz.js";function W(i,e={}){return typeof i=="function"?i.prototype&&i.prototype.isReactComponent?v.createElement(i,e):i(e):i}function Xt(i){if(Array.isArray(i)){const e=i.slice(0);for(let t=0;t{if(e==null)return!1;const n=Ds(i,e);return n.length===1||t===n[0]}).reduce((e,t)=>{if(typeof t!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return e===null?t:function(...o){e.apply(this,o),t.apply(this,o)}},null)}function Ds(i,e){const t=[];return i.forEach((n,o)=>{n===e&&t.push(o)}),t}function Pr(i){const e=`${i}`,t=e.match(/[\d.\-\+]*\s*(.*)/);return[parseFloat(e),t&&t.length>0?t[1]:""]}function Ls(i){if(!i||typeof i=="number")return i;const e=Pr(i),t=Zt(e,2),n=t[0],o=t[1];return o==="ms"?n:o==="s"?n*1e3:n}function fe(i,e,t,n){const o=i===window||i===document?i:M(i);return o==null||o.addEventListener(e,t,n),{remove(){o==null||o.removeEventListener(e,t,n)}}}function Ns(i,e){const t=i&&M(i),n=e&&M(e);return!t||!n?!1:!(t instanceof Window)&&!(n instanceof Window)?t.contains(n):Tr(t,n)}function Tr(i,e){let t=e;for(;t;){if(t===i)return!0;t=t.parentNode}return!1}const Lt=Z?Ns:Tr;function z(i){const e={top:0,bottom:0,left:0,right:0,height:0,width:0};if(!Z)return e;const t=i&&M(i);if(!t)return e;if(t===window)return{left:window.pageXOffset,top:window.pageYOffset,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth+window.pageXOffset,bottom:window.innerHeight+window.pageYOffset};const n=i===document?document:Ie(t),o=n&&n.documentElement;if(!o||!Lt(o,t))return e;const r=t.getBoundingClientRect();let a;for(a in e)e[a]=r[a];if(n!==document&&n.defaultView){const l=n.defaultView.frameElement;if(l){const d=z(l);e.top+=d.top,e.bottom+=d.top,e.left+=d.left,e.right+=d.left}}return{top:e.top+(window.pageYOffset||o.scrollTop)-(o.clientTop||0),left:e.left+(window.pageXOffset||o.scrollLeft)-(o.clientLeft||0),width:(e.width==null?t.offsetWidth:e.width)||0,height:(e.height==null?t.offsetHeight:e.height)||0,right:n.body.clientWidth-e.width-e.left,bottom:n.body.clientHeight-e.height-e.top}}const De=function(){let i;if(Z&&window.requestAnimationFrame&&window.cancelAnimationFrame)i=e=>{const t=window.requestAnimationFrame(e);return{cancel:()=>window.cancelAnimationFrame(t)}};else{let e=new Date().getTime();i=t=>{const n=new Date().getTime(),o=Math.max(0,16-(n-e)),r=setTimeout(t,o);return e=n,{cancel:()=>clearTimeout(r)}}}return i}();function Fs(i,e){const t=M(i),n=[];let o=z(t)||{},r=!1;function a(){if(!r){const l=z(t)||{};(l.top!==o.top||l.left!==o.left||l.right!==o.right||l.bottom!==o.bottom||l.width!==o.width||l.height!==o.height)&&typeof e=="function"&&e(l),o=l,n.push(De(a))}}return a(),{remove(){r=!0,n.forEach(l=>l.cancel())}}}function Ws(i){return!!(i.tagName.includes("-")&&customElements.get(i.tagName.toLowerCase()))}function Dt(i){const e=(i||document).activeElement;return e&&Ws(e)?e.shadowRoot.activeElement:e}function ct(i){const e=i&&M(i),t=Dt();return!!e&&(t===e||Lt(e,t))}const Jn=["a[href]","frame","iframe","object","input:not([type=hidden])","select","textarea","button","*[tabindex]",'[contenteditable="true"]'].join(",");function Wn(i,e,t){const n=i&&M(i);if(!n||typeof n.querySelectorAll!="function")return[];let o=Array.from(n.querySelectorAll(Jn));return t&&n.matches(Jn)&&(o=[...o,n]),o.filter(r=>typeof e=="function"?e(r)&&ei(r):ei(r))}function Hs(i){return ve(i).display==="none"}function zs(i){var e,t;const n=["fixed","absolute"];return!!(n.includes((e=i.style.position)===null||e===void 0?void 0:e.toLowerCase())||n.includes((t=ve(i).getPropertyValue("position"))===null||t===void 0?void 0:t.toLowerCase()))}function Vs(i){let e=i;for(;e&&!(e===document.body||e instanceof ShadowRoot);){if(Hs(e))return!1;if(zs(e))break;e=e.parentNode}return!0}function ei(i){return!i.disabled&&Vs(i)}function Hn(i,e){return Wn(i,t=>!js(t.getAttribute("tabindex")),e)}function js(i){return!isNaN(i)&&i<0}const Us={toArray:()=>[],contains:()=>!1,add:()=>{},remove:()=>{}};function ti(i){const e=M(i);if(!e)return Us;const t={toArray(){return[...e.classList]},contains:()=>!1,add:()=>{},remove:()=>{}};return t.add=n=>e.classList.add(n),t.remove=n=>e.classList.remove(n),t.contains=n=>e.classList.contains(n),t}const ni=new WeakMap;function ii(i,e=!1){var t;if(!Z)return 16;const n=i||((t=Ie(i))===null||t===void 0?void 0:t.documentElement),o=ni.get(n);if(!e&&o)return o;const r=parseInt(ve(n).getPropertyValue("font-size"));return ni.set(n,r),r}function Gs(i){const e=[];if(!Z)return e;const t=i&&M(i);if(t){let n=t;for(;(n=n.parentNode)&&n&&n.nodeType===1&&n.tagName!=="BODY";){const o=ve(n),r=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("-moz-transform")||o.getPropertyValue("-ms-transform")||o.getPropertyValue("-o-transform")||o.getPropertyValue("transform")||"none",a=r==="none"||r==="matrix(1, 0, 0, 1, 0, 0)";(o.position!=="static"||!a)&&e.push(n)}e.push(Ie(t).body)}return e}function Mr(i){const e=[];if(!Z)return e;const t=i&&M(i);if(t){const o=(ve(t)||{}).position;if(o==="fixed")return[t.ownerDocument];let r=t;for(;r&&r.nodeType===1&&(r=r.parentNode);){let l;try{l=ve(r)}catch{}if(typeof l>"u"||l===null)return e.push(r),e;const d=l,c=d.overflow,u=d.overflowX,p=d.overflowY;/(auto|scroll|overlay)/.test(c+p+u)&&(o!=="absolute"||["relative","absolute","fixed"].indexOf(l.position)>=0)&&e.push(r)}const a=t.ownerDocument;a&&(e.push(a.body),a!==document&&e.push(a.defaultView))}return e}function oi(i,e){const t=e.currentTarget,n=e.relatedTarget;(!n||n!==t&&!Lt(t,n))&&i(e)}function Kt(i){const e=i&&M(i);return e?Dt()===e:!1}function Pn(i,e=!0){const t=i&&M(i);if(t===window||t===document||t===document.body)return!0;const n=t.parentNode;if(t.nodeType===3)return Pn(n,e);const o=t?ve(t):{};if(o.display==="none"||o.visibility==="hidden"||o.opacity==="0")return!1;if(o.overflow==="hidden"&&o.position==="absolute"&&o.clip!=="auto"){const r=o.clip.substring(5).slice(0,-1).split(", ");let a=!0;if(r.forEach(l=>{l!=="0px"&&(a=!1)}),a)return!1}return e&&n?Pn(n):!0}function qs(i,e){const t=M(e)||document;if(Z){const n=qt(t);return n&&n.matchMedia(i)}return null}function Y(i,e){if(!i||typeof i=="number")return i;const t=Pr(i),n=Zt(t,2),o=n[0],r=n[1];if(r==="rem")return o*ii();if(r==="em"){const a=Z?document.body:null;return o*ii(e||a)}else return o}const Xs=Object.prototype.hasOwnProperty;function vn(i,e){if(ri(i,e))return!0;if(typeof i!="object"||i===null||typeof e!="object"||e===null)return!1;const t=Object.keys(i),n=Object.keys(e);if(t.length!==n.length)return!1;for(let o=0;o{d.indexOf("on")===0&&(typeof e[d]=="function"||typeof i.props[d]=="function")&&(l[d]=L(i.props[d],e[d]))}),o==null||n==null?v.cloneElement(i,l,...t):($(r,`Cloning an element with a ref that will be overwritten because the ref is not a function. Use a composable callback-style ref instead. Ignoring ref: ${o}`),v.cloneElement(i,{...l,ref(d){a?n(d):n.current=d,o(d)}},...t))}function lt(i,e={}){const t=w.Children.count(i);return t===0?null:typeof i=="string"&&i.length>0||t>1?v.createElement("span",e,i):J(Array.isArray(i)?i[0]:i,e)}const Ks=()=>i=>i;function si(i){return typeof i=="string"?i:i.displayName||i.name}function Ar({props:i={},interactionTypes:e=["disabled","readonly"]}={}){const t=i.interaction,n=i.disabled,o=i.readOnly;return t||(e.includes("disabled")&&n?"disabled":e.includes("readonly")&&o?"readonly":"enabled")}function U(i,e=[]){return i&&i.type?e.map(n=>si(n)).indexOf(si(i.type))>=0:!1}function ai(i){return function(e,t,n,o="",r=""){const a=e[t];return a===null||typeof a>"u"?new Error(`The prop \`${t}\` is marked as required in \`${n}\`, but its value is \`${a}\``):i(e,t,n,o,r)}}const G={oneOf(i){function e(t,n,o){const r=v.Children.toArray(t[n]),a=i.map(l=>l&&Le(l));for(let l=0;l{const c=Le(d);return r[c]=0,c});for(let d=0;d{r[d]>1&&l.push(`${r[d]} children of type ${d}`),r[d]===0&&l.push(`0 children of type ${d}`)}),l.length>0?new Error(`Expected exactly one of each ${a.join(", ")} in ${n} but found:${l.join(` +import{R as v,v as Zt,z as M,A as Z,B as Ie,C as ve,D as qt,m as $,r as w,P as s,w as P,h as V,q as ye,i as h,p as oe,l as Rr,f as N,E as dt,F as Ps,s as pe,t as A,G as Br,T as ee,V as H,o as j,S as R,H as Er,I as Bn,J as Ts,K as Ms,j as O,M as Qn,N as As}from"./index-C3XQCywa.js";function W(i,e={}){return typeof i=="function"?i.prototype&&i.prototype.isReactComponent?v.createElement(i,e):i(e):i}function Xt(i){if(Array.isArray(i)){const e=i.slice(0);for(let t=0;t{if(e==null)return!1;const n=Ds(i,e);return n.length===1||t===n[0]}).reduce((e,t)=>{if(typeof t!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return e===null?t:function(...o){e.apply(this,o),t.apply(this,o)}},null)}function Ds(i,e){const t=[];return i.forEach((n,o)=>{n===e&&t.push(o)}),t}function Pr(i){const e=`${i}`,t=e.match(/[\d.\-\+]*\s*(.*)/);return[parseFloat(e),t&&t.length>0?t[1]:""]}function Ls(i){if(!i||typeof i=="number")return i;const e=Pr(i),t=Zt(e,2),n=t[0],o=t[1];return o==="ms"?n:o==="s"?n*1e3:n}function fe(i,e,t,n){const o=i===window||i===document?i:M(i);return o==null||o.addEventListener(e,t,n),{remove(){o==null||o.removeEventListener(e,t,n)}}}function Ns(i,e){const t=i&&M(i),n=e&&M(e);return!t||!n?!1:!(t instanceof Window)&&!(n instanceof Window)?t.contains(n):Tr(t,n)}function Tr(i,e){let t=e;for(;t;){if(t===i)return!0;t=t.parentNode}return!1}const Lt=Z?Ns:Tr;function z(i){const e={top:0,bottom:0,left:0,right:0,height:0,width:0};if(!Z)return e;const t=i&&M(i);if(!t)return e;if(t===window)return{left:window.pageXOffset,top:window.pageYOffset,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth+window.pageXOffset,bottom:window.innerHeight+window.pageYOffset};const n=i===document?document:Ie(t),o=n&&n.documentElement;if(!o||!Lt(o,t))return e;const r=t.getBoundingClientRect();let a;for(a in e)e[a]=r[a];if(n!==document&&n.defaultView){const l=n.defaultView.frameElement;if(l){const d=z(l);e.top+=d.top,e.bottom+=d.top,e.left+=d.left,e.right+=d.left}}return{top:e.top+(window.pageYOffset||o.scrollTop)-(o.clientTop||0),left:e.left+(window.pageXOffset||o.scrollLeft)-(o.clientLeft||0),width:(e.width==null?t.offsetWidth:e.width)||0,height:(e.height==null?t.offsetHeight:e.height)||0,right:n.body.clientWidth-e.width-e.left,bottom:n.body.clientHeight-e.height-e.top}}const De=function(){let i;if(Z&&window.requestAnimationFrame&&window.cancelAnimationFrame)i=e=>{const t=window.requestAnimationFrame(e);return{cancel:()=>window.cancelAnimationFrame(t)}};else{let e=new Date().getTime();i=t=>{const n=new Date().getTime(),o=Math.max(0,16-(n-e)),r=setTimeout(t,o);return e=n,{cancel:()=>clearTimeout(r)}}}return i}();function Fs(i,e){const t=M(i),n=[];let o=z(t)||{},r=!1;function a(){if(!r){const l=z(t)||{};(l.top!==o.top||l.left!==o.left||l.right!==o.right||l.bottom!==o.bottom||l.width!==o.width||l.height!==o.height)&&typeof e=="function"&&e(l),o=l,n.push(De(a))}}return a(),{remove(){r=!0,n.forEach(l=>l.cancel())}}}function Ws(i){return!!(i.tagName.includes("-")&&customElements.get(i.tagName.toLowerCase()))}function Dt(i){const e=(i||document).activeElement;return e&&Ws(e)?e.shadowRoot.activeElement:e}function ct(i){const e=i&&M(i),t=Dt();return!!e&&(t===e||Lt(e,t))}const Jn=["a[href]","frame","iframe","object","input:not([type=hidden])","select","textarea","button","*[tabindex]",'[contenteditable="true"]'].join(",");function Wn(i,e,t){const n=i&&M(i);if(!n||typeof n.querySelectorAll!="function")return[];let o=Array.from(n.querySelectorAll(Jn));return t&&n.matches(Jn)&&(o=[...o,n]),o.filter(r=>typeof e=="function"?e(r)&&ei(r):ei(r))}function Hs(i){return ve(i).display==="none"}function zs(i){var e,t;const n=["fixed","absolute"];return!!(n.includes((e=i.style.position)===null||e===void 0?void 0:e.toLowerCase())||n.includes((t=ve(i).getPropertyValue("position"))===null||t===void 0?void 0:t.toLowerCase()))}function Vs(i){let e=i;for(;e&&!(e===document.body||e instanceof ShadowRoot);){if(Hs(e))return!1;if(zs(e))break;e=e.parentNode}return!0}function ei(i){return!i.disabled&&Vs(i)}function Hn(i,e){return Wn(i,t=>!js(t.getAttribute("tabindex")),e)}function js(i){return!isNaN(i)&&i<0}const Us={toArray:()=>[],contains:()=>!1,add:()=>{},remove:()=>{}};function ti(i){const e=M(i);if(!e)return Us;const t={toArray(){return[...e.classList]},contains:()=>!1,add:()=>{},remove:()=>{}};return t.add=n=>e.classList.add(n),t.remove=n=>e.classList.remove(n),t.contains=n=>e.classList.contains(n),t}const ni=new WeakMap;function ii(i,e=!1){var t;if(!Z)return 16;const n=i||((t=Ie(i))===null||t===void 0?void 0:t.documentElement),o=ni.get(n);if(!e&&o)return o;const r=parseInt(ve(n).getPropertyValue("font-size"));return ni.set(n,r),r}function Gs(i){const e=[];if(!Z)return e;const t=i&&M(i);if(t){let n=t;for(;(n=n.parentNode)&&n&&n.nodeType===1&&n.tagName!=="BODY";){const o=ve(n),r=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("-moz-transform")||o.getPropertyValue("-ms-transform")||o.getPropertyValue("-o-transform")||o.getPropertyValue("transform")||"none",a=r==="none"||r==="matrix(1, 0, 0, 1, 0, 0)";(o.position!=="static"||!a)&&e.push(n)}e.push(Ie(t).body)}return e}function Mr(i){const e=[];if(!Z)return e;const t=i&&M(i);if(t){const o=(ve(t)||{}).position;if(o==="fixed")return[t.ownerDocument];let r=t;for(;r&&r.nodeType===1&&(r=r.parentNode);){let l;try{l=ve(r)}catch{}if(typeof l>"u"||l===null)return e.push(r),e;const d=l,c=d.overflow,u=d.overflowX,p=d.overflowY;/(auto|scroll|overlay)/.test(c+p+u)&&(o!=="absolute"||["relative","absolute","fixed"].indexOf(l.position)>=0)&&e.push(r)}const a=t.ownerDocument;a&&(e.push(a.body),a!==document&&e.push(a.defaultView))}return e}function oi(i,e){const t=e.currentTarget,n=e.relatedTarget;(!n||n!==t&&!Lt(t,n))&&i(e)}function Kt(i){const e=i&&M(i);return e?Dt()===e:!1}function Pn(i,e=!0){const t=i&&M(i);if(t===window||t===document||t===document.body)return!0;const n=t.parentNode;if(t.nodeType===3)return Pn(n,e);const o=t?ve(t):{};if(o.display==="none"||o.visibility==="hidden"||o.opacity==="0")return!1;if(o.overflow==="hidden"&&o.position==="absolute"&&o.clip!=="auto"){const r=o.clip.substring(5).slice(0,-1).split(", ");let a=!0;if(r.forEach(l=>{l!=="0px"&&(a=!1)}),a)return!1}return e&&n?Pn(n):!0}function qs(i,e){const t=M(e)||document;if(Z){const n=qt(t);return n&&n.matchMedia(i)}return null}function Y(i,e){if(!i||typeof i=="number")return i;const t=Pr(i),n=Zt(t,2),o=n[0],r=n[1];if(r==="rem")return o*ii();if(r==="em"){const a=Z?document.body:null;return o*ii(e||a)}else return o}const Xs=Object.prototype.hasOwnProperty;function vn(i,e){if(ri(i,e))return!0;if(typeof i!="object"||i===null||typeof e!="object"||e===null)return!1;const t=Object.keys(i),n=Object.keys(e);if(t.length!==n.length)return!1;for(let o=0;o{d.indexOf("on")===0&&(typeof e[d]=="function"||typeof i.props[d]=="function")&&(l[d]=L(i.props[d],e[d]))}),o==null||n==null?v.cloneElement(i,l,...t):($(r,`Cloning an element with a ref that will be overwritten because the ref is not a function. Use a composable callback-style ref instead. Ignoring ref: ${o}`),v.cloneElement(i,{...l,ref(d){a?n(d):n.current=d,o(d)}},...t))}function lt(i,e={}){const t=w.Children.count(i);return t===0?null:typeof i=="string"&&i.length>0||t>1?v.createElement("span",e,i):J(Array.isArray(i)?i[0]:i,e)}const Ks=()=>i=>i;function si(i){return typeof i=="string"?i:i.displayName||i.name}function Ar({props:i={},interactionTypes:e=["disabled","readonly"]}={}){const t=i.interaction,n=i.disabled,o=i.readOnly;return t||(e.includes("disabled")&&n?"disabled":e.includes("readonly")&&o?"readonly":"enabled")}function U(i,e=[]){return i&&i.type?e.map(n=>si(n)).indexOf(si(i.type))>=0:!1}function ai(i){return function(e,t,n,o="",r=""){const a=e[t];return a===null||typeof a>"u"?new Error(`The prop \`${t}\` is marked as required in \`${n}\`, but its value is \`${a}\``):i(e,t,n,o,r)}}const G={oneOf(i){function e(t,n,o){const r=v.Children.toArray(t[n]),a=i.map(l=>l&&Le(l));for(let l=0;l{const c=Le(d);return r[c]=0,c});for(let d=0;d{r[d]>1&&l.push(`${r[d]} children of type ${d}`),r[d]===0&&l.push(`0 children of type ${d}`)}),l.length>0?new Error(`Expected exactly one of each ${a.join(", ")} in ${n} but found:${l.join(` `)}`):null}},enforceOrder(...i){function e(r,a){for(let l=0;ln(r,l)).join(` `)}function n(r,a){const l=a.map(d=>d?Le(d):"??").map(d=>` <${d} />`).join(` diff --git a/assets/error-BC2Hv5fG.js b/assets/error-Cp8tnuu0.js similarity index 92% rename from assets/error-BC2Hv5fG.js rename to assets/error-Cp8tnuu0.js index a05846f..38ec139 100644 --- a/assets/error-BC2Hv5fG.js +++ b/assets/error-Cp8tnuu0.js @@ -1 +1 @@ -import{a as _,x as w,y as R,j as s,V as j}from"./index-DCzcanBz.js";import{c as f,a as y,g as k,L as N,T as E,R as b,b as B}from"./RenderTopNavBar-CILoEAmM.js";import{B as T}from"./index-De3kK20J.js";const L={awkward:{EN:"Well, this is awkward.",ES_LA:"Esto es incómodo.",PT_BR:"Isso é constrangedor.",DE:"Das ist peinlich."},not_your_fault:{EN:"I'm not sure what happened, but I'm pretty sure it's not your fault.",ES_LA:"No estoy seguro de qué pasó, pero estoy bastante seguro de que no es tu culpa.",PT_BR:"Não tenho certeza do que aconteceu, mas tenho certeza de que não é sua culpa.",DE:"Ich bin mir nicht sicher, was passiert ist, aber ich bin mir ziemlich sicher, dass es nicht deine Schuld ist."},uhm:{EN:"Uhm...",ES_LA:"Ehm...",PT_BR:"Hã...",DE:"Ähm..."},class_dismissed:{EN:"class dismissed",ES_LA:"clase despedida",PT_BR:"classe dispensada",DE:"Klasse entlassen"},unknown_error:{EN:"An unknown error occurred.",ES_LA:"Ocurrió un error desconocido.",PT_BR:"Ocorreu um erro desconhecido.",DE:"Ein unbekannter Fehler ist aufgetreten."}};function x(){const e=f.c(24),a=_().language;let g,r;e[0]!==a?(r=y(a),g=k(L,r),e[0]=a,e[1]=g,e[2]=r):(g=e[1],r=e[2]);const t=g,i=w();let n;R(i)?n=`${i.status} ${i.statusText}`:i instanceof Error?n=i.message:typeof i=="string"?n=i:(console.error(i),n=t.unknown_error);let o;e[3]!==r?(o=s.jsx(b,{language:r}),e[3]=r,e[4]=o):o=e[4];let l;e[5]!==n?(l=s.jsx(E,{as:"p",children:s.jsx("i",{children:n})}),e[5]=n,e[6]=l):l=e[6];let d;e[7]!==t.class_dismissed?(d=s.jsx(N,{href:"./#/",children:t.class_dismissed}),e[7]=t.class_dismissed,e[8]=d):d=e[8];let c;e[9]!==t.uhm||e[10]!==d?(c=s.jsxs(E,{as:"p",children:[t.uhm," ",d,"."]}),e[9]=t.uhm,e[10]=d,e[11]=c):c=e[11];let u;e[12]!==l||e[13]!==c?(u=s.jsxs(s.Fragment,{children:[l,c]}),e[12]=l,e[13]=c,e[14]=u):u=e[14];let m;e[15]!==t.awkward||e[16]!==u?(m=s.jsx(j,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:s.jsx(T,{size:"medium",heading:t.awkward,headingAs:"h1",message:u})}),e[15]=t.awkward,e[16]=u,e[17]=m):m=e[17];let h;e[18]!==r?(h=s.jsx(B,{language:r}),e[18]=r,e[19]=h):h=e[19];let p;return e[20]!==o||e[21]!==m||e[22]!==h?(p=s.jsxs(s.Fragment,{children:[o,m,h]}),e[20]=o,e[21]=m,e[22]=h,e[23]=p):p=e[23],p}x.displayName="Route.Error";function S(){const e=f.c(1);let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(x,{}),e[0]=a):a=e[0],a}S.displayName="Error.ErrorPage";export{x as Component,S as ErrorBoundary}; +import{a as _,x as w,y as R,j as s,V as j}from"./index-C3XQCywa.js";import{c as f,a as y,g as k,L as N,T as E,R as b,b as B}from"./RenderTopNavBar-D2dLV4g_.js";import{B as T}from"./index-BfwAAv1n.js";const L={awkward:{EN:"Well, this is awkward.",ES_LA:"Esto es incómodo.",PT_BR:"Isso é constrangedor.",DE:"Das ist peinlich."},not_your_fault:{EN:"I'm not sure what happened, but I'm pretty sure it's not your fault.",ES_LA:"No estoy seguro de qué pasó, pero estoy bastante seguro de que no es tu culpa.",PT_BR:"Não tenho certeza do que aconteceu, mas tenho certeza de que não é sua culpa.",DE:"Ich bin mir nicht sicher, was passiert ist, aber ich bin mir ziemlich sicher, dass es nicht deine Schuld ist."},uhm:{EN:"Uhm...",ES_LA:"Ehm...",PT_BR:"Hã...",DE:"Ähm..."},class_dismissed:{EN:"class dismissed",ES_LA:"clase despedida",PT_BR:"classe dispensada",DE:"Klasse entlassen"},unknown_error:{EN:"An unknown error occurred.",ES_LA:"Ocurrió un error desconocido.",PT_BR:"Ocorreu um erro desconhecido.",DE:"Ein unbekannter Fehler ist aufgetreten."}};function x(){const e=f.c(24),a=_().language;let g,r;e[0]!==a?(r=y(a),g=k(L,r),e[0]=a,e[1]=g,e[2]=r):(g=e[1],r=e[2]);const t=g,i=w();let n;R(i)?n=`${i.status} ${i.statusText}`:i instanceof Error?n=i.message:typeof i=="string"?n=i:(console.error(i),n=t.unknown_error);let o;e[3]!==r?(o=s.jsx(b,{language:r}),e[3]=r,e[4]=o):o=e[4];let l;e[5]!==n?(l=s.jsx(E,{as:"p",children:s.jsx("i",{children:n})}),e[5]=n,e[6]=l):l=e[6];let d;e[7]!==t.class_dismissed?(d=s.jsx(N,{href:"./#/",children:t.class_dismissed}),e[7]=t.class_dismissed,e[8]=d):d=e[8];let c;e[9]!==t.uhm||e[10]!==d?(c=s.jsxs(E,{as:"p",children:[t.uhm," ",d,"."]}),e[9]=t.uhm,e[10]=d,e[11]=c):c=e[11];let u;e[12]!==l||e[13]!==c?(u=s.jsxs(s.Fragment,{children:[l,c]}),e[12]=l,e[13]=c,e[14]=u):u=e[14];let m;e[15]!==t.awkward||e[16]!==u?(m=s.jsx(j,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:s.jsx(T,{size:"medium",heading:t.awkward,headingAs:"h1",message:u})}),e[15]=t.awkward,e[16]=u,e[17]=m):m=e[17];let h;e[18]!==r?(h=s.jsx(B,{language:r}),e[18]=r,e[19]=h):h=e[19];let p;return e[20]!==o||e[21]!==m||e[22]!==h?(p=s.jsxs(s.Fragment,{children:[o,m,h]}),e[20]=o,e[21]=m,e[22]=h,e[23]=p):p=e[23],p}x.displayName="Route.Error";function S(){const e=f.c(1);let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(x,{}),e[0]=a):a=e[0],a}S.displayName="Error.ErrorPage";export{x as Component,S as ErrorBoundary}; diff --git a/assets/index-2_RebUFS.js b/assets/index-B7tEZKBe.js similarity index 70% rename from assets/index-2_RebUFS.js rename to assets/index-B7tEZKBe.js index 32ed0dc..a14800e 100644 --- a/assets/index-2_RebUFS.js +++ b/assets/index-B7tEZKBe.js @@ -1,32 +1,32 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DCzcanBz.js","assets/index-dyNilIOc.css"])))=>i.map(i=>d[i]); -import{R as rt,_ as Wp,F as Ep,r as Hc,v as Vp,P as j,s as Yp,w as Dp,E as qp,t as zp,G as Lp,h as _p,i as Un,p as Bp,o as Up}from"./index-DCzcanBz.js";import{T as Ip,I as jp,e as Np}from"./index-C5yFM9ST.js";import{I as Gp,a as ha}from"./index-C1tjm6wA.js";import{i as Fp,U as Hp,S as Kp}from"./RenderTopNavBar-CILoEAmM.js";class B{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,i){[e,t]=Qi(this,e,t);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),ot.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Qi(this,e,t);let i=[];return this.decompose(e,t,i,0),ot.from(i,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),i=this.length-this.scanIdentical(e,-1),s=new rn(this),r=new rn(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new rn(this,e)}iterRange(e,t=this.length){return new Kc(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Jc(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?B.empty:e.length<=32?new ne(e):ot.from(ne.split(e,[]))}}class ne extends B{constructor(e,t=Jp(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new em(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new ne(ca(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=gs(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new ne(l,o.length+r.length));else{let a=l.length>>1;i.push(new ne(l.slice(0,a)),new ne(l.slice(a)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof ne))return super.replace(e,t,i);[e,t]=Qi(this,e,t);let s=gs(this.text,gs(i.text,ca(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new ne(s,r):ot.from(ne.split(s,[]),r)}sliceString(e,t=this.length,i=` +const __vite__fileDeps=["assets/index-C3XQCywa.js","assets/index-dyNilIOc.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +import{R as rt,_ as Wp,F as Ep,r as Kc,v as Vp,P as j,s as Yp,w as Dp,E as qp,t as zp,G as Lp,h as _p,i as Un,p as Bp,o as Up}from"./index-C3XQCywa.js";import{T as Ip,I as jp,e as Np}from"./index-CuKaSjpf.js";import{I as Gp,a as ca}from"./index-D14ZWBB_.js";import{i as Fp,U as Hp,S as Kp}from"./RenderTopNavBar-D2dLV4g_.js";class B{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,i){[e,t]=Qi(this,e,t);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),ot.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Qi(this,e,t);let i=[];return this.decompose(e,t,i,0),ot.from(i,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),i=this.length-this.scanIdentical(e,-1),s=new rn(this),r=new rn(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new rn(this,e)}iterRange(e,t=this.length){return new Jc(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new ef(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?B.empty:e.length<=32?new ne(e):ot.from(ne.split(e,[]))}}class ne extends B{constructor(e,t=Jp(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new em(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new ne(fa(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=gs(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new ne(l,o.length+r.length));else{let a=l.length>>1;i.push(new ne(l.slice(0,a)),new ne(l.slice(a)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof ne))return super.replace(e,t,i);[e,t]=Qi(this,e,t);let s=gs(this.text,gs(i.text,fa(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new ne(s,r):ot.from(ne.split(s,[]),r)}sliceString(e,t=this.length,i=` `){[e,t]=Qi(this,e,t);let s="";for(let r=0,o=0;r<=t&&oe&&o&&(s+=i),er&&(s+=l.slice(Math.max(0,e-r),t-r)),r=a+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new ne(i,s)),i=[],s=-1);return s>-1&&t.push(new ne(i,s)),t}}class ot extends B{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=a+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r=o){let h=s&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!h?i.push(l):l.decompose(e-o,t-o,i,h)}o=a+1}}replace(e,t,i){if([e,t]=Qi(this,e,t),i.lines=r&&t<=l){let a=o.replace(e-r,t-r,i),h=this.lines-o.lines+a.lines;if(a.lines>4&&a.lines>h>>6){let c=this.children.slice();return c[s]=a,new ot(c,this.length-(t-e)+i.length)}return super.replace(r,l,a)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=` -`){[e,t]=Qi(this,e,t);let s="";for(let r=0,o=0;re&&r&&(s+=i),eo&&(s+=l.sliceString(e-o,t-o,i)),o=a+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof ot))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let a=this.children[s],h=e.children[r];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let O of e)O.flatten(d);return new ne(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],a=0,h=-1,c=[];function f(d){let O;if(d.lines>r&&d instanceof ot)for(let m of d.children)f(m);else d.lines>o&&(a>o||!a)?(u(),l.push(d)):d instanceof ne&&a&&(O=c[c.length-1])instanceof ne&&d.lines+O.lines<=32?(a+=d.lines,h+=d.length+1,c[c.length-1]=new ne(O.text.concat(d.text),O.length+1+d.length)):(a+d.lines>s&&u(),a+=d.lines,h+=d.length+1,c.push(d))}function u(){a!=0&&(l.push(c.length==1?c[0]:ot.from(c,h)),h=-1,a=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new ot(l,t)}}B.empty=new ne([""],0);function Jp(n){let e=-1;for(let t of n)e+=t.length+1;return e}function gs(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r=t&&(a>i&&(l=l.slice(0,i-s)),s0?1:(e instanceof ne?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof ne?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=` -`,this;e--}else if(s instanceof ne){let a=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=s.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof ne?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Kc{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new rn(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}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 i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),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 Jc{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=function(){return this.iter()},rn.prototype[Symbol.iterator]=Kc.prototype[Symbol.iterator]=Jc.prototype[Symbol.iterator]=function(){return this});let em=class{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}};function Qi(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}let mi="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(n=>n?parseInt(n,36):1);for(let n=1;nn)return mi[e-1]<=n;return!1}function fa(n){return n>=127462&&n<=127487}const ua=8205;function me(n,e,t=!0,i=!0){return(t?ef:im)(n,e,i)}function ef(n,e,t){if(e==n.length)return e;e&&tf(n.charCodeAt(e))&&nf(n.charCodeAt(e-1))&&e--;let i=ue(n,e);for(e+=ze(i);e=0&&fa(ue(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function im(n,e,t){for(;e>0;){let i=ef(n,e-2,t);if(i=56320&&n<57344}function nf(n){return n>=55296&&n<56320}function ue(n,e){let t=n.charCodeAt(e);if(!nf(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return tf(i)?(t-55296<<10)+(i-56320)+65536:t}function cl(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function ze(n){return n<65536?1:2}const io=/\r\n?|\n/;var Oe=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(Oe||(Oe={}));class ft{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return r+(e-s);r+=l}else{if(i!=Oe.Simple&&h>=e&&(i==Oe.TrackDel&&se||i==Oe.TrackBefore&&se))return null;if(h>e||h==e&&t<0&&!l)return e==s||t<0?r:r+a;r+=a}s=h}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i=0&&s<=t&&l>=e)return st?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ft(e)}static create(e){return new ft(e)}}class he extends ft{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 no(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return so(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s=0){t[s]=l,t[s+1]=o;let a=s>>1;for(;i.length0&&Tt(i,t,r.text),r.forward(c),l+=c}let h=e[o++];for(;l>1].toJSON()))}return e}static of(e,t,i){let s=[],r=[],o=0,l=null;function a(c=!1){if(!c&&!s.length)return;ou||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let O=d?typeof d=="string"?B.of(d.split(i||io)):d:B.empty,m=O.length;if(f==u&&m==0)return;fo&&ge(s,f-o,-1),ge(s,u-f,m),Tt(r,s,O),o=u}}return h(e),a(!l),l}static empty(e){return new he(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let s=0;sl&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;i.length=0&&t<=0&&t==n[s+1]?n[s]+=e:e==0&&n[s]==0?n[s+1]+=t:i?(n[s]+=e,n[s+1]+=t):n.push(e,t)}function Tt(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],a=n.sections[o++];e(s,h,r,c,f),s=h,r=c}}}function so(n,e,t,i=!1){let s=[],r=i?[]:null,o=new un(n),l=new un(e);for(let a=-1;;)if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);ge(s,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len=0&&a=0){let h=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);h+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.lena||o.ins>=0&&o.len>a)&&(l||i.length>h),r.forward2(a),o.forward(a)}}}}class un{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?B.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?B.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Gt{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new Gt(i,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return y.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return y.range(this.anchor,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return y.range(e.anchor,e.head)}static create(e,t,i){return new Gt(e,t,i)}}class y{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:y.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;ie.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new y(e.ranges.map(t=>Gt.fromJSON(t)),e.main)}static single(e,t=e){return new y([y.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;se?8:0)|r)}static normalized(e,t=0){let i=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(i);for(let s=1;sr.head?y.range(a,l):y.range(l,a))}}return new y(e,t)}}function rf(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let fl=0;class T{constructor(e,t,i,s,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=s,this.id=fl++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(e={}){return new T(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:ul),!!e.static,e.enables)}of(e){return new bs([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new bs(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new bs(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function ul(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class bs{constructor(e,t,i,s){this.dependencies=e,this.facet=t,this.type=i,this.value=s,this.id=fl++}dynamicSlot(e){var t;let i=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,l=this.type==2,a=!1,h=!1,c=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?h=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(a&&u.docChanged||h&&(u.docChanged||u.selection)||ro(f,c)){let d=i(f);if(l?!da(d,f.values[o],s):!s(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,u)=>{let d,O=u.config.address[r];if(O!=null){let m=Ts(u,O);if(this.dependencies.every(g=>g instanceof T?u.facet(g)===f.facet(g):g instanceof ce?u.field(g,!1)==f.field(g,!1):!0)||(l?da(d=i(f),m,s):s(d=i(f),m)))return f.values[o]=m,0}else d=i(f);return f.values[o]=d,1}}}}function da(n,e,t){if(n.length!=e.length)return!1;for(let i=0;in[a.id]),s=t.map(a=>a.type),r=i.filter(a=>!(a&1)),o=n[e.id]>>1;function l(a){let h=[];for(let c=0;ci===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Oa).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,s)=>{let r=i.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[t]=o,1)},reconfigure:(i,s)=>s.config.address[this.id]!=null?(i.values[t]=s.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,Oa.of({field:this,create:e})]}get extension(){return this}}const jt={lowest:4,low:3,default:2,high:1,highest:0};function _i(n){return e=>new of(e,n)}const kt={highest:_i(jt.highest),high:_i(jt.high),default:_i(jt.default),low:_i(jt.low),lowest:_i(jt.lowest)};class of{constructor(e,t){this.inner=e,this.prec=t}}class rr{of(e){return new oo(this,e)}reconfigure(e){return rr.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class oo{constructor(e,t){this.compartment=e,this.inner=t}}class Zs{constructor(e,t,i,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,i){let s=[],r=Object.create(null),o=new Map;for(let u of sm(e,t,o))u instanceof ce?s.push(u):(r[u.facet.id]||(r[u.facet.id]=[])).push(u);let l=Object.create(null),a=[],h=[];for(let u of s)l[u.id]=h.length<<1,h.push(d=>u.slot(d));let c=i==null?void 0:i.config.facets;for(let u in r){let d=r[u],O=d[0].facet,m=c&&c[u]||[];if(d.every(g=>g.type==0))if(l[O.id]=a.length<<1|1,ul(m,d))a.push(i.facet(O));else{let g=O.combine(d.map(b=>b.value));a.push(i&&O.compare(g,i.facet(O))?i.facet(O):g)}else{for(let g of d)g.type==0?(l[g.id]=a.length<<1|1,a.push(g.value)):(l[g.id]=h.length<<1,h.push(b=>g.dynamicSlot(b)));l[O.id]=h.length<<1,h.push(g=>nm(g,O,d))}}let f=h.map(u=>u(l));return new Zs(e,o,f,l,a,r)}}function sm(n,e,t){let i=[[],[],[],[],[]],s=new Map;function r(o,l){let a=s.get(o);if(a!=null){if(a<=l)return;let h=i[a].indexOf(o);h>-1&&i[a].splice(h,1),o instanceof oo&&t.delete(o.compartment)}if(s.set(o,l),Array.isArray(o))for(let h of o)r(h,l);else if(o instanceof oo){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),r(h,l)}else if(o instanceof of)r(o.inner,o.prec);else if(o instanceof ce)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof bs)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,jt.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(h,l)}}return r(n,jt.default),i.reduce((o,l)=>o.concat(l))}function on(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let s=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|s}function Ts(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const lf=T.define(),lo=T.define({combine:n=>n.some(e=>e),static:!0}),af=T.define({combine:n=>n.length?n[0]:void 0,static:!0}),hf=T.define(),cf=T.define(),ff=T.define(),uf=T.define({combine:n=>n.length?n[0]:!1});class xt{constructor(e,t){this.type=e,this.value=t}static define(){return new rm}}class rm{of(e){return new xt(this,e)}}class om{constructor(e){this.map=e}of(e){return new M(this,e)}}class M{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new M(this.type,t)}is(e){return this.type==e}static define(e={}){return new om(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let s of e){let r=s.map(t);r&&i.push(r)}return i}}M.reconfigure=M.define();M.appendConfig=M.define();class re{constructor(e,t,i,s,r,o){this.startState=e,this.changes=t,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&rf(i,t.newLength),r.some(l=>l.type==re.time)||(this.annotations=r.concat(re.time.of(Date.now())))}static create(e,t,i,s,r,o){return new re(e,t,i,s,r,o)}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(re.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}re.time=xt.define();re.userEvent=xt.define();re.addToHistory=xt.define();re.remote=xt.define();function lm(n,e){let t=[];for(let i=0,s=0;;){let r,o;if(i=n[i]))r=n[i++],o=n[i++];else if(s=0;s--){let r=i[s](n);r instanceof re?n=r:Array.isArray(r)&&r.length==1&&r[0]instanceof re?n=r[0]:n=Of(e,gi(r),!1)}return n}function hm(n){let e=n.startState,t=e.facet(ff),i=n;for(let s=t.length-1;s>=0;s--){let r=t[s](n);r&&Object.keys(r).length&&(i=df(i,ao(e,r,n.changes.newLength),!0))}return i==n?n:re.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const cm=[];function gi(n){return n==null?cm:Array.isArray(n)?n:[n]}var te=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(te||(te={}));const fm=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let ho;try{ho=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function um(n){if(ho)return ho.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||fm.test(t)))return!0}return!1}function dm(n){return e=>{if(!/\S/.test(e))return te.Space;if(um(e))return te.Word;for(let t=0;t-1)return te.Word;return te.Other}}class Y{constructor(e,t,i,s,r,o){this.config=e,this.doc=t,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;ls.set(h,a)),t=null),s.set(l.value.compartment,l.value.extension)):l.is(M.reconfigure)?(t=null,i=l.value):l.is(M.appendConfig)&&(t=null,i=gi(i).concat(l.value));let r;t?r=e.startState.values.slice():(t=Zs.resolve(i,s,this),r=new Y(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,h)=>h.reconfigure(a,this),null).values);let o=e.startState.facet(lo)?e.newSelection:e.newSelection.asSingle();new Y(t,e.newDoc,o,r,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:y.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),s=this.changes(i.changes),r=[i.range],o=gi(i.effects);for(let l=1;lo.spec.fromJSON(l,a)))}}return Y.create({doc:e.doc,selection:y.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=Zs.resolve(e.extensions||[],new Map),i=e.doc instanceof B?e.doc:B.of((e.doc||"").split(t.staticFacet(Y.lineSeparator)||io)),s=e.selection?e.selection instanceof y?e.selection:y.single(e.selection.anchor,e.selection.head):y.single(0);return rf(s,i.length),t.staticFacet(lo)||(s=s.asSingle()),new Y(t,i,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(Y.tabSize)}get lineBreak(){return this.facet(Y.lineSeparator)||` -`}get readOnly(){return this.facet(uf)}phrase(e,...t){for(let i of this.facet(Y.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?i:t[r-1]})),e}languageDataAt(e,t,i=-1){let s=[];for(let r of this.facet(lf))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return dm(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let a=me(t,o,!1);if(r(t.slice(a,o))!=te.Word)break;o=a}for(;ln.length?n[0]:4});Y.lineSeparator=af;Y.readOnly=uf;Y.phrases=T.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(s=>n[s]==e[s])}});Y.languageData=lf;Y.changeFilter=hf;Y.transactionFilter=cf;Y.transactionExtender=ff;rr.reconfigure=M.define();function dt(n,e,t={}){let i={};for(let s of n)for(let r of Object.keys(s)){let o=s[r],l=i[r];if(l===void 0)i[r]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,r))i[r]=t[r](l,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)i[s]===void 0&&(i[s]=e[s]);return i}class Ht{eq(e){return this==e}range(e,t=e){return co.create(e,t,this)}}Ht.prototype.startSide=Ht.prototype.endSide=0;Ht.prototype.point=!1;Ht.prototype.mapMode=Oe.TrackDel;let co=class pf{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new pf(e,t,i)}};function fo(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class dl{constructor(e,t,i,s){this.from=e,this.to=t,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,s=0){let r=i?this.to:this.from;for(let o=s,l=r.length;;){if(o==l)return o;let a=o+l>>1,h=r[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-t;if(a==o)return h>=0?o:l;h>=0?l=a:o=a+1}}between(e,t,i,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,r);rd||u==d&&h.startSide>0&&h.endSide<=0)continue;(d-u||h.endSide-h.startSide)<0||(o<0&&(o=u),h.point&&(l=Math.max(l,d-u)),i.push(h),s.push(u-o),r.push(d-o))}return{mapped:i.length?new dl(s,r,i,l):null,pos:o}}}class _{constructor(e,t,i,s){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=s}static create(e,t,i,s){return new _(e,t,i,s)}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:i=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(fo)),this.isEmpty)return t.length?_.of(t):this;let l=new mf(this,null,-1).goto(0),a=0,h=[],c=new Et;for(;l.value||a=0){let f=t[a++];c.addInner(f.from,f.to,f.value)||h.push(f)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||rl.to||r=r&&e<=r+o.length&&o.between(r,e-r,t-r,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return dn.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return dn.from(e).goto(t)}static compare(e,t,i,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),l=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),a=pa(o,l,i),h=new Bi(o,a,r),c=new Bi(l,a,r);i.iterGaps((f,u,d)=>ma(h,f,c,u,d,s)),i.empty&&i.length==0&&ma(h,0,c,0,0,s)}static eq(e,t,i=0,s){s==null&&(s=999999999);let r=e.filter(c=>!c.isEmpty&&t.indexOf(c)<0),o=t.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(r.length!=o.length)return!1;if(!r.length)return!0;let l=pa(r,o),a=new Bi(r,l,0).goto(i),h=new Bi(o,l,0).goto(i);for(;;){if(a.to!=h.to||!uo(a.active,h.active)||a.point&&(!h.point||!a.point.eq(h.point)))return!1;if(a.to>s)return!0;a.next(),h.next()}}static spans(e,t,i,s,r=-1){let o=new Bi(e,null,r).goto(t),l=t,a=o.openStart;for(;;){let h=Math.min(o.to,i);if(o.point){let c=o.activeForPoint(o.to),f=o.pointFroml&&(s.span(l,h,o.active,a),a=o.openEnd(h));if(o.to>i)return a+(o.point&&o.to>i?1:0);l=o.to,o.next()}}static of(e,t=!1){let i=new Et;for(let s of e instanceof co?[e]:t?Om(e):e)i.add(s.from,s.to,s.value);return i.finish()}static join(e){if(!e.length)return _.empty;let t=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let s=e[i];s!=_.empty;s=s.nextLayer)t=new _(s.chunkPos,s.chunk,t,Math.max(s.maxPoint,t.maxPoint));return t}}_.empty=new _([],[],null,-1);function Om(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(fo);e=i}return n}_.empty.nextLayer=_.empty;class Et{finishChunk(e){this.chunks.push(new dl(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,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new Et)).add(e,t,i)}addInner(e,t,i){let s=e-this.lastTo||i.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.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 i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(_.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=_.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function pa(n,e,t){let i=new Map;for(let r of n)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&s.push(new mf(o,t,i,r));return s.length==1?s[0]:new dn(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let i=this.heap.length>>1;i>=0;i--)Sr(this.heap,i);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let i=this.heap.length>>1;i>=0;i--)Sr(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)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(),Sr(this.heap,0)}}}function Sr(n,e){for(let t=n[e];;){let i=(e<<1)+1;if(i>=n.length)break;let s=n[i];if(i+1=0&&(s=n[i+1],i++),t.compare(s)<0)break;n[i]=t,n[e]=s,e=i}}class Bi{constructor(e,t,i){this.minPoint=i,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=dn.from(e,t,i)}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){In(this.active,e),In(this.activeTo,e),In(this.activeRank,e),this.minActive=ga(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:s,rank:r}=this.cursor;for(;t0;)t++;jn(this.active,t,i),jn(this.activeTo,t,s),jn(this.activeRank,t,r),e&&jn(e,t,this.cursor.from),this.minActive=ga(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&In(i,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(i),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function ma(n,e,t,i,s,r){n.goto(e),t.goto(i);let o=i+s,l=i,a=i-e;for(;;){let h=n.to+a-t.to||n.endSide-t.endSide,c=h<0?n.to+a:t.to,f=Math.min(c,o);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&uo(n.activeForPoint(n.to),t.activeForPoint(t.to))||r.comparePoint(l,f,n.point,t.point):f>l&&!uo(n.active,t.active)&&r.compareRange(l,f,n.active,t.active),c>o)break;l=c,h<=0&&n.next(),h>=0&&t.next()}}function uo(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;i--)n[i+1]=n[i];n[e]=t}function ga(n,e){let t=-1,i=1e9;for(let s=0;s=e)return s;if(s==n.length)break;r+=n.charCodeAt(s)==9?t-r%t:1,s=me(n,s)}return i===!0?-1:n.length}const po="ͼ",ba=typeof Symbol>"u"?"__"+po:Symbol.for(po),mo=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Vt{constructor(e,t){this.rules=[];let{finish:i}=t||{};function s(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function r(o,l,a,h){let c=[],f=/^@(\w+)\b/.exec(o[0]),u=f&&f[1]=="keyframes";if(f&&l==null)return a.push(o[0]+";");for(let d in l){let O=l[d];if(/&/.test(d))r(d.split(/,\s*/).map(m=>o.map(g=>m.replace(/&/,g))).reduce((m,g)=>m.concat(g)),O,a);else if(O&&typeof O=="object"){if(!f)throw new RangeError("The value of a property ("+d+") should be a primitive value.");r(s(d),O,c,u)}else O!=null&&c.push(d.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+O+";")}(c.length||u)&&a.push((i&&!f&&!h?o.map(i):o).join(", ")+" {"+c.join(" ")+"}")}for(let o in e)r(s(o),e[o],this.rules)}getRules(){return this.rules.join(` -`)}static newName(){let e=Sa[ba]||1;return Sa[ba]=e+1,po+e.toString(36)}static mount(e,t,i){let s=e[mo],r=i&&i.nonce;s?r&&s.setNonce(r):s=new pm(e,r),s.mount(Array.isArray(t)?t:[t],e)}}let ya=new Map;class pm{constructor(e,t){let i=e.ownerDocument||e,s=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let r=ya.get(i);if(r)return e[mo]=r;this.sheet=new s.CSSStyleSheet,ya.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[mo]=this}mount(e,t){let i=this.sheet,s=0,r=0;for(let o=0;o-1&&(this.modules.splice(a,1),r--,a=-1),a==-1){if(this.modules.splice(r++,0,l),i)for(let h=0;h",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},mm=typeof navigator<"u"&&/Mac/.test(navigator.platform),gm=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var de=0;de<10;de++)Yt[48+de]=Yt[96+de]=String(de);for(var de=1;de<=24;de++)Yt[de+111]="F"+de;for(var de=65;de<=90;de++)Yt[de]=String.fromCharCode(de+32),On[de]=String.fromCharCode(de);for(var yr in Yt)On.hasOwnProperty(yr)||(On[yr]=Yt[yr]);function bm(n){var e=mm&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||gm&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?On:Yt)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function pn(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function go(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Sm(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Ss(n,e){if(!e.anchorNode)return!1;try{return go(n,e.anchorNode)}catch{return!1}}function mn(n){return n.nodeType==3?Jt(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function ln(n,e,t,i){return t?ka(n,e,t,i,-1)||ka(n,e,t,i,1):!1}function Kt(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Rs(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function ka(n,e,t,i,s){for(;;){if(n==t&&e==i)return!0;if(e==(s<0?0:bt(n))){if(n.nodeName=="DIV")return!1;let r=n.parentNode;if(!r||r.nodeType!=1)return!1;e=Kt(n)+(s<0?0:1),n=r}else if(n.nodeType==1){if(n=n.childNodes[e+(s<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=s<0?bt(n):0}else return!1}}function bt(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Ol(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function ym(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function gf(n,e){let t=e.width/n.offsetWidth,i=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-n.offsetHeight)<1)&&(i=1),{scaleX:t,scaleY:i}}function km(n,e,t,i,s,r,o,l){let a=n.ownerDocument,h=a.defaultView||window;for(let c=n,f=!1;c&&!f;)if(c.nodeType==1){let u,d=c==a.body,O=1,m=1;if(d)u=ym(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(f=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let S=c.getBoundingClientRect();({scaleX:O,scaleY:m}=gf(c,S)),u={left:S.left,right:S.left+c.clientWidth*O,top:S.top,bottom:S.top+c.clientHeight*m}}let g=0,b=0;if(s=="nearest")e.top0&&e.bottom>u.bottom+b&&(b=e.bottom-u.bottom+b+o)):e.bottom>u.bottom&&(b=e.bottom-u.bottom+o,t<0&&e.top-b0&&e.right>u.right+g&&(g=e.right-u.right+g+r)):e.right>u.right&&(g=e.right-u.right+r,t<0&&e.leftt.clientHeight||t.scrollWidth>t.clientWidth)return t;t=t.assignedSlot||t.parentNode}else if(t.nodeType==11)t=t.host;else break;return null}class wm{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:i}=e;this.set(t,Math.min(e.anchorOffset,t?bt(t):0),i,Math.min(e.focusOffset,i?bt(i):0))}set(e,t,i,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=s}}let ci=null;function bf(n){if(n.setActive)return n.setActive();if(ci)return n.focus(ci);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(ci==null?{get preventScroll(){return ci={preventScroll:!0},!0}}:void 0),!ci){ci=!1;for(let t=0;tMath.max(1,n.scrollHeight-n.clientHeight-4)}function kf(n,e){for(let t=n,i=e;;){if(t.nodeType==3&&i>0)return{node:t,offset:i};if(t.nodeType==1&&i>0){if(t.contentEditable=="false")return null;t=t.childNodes[i-1],i=bt(t)}else if(t.parentNode&&!Rs(t))i=Kt(t),t=t.parentNode;else return null}}function xf(n,e){for(let t=n,i=e;;){if(t.nodeType==3&&it)return f.domBoundsAround(e,t,h);if(u>=e&&s==-1&&(s=a,r=h),h>t&&f.dom.parentNode==this.dom){o=a,l=c;break}c=u,h=u+f.breakAfter}return{from:r,to:l<0?i+this.length:l,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].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),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&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,i=pl){this.markDirty();for(let s=e;sthis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function Qf(n,e,t,i,s,r,o,l,a){let{children:h}=n,c=h.length?h[e]:null,f=r.length?r[r.length-1]:null,u=f?f.breakAfter:o;if(!(e==i&&c&&!o&&!u&&r.length<2&&c.merge(t,s,r.length?f:null,t==0,l,a))){if(i0&&(!o&&r.length&&c.merge(t,c.length,r[0],!1,l,0)?c.breakAfter=r.shift().breakAfter:(t2);var Z={mac:$a||/Mac/.test($e.platform),windows:/Win/.test($e.platform),linux:/Linux|X11/.test($e.platform),ie:or,ie_version:$f?bo.documentMode||6:yo?+yo[1]:So?+So[1]:0,gecko:Qa,gecko_version:Qa?+(/Firefox\/(\d+)/.exec($e.userAgent)||[0,0])[1]:0,chrome:!!kr,chrome_version:kr?+kr[1]:0,ios:$a,android:/Android\b/.test($e.userAgent),webkit:Pa,safari:vf,webkit_version:Pa?+(/\bAppleWebKit\/(\d+)/.exec($e.userAgent)||[0,0])[1]:0,tabSize:bo.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const $m=256;class Fe extends G{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){e.nodeType==3&&this.createDOM(e)}merge(e,t,i){return this.flags&8||i&&(!(i instanceof Fe)||this.length-(t-e)+i.length>$m||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new Fe(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new be(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return vm(this.dom,e,t)}}class St extends G{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let s of t)s.setParent(this)}setAttrs(e){if(Sf(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)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,i,s,r,o){return i&&(!(i instanceof St&&i.mark.eq(this.mark))||e&&r<=0||te&&t.push(i=e&&(s=r),i=a,r++}let o=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new St(this.mark,t,o)}domAtPos(e){return Cf(this,e)}coordsAt(e,t){return Tf(this,e,t)}}function vm(n,e,t){let i=n.nodeValue.length;e>i&&(e=i);let s=e,r=e,o=0;e==0&&t<0||e==i&&t>=0?Z.chrome||Z.gecko||(e?(s--,o=1):r=0)?0:l.length-1];return Z.safari&&!o&&a.width==0&&(a=Array.prototype.find.call(l,h=>h.width)||a),o?Ol(a,o<0):a||null}class Rt extends G{static create(e,t,i){return new Rt(e,t,i)}constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}split(e){let t=Rt.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.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,i,s,r,o){return i&&(!(i instanceof Rt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0)?be.before(this.dom):be.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;let s=this.dom.getClientRects(),r=null;if(!s.length)return null;let o=this.side?this.side<0:e>0;for(let l=o?s.length-1:0;r=s[l],!(e>0?l==0:l==s.length-1||r.top0?be.before(this.dom):be.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return B.empty}get isHidden(){return!0}}Fe.prototype.children=Rt.prototype.children=Pi.prototype.children=pl;function Cf(n,e){let t=n.dom,{children:i}=n,s=0;for(let r=0;sr&&e0;r--){let o=i[r-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let r=s;r0&&e instanceof St&&s.length&&(i=s[s.length-1])instanceof St&&i.mark.eq(e.mark)?Zf(i,e.children[0],t-1):(s.push(e),e.setParent(n)),n.length+=e.length}function Tf(n,e,t){let i=null,s=-1,r=null,o=-1;function l(h,c){for(let f=0,u=0;f=c&&(d.children.length?l(d,c-u):(!r||r.isHidden&&t>0)&&(O>c||u==O&&d.getSide()>0)?(r=d,o=c-u):(u-1?1:0)!=s.length-(t&&s.indexOf(t)>-1?1:0))return!1;for(let r of i)if(r!=t&&(s.indexOf(r)==-1||n[r]!==e[r]))return!1;return!0}function xo(n,e,t){let i=!1;if(e)for(let s in e)t&&s in t||(i=!0,s=="style"?n.style.cssText="":n.removeAttribute(s));if(t)for(let s in t)e&&e[s]==t[s]||(i=!0,s=="style"?n.style.cssText=t[s]:n.setAttribute(s,t[s]));return i}function Zm(n){let e=Object.create(null);for(let t=0;t0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){As(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Zf(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=ko(t,this.attrs||{})),i&&(this.attrs=ko({class:i},this.attrs||{}))}domAtPos(e){return Cf(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var i;this.dom?this.flags&4&&(Sf(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),this.prevAttrs!==void 0&&(xo(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let s=this.dom.lastChild;for(;s&&G.get(s)instanceof St;)s=s.lastChild;if(!s||!this.length||s.nodeName!="BR"&&((i=G.get(s))===null||i===void 0?void 0:i.isEditable)==!1&&(!Z.ios||!this.children.some(r=>r instanceof Fe))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let i of this.children){if(!(i instanceof Fe)||/[^ -~]/.test(i.text))return null;let s=mn(i.dom);if(s.length!=1)return null;e+=s[0].width,t=s[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let i=Tf(this,e,t);if(!this.children.length&&i&&this.parent){let{heightOracle:s}=this.parent.view.viewState,r=i.bottom-i.top;if(Math.abs(r-s.lineHeight)<2&&s.textHeight=t){if(r instanceof se)return r;if(o>t)break}s=o+r.breakAfter}return null}}class mt extends G{constructor(e,t,i){super(),this.widget=e,this.length=t,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,s,r,o){return i&&(!(i instanceof mt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0}}class wt{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,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var ke=function(n){return n[n.Text=0]="Text",n[n.WidgetBefore=1]="WidgetBefore",n[n.WidgetAfter=2]="WidgetAfter",n[n.WidgetRange=3]="WidgetRange",n}(ke||(ke={}));class A extends Ht{constructor(e,t,i,s){super(),this.startSide=e,this.endSide=t,this.widget=i,this.spec=s}get heightRelevant(){return!1}static mark(e){return new Wn(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return t+=i&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Dt(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,s;if(e.isBlockGap)i=-5e8,s=4e8;else{let{start:r,end:o}=Rf(e,t);i=(r?t?-3e8:-1:5e8)-1,s=(o?t?2e8:1:-6e8)+1}return new Dt(e,i,s,t,e.widget||null,!0)}static line(e){return new En(e)}static set(e,t=!1){return _.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}A.none=_.empty;class Wn extends A{constructor(e){let{start:t,end:i}=Rf(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,i;return this==e||e instanceof Wn&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&As(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)}}Wn.prototype.point=!1;class En extends A{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof En&&this.spec.class==e.spec.class&&As(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)}}En.prototype.mapMode=Oe.TrackBefore;En.prototype.point=!0;class Dt extends A{constructor(e,t,i,s,r,o){super(t,i,r,e),this.block=s,this.isReplace=o,this.mapMode=s?t<=0?Oe.TrackBefore:Oe.TrackAfter:Oe.TrackDel}get type(){return this.startSide!=this.endSide?ke.WidgetRange:this.startSide<=0?ke.WidgetBefore:ke.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Dt&&Tm(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)}}Dt.prototype.point=!0;function Rf(n,e=!1){let{inclusiveStart:t,inclusiveEnd:i}=n;return t==null&&(t=n.inclusive),i==null&&(i=n.inclusive),{start:t??e,end:i??e}}function Tm(n,e){return n==e||!!(n&&e&&n.compare(e))}function wo(n,e,t,i=0){let s=t.length-1;s>=0&&t[s]+i>=n?t[s]=Math.max(t[s],e):t.push(n,e)}class an{constructor(e,t,i,s){this.doc=e,this.pos=t,this.end=i,this.disallowBlockEffectsFor=s,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(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof mt&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new se),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Nn(new Pi(-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 mt)&&this.getLine()}buildText(e,t,i){for(;e>0;){if(this.textOff==this.text.length){let{value:r,lineBreak:o,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(o){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}else this.text=r,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append(Nn(new Fe(this.text.slice(this.textOff,this.textOff+s)),t),i),this.atCursorPos=!0,this.textOff+=s,e-=s,i=0}}span(e,t,i,s){this.buildText(t-e,i,s),this.pos=t,this.openStart<0&&(this.openStart=s)}point(e,t,i,s,r,o){if(this.disallowBlockEffectsFor[o]&&i instanceof Dt){if(i.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 l=t-e;if(i instanceof Dt)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new mt(i.widget||$i.block,l,i));else{let a=Rt.create(i.widget||$i.inline,l,l?0:i.startSide),h=this.atCursorPos&&!a.isEditable&&r<=s.length&&(e0),c=!a.isEditable&&(es.length||i.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!h&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),h&&(f.append(Nn(new Pi(1),s),r),r=s.length+Math.max(0,r-s.length)),f.append(Nn(a,s),r),this.atCursorPos=c,this.pendingBuffer=c?es.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=r)}static build(e,t,i,s,r){let o=new an(e,t,i,r);return o.openEnd=_.spans(s,t,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function Nn(n,e){for(let t of e)n=new St(t,[n],n.length);return n}class $i extends wt{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}}$i.inline=new $i("span");$i.block=new $i("div");var ee=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(ee||(ee={}));const ei=ee.LTR,ml=ee.RTL;function Af(n){let e=[];for(let t=0;t=t){if(l.level==i)return o;(r<0||(s!=0?s<0?l.fromt:e[r].level>l.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}function Mf(n,e){if(n.length!=e.length)return!1;for(let t=0;t=0;m-=3)if(tt[m+1]==-d){let g=tt[m+2],b=g&2?s:g&4?g&1?r:s:0;b&&(N[f]=N[tt[m]]=b),l=m;break}}else{if(tt.length==189)break;tt[l++]=f,tt[l++]=u,tt[l++]=a}else if((O=N[f])==2||O==1){let m=O==s;a=m?0:1;for(let g=l-3;g>=0;g-=3){let b=tt[g+2];if(b&2)break;if(m)tt[g+2]|=2;else{if(b&4)break;tt[g+2]|=4}}}}}function Em(n,e,t,i){for(let s=0,r=i;s<=t.length;s++){let o=s?t[s-1].to:n,l=sa;)O==g&&(O=t[--m].from,g=m?t[m-1].to:n),N[--O]=d;a=c}else r=h,a++}}}function Po(n,e,t,i,s,r,o){let l=i%2?2:1;if(i%2==s%2)for(let a=e,h=0;aa&&o.push(new At(a,m.from,d));let g=m.direction==ei!=!(d%2);$o(n,g?i+1:i,s,m.inner,m.from,m.to,o),a=m.to}O=m.to}else{if(O==t||(c?N[O]!=l:N[O]==l))break;O++}u?Po(n,a,O,i+1,s,u,o):ae;){let c=!0,f=!1;if(!h||a>r[h-1].to){let m=N[a-1];m!=l&&(c=!1,f=m==16)}let u=!c&&l==1?[]:null,d=c?i:i+1,O=a;e:for(;;)if(h&&O==r[h-1].to){if(f)break e;let m=r[--h];if(!c)for(let g=m.from,b=h;;){if(g==e)break e;if(b&&r[b-1].to==g)g=r[--b].from;else{if(N[g-1]==l)break e;break}}if(u)u.push(m);else{m.toN.length;)N[N.length]=256;let i=[],s=e==ei?0:1;return $o(n,s,s,t,0,n.length,i),i}function Wf(n){return[new At(0,n,0)]}let Ef="";function Ym(n,e,t,i,s){var r;let o=i.head-n.from,l=At.find(e,o,(r=i.bidiLevel)!==null&&r!==void 0?r:-1,i.assoc),a=e[l],h=a.side(s,t);if(o==h){let u=l+=s?1:-1;if(u<0||u>=e.length)return null;a=e[l=u],o=a.side(!s,t),h=a.side(s,t)}let c=me(n.text,o,a.forward(s,t));(ca.to)&&(c=h),Ef=n.text.slice(Math.min(o,c),Math.max(o,c));let f=l==(s?e.length-1:0)?null:e[l+(s?1:-1)];return f&&c==h&&f.level+(s?0:1)n.some(e=>e)}),Bf=T.define({combine:n=>n.some(e=>e)}),Uf=T.define();class Si{constructor(e,t="nearest",i="nearest",s=5,r=5,o=!1){this.range=e,this.y=t,this.x=i,this.yMargin=s,this.xMargin=r,this.isSnapshot=o}map(e){return e.empty?this:new Si(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 Si(y.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Gn=M.define({map:(n,e)=>n.map(e)}),If=M.define();function Ce(n,e,t){let i=n.facet(qf);i.length?i[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const Ct=T.define({combine:n=>n.length?n[0]:!0});let qm=0;const Ki=T.define();class oe{constructor(e,t,i,s,r){this.id=e,this.create=t,this.domEventHandlers=i,this.domEventObservers=s,this.extension=r(this)}static define(e,t){const{eventHandlers:i,eventObservers:s,provide:r,decorations:o}=t||{};return new oe(qm++,e,i,s,l=>{let a=[Ki.of(l)];return o&&a.push(gn.of(h=>{let c=h.plugin(l);return c?o(c):A.none})),r&&a.push(r(l)),a})}static fromClass(e,t){return oe.define(i=>new e(i),t)}}class xr{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(i){if(Ce(t.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Ce(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(i){Ce(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const jf=T.define(),gl=T.define(),gn=T.define(),Nf=T.define(),bl=T.define(),Gf=T.define();function Ca(n,e){let t=n.state.facet(Gf);if(!t.length)return t;let i=t.map(r=>r instanceof Function?r(n):r),s=[];return _.spans(i,e.from,e.to,{point(){},span(r,o,l,a){let h=r-e.from,c=o-e.from,f=s;for(let u=l.length-1;u>=0;u--,a--){let d=l[u].spec.bidiIsolate,O;if(d==null&&(d=Dm(e.text,h,c)),a>0&&f.length&&(O=f[f.length-1]).to==h&&O.direction==d)O.to=c,f=O.inner;else{let m={from:h,to:c,direction:d,inner:[]};f.push(m),f=m.inner}}}}),s}const Ff=T.define();function Hf(n){let e=0,t=0,i=0,s=0;for(let r of n.state.facet(Ff)){let o=r(n);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(i=Math.max(i,o.top)),o.bottom!=null&&(s=Math.max(s,o.bottom)))}return{left:e,right:t,top:i,bottom:s}}const Ji=T.define();class Be{constructor(e,t,i,s){this.fromA=e,this.toA=t,this.fromB=i,this.toB=s}join(e){return new Be(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,i=this;for(;t>0;t--){let s=e[t-1];if(!(s.fromA>i.toA)){if(s.toAc)break;r+=2}if(!a)return i;new Be(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),o=a.toA,l=a.toB}}}class Xs{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=he.empty(this.startState.doc.length);for(let r of i)this.changes=this.changes.compose(r.changes);let s=[];this.changes.iterChangedRanges((r,o,l,a)=>s.push(new Be(r,o,l,a))),this.changedRanges=s}static create(e,t,i){return new Xs(e,t,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class Za extends G{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=A.none,this.lastCompositionAfterCursor=!1,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 se],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Be(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:h,toA:c})=>cthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?s=this.domChanged.newSel.head:!jm(e.changes,this.hasComposition)&&!e.selectionSet&&(s=e.state.selection.main.head));let r=s>-1?Lm(this.view,e.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:h,to:c}=this.hasComposition;i=new Be(h,c,e.changes.mapPos(h,-1),e.changes.mapPos(c,1)).addToSet(i.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(Z.ie||Z.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.updateDeco(),a=Um(o,l,e.changes);return i=Be.extendWithRanges(i,a),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,i);let{observer:s}=this.view;s.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=Z.chrome||Z.ios?{node:s.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||s.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let r=[];if(this.view.viewport.from||this.view.viewport.to=0?s[o]:null;if(!l)break;let{fromA:a,toA:h,fromB:c,toB:f}=l,u,d,O,m;if(i&&i.range.fromBc){let w=an.build(this.view.state.doc,c,i.range.fromB,this.decorations,this.dynamicDecorationMap),k=an.build(this.view.state.doc,i.range.toB,f,this.decorations,this.dynamicDecorationMap);d=w.breakAtStart,O=w.openStart,m=k.openEnd;let C=this.compositionView(i);k.breakAtStart?C.breakAfter=1:k.content.length&&C.merge(C.length,C.length,k.content[0],!1,k.openStart,0)&&(C.breakAfter=k.content[0].breakAfter,k.content.shift()),w.content.length&&C.merge(0,0,w.content[w.content.length-1],!0,0,w.openEnd)&&w.content.pop(),u=w.content.concat(C).concat(k.content)}else({content:u,breakAtStart:d,openStart:O,openEnd:m}=an.build(this.view.state.doc,c,f,this.decorations,this.dynamicDecorationMap));let{i:g,off:b}=r.findPos(h,1),{i:S,off:x}=r.findPos(a,-1);Qf(this,S,x,g,b,u,d,O,m)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let i of t.effects)i.is(If)&&(this.editContextFormatting=i.value)}compositionView(e){let t=new Fe(e.text.nodeValue);t.flags|=8;for(let{deco:s}of e.marks)t=new St(s,[t],t.length);let i=new se;return i.append(t,0),i}fixCompositionDOM(e){let t=(r,o)=>{o.flags|=8|(o.children.some(a=>a.flags&7)?1:0),this.markedForComposition.add(o);let l=G.get(r);l&&l!=o&&(l.dom=null),o.setDOM(r)},i=this.childPos(e.range.fromB,1),s=this.children[i.i];t(e.line,s);for(let r=e.marks.length-1;r>=-1;r--)i=s.childPos(i.off,1),s=s.children[i.i],t(r>=0?e.marks[r].node:e.text,s)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,s=i==this.dom,r=!s&&Ss(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(s||t||r))return;let o=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(l.anchor)),h=l.empty?a:this.moveToLine(this.domAtPos(l.head));if(Z.gecko&&l.empty&&!this.hasComposition&&zm(a)){let f=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(f,a.node.childNodes[a.offset]||null)),a=h=new be(f,0),o=!0}let c=this.view.observer.selectionRange;(o||!c.focusNode||(!ln(a.node,a.offset,c.anchorNode,c.anchorOffset)||!ln(h.node,h.offset,c.focusNode,c.focusOffset))&&!this.suppressWidgetCursorChange(c,l))&&(this.view.observer.ignore(()=>{Z.android&&Z.chrome&&this.dom.contains(c.focusNode)&&Im(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=pn(this.view.root);if(f)if(l.empty){if(Z.gecko){let u=_m(a.node,a.offset);if(u&&u!=3){let d=(u==1?kf:xf)(a.node,a.offset);d&&(a=new be(d.node,d.offset))}}f.collapse(a.node,a.offset),l.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=l.bidiLevel)}else if(f.extend){f.collapse(a.node,a.offset);try{f.extend(h.node,h.offset)}catch{}}else{let u=document.createRange();l.anchor>l.head&&([a,h]=[h,a]),u.setEnd(h.node,h.offset),u.setStart(a.node,a.offset),f.removeAllRanges(),f.addRange(u)}r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(a,h)),this.impreciseAnchor=a.precise?null:new be(c.anchorNode,c.anchorOffset),this.impreciseHead=h.precise?null:new be(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&ln(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,i=pn(e.root),{anchorNode:s,anchorOffset:r}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let o=se.find(this,t.head);if(!o)return;let l=o.posAtStart;if(t.head==l||t.head==l+o.length)return;let a=this.coordsAt(t.head,-1),h=this.coordsAt(t.head,1);if(!a||!h||a.bottom>h.top)return;let c=this.domAtPos(t.head+t.assoc);i.collapse(c.node,c.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&i.collapse(s,r)}moveToLine(e){let t=this.dom,i;if(e.node!=t)return e;for(let s=e.offset;!i&&s=0;s--){let r=G.get(t.childNodes[s]);r instanceof se&&(i=r.domAtPos(r.length))}return i?new be(i.node,i.offset,!0):e}nearest(e){for(let t=e;t;){let i=G.get(t);if(i&&i.rootView==this)return i;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;t=0;o--){let l=this.children[o],a=r-l.breakAfter,h=a-l.length;if(ae||l.covers(1))&&(!i||l instanceof se&&!(i instanceof se&&t>=0)))i=l,s=h;else if(i&&h==e&&a==e&&l instanceof mt&&Math.abs(t)<2){if(l.deco.startSide<0)break;o&&(i=null)}r=h}return i?i.coordsAt(e-s,t):null}coordsForChar(e){let{i:t,off:i}=this.childPos(e,1),s=this.children[t];if(!(s instanceof se))return null;for(;s.children.length;){let{i:l,off:a}=s.childPos(i,1);for(;;l++){if(l==s.children.length)return null;if((s=s.children[l]).length)break}i=a}if(!(s instanceof Fe))return null;let r=me(s.text,i);if(r==i)return null;let o=Jt(s.dom,i,r).getClientRects();for(let l=0;lMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==ee.LTR;for(let h=0,c=0;cs)break;if(h>=i){let d=f.dom.getBoundingClientRect();if(t.push(d.height),o){let O=f.dom.lastChild,m=O?mn(O):[];if(m.length){let g=m[m.length-1],b=a?g.right-d.left:d.right-g.left;b>l&&(l=b,this.minWidth=r,this.minWidthFrom=h,this.minWidthTo=u)}}}h=u+f.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?ee.RTL:ee.LTR}measureTextSize(){for(let r of this.children)if(r instanceof se){let o=r.measureTextSize();if(o)return o}let e=document.createElement("div"),t,i,s;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let r=mn(e.firstChild)[0];t=e.getBoundingClientRect().height,i=r?r.width/27:7,s=r?r.height:t,e.remove()}),{lineHeight:t,charWidth:i,textHeight:s}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new wf(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,s=0;;s++){let r=s==t.viewports.length?null:t.viewports[s],o=r?r.from-1:this.length;if(o>i){let l=(t.lineBlockAt(o).bottom-t.lineBlockAt(i).top)/this.view.scaleY;e.push(A.replace({widget:new Ta(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!r)break;i=r.to+1}return A.set(e)}updateDeco(){let e=1,t=this.view.state.facet(gn).map(r=>(this.dynamicDecorationMap[e++]=typeof r=="function")?r(this.view):r),i=!1,s=this.view.state.facet(Nf).map((r,o)=>{let l=typeof r=="function";return l&&(i=!0),l?r(this.view):r});for(s.length&&(this.dynamicDecorationMap[e++]=i,t.push(_.join(s))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),s;if(!i)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let r=Hf(this.view),o={left:i.left-r.left,top:i.top-r.top,right:i.right+r.right,bottom:i.bottom+r.bottom},{offsetWidth:l,offsetHeight:a}=this.view.scrollDOM;km(this.view.scrollDOM,o,t.head{ie.from&&(t=!0)}),t}function Nm(n,e,t=1){let i=n.charCategorizer(e),s=n.doc.lineAt(e),r=e-s.from;if(s.length==0)return y.cursor(e);r==0?t=1:r==s.length&&(t=-1);let o=r,l=r;t<0?o=me(s.text,r,!1):l=me(s.text,r);let a=i(s.text.slice(o,l));for(;o>0;){let h=me(s.text,o,!1);if(i(s.text.slice(h,o))!=a)break;o=h}for(;ln?e.left-n:Math.max(0,n-e.right)}function Fm(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function wr(n,e){return n.tope.top+1}function Ra(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function Co(n,e,t){let i,s,r,o,l=!1,a,h,c,f;for(let O=n.firstChild;O;O=O.nextSibling){let m=mn(O);for(let g=0;gx||o==x&&r>S){i=O,s=b,r=S,o=x;let w=x?t0?g0)}S==0?t>b.bottom&&(!c||c.bottomb.top)&&(h=O,f=b):c&&wr(c,b)?c=Aa(c,b.bottom):f&&wr(f,b)&&(f=Ra(f,b.top))}}if(c&&c.bottom>=t?(i=a,s=c):f&&f.top<=t&&(i=h,s=f),!i)return{node:n,offset:0};let u=Math.max(s.left,Math.min(s.right,e));if(i.nodeType==3)return Xa(i,u,t);if(l&&i.contentEditable!="false")return Co(i,u,t);let d=Array.prototype.indexOf.call(n.childNodes,i)+(e>=(s.left+s.right)/2?1:0);return{node:n,offset:d}}function Xa(n,e,t){let i=n.nodeValue.length,s=-1,r=1e9,o=0;for(let l=0;lt?c.top-t:t-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&f=(c.left+c.right)/2,d=u;if((Z.chrome||Z.gecko)&&Jt(n,l).getBoundingClientRect().left==c.right&&(d=!u),f<=0)return{node:n,offset:l+(d?1:0)};s=l+(d?1:0),r=f}}}return{node:n,offset:s>-1?s:o>0?n.nodeValue.length:0}}function Jf(n,e,t,i=-1){var s,r;let o=n.contentDOM.getBoundingClientRect(),l=o.top+n.viewState.paddingTop,a,{docHeight:h}=n.viewState,{x:c,y:f}=e,u=f-l;if(u<0)return 0;if(u>h)return n.state.doc.length;for(let w=n.viewState.heightOracle.textHeight/2,k=!1;a=n.elementAtHeight(u),a.type!=ke.Text;)for(;u=i>0?a.bottom+w:a.top-w,!(u>=0&&u<=h);){if(k)return t?null:0;k=!0,i=-i}f=l+u;let d=a.from;if(dn.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:Ma(n,o,a,c,f);let O=n.dom.ownerDocument,m=n.root.elementFromPoint?n.root:O,g=m.elementFromPoint(c,f);g&&!n.contentDOM.contains(g)&&(g=null),g||(c=Math.max(o.left+1,Math.min(o.right-1,c)),g=m.elementFromPoint(c,f),g&&!n.contentDOM.contains(g)&&(g=null));let b,S=-1;if(g&&((s=n.docView.nearest(g))===null||s===void 0?void 0:s.isEditable)!=!1){if(O.caretPositionFromPoint){let w=O.caretPositionFromPoint(c,f);w&&({offsetNode:b,offset:S}=w)}else if(O.caretRangeFromPoint){let w=O.caretRangeFromPoint(c,f);w&&({startContainer:b,startOffset:S}=w,(!n.contentDOM.contains(b)||Z.safari&&Hm(b,S,c)||Z.chrome&&Km(b,S,c))&&(b=void 0))}}if(!b||!n.docView.dom.contains(b)){let w=se.find(n.docView,d);if(!w)return u>a.top+a.height/2?a.to:a.from;({node:b,offset:S}=Co(w.dom,c,f))}let x=n.docView.nearest(b);if(!x)return null;if(x.isWidget&&((r=x.dom)===null||r===void 0?void 0:r.nodeType)==1){let w=x.dom.getBoundingClientRect();return e.yn.defaultLineHeight*1.5){let l=n.viewState.heightOracle.textHeight,a=Math.floor((s-t.top-(n.defaultLineHeight-l)*.5)/l);r+=a*n.viewState.heightOracle.lineLength}let o=n.state.sliceDoc(t.from,t.to);return t.from+Oo(o,r,n.state.tabSize)}function Hm(n,e,t){let i;if(n.nodeType!=3||e!=(i=n.nodeValue.length))return!1;for(let s=n.nextSibling;s;s=s.nextSibling)if(s.nodeType!=1||s.nodeName!="BR")return!1;return Jt(n,i-1,i).getBoundingClientRect().left>t}function Km(n,e,t){if(e!=0)return!1;for(let s=n;;){let r=s.parentNode;if(!r||r.nodeType!=1||r.firstChild!=s)return!1;if(r.classList.contains("cm-line"))break;s=r}let i=n.nodeType==1?n.getBoundingClientRect():Jt(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-i.left>5}function Zo(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let i of t.type)if(i.to>e||i.to==e&&(i.to==t.to||i.type==ke.Text))return i}return t}function Jm(n,e,t,i){let s=Zo(n,e.head),r=!i||s.type!=ke.Text||!(n.lineWrapping||s.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(r){let o=n.dom.getBoundingClientRect(),l=n.textDirectionAt(s.from),a=n.posAtCoords({x:t==(l==ee.LTR)?o.right-1:o.left+1,y:(r.top+r.bottom)/2});if(a!=null)return y.cursor(a,t?-1:1)}return y.cursor(t?s.to:s.from,t?-1:1)}function Wa(n,e,t,i){let s=n.state.doc.lineAt(e.head),r=n.bidiSpans(s),o=n.textDirectionAt(s.from);for(let l=e,a=null;;){let h=Ym(s,r,o,l,t),c=Ef;if(!h){if(s.number==(t?n.state.doc.lines:1))return l;c=` -`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),h=n.visualLineSide(s,!t)}if(a){if(!a(c))return l}else{if(!i)return h;a=i(c)}l=h}}function eg(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==te.Space&&(s=o),s==o}}function tg(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return y.cursor(s,e.assoc);let o=e.goalColumn,l,a=n.contentDOM.getBoundingClientRect(),h=n.coordsAtPos(s,e.assoc||-1),c=n.documentTop;if(h)o==null&&(o=h.left-a.left),l=r<0?h.top:h.bottom;else{let d=n.viewState.lineBlockAt(s);o==null&&(o=Math.min(a.right-a.left,n.defaultCharacterWidth*(s-d.from))),l=(r<0?d.top:d.bottom)+c}let f=a.left+o,u=i??n.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let O=l+(u+d)*r,m=Jf(n,{x:f,y:O},!1,r);if(Oa.bottom||(r<0?ms)){let g=n.docView.coordsForChar(m),b=!g||O{if(e>r&&es(n)),t.from,e.head>t.from?-1:1);return i==t.from?t:y.cursor(i,inull),Z.gecko&&bg(e.contentDOM.ownerDocument)}handleEvent(e){!cg(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let i=this.handlers[e];if(i){for(let s of i.observers)s(this.view,t);for(let s of i.handlers){if(t.defaultPrevented)break;if(s(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=ng(e),i=this.handlers,s=this.view.contentDOM;for(let r in t)if(r!="scroll"){let o=!t[r].handlers.length,l=i[r];l&&o!=!l.handlers.length&&(s.removeEventListener(r,this.handleEvent),l=null),l||s.addEventListener(r,this.handleEvent,{passive:o})}for(let r in i)r!="scroll"&&!t[r]&&s.removeEventListener(r,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&tu.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Z.android&&Z.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Z.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=eu.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||sg.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:Z.safari&&!Z.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.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 Ea(n,e){return(t,i)=>{try{return e.call(n,i,t)}catch(s){Ce(t.state,s)}}}function ng(n){let e=Object.create(null);function t(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of n){let s=i.spec;if(s&&s.domEventHandlers)for(let r in s.domEventHandlers){let o=s.domEventHandlers[r];o&&t(r).handlers.push(Ea(i.value,o))}if(s&&s.domEventObservers)for(let r in s.domEventObservers){let o=s.domEventObservers[r];o&&t(r).observers.push(Ea(i.value,o))}}for(let i in He)t(i).handlers.push(He[i]);for(let i in Ue)t(i).observers.push(Ue[i]);return e}const eu=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],sg="dthko",tu=[16,17,18,20,91,92,224,225],Fn=6;function Hn(n){return Math.max(0,n)*.7+8}function rg(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class og{constructor(e,t,i,s){this.view=e,this.startEvent=t,this.style=i,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=xm(e.contentDOM),this.atoms=e.state.facet(bl).map(o=>o(e));let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Y.allowMultipleSelections)&&lg(e,t),this.dragging=hg(e,t)&&ru(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){var t;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&rg(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let i=0,s=0,r=((t=this.scrollParent)===null||t===void 0?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},o=Hf(this.view);e.clientX-o.left<=r.left+Fn?i=-Hn(r.left-e.clientX):e.clientX+o.right>=r.right-Fn&&(i=Hn(e.clientX-r.right)),e.clientY-o.top<=r.top+Fn?s=-Hn(r.top-e.clientY):e.clientY+o.bottom>=r.bottom-Fn&&(s=Hn(e.clientY-r.bottom)),this.setScrollSpeed(i,s)}up(e){this.dragging==null&&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),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let i=0;it.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function lg(n,e){let t=n.state.facet(Vf);return t.length?t[0](e):Z.mac?e.metaKey:e.ctrlKey}function ag(n,e){let t=n.state.facet(Yf);return t.length?t[0](e):Z.mac?!e.altKey:!e.ctrlKey}function hg(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let i=pn(n.root);if(!i||i.rangeCount==0)return!0;let s=i.getRangeAt(0).getClientRects();for(let r=0;r=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function cg(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,i;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(i=G.get(t))&&i.ignoreEvent(e))return!1;return!0}const He=Object.create(null),Ue=Object.create(null),iu=Z.ie&&Z.ie_version<15||Z.ios&&Z.webkit_version<604;function fg(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),nu(n,t.value)},50)}function nu(n,e){let{state:t}=n,i,s=1,r=t.toText(e),o=r.lines==t.selection.ranges.length;if(To!=null&&t.selection.ranges.every(a=>a.empty)&&To==r.toString()){let a=-1;i=t.changeByRange(h=>{let c=t.doc.lineAt(h.from);if(c.from==a)return{range:h};a=c.from;let f=t.toText((o?r.line(s++).text:e)+t.lineBreak);return{changes:{from:c.from,insert:f},range:y.cursor(h.from+f.length)}})}else o?i=t.changeByRange(a=>{let h=r.line(s++);return{changes:{from:a.from,to:a.to,insert:h.text},range:y.cursor(a.from+h.length)}}):i=t.replaceSelection(r);n.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}Ue.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};He.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);Ue.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};Ue.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};He.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let i of n.state.facet(Df))if(t=i(n,e),t)break;if(!t&&e.button==0&&(t=Og(n,e)),t){let i=!n.hasFocus;n.inputState.startMouseSelection(new og(n,e,t,i)),i&&n.observer.ignore(()=>{bf(n.contentDOM);let r=n.root.activeElement;r&&!r.contains(n.contentDOM)&&r.blur()});let s=n.inputState.mouseSelection;if(s)return s.start(e),s.dragging===!1}return!1};function Va(n,e,t,i){if(i==1)return y.cursor(e,t);if(i==2)return Nm(n.state,e,t);{let s=se.find(n.docView,e),r=n.state.doc.lineAt(s?s.posAtEnd:e),o=s?s.posAtStart:r.from,l=s?s.posAtEnd:r.to;return ln>=e.top&&n<=e.bottom,Ya=(n,e,t)=>su(e,t)&&n>=t.left&&n<=t.right;function ug(n,e,t,i){let s=se.find(n.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(r==0)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&Ya(t,i,o))return-1;let l=s.coordsAt(r,1);return l&&Ya(t,i,l)?1:o&&su(i,o)?-1:1}function Da(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:ug(n,t,e.clientX,e.clientY)}}const dg=Z.ie&&Z.ie_version<=11;let qa=null,za=0,La=0;function ru(n){if(!dg)return n.detail;let e=qa,t=La;return qa=n,La=Date.now(),za=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(za+1)%3:1}function Og(n,e){let t=Da(n,e),i=ru(e),s=n.state.selection;return{update(r){r.docChanged&&(t.pos=r.changes.mapPos(t.pos),s=s.map(r.changes))},get(r,o,l){let a=Da(n,r),h,c=Va(n,a.pos,a.bias,i);if(t.pos!=a.pos&&!o){let f=Va(n,t.pos,t.bias,i),u=Math.min(f.from,c.from),d=Math.max(f.to,c.to);c=u1&&(h=pg(s,a.pos))?h:l?s.addRange(c):y.create([c])}}}function pg(n,e){for(let t=0;t=e)return y.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}He.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let s=n.docView.nearest(e.target);if(s&&s.isWidget){let r=s.posAtStart,o=r+s.length;(r>=t.to||o<=t.from)&&(t=y.range(r,o))}}let{inputState:i}=n;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",n.state.sliceDoc(t.from,t.to)),e.dataTransfer.effectAllowed="copyMove"),!1};He.dragend=n=>(n.inputState.draggedContent=null,!1);function _a(n,e,t,i){if(!t)return;let s=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:r}=n.inputState,o=i&&r&&ag(n,e)?{from:r.from,to:r.to}:null,l={from:s,insert:t},a=n.state.changes(o?[o,l]:l);n.focus(),n.dispatch({changes:a,selection:{anchor:a.mapPos(s,-1),head:a.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"}),n.inputState.draggedContent=null}He.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let i=Array(t.length),s=0,r=()=>{++s==t.length&&_a(n,e,i.filter(o=>o!=null).join(n.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[o]=l.result),r()},l.readAsText(t[o])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return _a(n,e,i,!0),!0}return!1};He.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=iu?null:e.clipboardData;return t?(nu(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(fg(n),!1)};function mg(n,e){let t=n.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),n.focus()},50)}function gg(n){let e=[],t=[],i=!1;for(let s of n.selection.ranges)s.empty||(e.push(n.sliceDoc(s.from,s.to)),t.push(s));if(!e.length){let s=-1;for(let{from:r}of n.selection.ranges){let o=n.doc.lineAt(r);o.number>s&&(e.push(o.text),t.push({from:o.from,to:Math.min(n.doc.length,o.to+1)})),s=o.number}i=!0}return{text:e.join(n.lineBreak),ranges:t,linewise:i}}let To=null;He.copy=He.cut=(n,e)=>{let{text:t,ranges:i,linewise:s}=gg(n.state);if(!t&&!s)return!1;To=s?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let r=iu?null:e.clipboardData;return r?(r.clearData(),r.setData("text/plain",t),!0):(mg(n,t),!1)};const ou=xt.define();function lu(n,e){let t=[];for(let i of n.facet(Lf)){let s=i(n,e);s&&t.push(s)}return t?n.update({effects:t,annotations:ou.of(!0)}):null}function au(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=lu(n.state,e);t?n.dispatch(t):n.update([])}},10)}Ue.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),au(n)};Ue.blur=n=>{n.observer.clearSelectionRange(),au(n)};Ue.compositionstart=Ue.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};Ue.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,Z.chrome&&Z.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};Ue.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};He.beforeinput=(n,e)=>{var t;let i;if(Z.chrome&&Z.android&&(i=eu.find(s=>s.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((t=window.visualViewport)===null||t===void 0?void 0:t.height)||0;setTimeout(()=>{var r;(((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0)>s+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return Z.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),Z.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>Ue.compositionend(n,e),20),!1};const Ba=new Set;function bg(n){Ba.has(n)||(Ba.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const Ua=["pre-wrap","normal","pre-line","break-spaces"];class Sg{constructor(e){this.lineWrapping=e,this.doc=B.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}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 Ua.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=i,this.textHeight=s,this.lineLength=r,a){this.heightSamples={};for(let h=0;h0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>ks&&(e.heightChanged=!0),this.height=t)}replace(e,t,i){return xe.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,s){let r=this,o=i.doc;for(let l=s.length-1;l>=0;l--){let{fromA:a,toA:h,fromB:c,toB:f}=s[l],u=r.lineAt(a,J.ByPosNoHeight,i.setDoc(t),0,0),d=u.to>=h?u:r.lineAt(h,J.ByPosNoHeight,i,0,0);for(f+=d.to-h,h=d.to;l>0&&u.from<=s[l-1].toA;)a=s[l-1].fromA,c=s[l-1].fromB,l--,ar*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),i+=1+l.break,s-=l.size}else if(r>s*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,r-=l.size}else break;else if(s=r&&o(this.blockAt(0,i,s,r))}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more&&this.setHeight(e,s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Me extends hu{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,i,s){return new lt(s,this.length,i,this.height,this.breaks)}replace(e,t,i){let s=i[0];return i.length==1&&(s instanceof Me||s instanceof fe&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof fe?s=new Me(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):xe.of(i)}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more?this.setHeight(e,s.heights[s.index++]):(i||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 fe extends xe{constructor(e){super(e,0)}heightMetrics(e,t){let i=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,r=s-i+1,o,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*r);o=a/r,this.length>r+1&&(l=(this.height-a)/(this.length-r-1))}else o=this.height/r;return{firstLine:i,lastLine:s,perLine:o,perChar:l}}blockAt(e,t,i,s){let{firstLine:r,lastLine:o,perLine:l,perChar:a}=this.heightMetrics(t,s);if(t.lineWrapping){let h=s+(e0){let r=i[i.length-1];r instanceof fe?i[i.length-1]=new fe(r.length+s):i.push(null,new fe(s-1))}if(e>0){let r=i[0];r instanceof fe?i[0]=new fe(e+r.length):i.unshift(new fe(e-1),null)}return xe.of(i)}decomposeLeft(e,t){t.push(new fe(e-1),null)}decomposeRight(e,t){t.push(null,new fe(this.length-e-1))}updateHeight(e,t=0,i=!1,s){let r=t+this.length;if(s&&s.from<=t+this.length&&s.more){let o=[],l=Math.max(t,s.from),a=-1;for(s.from>t&&o.push(new fe(s.from-t-1).updateHeight(e,t));l<=r&&s.more;){let c=e.doc.lineAt(l).length;o.length&&o.push(null);let f=s.heights[s.index++];a==-1?a=f:Math.abs(f-a)>=ks&&(a=-2);let u=new Me(c,f);u.outdated=!1,o.push(u),l+=c+1}l<=r&&o.push(null,new fe(r-l).updateHeight(e,l));let h=xe.of(o);return(a<0||Math.abs(h.height-this.height)>=ks||Math.abs(a-this.heightMetrics(e,t).perLine)>=ks)&&(e.heightChanged=!0),h}else(i||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class kg extends xe{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,t,i,s){let r=i+this.left.height;return el))return h;let c=t==J.ByPosNoHeight?J.ByPosNoHeight:J.ByPos;return a?h.join(this.right.lineAt(l,c,i,o,l)):this.left.lineAt(l,c,i,s,r).join(h)}forEachLine(e,t,i,s,r,o){let l=s+this.left.height,a=r+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,i,l,a,o);else{let h=this.lineAt(a,J.ByPos,i,s,r);e=e&&h.from<=t&&o(h),t>h.to&&this.right.forEachLine(h.to+1,t,i,l,a,o)}}replace(e,t,i){let s=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-s,t-s,i));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let l of i)r.push(l);if(e>0&&Ia(r,o-1),t=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,s=i+this.break;if(e>=s)return this.right.decomposeRight(e-s,t);e2*t.size||t.size>2*e.size?xe.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,i=!1,s){let{left:r,right:o}=this,l=t+r.length+this.break,a=null;return s&&s.from<=t+r.length&&s.more?a=r=r.updateHeight(e,t,i,s):r.updateHeight(e,t,i),s&&s.from<=l+o.length&&s.more?a=o=o.updateHeight(e,l,i,s):o.updateHeight(e,l,i),a?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Ia(n,e){let t,i;n[e]==null&&(t=n[e-1])instanceof fe&&(i=n[e+1])instanceof fe&&n.splice(e-1,3,new fe(t.length+1+i.length))}const xg=5;class Sl{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 i=Math.min(t,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof Me?s.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Me(i-this.pos,-1)),this.writtenTo=i,t>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e=xg)&&this.addLineDeco(s,r,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new Me(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new fe(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Me)return e;let t=new Me(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,i){let s=this.ensureLine();s.length+=i,s.collapsed+=i,s.widgetHeight=Math.max(s.widgetHeight,e),s.breaks+=t,this.writtenTo=this.pos=this.pos+i}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Me)&&!this.isCovered?this.nodes.push(new Me(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&f.overflow!="visible"){let u=c.getBoundingClientRect();r=Math.max(r,u.left),o=Math.min(o,u.right),l=Math.max(l,u.top),a=h==n.parentNode?u.bottom:Math.min(a,u.bottom)}h=f.position=="absolute"||f.position=="fixed"?c.offsetParent:c.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:r-t.left,right:Math.max(r,o)-t.left,top:l-(t.top+e),bottom:Math.max(l,a)-(t.top+e)}}function $g(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Pr{constructor(e,t,i){this.from=e,this.to=t,this.size=i}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new Sg(t),this.stateDeco=e.facet(gn).filter(i=>typeof i!="function"),this.heightMap=xe.empty().applyChanges(this.stateDeco,B.empty,this.heightOracle.setDoc(e.doc),[new Be(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=A.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let s=i?t.head:t.anchor;if(!e.some(({from:r,to:o})=>s>=r&&s<=o)){let{from:r,to:o}=this.lineBlockAt(s);e.push(new Kn(r,o))}}return this.viewports=e.sort((i,s)=>i.from-s.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Na:new yl(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(en(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(gn).filter(c=>typeof c!="function");let s=e.changedRanges,r=Be.extendWithRanges(s,wg(i,this.stateDeco,e?e.changes:he.empty(this.state.doc.length))),o=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),this.heightMap.height!=o&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let h=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&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(Bf)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),s=this.heightOracle,r=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?ee.RTL:ee.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),l=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let h=0,c=0;if(l.width&&l.height){let{scaleX:w,scaleY:k}=gf(t,l);(w>.005&&Math.abs(this.scaleX-w)>.005||k>.005&&Math.abs(this.scaleY-k)>.005)&&(this.scaleX=w,this.scaleY=k,h|=8,o=a=!0)}let f=(parseInt(i.paddingTop)||0)*this.scaleY,u=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=u)&&(this.paddingTop=f,this.paddingBottom=u,h|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=8);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=yf(e.scrollDOM);let O=(this.printing?$g:Pg)(t,this.paddingTop),m=O.top-this.pixelViewport.top,g=O.bottom-this.pixelViewport.bottom;this.pixelViewport=O;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let S=l.width;if((this.contentDOMWidth!=S||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,h|=8),a){let w=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(w)&&(o=!0),o||s.lineWrapping&&Math.abs(S-this.contentDOMWidth)>s.charWidth){let{lineHeight:k,charWidth:C,textHeight:v}=e.docView.measureTextSize();o=k>0&&s.refresh(r,k,C,v,S/C,w),o&&(e.docView.minWidth=0,h|=8)}m>0&&g>0?c=Math.max(m,g):m<0&&g<0&&(c=Math.min(m,g)),s.heightChanged=!1;for(let k of this.viewports){let C=k.from==this.viewport.from?w:e.docView.measureVisibleLineHeights(k);this.heightMap=(o?xe.empty().applyChanges(this.stateDeco,B.empty,this.heightOracle,[new Be(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new yg(k.from,C))}s.heightChanged&&(h|=2)}let x=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return x&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),h|=this.updateForViewport()),(h&2||x)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,a=new Kn(s.lineAt(o-i*1e3,J.ByHeight,r,0,0).from,s.lineAt(l+(1-i)*1e3,J.ByHeight,r,0,0).to);if(t){let{head:h}=t.range;if(ha.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=s.lineAt(h,J.ByPos,r,0,0),u;t.y=="center"?u=(f.top+f.bottom)/2-c/2:t.y=="start"||t.y=="nearest"&&h=l+Math.max(10,Math.min(i,250)))&&s>o-2*1e3&&r>1,o=s<<1;if(this.defaultTextDirection!=ee.LTR&&!i)return[];let l=[],a=(c,f,u,d)=>{if(f-cc&&bb.from>=u.from&&b.to<=u.to&&Math.abs(b.from-c)b.fromS));if(!g){if(fb.from<=f&&b.to>=f)){let b=t.moveToLineBoundary(y.cursor(f),!1,!0).head;b>c&&(f=b)}g=new Pr(c,f,this.gapSize(u,c,f,d))}l.push(g)},h=c=>{if(c.lengthc.from&&a(c.from,d,c,f),Ot.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];_.spans(e,this.viewport.from,this.viewport.to,{span(s,r){t.push({from:s,to:r})},point(){}},20);let i=t.length!=this.visibleRanges.length||this.visibleRanges.some((s,r)=>s.from!=t[r].from||s.to!=t[r].to);return this.visibleRanges=t,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||en(this.heightMap.lineAt(e,J.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||en(this.heightMap.lineAt(this.scaler.fromDOM(e),J.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 en(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 Kn{constructor(e,t){this.from=e,this.to=t}}function Cg(n,e,t){let i=[],s=n,r=0;return _.spans(t,n,e,{span(){},point(o,l){o>s&&(i.push({from:s,to:o}),r+=o-s),s=l}},20),s=1)return e[e.length-1].to;let i=Math.floor(n*t);for(let s=0;;s++){let{from:r,to:o}=e[s],l=o-r;if(i<=l)return r+i;i-=l}}function es(n,e){let t=0;for(let{from:i,to:s}of n.ranges){if(e<=s){t+=e-i;break}t+=s-i}return t/n.total}function Zg(n,e){for(let t of n)if(e(t))return t}const Na={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};class yl{constructor(e,t,i){let s=0,r=0,o=0;this.viewports=i.map(({from:l,to:a})=>{let h=t.lineAt(l,J.ByPos,e,0,0).top,c=t.lineAt(a,J.ByPos,e,0,0).bottom;return s+=c-h,{from:l,to:a,top:h,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let l of this.viewports)l.domTop=o+(l.top-r)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),r=l.bottom}toDOM(e){for(let t=0,i=0,s=0;;t++){let r=tt.from==e.viewports[i].from&&t.to==e.viewports[i].to):!1}}function en(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),i=e.toDOM(n.bottom);return new lt(n.from,n.length,t,i-t,Array.isArray(n._content)?n._content.map(s=>en(s,e)):n._content)}const ts=T.define({combine:n=>n.join(" ")}),Ro=T.define({combine:n=>n.indexOf(!0)>-1}),Ao=Vt.newName(),cu=Vt.newName(),fu=Vt.newName(),uu={"&light":"."+cu,"&dark":"."+fu};function Xo(n,e,t){return new Vt(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,s=>{if(s=="&")return n;if(!t||!t[s])throw new RangeError(`Unsupported selector: ${s}`);return t[s]}):n+" "+i}})}const Tg=Xo("."+Ao,{"&":{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-iso":{unicodeBidi:"isolate"},".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,')`,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"}},uu),tn="￿";class Rg{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(Y.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=tn}readRange(e,t){if(!e)return this;let i=e.parentNode;for(let s=e;;){this.findPointBefore(i,s);let r=this.text.length;this.readNode(s);let o=s.nextSibling;if(o==t)break;let l=G.get(s),a=G.get(o);(l&&a?l.breakAfter:(l?l.breakAfter:Rs(s))||Rs(o)&&(s.nodeName!="BR"||s.cmIgnore)&&this.text.length>r)&&this.lineBreak(),s=o}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,o=1,l;if(this.lineSeparator?(r=t.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(l=s.exec(t))&&(r=l.index,o=l[0].length),this.append(t.slice(i,r<0?t.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);i=r+o}}readNode(e){if(e.cmIgnore)return;let t=G.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let s=i.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(Ag(e,i.node,i.offset)?t:0))}}function Ag(n,e,t){for(;;){if(!e||t-1;let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let l=r||o?[]:Eg(e),a=new Rg(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=Vg(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=r&&r.node==l.focusNode&&r.offset==l.focusOffset||!go(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),h=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!go(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),c=e.viewport;if((Z.ios||Z.chrome)&&e.state.selection.main.empty&&a!=h&&(c.from>0||c.toDate.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:l}=e.bounds,a=s.from,h=null;(r===8||Z.android&&e.text.length=s.from&&t.to<=s.to&&(t.from!=s.from||t.to!=s.to)&&s.to-s.from-(t.to-t.from)<=4?t={from:s.from,to:s.to,insert:n.state.doc.slice(s.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,s.to))}:(Z.mac||Z.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(i&&t.insert.length==2&&(i=y.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:B.of([" "])}):Z.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==` - `&&n.lineWrapping&&(i&&(i=y.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:B.of([" "])}),t)return Ou(n,t,i,r);if(i&&!i.main.eq(s)){let o=!1,l="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(o=!0),l=n.inputState.lastSelectionOrigin),n.dispatch({selection:i,scrollIntoView:o,userEvent:l}),!0}else return!1}function Ou(n,e,t,i=-1){if(Z.ios&&n.inputState.flushIOSKey(e))return!0;let s=n.state.selection.main;if(Z.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&n.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&bi(n.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||i==8&&e.insert.lengths.head)&&bi(n.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&bi(n.contentDOM,"Delete",46)))return!0;let r=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let o,l=()=>o||(o=Mg(n,e,t));return n.state.facet(zf).some(a=>a(n,e.from,e.to,r,l))||n.dispatch(l()),!0}function Mg(n,e,t){let i,s=n.state,r=s.selection.main;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let l=r.frome.to?s.sliceDoc(e.to,r.to):"";i=s.replaceSelection(n.state.toText(l+e.insert.sliceString(0,void 0,n.state.lineBreak)+a))}else{let l=s.changes(e),a=t&&t.main.to<=l.newLength?t.main:void 0;if(s.selection.ranges.length>1&&n.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let h=n.state.sliceDoc(e.from,e.to),c,f=t&&Kf(n,t.main.head);if(f){let O=e.insert.length-(e.to-e.from);c={from:f.from,to:f.to-O}}else c=n.state.doc.lineAt(r.head);let u=r.to-e.to,d=r.to-r.from;i=s.changeByRange(O=>{if(O.from==r.from&&O.to==r.to)return{changes:l,range:a||O.map(l)};let m=O.to-u,g=m-h.length;if(O.to-O.from!=d||n.state.sliceDoc(g,m)!=h||O.to>=c.from&&O.from<=c.to)return{range:O};let b=s.changes({from:g,to:m,insert:e.insert}),S=O.to-r.to;return{changes:b,range:a?y.range(Math.max(0,a.anchor+S),Math.max(0,a.head+S)):O.map(b)}})}else i={changes:l,selection:a&&s.selection.replaceRange(a)}}let o="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,o+=".compose",n.inputState.compositionFirstChange&&(o+=".start",n.inputState.compositionFirstChange=!1)),s.update(i,{userEvent:o,scrollIntoView:!0})}function Wg(n,e,t,i){let s=Math.min(n.length,e.length),r=0;for(;r0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let a=Math.max(0,r-Math.min(o,l));t-=o+a-r}if(o=o?r-t:0;r-=a,l=r+(l-o),o=r}else if(l=l?r-t:0;r-=a,o=r+(o-l),l=r}return{from:r,toA:o,toB:l}}function Eg(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}=n.observer.selectionRange;return t&&(e.push(new Ga(t,i)),(s!=t||r!=i)&&e.push(new Ga(s,r))),e}function Vg(n,e){if(n.length==0)return null;let t=n[0].pos,i=n.length==2?n[1].pos:t;return t>-1&&i>-1?y.single(t+e,i+e):null}const Yg={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},$r=Z.ie&&Z.ie_version<=11;class Dg{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new wm,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.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let i of t)this.queue.push(i);(Z.ie&&Z.ie_version<=11||Z.ios&&e.composing)&&t.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(Z.chrome&&Z.chrome_version<126)&&(this.editContext=new zg(e),e.state.facet(Ct)&&(e.contentDOM.editContext=this.editContext.editContext)),$r&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.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),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.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(t=>{t.length>0&&t[t.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.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){e.type=="change"&&!e.matches||(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,i)=>t!=e[i]))){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:i}=this,s=this.selectionRange;if(i.state.facet(Ct)?i.root.activeElement!=this.dom:!Ss(i.dom,s))return;let r=s.anchorNode&&i.docView.nearest(s.anchorNode);if(r&&r.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Z.ie&&Z.ie_version<=11||Z.android&&Z.chrome)&&!i.state.selection.main.empty&&s.focusNode&&ln(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=pn(e.root);if(!t)return!1;let i=Z.safari&&e.root.nodeType==11&&Sm(this.dom.ownerDocument)==this.dom&&qg(this.view,t)||t;if(!i||this.selectionRange.eq(i))return!1;let s=Ss(this.dom,i);return s&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=r.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&r.force&&bi(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{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,i=-1,s=!1;for(let r of e){let o=this.readMutation(r);o&&(o.typeOver&&(s=!0),t==-1?{from:t,to:i}=o:(t=Math.min(o.from,t),i=Math.max(o.to,i)))}return{from:t,to:i,typeOver:s}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),s=this.selectionChanged&&Ss(this.dom,this.selectionRange);if(e<0&&!s)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new Xg(this.view,e,t,i);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}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 i=this.view.state,s=du(this.view,t);return this.view.state==i&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),s}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let i=Fa(t,e.previousSibling||e.target.previousSibling,-1),s=Fa(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:s?t.posBefore(s):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{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),this.printQuery?this.printQuery.addEventListener("change",this.onPrint):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),this.printQuery?this.printQuery.removeEventListener("change",this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Ct)!=e.state.facet(Ct)&&(e.view.contentDOM.editContext=e.state.facet(Ct)?this.editContext.editContext:null))}destroy(){var e,t,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let s of this.scrollTargets)s.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 Fa(n,e,t){for(;e;){let i=G.get(e);if(i&&i.parent==n)return i;let s=e.parentNode;e=s!=n.dom?s:t>0?e.nextSibling:e.previousSibling}return null}function Ha(n,e){let t=e.startContainer,i=e.startOffset,s=e.endContainer,r=e.endOffset,o=n.docView.domAtPos(n.state.selection.main.anchor);return ln(o.node,o.offset,s,r)&&([t,i,s,r]=[s,r,t,i]),{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}}function qg(n,e){if(e.getComposedRanges){let s=e.getComposedRanges(n.root)[0];if(s)return Ha(n,s)}let t=null;function i(s){s.preventDefault(),s.stopImmediatePropagation(),t=s.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",i,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",i,!0),t?Ha(n,t):null}class zg{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});t.addEventListener("textupdate",i=>{let{anchor:s}=e.state.selection.main,r={from:this.toEditorPos(i.updateRangeStart),to:this.toEditorPos(i.updateRangeEnd),insert:B.of(i.text.split(` -`))};r.from==this.from&&sthis.to&&(r.to=s),!(r.from==r.to&&!r.insert.length)&&(this.pendingContextChange=r,Ou(e,r,y.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd))),this.pendingContextChange&&this.revertPending(e.state))}),t.addEventListener("characterboundsupdate",i=>{let s=[],r=null;for(let o=this.toEditorPos(i.rangeStart),l=this.toEditorPos(i.rangeEnd);o{let s=[];for(let r of i.getTextFormats()){let o=r.underlineStyle,l=r.underlineThickness;if(o!="None"&&l!="None"){let a=`text-decoration: underline ${o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${l=="Thin"?1:2}px`;s.push(A.mark({attributes:{style:a}}).range(this.toEditorPos(r.rangeStart),this.toEditorPos(r.rangeEnd)))}}e.dispatch({effects:If.of(A.set(s))})}),t.addEventListener("compositionstart",()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)}),t.addEventListener("compositionend",()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null}),this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let s=pn(i.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,i=!1,s=this.pendingContextChange;return e.changes.iterChanges((r,o,l,a,h)=>{if(i)return;let c=h.length-(o-r);if(s&&o>=s.to)if(s.from==r&&s.to==o&&s.insert.eq(h)){s=this.pendingContextChange=null,t+=c;return}else s=null,this.revertPending(e.state);if(r+=t,o+=t,o<=this.from)this.from+=c,this.to+=c;else if(rthis.to||this.to-this.from+h.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),h.toString()),this.to+=c}t+=c}),s&&!i&&this.revertPending(e.state),!i}update(e){!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.to+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),s=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(i,s)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}}class ${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),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(i=>i.forEach(s=>t(s,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||Qm(e.parent)||document,this.viewState=new ja(e.state||Y.create(e)),e.scrollTo&&e.scrollTo.is(Gn)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Ki).map(i=>new xr(i));for(let i of this.plugins)i.update(this);this.observer=new Dg(this),this.inputState=new ig(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Za(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}dispatch(...e){let t=e.length==1&&e[0]instanceof re?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,s,r=this.state;for(let u of e){if(u.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=u.state}if(this.destroyed){this.viewState.state=r;return}let o=this.hasFocus,l=0,a=null;e.some(u=>u.annotation(ou))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=lu(r,o),a||(l=1));let h=this.observer.delayedAndroidKey,c=null;if(h?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(c=null)):this.observer.clear(),r.facet(Y.phrases)!=this.state.facet(Y.phrases))return this.setState(r);s=Xs.create(this,r,e),s.flags|=l;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let u of e){if(f&&(f=f.map(u.changes)),u.scrollIntoView){let{main:d}=u.state.selection;f=new Si(d.empty?d:y.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of u.effects)d.is(Gn)&&(f=d.value.clip(this.state))}this.viewState.update(s,f),this.bidiCache=Ms.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),t=this.docView.update(s),this.state.facet(Ji)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(u=>u.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(ts)!=s.state.facet(ts)&&(this.viewState.mustMeasureContent=!0),(t||i||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!s.empty)for(let u of this.state.facet(vo))try{u(s)}catch(d){Ce(this.state,d,"update listener")}(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!du(this,c)&&h.force&&bi(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new ja(e),this.plugins=e.facet(Ki).map(i=>new xr(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new Za(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(Ki),i=e.state.facet(Ki);if(t!=i){let s=[];for(let r of i){let o=t.indexOf(r);if(o<0)s.push(new xr(r));else{let l=this.plugins[o];l.mustUpdate=e,s.push(l)}}for(let r of this.plugins)r.mustUpdate!=e&&r.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let s of this.plugins)s.mustUpdate=e;for(let s=0;s-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,i=this.scrollDOM,s=i.scrollTop*this.scaleY,{scrollAnchorPos:r,scrollAnchorHeight:o}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(o<0)if(yf(i))r=-1,o=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(s);r=d.from,o=d.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];a&4||([this.measureRequests,h]=[h,this.measureRequests]);let c=h.map(d=>{try{return d.read(this)}catch(O){return Ce(this.state,O),Ka}}),f=Xs.create(this,this.state,[]),u=!1;f.flags|=a,t?t.flags|=a:t=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),u=this.docView.update(f),u&&this.docViewUpdate());for(let d=0;d1||O<-1){s=s+O,i.scrollTop=s/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(vo))l(t)}get themeClasses(){return Ao+" "+(this.state.facet(Ro)?fu:cu)+" "+this.state.facet(ts)}updateAttrs(){let e=Ja(this,jf,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Ct)?"true":"false",class:"cm-content",style:`${Z.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),Ja(this,gl,t);let i=this.observer.ignore(()=>{let s=xo(this.contentDOM,this.contentAttrs,t),r=xo(this.dom,this.editorAttrs,e);return s||r});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let s of i.effects)if(s.is($.announce)){t&&(this.announceDOM.textContent=""),t=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(Ji);let e=this.state.facet($.cspNonce);Vt.mount(this.root,this.styleModules.concat(Tg).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&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(e.key!=null){for(let t=0;ti.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,i){return Qr(this,e,Wa(this,e,t,i))}moveByGroup(e,t){return Qr(this,e,Wa(this,e,t,i=>eg(this,e.head,i)))}visualLineSide(e,t){let i=this.bidiSpans(e),s=this.textDirectionAt(e.from),r=i[t?i.length-1:0];return y.cursor(r.side(t,s)+e.from,r.forward(!t,s)?1:-1)}moveToLineBoundary(e,t,i=!0){return Jm(this,e,t,i)}moveVertically(e,t,i){return Qr(this,e,tg(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Jf(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let s=this.state.doc.lineAt(e),r=this.bidiSpans(s),o=r[At.find(r,e-s.from,-1,t)];return Ol(i,o.dir==ee.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(_f)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Lg)return Wf(e.length);let t=this.textDirectionAt(e.from),i;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||Mf(r.isolates,i=Ca(this,e))))return r.order;i||(i=Ca(this,e));let s=Vm(e.text,t,i);return this.bidiCache.push(new Ms(e.from,e.to,t,i,!0,s)),s}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Z.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{bf(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();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 Gn.of(new Si(typeof e=="number"?y.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return Gn.of(new Si(y.cursor(i.from),"start","start",i.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return oe.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return oe.define(()=>({}),{eventObservers:e})}static theme(e,t){let i=Vt.newName(),s=[ts.of(i),Ji.of(Xo(`.${i}`,e))];return t&&t.dark&&s.push(Ro.of(!0)),s}static baseTheme(e){return kt.lowest(Ji.of(Xo("."+Ao,e,uu)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),s=i&&G.get(i)||G.get(e);return((t=s==null?void 0:s.rootView)===null||t===void 0?void 0:t.view)||null}}$.styleModule=Ji;$.inputHandler=zf;$.scrollHandler=Uf;$.focusChangeEffect=Lf;$.perLineTextDirection=_f;$.exceptionSink=qf;$.updateListener=vo;$.editable=Ct;$.mouseSelectionStyle=Df;$.dragMovesSelection=Yf;$.clickAddsSelectionRange=Vf;$.decorations=gn;$.outerDecorations=Nf;$.atomicRanges=bl;$.bidiIsolatedRanges=Gf;$.scrollMargins=Ff;$.darkTheme=Ro;$.cspNonce=T.define({combine:n=>n.length?n[0]:""});$.contentAttributes=gl;$.editorAttributes=jf;$.lineWrapping=$.contentAttributes.of({class:"cm-lineWrapping"});$.announce=M.define();const Lg=4096,Ka={};class Ms{constructor(e,t,i,s,r,o){this.from=e,this.to=t,this.dir=i,this.isolates=s,this.fresh=r,this.order=o}static update(e,t){if(t.empty&&!e.some(r=>r.fresh))return e;let i=[],s=e.length?e[e.length-1].dir:ee.LTR;for(let r=Math.max(0,e.length-10);r=0;s--){let r=i[s],o=typeof r=="function"?r(n):r;o&&ko(o,t)}return t}const _g=Z.mac?"mac":Z.windows?"win":Z.linux?"linux":"key";function Bg(n,e){const t=n.split(/-(?!$)/);let i=t[t.length-1];i=="Space"&&(i=" ");let s,r,o,l;for(let a=0;ai.concat(s),[]))),t}function Ig(n,e,t){return mu(pu(n.state),e,n,t)}let Zt=null;const jg=4e3;function Ng(n,e=_g){let t=Object.create(null),i=Object.create(null),s=(o,l)=>{let a=i[o];if(a==null)i[o]=l;else if(a!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},r=(o,l,a,h,c)=>{var f,u;let d=t[o]||(t[o]=Object.create(null)),O=l.split(/ (?!$)/).map(b=>Bg(b,e));for(let b=1;b{let w=Zt={view:x,prefix:S,scope:o};return setTimeout(()=>{Zt==w&&(Zt=null)},jg),!0}]})}let m=O.join(" ");s(m,!1);let g=d[m]||(d[m]={preventDefault:!1,stopPropagation:!1,run:((u=(f=d._any)===null||f===void 0?void 0:f.run)===null||u===void 0?void 0:u.slice())||[]});a&&g.run.push(a),h&&(g.preventDefault=!0),c&&(g.stopPropagation=!0)};for(let o of n){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let h of l){let c=t[h]||(t[h]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let u in c)c[u].run.push(d=>f(d,Mo))}let a=o[e]||o.key;if(a)for(let h of l)r(h,a,o.run,o.preventDefault,o.stopPropagation),o.shift&&r(h,"Shift-"+a,o.shift,o.preventDefault,o.stopPropagation)}return t}let Mo=null;function mu(n,e,t,i){Mo=e;let s=bm(e),r=ue(s,0),o=ze(r)==s.length&&s!=" ",l="",a=!1,h=!1,c=!1;Zt&&Zt.view==t&&Zt.scope==i&&(l=Zt.prefix+" ",tu.indexOf(e.keyCode)<0&&(h=!0,Zt=null));let f=new Set,u=g=>{if(g){for(let b of g.run)if(!f.has(b)&&(f.add(b),b(t)))return g.stopPropagation&&(c=!0),!0;g.preventDefault&&(g.stopPropagation&&(c=!0),h=!0)}return!1},d=n[i],O,m;return d&&(u(d[l+is(s,e,!o)])?a=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Z.windows&&e.ctrlKey&&e.altKey)&&(O=Yt[e.keyCode])&&O!=s?(u(d[l+is(O,e,!0)])||e.shiftKey&&(m=On[e.keyCode])!=s&&m!=O&&u(d[l+is(m,e,!1)]))&&(a=!0):o&&e.shiftKey&&u(d[l+is(s,e,!0)])&&(a=!0),!a&&u(d._any)&&(a=!0)),h&&(a=!0),a&&c&&e.stopPropagation(),Mo=null,a}class Yn{constructor(e,t,i,s,r){this.className=e,this.left=t,this.top=i,this.width=s,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(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,i){if(i.empty){let s=e.coordsAtPos(i.head,i.assoc||1);if(!s)return[];let r=gu(e);return[new Yn(t,s.left-r.left,s.top-r.top,null,s.bottom-s.top)]}else return Gg(e,t,i)}}function gu(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==ee.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function th(n,e,t,i){let s=n.coordsAtPos(e,t*2);if(!s)return i;let r=n.dom.getBoundingClientRect(),o=(s.top+s.bottom)/2,l=n.posAtCoords({x:r.left+1,y:o}),a=n.posAtCoords({x:r.right-1,y:o});return l==null||a==null?i:{from:Math.max(i.from,Math.min(l,a)),to:Math.min(i.to,Math.max(l,a))}}function Gg(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let i=Math.max(t.from,n.viewport.from),s=Math.min(t.to,n.viewport.to),r=n.textDirection==ee.LTR,o=n.contentDOM,l=o.getBoundingClientRect(),a=gu(n),h=o.querySelector(".cm-line"),c=h&&window.getComputedStyle(h),f=l.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),u=l.right-(c?parseInt(c.paddingRight):0),d=Zo(n,i),O=Zo(n,s),m=d.type==ke.Text?d:null,g=O.type==ke.Text?O:null;if(m&&(n.lineWrapping||d.widgetLineBreaks)&&(m=th(n,i,1,m)),g&&(n.lineWrapping||O.widgetLineBreaks)&&(g=th(n,s,-1,g)),m&&g&&m.from==g.from&&m.to==g.to)return S(x(t.from,t.to,m));{let k=m?x(t.from,null,m):w(d,!1),C=g?x(null,t.to,g):w(O,!0),v=[];return(m||d).to<(g||O).from-(m&&g?1:0)||d.widgetLineBreaks>1&&k.bottom+n.defaultLineHeight/2E&&U.from=we)break;ae>ie&&V(Math.max(Ye,ie),k==null&&Ye<=E,Math.min(ae,we),C==null&&ae>=I,Te.dir)}if(ie=Qe.to+1,ie>=we)break}return z.length==0&&V(E,k==null,I,C==null,n.textDirection),{top:W,bottom:q,horizontal:z}}function w(k,C){let v=l.top+(C?k.top:k.bottom);return{top:v,bottom:v,horizontal:[]}}}function Fg(n,e){return n.constructor==e.constructor&&n.eq(e)}class Hg{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(xs)!=e.state.facet(xs)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,i=e.facet(xs);for(;t!Fg(t,this.drawn[i]))){let t=this.dom.firstChild,i=0;for(let s of e)s.update&&t&&s.constructor&&this.drawn[i].constructor&&s.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(s.draw(),t);for(;t;){let s=t.nextSibling;t.remove(),t=s}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const xs=T.define();function bu(n){return[oe.define(e=>new Hg(e,n)),xs.of(n)]}const Su=!Z.ios,bn=T.define({combine(n){return dt(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function Kg(n={}){return[bn.of(n),Jg,e0,t0,Bf.of(!0)]}function yu(n){return n.startState.facet(bn)!=n.state.facet(bn)}const Jg=bu({above:!0,markers(n){let{state:e}=n,t=e.facet(bn),i=[];for(let s of e.selection.ranges){let r=s==e.selection.main;if(s.empty?!r||Su:t.drawRangeCursor){let o=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=s.empty?s:y.cursor(s.head,s.head>s.anchor?-1:1);for(let a of Yn.forRange(n,o,l))i.push(a)}}return i},update(n,e){n.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=yu(n);return t&&ih(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){ih(e.state,n)},class:"cm-cursorLayer"});function ih(n,e){e.style.animationDuration=n.facet(bn).cursorBlinkRate+"ms"}const e0=bu({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:Yn.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||yu(n)},class:"cm-selectionLayer"}),Wo={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};Su&&(Wo[".cm-line"].caretColor=Wo[".cm-content"].caretColor="transparent !important");const t0=kt.highest($.theme(Wo)),ku=M.define({map(n,e){return n==null?null:e.mapPos(n)}}),nn=ce.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,i)=>i.is(ku)?i.value:t,n)}}),i0=oe.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(nn);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(nn)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field(nn),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let i=n.scrollDOM.getBoundingClientRect();return{left:t.left-i.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-i.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(nn)!=n&&this.view.dispatch({effects:ku.of(n)})}},{eventObservers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function n0(){return[nn,i0]}function nh(n,e,t,i,s){e.lastIndex=0;for(let r=n.iterRange(t,i),o=t,l;!r.next().done;o+=r.value.length)if(!r.lineBreak)for(;l=e.exec(r.value);)s(o+l.index,l)}function s0(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let i=[];for(let{from:s,to:r}of t)s=Math.max(n.state.doc.lineAt(s).from,s-e),r=Math.min(n.state.doc.lineAt(r).to,r+e),i.length&&i[i.length-1].to>=s?i[i.length-1].to=r:i.push({from:s,to:r});return i}class r0{constructor(e){const{regexp:t,decoration:i,decorate:s,boundary:r,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,s)this.addMatch=(l,a,h,c)=>s(c,h,h+l[0].length,l,a);else if(typeof i=="function")this.addMatch=(l,a,h,c)=>{let f=i(l,a,h);f&&c(h,h+l[0].length,f)};else if(i)this.addMatch=(l,a,h,c)=>c(h,h+l[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=o}createDeco(e){let t=new Et,i=t.add.bind(t);for(let{from:s,to:r}of s0(e,this.maxLength))nh(e.state.doc,this.regexp,s,r,(o,l)=>this.addMatch(l,e,o,i));return t.finish()}updateDeco(e,t){let i=1e9,s=-1;return e.docChanged&&e.changes.iterChanges((r,o,l,a)=>{a>e.view.viewport.from&&l1e3?this.createDeco(e.view):s>-1?this.updateRange(e.view,t.map(e.changes),i,s):t}updateRange(e,t,i,s){for(let r of e.visibleRanges){let o=Math.max(r.from,i),l=Math.min(r.to,s);if(l>o){let a=e.state.doc.lineAt(o),h=a.toa.from;o--)if(this.boundary.test(a.text[o-1-a.from])){c=o;break}for(;lu.push(b.range(m,g));if(a==h)for(this.regexp.lastIndex=c-a.from;(d=this.regexp.exec(a.text))&&d.indexthis.addMatch(g,e,m,O));t=t.update({filterFrom:c,filterTo:f,filter:(m,g)=>mf,add:u})}}return t}}const Eo=/x/.unicode!=null?"gu":"g",o0=new RegExp(`[\0-\b ---Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Eo),l0={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 vr=null;function a0(){var n;if(vr==null&&typeof document<"u"&&document.body){let e=document.body.style;vr=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return vr||!1}const ws=T.define({combine(n){let e=dt(n,{render:null,specialChars:o0,addSpecialChars:null});return(e.replaceTabs=!a0())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Eo)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Eo)),e}});function h0(n={}){return[ws.of(n),c0()]}let sh=null;function c0(){return sh||(sh=oe.fromClass(class{constructor(n){this.view=n,this.decorations=A.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(ws)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new r0({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=ue(e[0],0);if(r==9){let o=s.lineAt(i),l=t.state.tabSize,a=Ge(o.text,l,i-o.from);return A.replace({widget:new O0((l-a%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=A.replace({widget:new d0(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(ws);n.startState.facet(ws)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const f0="•";function u0(n){return n>=32?f0:n==10?"␤":String.fromCharCode(9216+n)}class d0 extends wt{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=u0(this.code),i=e.state.phrase("Control character")+" "+(l0[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class O0 extends wt{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function p0(){return g0}const m0=A.line({class:"cm-activeLine"}),g0=oe.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let i of n.state.selection.ranges){let s=n.lineBlockAt(i.head);s.from>e&&(t.push(m0.range(s.from)),e=s.from)}return A.set(t)}},{decorations:n=>n.decorations}),Vo=2e3;function b0(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>Vo||t.off>Vo||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let a=i;a<=s;a++){let h=n.doc.line(a);h.length<=l&&r.push(y.range(h.from+o,h.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let a=i;a<=s;a++){let h=n.doc.line(a),c=Oo(h.text,o,n.tabSize,!0);if(c<0)r.push(y.cursor(h.to));else{let f=Oo(h.text,l,n.tabSize);r.push(y.range(h.from+c,h.from+f))}}}return r}function S0(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function rh(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),s=t-i.from,r=s>Vo?-1:s==i.length?S0(n,e.clientX):Ge(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function y0(n,e){let t=rh(n,e),i=n.state.selection;return t?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(r);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},i=i.map(s.changes)}},get(s,r,o){let l=rh(n,s);if(!l)return i;let a=b0(n.state,t,l);return a.length?o?y.create(a.concat(i.ranges)):y.create(a):i}}:null}function k0(n){let e=t=>t.altKey&&t.button==0;return $.mouseSelectionStyle.of((t,i)=>e(i)?y0(t,i):null)}const x0={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},w0={style:"cursor: crosshair"};function Q0(n={}){let[e,t]=x0[n.key||"Alt"],i=oe.fromClass(class{constructor(s){this.view=s,this.isDown=!1}set(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}},{eventObservers:{keydown(s){this.set(s.keyCode==e||t(s))},keyup(s){(s.keyCode==e||!t(s))&&this.set(!1)},mousemove(s){this.set(t(s))}}});return[i,$.contentAttributes.of(s=>{var r;return!((r=s.plugin(i))===null||r===void 0)&&r.isDown?w0:null})]}const Ui="-10000px";class xu{constructor(e,t,i,s){this.facet=t,this.createTooltipView=i,this.removeTooltipView=s,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let r=null;this.tooltipViews=this.tooltips.map(o=>r=i(o,r))}update(e,t){var i;let s=e.state.facet(this.facet),r=s.filter(a=>a);if(s===this.input){for(let a of this.tooltipViews)a.update&&a.update(e);return!1}let o=[],l=t?[]:null;for(let a=0;at[h]=a),t.length=l.length),this.input=s,this.tooltips=r,this.tooltipViews=o,!0}}function P0(n){let{win:e}=n;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Cr=T.define({combine:n=>{var e,t,i;return{position:Z.ios?"absolute":((e=n.find(s=>s.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(s=>s.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((i=n.find(s=>s.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||P0}}}),oh=new WeakMap,kl=oe.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(Cr);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new xu(n,xl,(t,i)=>this.createTooltip(t,i),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.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 n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,i=n.state.facet(Cr);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let s of this.manager.tooltipViews)s.dom.style.position=this.position;t=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let s of this.manager.tooltipViews)this.container.appendChild(s.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),i=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let s=document.createElement("div");s.className="cm-tooltip-arrow",t.dom.appendChild(s)}return t.dom.style.position=this.position,t.dom.style.top=Ui,t.dom.style.left="0px",this.container.insertBefore(t.dom,i),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(n=i.destroy)===null||n===void 0||n.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect(),e=1,t=1,i=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(Z.gecko)i=s.offsetParent!=this.container.ownerDocument.body;else if(s.style.top==Ui&&s.style.left=="0px"){let r=s.getBoundingClientRect();i=Math.abs(r.top+1e4)>1||Math.abs(r.left)>1}}if(i||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(e=s.width/this.parent.offsetWidth,t=s.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((s,r)=>{let o=this.manager.tooltipViews[r];return o.getCoords?o.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(Cr).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:i}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{editor:t,space:i,scaleX:s,scaleY:r}=n,o=[];for(let l=0;l=Math.min(t.bottom,i.bottom)||f.rightMath.min(t.right,i.right)+.1){c.style.top=Ui;continue}let d=a.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,O=d?7:0,m=u.right-u.left,g=(e=oh.get(h))!==null&&e!==void 0?e:u.bottom-u.top,b=h.offset||v0,S=this.view.textDirection==ee.LTR,x=u.width>i.right-i.left?S?i.left:i.right-u.width:S?Math.min(f.left-(d?14:0)+b.x,i.right-m):Math.max(i.left,f.left-m+(d?14:0)-b.x),w=this.above[l];!a.strictSide&&(w?f.top-(u.bottom-u.top)-b.yi.bottom)&&w==i.bottom-f.bottom>f.top-i.top&&(w=this.above[l]=!w);let k=(w?f.top-i.top:i.bottom-f.bottom)-O;if(kx&&W.topC&&(C=w?W.top-g-2-O:W.bottom+O+2);if(this.position=="absolute"?(c.style.top=(C-n.parent.top)/r+"px",c.style.left=(x-n.parent.left)/s+"px"):(c.style.top=C/r+"px",c.style.left=x/s+"px"),d){let W=f.left+(S?b.x:-b.x)-(x+14-7);d.style.left=W/s+"px"}h.overlap!==!0&&o.push({left:x,top:C,right:v,bottom:C+g}),c.classList.toggle("cm-tooltip-above",w),c.classList.toggle("cm-tooltip-below",!w),h.positioned&&h.positioned(n.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 n of this.manager.tooltipViews)n.dom.style.top=Ui}},{eventObservers:{scroll(){this.maybeMeasure()}}}),$0=$.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:`${7*2}px`,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"}}}),v0={x:0,y:0},xl=T.define({enables:[kl,$0]}),Ws=T.define({combine:n=>n.reduce((e,t)=>e.concat(t),[])});class lr{static create(e){return new lr(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new xu(e,Ws,(t,i)=>this.createHostedView(t,i),t=>t.dom.remove())}createHostedView(e,t){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}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)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let i of this.manager.tooltipViews){let s=i[e];if(s!==void 0){if(t===void 0)t=s;else if(t!==s)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 C0=xl.compute([Ws],n=>{let e=n.facet(Ws);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var i;return(i=t.end)!==null&&i!==void 0?i:t.pos})),create:lr.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class Z0{constructor(e,t,i,s,r){this.view=e,this.source=t,this.field=i,this.setHover=s,this.hoverTime=r,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.length)return;let e=Date.now()-this.lastMove.time;el.bottom||t.xl.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(s)).find(c=>c.from<=s&&c.to>=s),h=a&&a.dir==ee.RTL?-1:1;r=t.x{this.pending==l&&(this.pending=null,a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])}))},a=>Ce(e.state,a,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(kl),t=e?e.manager.tooltips.findIndex(i=>i.create==lr.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,i;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:s,tooltip:r}=this;if(s.length&&r&&!T0(r.dom,e)||this.pending){let{pos:o}=s[0]||this.pending,l=(i=(t=s[0])===null||t===void 0?void 0:t.end)!==null&&i!==void 0?i:o;(o==l?this.view.posAtCoords(this.lastMove)!=o:!R0(this.view,o,l,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=i=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const ns=4;function T0(n,e){let t=n.getBoundingClientRect();return e.clientX>=t.left-ns&&e.clientX<=t.right+ns&&e.clientY>=t.top-ns&&e.clientY<=t.bottom+ns}function R0(n,e,t,i,s,r){let o=n.scrollDOM.getBoundingClientRect(),l=n.documentTop+n.documentPadding.top+n.contentHeight;if(o.left>i||o.rights||Math.min(o.bottom,l)=e&&a<=t}function A0(n,e={}){let t=M.define(),i=ce.define({create(){return[]},update(s,r){if(s.length&&(e.hideOnChange&&(r.docChanged||r.selection)?s=[]:e.hideOn&&(s=s.filter(o=>!e.hideOn(r,o))),r.docChanged)){let o=[];for(let l of s){let a=r.changes.mapPos(l.pos,-1,Oe.TrackDel);if(a!=null){let h=Object.assign(Object.create(null),l);h.pos=a,h.end!=null&&(h.end=r.changes.mapPos(h.end)),o.push(h)}}s=o}for(let o of r.effects)o.is(t)&&(s=o.value),o.is(X0)&&(s=[]);return s},provide:s=>Ws.from(s)});return[i,oe.define(s=>new Z0(s,n,i,t,e.hoverTime||300)),C0]}function wu(n,e){let t=n.plugin(kl);if(!t)return null;let i=t.manager.tooltips.indexOf(e);return i<0?null:t.manager.tooltipViews[i]}const X0=M.define(),lh=T.define({combine(n){let e,t;for(let i of n)e=e||i.topContainer,t=t||i.bottomContainer;return{topContainer:e,bottomContainer:t}}});function Sn(n,e){let t=n.plugin(Qu),i=t?t.specs.indexOf(e):-1;return i>-1?t.panels[i]:null}const Qu=oe.fromClass(class{constructor(n){this.input=n.state.facet(yn),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(lh);this.top=new ss(n,!0,e.topContainer),this.bottom=new ss(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(lh);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new ss(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new ss(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(yn);if(t!=this.input){let i=t.filter(a=>a),s=[],r=[],o=[],l=[];for(let a of i){let h=this.specs.indexOf(a),c;h<0?(c=a(n.view),l.push(c)):(c=this.panels[h],c.update&&c.update(n)),s.push(c),(c.top?r:o).push(c)}this.specs=i,this.panels=s,this.top.sync(r),this.bottom.sync(o);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let i of this.panels)i.update&&i.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>$.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class ss{constructor(e,t,i){this.view=e,this.top=t,this.container=i,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(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}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 t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=ah(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=ah(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 ah(n){let e=n.nextSibling;return n.remove(),e}const yn=T.define({enables:Qu});class yt extends Ht{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}yt.prototype.elementClass="";yt.prototype.toDOM=void 0;yt.prototype.mapMode=Oe.TrackBefore;yt.prototype.startSide=yt.prototype.endSide=-1;yt.prototype.point=!0;const Qs=T.define(),M0={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>_.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},hn=T.define();function W0(n){return[Pu(),hn.of(Object.assign(Object.assign({},M0),n))]}const hh=T.define({combine:n=>n.some(e=>e)});function Pu(n){return[E0]}const E0=oe.fromClass(class{constructor(n){this.view=n,this.prevViewport=n.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=n.state.facet(hn).map(e=>new fh(n,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!n.state.facet(hh),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,i=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(i<(t.to-t.from)*.8)}n.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(hh)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&this.dom.remove();let t=_.iter(this.view.state.facet(Qs),this.view.viewport.from),i=[],s=this.gutters.map(r=>new V0(r,this.view.viewport,-this.view.documentPadding.top));for(let r of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(r.type)){let o=!0;for(let l of r.type)if(l.type==ke.Text&&o){Yo(t,i,l.from);for(let a of s)a.line(this.view,l,i);o=!1}else if(l.widget)for(let a of s)a.widget(this.view,l)}else if(r.type==ke.Text){Yo(t,i,r.from);for(let o of s)o.line(this.view,r,i)}else if(r.widget)for(let o of s)o.widget(this.view,r);for(let r of s)r.finish();n&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(n){let e=n.startState.facet(hn),t=n.state.facet(hn),i=n.docChanged||n.heightChanged||n.viewportChanged||!_.eq(n.startState.facet(Qs),n.state.facet(Qs),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let s of this.gutters)s.update(n)&&(i=!0);else{i=!0;let s=[];for(let r of t){let o=e.indexOf(r);o<0?s.push(new fh(this.view,r)):(this.gutters[o].update(n),s.push(this.gutters[o]))}for(let r of this.gutters)r.dom.remove(),s.indexOf(r)<0&&r.destroy();for(let r of s)this.dom.appendChild(r.dom);this.gutters=s}return i}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove()}},{provide:n=>$.scrollMargins.of(e=>{let t=e.plugin(n);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==ee.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function ch(n){return Array.isArray(n)?n:[n]}function Yo(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class V0{constructor(e,t,i){this.gutter=e,this.height=i,this.i=0,this.cursor=_.iter(e.markers,t.from)}addElement(e,t,i){let{gutter:s}=this,r=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==s.elements.length){let l=new $u(e,o,r,i);s.elements.push(l),s.dom.appendChild(l.dom)}else s.elements[this.i].update(e,o,r,i);this.height=t.bottom,this.i++}line(e,t,i){let s=[];Yo(this.cursor,s,t.from),i.length&&(s=s.concat(i));let r=this.gutter.config.lineMarker(e,t,s);r&&s.unshift(r);let o=this.gutter;s.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,s)}widget(e,t){let i=this.gutter.config.widgetMarker(e,t.widget,t);i&&this.addElement(e,t,[i])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class fh{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 i in t.domEventHandlers)this.dom.addEventListener(i,s=>{let r=s.target,o;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let a=r.getBoundingClientRect();o=(a.top+a.bottom)/2}else o=s.clientY;let l=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[i](e,l,s)&&s.preventDefault()});this.markers=ch(t.markers(e)),t.initialSpacer&&(this.spacer=new $u(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=ch(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let s=this.config.updateSpacer(this.spacer.markers[0],e);s!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[s])}let i=e.view.viewport;return!_.eq(this.markers,t,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class $u{constructor(e,t,i,s){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,i,s)}update(e,t,i,s){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),Y0(this.markers,s)||this.setMarkers(e,s)}setMarkers(e,t){let i="cm-gutterElement",s=this.dom.firstChild;for(let r=0,o=0;;){let l=o,a=rr(l,a,h)||o(l,a,h):o}return i}})}});class Zr extends yt{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Tr(n,e){return n.state.facet(Oi).formatNumber(e,n.state)}const q0=hn.compute([Oi],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(D0)},lineMarker(e,t,i){return i.some(s=>s.toDOM)?null:new Zr(Tr(e,e.state.doc.lineAt(t.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(Oi)!=e.state.facet(Oi),initialSpacer(e){return new Zr(Tr(e,uh(e.state.doc.lines)))},updateSpacer(e,t){let i=Tr(t.view,uh(t.view.state.doc.lines));return i==e.number?e:new Zr(i)},domEventHandlers:n.facet(Oi).domEventHandlers}));function z0(n={}){return[Oi.of(n),Pu(),q0]}function uh(n){let e=9;for(;e{let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.head).from;s>t&&(t=s,e.push(L0.range(s)))}return _.of(e)});function B0(){return _0}const vu=1024;let U0=0;class Le{constructor(e,t){this.from=e,this.to=t}}class X{constructor(e={}){this.id=U0++,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 typeof e!="function"&&(e=le.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}X.closedBy=new X({deserialize:n=>n.split(" ")});X.openedBy=new X({deserialize:n=>n.split(" ")});X.group=new X({deserialize:n=>n.split(" ")});X.isolate=new X({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});X.contextHash=new X({perNode:!0});X.lookAhead=new X({perNode:!0});X.mounted=new X({perNode:!0});class kn{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[X.mounted.id]}}const I0=Object.create(null);class le{constructor(e,t,i,s=0){this.name=e,this.props=t,this.id=i,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):I0,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new le(e.name||"",t,e.id,i);if(e.props){for(let r of e.props)if(Array.isArray(r)||(r=r(s)),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 s}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(X.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let s of i.split(" "))t[s]=e[i];return i=>{for(let s=i.prop(X.group),r=-1;r<(s?s.length:0);r++){let o=t[r<0?i.name:s[r]];if(o)return o}}}}le.none=new le("",Object.create(null),0,8);class Vi{constructor(e){this.types=e;for(let t=0;t0;for(let a=this.cursor(o|K.IncludeAnonymous);;){let h=!1;if(a.from<=r&&a.to>=s&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;h=!0}for(;h&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;h=!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:Pl(le.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,s)=>new D(this.type,t,i,s,this.propValues),e.makeTree||((t,i,s)=>new D(le.none,t,i,s)))}static build(e){return F0(e)}}D.empty=new D(le.none,[],[],0);class wl{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 wl(this.buffer,this.index)}}class qt{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return le.none}toString(){let e=[];for(let t=0;t0));a=o[a+3]);return l}slice(e,t,i){let s=this.buffer,r=new Uint16Array(t-e),o=0;for(let l=e,a=0;l=e&&te;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function xn(n,e,t,i){for(var s;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?l.length:-1;e!=h;e+=t){let c=l[e],f=a[e]+o.from;if(Cu(s,i,f,f+c.length)){if(c instanceof qt){if(r&K.ExcludeBuffers)continue;let u=c.findChild(0,c.buffer.length,t,i-f,s);if(u>-1)return new at(new j0(o,c,e,f),null,u)}else if(r&K.IncludeAnonymous||!c.type.isAnonymous||Ql(c)){let u;if(!(r&K.IgnoreMounts)&&(u=kn.get(c))&&!u.overlay)return new Se(u.tree,f,e,o);let d=new Se(c,f,e,o);return r&K.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?c.children.length-1:0,t,i,s)}}}if(r&K.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))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,i=0){let s;if(!(i&K.IgnoreOverlays)&&(s=kn.get(this._tree))&&s.overlay){let r=e-this.from;for(let{from:o,to:l}of s.overlay)if((t>0?o<=r:o=r:l>r))return new Se(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}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 Oh(n,e,t,i){let s=n.cursor(),r=[];if(!s.firstChild())return r;if(t!=null){for(let o=!1;!o;)if(o=s.type.is(t),!s.nextSibling())return r}for(;;){if(i!=null&&s.type.is(i))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return i==null?r:[]}}function Do(n,e,t=e.length-1){for(let i=n.parent;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class j0{constructor(e,t,i,s){this.parent=e,this.buffer=t,this.index=i,this.start=s}}class at extends Zu{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,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,i);return r<0?null:new at(this.context,this,r)}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,i=0){if(i&K.ExcludeBuffers)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new at(this.context,this,r)}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 at(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 at(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,s=this.index+4,r=i.buffer[this.index+3];if(r>s){let o=i.buffer[this.index+1];e.push(i.slice(s,r,o)),t.push(0)}return new D(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Tu(n){if(!n.length)return null;let e=0,t=n[0];for(let r=1;rt.from||o.to=e){let l=new Se(o.tree,o.overlay[0].from+r.from,-1,r);(s||(s=[i])).push(xn(l,e,t,!1))}}return s?Tu(s):i}class Es{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 Se)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.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):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:s}=this.buffer;return this.type=t||s.set.types[s.buffer[e]],this.from=i+s.buffer[e+1],this.to=i+s.buffer[e+2],!0}yield(e){return e?e instanceof Se?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:s}=this.buffer,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,i);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}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,i=this.mode){return this.buffer?i&K.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&K.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&K.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)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let s=i<0?0:this.stack[i]+4;if(this.index!=s)return this.yieldBuf(t.findChild(s,this.index,-1,0,4))}else{let s=t.buffer[this.index+3];if(s<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(s)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:s}=this;if(s){if(e>0){if(this.index-1)for(let r=t+e,o=e<0?-1:i._tree.children.length;r!=o;r+=e){let l=i._tree.children[r];if(this.mode&K.IncludeAnonymous||l instanceof qt||!l.type.isAnonymous||Ql(l))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=0;){for(let o=e;o;o=o._parent)if(o.index==s){if(s==this.index)return o;t=o,i=r+1;break e}s=this.stack[--r]}for(let s=i;s=0;r--){if(r<0)return Do(this.node,e,s);let o=i[t.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[s]&&e[s]!=o.name)return!1;s--}}return!0}}function Ql(n){return n.children.some(e=>e instanceof qt||!e.type.isAnonymous||Ql(e))}function F0(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:s=vu,reused:r=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new wl(t,t.length):t,a=i.types,h=0,c=0;function f(k,C,v,W,q,z){let{id:V,start:E,end:I,size:U}=l,ie=c;for(;U<0;)if(l.next(),U==-1){let ae=r[V];v.push(ae),W.push(E-k);return}else if(U==-3){h=V;return}else if(U==-4){c=V;return}else throw new RangeError(`Unrecognized record size: ${U}`);let we=a[V],Qe,Te,Ye=E-k;if(I-E<=s&&(Te=g(l.pos-C,q))){let ae=new Uint16Array(Te.size-Te.skip),De=l.pos-Te.size,et=ae.length;for(;l.pos>De;)et=b(Te.start,ae,et);Qe=new qt(ae,I-Te.start,i),Ye=Te.start-k}else{let ae=l.pos-U;l.next();let De=[],et=[],_t=V>=o?V:-1,hi=0,Bn=I;for(;l.pos>ae;)_t>=0&&l.id==_t&&l.size>=0?(l.end<=Bn-s&&(O(De,et,E,hi,l.end,Bn,_t,ie),hi=De.length,Bn=l.end),l.next()):z>2500?u(E,ae,De,et):f(E,ae,De,et,_t,z+1);if(_t>=0&&hi>0&&hi-1&&hi>0){let aa=d(we);Qe=Pl(we,De,et,0,De.length,0,I-E,aa,aa)}else Qe=m(we,De,et,I-E,ie-I)}v.push(Qe),W.push(Ye)}function u(k,C,v,W){let q=[],z=0,V=-1;for(;l.pos>C;){let{id:E,start:I,end:U,size:ie}=l;if(ie>4)l.next();else{if(V>-1&&I=0;U-=3)E[ie++]=q[U],E[ie++]=q[U+1]-I,E[ie++]=q[U+2]-I,E[ie++]=ie;v.push(new qt(E,q[2]-I,i)),W.push(I-k)}}function d(k){return(C,v,W)=>{let q=0,z=C.length-1,V,E;if(z>=0&&(V=C[z])instanceof D){if(!z&&V.type==k&&V.length==W)return V;(E=V.prop(X.lookAhead))&&(q=v[z]+V.length+E)}return m(k,C,v,W,q)}}function O(k,C,v,W,q,z,V,E){let I=[],U=[];for(;k.length>W;)I.push(k.pop()),U.push(C.pop()+v-q);k.push(m(i.types[V],I,U,z-q,E-z)),C.push(q-v)}function m(k,C,v,W,q=0,z){if(h){let V=[X.contextHash,h];z=z?[V].concat(z):[V]}if(q>25){let V=[X.lookAhead,q];z=z?[V].concat(z):[V]}return new D(k,C,v,W,z)}function g(k,C){let v=l.fork(),W=0,q=0,z=0,V=v.end-s,E={size:0,start:0,skip:0};e:for(let I=v.pos-k;v.pos>I;){let U=v.size;if(v.id==C&&U>=0){E.size=W,E.start=q,E.skip=z,z+=4,W+=4,v.next();continue}let ie=v.pos-U;if(U<0||ie=o?4:0,Qe=v.start;for(v.next();v.pos>ie;){if(v.size<0)if(v.size==-3)we+=4;else break e;else v.id>=o&&(we+=4);v.next()}q=Qe,W+=U,z+=we}return(C<0||W==k)&&(E.size=W,E.start=q,E.skip=z),E.size>4?E:void 0}function b(k,C,v){let{id:W,start:q,end:z,size:V}=l;if(l.next(),V>=0&&W4){let I=l.pos-(V-4);for(;l.pos>I;)v=b(k,C,v)}C[--v]=E,C[--v]=z-k,C[--v]=q-k,C[--v]=W}else V==-3?h=W:V==-4&&(c=W);return v}let S=[],x=[];for(;l.pos>0;)f(n.start||0,n.bufferStart||0,S,x,-1,0);let w=(e=n.length)!==null&&e!==void 0?e:S.length?x[0]+S[0].length:0;return new D(a[n.topID],S.reverse(),x.reverse(),w)}const ph=new WeakMap;function Ps(n,e){if(!n.isAnonymous||e instanceof qt||e.type!=n)return 1;let t=ph.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof D)){t=1;break}t+=Ps(n,i)}ph.set(e,t)}return t}function Pl(n,e,t,i,s,r,o,l,a){let h=0;for(let O=i;O=c)break;C+=v}if(x==w+1){if(C>c){let v=O[w];d(v.children,v.positions,0,v.children.length,m[w]+S);continue}f.push(O[w])}else{let v=m[x-1]+O[x-1].length-k;f.push(Pl(n,O,m,w,x,k,v,null,a))}u.push(k+S-r)}}return d(e,t,i,s,0),(l||a)(f,u,o)}class Ru{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof at?this.setBuffer(e.context.buffer,e.index,t):e instanceof Se&&this.map.set(e.tree,t)}get(e){return e instanceof at?this.getBuffer(e.context.buffer,e.index):e instanceof Se?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 gt{constructor(e,t,i,s,r=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=s,this.open=(r?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let s=[new gt(0,e.length,e,0,!1,i)];for(let r of t)r.to>e.length&&s.push(r);return s}static applyChanges(e,t,i=128){if(!t.length)return e;let s=[],r=1,o=e.length?e[0]:null;for(let l=0,a=0,h=0;;l++){let c=l=i)for(;o&&o.from=u.from||f<=u.to||h){let d=Math.max(u.from,a)-h,O=Math.min(u.to,f)-h;u=d>=O?null:new gt(d,O,u.tree,u.offset+h,l>0,!!c)}if(u&&s.push(u),o.to>f)break;o=rnew Le(s.from,s.to)):[new Le(0,0)]:[new Le(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let s=this.startParse(e,t,i);for(;;){let r=s.advance();if(r)return r}}}class H0{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 Au(n){return(e,t,i,s)=>new J0(e,n,t,i,s)}class mh{constructor(e,t,i,s,r){this.parser=e,this.parse=t,this.overlay=i,this.target=s,this.from=r}}function gh(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class K0{constructor(e,t,i,s,r,o,l){this.parser=e,this.predicate=t,this.mounts=i,this.index=s,this.start=r,this.target=o,this.prev=l,this.depth=0,this.ranges=[]}}const qo=new X({perNode:!0});class J0{constructor(e,t,i,s,r){this.nest=t,this.input=i,this.fragments=s,this.ranges=r,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let s of this.inner)s.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new D(i.type,i.children,i.positions,i.length,i.propValues.concat([[qo,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[X.mounted.id]=new kn(t,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t=this.stoppedAt)l=!1;else if(e.hasNode(s)){if(t){let h=t.mounts.find(c=>c.frag.from<=s.from&&c.frag.to>=s.to&&c.mount.overlay);if(h)for(let c of h.mount.overlay){let f=c.from+h.pos,u=c.to+h.pos;f>=s.from&&u<=s.to&&!t.ranges.some(d=>d.fromf)&&t.ranges.push({from:f,to:u})}}l=!1}else if(i&&(o=eb(i.ranges,s.from,s.to)))l=o!=2;else if(!s.type.isAnonymous&&(r=this.nest(s,this.input))&&(s.fromnew Le(f.from-s.from,f.to-s.from)):null,s.tree,c.length?c[0].from:s.from)),r.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):l=!1}}else t&&(a=t.predicate(s))&&(a===!0&&(a=new Le(s.from,s.to)),a.fromnew Le(c.from-t.start,c.to-t.start)),t.target,h[0].from))),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function eb(n,e,t){for(let i of n){if(i.from>=t)break;if(i.to>e)return i.from<=e&&i.to>=t?2:1}return 0}function bh(n,e,t,i,s,r){if(e=e&&t.enter(i,1,K.IgnoreOverlays|K.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&&t.positions[0]==0&&t.children[0]instanceof D)t=t.children[0];else break}return!1}}let ib=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(t=i.tree.prop(qo))!==null&&t!==void 0?t:i.to,this.inner=new Sh(i.tree,-i.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=(e=t.tree.prop(qo))!==null&&e!==void 0?e:t.to,this.inner=new Sh(t.tree,-t.offset)}}findMounts(e,t){var i;let s=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let r=this.inner.cursor.node;r;r=r.parent){let o=(i=r.tree)===null||i===void 0?void 0:i.prop(X.mounted);if(o&&o.parser==t)for(let l=this.fragI;l=r.to)break;a.tree==this.curFrag.tree&&s.push({frag:a,pos:r.from-a.offset,mount:o})}}}return s}};function yh(n,e){let t=null,i=e;for(let s=1,r=0;s=l)break;a.to<=o||(t||(i=t=e.slice()),a.froml&&t.splice(r+1,0,new Le(l,a.to))):a.to>l?t[r--]=new Le(l,a.to):t.splice(r--,1))}}return i}function nb(n,e,t,i){let s=0,r=0,o=!1,l=!1,a=-1e9,h=[];for(;;){let c=s==n.length?1e9:o?n[s].to:n[s].from,f=r==e.length?1e9:l?e[r].to:e[r].from;if(o!=l){let u=Math.max(a,t),d=Math.min(c,f,i);unew Le(u.from+i,u.to+i)),f=nb(e,c,a,h);for(let u=0,d=a;;u++){let O=u==f.length,m=O?h:f[u].from;if(m>d&&t.push(new gt(d,m,s.tree,-o,r.from>=d||r.openStart,r.to<=m||r.openEnd)),O)break;d=f[u].to}}else t.push(new gt(a,h,s.tree,-o,r.from>=o||r.openStart,r.to<=l||r.openEnd))}return t}let sb=0;class Ne{constructor(e,t,i){this.set=e,this.base=t,this.modified=i,this.id=sb++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let t=new Ne([],null,[]);if(t.set.push(t),e)for(let i of e.set)t.set.push(i);return t}static defineModifier(){let e=new Vs;return t=>t.modified.indexOf(e)>-1?t:Vs.get(t.base||t,t.modified.concat(e).sort((i,s)=>i.id-s.id))}}let rb=0;class Vs{constructor(){this.instances=[],this.id=rb++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(l=>l.base==e&&ob(t,l.modified));if(i)return i;let s=[],r=new Ne(s,e,t);for(let l of t)l.instances.push(r);let o=lb(t);for(let l of e.set)if(!l.modified.length)for(let a of o)s.push(Vs.get(l,a));return r}}function ob(n,e){return n.length==e.length&&n.every((t,i)=>t==e[i])}function lb(n){let e=[[]];for(let t=0;ti.length-t.length)}function oi(n){let e=Object.create(null);for(let t in n){let i=n[t];Array.isArray(i)||(i=[i]);for(let s of t.split(" "))if(s){let r=[],o=2,l=s;for(let f=0;;){if(l=="..."&&f>0&&f+3==s.length){o=1;break}let u=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!u)throw new RangeError("Invalid path: "+s);if(r.push(u[0]=="*"?"":u[0][0]=='"'?JSON.parse(u[0]):u[0]),f+=u[0].length,f==s.length)break;let d=s[f++];if(f==s.length&&d=="!"){o=0;break}if(d!="/")throw new RangeError("Invalid path: "+s);l=s.slice(f)}let a=r.length-1,h=r[a];if(!h)throw new RangeError("Invalid path: "+s);let c=new Ys(i,o,a>0?r.slice(0,a):null);e[h]=c.sort(e[h])}}return Xu.add(e)}const Xu=new X;class Ys{constructor(e,t,i,s){this.tags=e,this.mode=t,this.context=i,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=s;for(let l of r)for(let a of l.set){let h=t[a.id];if(h){o=o?o+" "+h:h;break}}return o},scope:i}}function ab(n,e){let t=null;for(let i of n){let s=i.style(e);s&&(t=t?t+" "+s:s)}return t}function hb(n,e,t,i=0,s=n.length){let r=new cb(i,Array.isArray(e)?e:[e],t);r.highlightRange(n.cursor(),i,s,"",r.highlighters),r.flush(s)}class cb{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,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,i,s,r){let{type:o,from:l,to:a}=e;if(l>=i||a<=t)return;o.isTop&&(r=this.highlighters.filter(d=>!d.scope||d.scope(o)));let h=s,c=fb(e)||Ys.empty,f=ab(r,c.tags);if(f&&(h&&(h+=" "),h+=f,c.mode==1&&(s+=(s?" ":"")+f)),this.startSpan(Math.max(t,l),h),c.opaque)return;let u=e.tree&&e.tree.prop(X.mounted);if(u&&u.overlay){let d=e.node.enter(u.overlay[0].from+l,1),O=this.highlighters.filter(g=>!g.scope||g.scope(u.tree.type)),m=e.firstChild();for(let g=0,b=l;;g++){let S=g=x||!e.nextSibling())););if(!S||x>i)break;b=S.to+l,b>t&&(this.highlightRange(d.cursor(),Math.max(t,S.from+l),Math.min(i,b),"",O),this.startSpan(Math.min(i,b),h))}m&&e.parent()}else if(e.firstChild()){u&&(s="");do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,s,r),this.startSpan(Math.min(i,e.to),h)}while(e.nextSibling());e.parent()}}}function fb(n){let e=n.type.prop(Xu);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const P=Ne.define,os=P(),$t=P(),xh=P($t),wh=P($t),vt=P(),ls=P(vt),Rr=P(vt),st=P(),Bt=P(st),it=P(),nt=P(),zo=P(),Ii=P(zo),as=P(),p={comment:os,lineComment:P(os),blockComment:P(os),docComment:P(os),name:$t,variableName:P($t),typeName:xh,tagName:P(xh),propertyName:wh,attributeName:P(wh),className:P($t),labelName:P($t),namespace:P($t),macroName:P($t),literal:vt,string:ls,docString:P(ls),character:P(ls),attributeValue:P(ls),number:Rr,integer:P(Rr),float:P(Rr),bool:P(vt),regexp:P(vt),escape:P(vt),color:P(vt),url:P(vt),keyword:it,self:P(it),null:P(it),atom:P(it),unit:P(it),modifier:P(it),operatorKeyword:P(it),controlKeyword:P(it),definitionKeyword:P(it),moduleKeyword:P(it),operator:nt,derefOperator:P(nt),arithmeticOperator:P(nt),logicOperator:P(nt),bitwiseOperator:P(nt),compareOperator:P(nt),updateOperator:P(nt),definitionOperator:P(nt),typeOperator:P(nt),controlOperator:P(nt),punctuation:zo,separator:P(zo),bracket:Ii,angleBracket:P(Ii),squareBracket:P(Ii),paren:P(Ii),brace:P(Ii),content:st,heading:Bt,heading1:P(Bt),heading2:P(Bt),heading3:P(Bt),heading4:P(Bt),heading5:P(Bt),heading6:P(Bt),contentSeparator:P(st),list:P(st),quote:P(st),emphasis:P(st),strong:P(st),link:P(st),monospace:P(st),strikethrough:P(st),inserted:P(),deleted:P(),changed:P(),invalid:P(),meta:as,documentMeta:P(as),annotation:P(as),processingInstruction:P(as),definition:Ne.defineModifier(),constant:Ne.defineModifier(),function:Ne.defineModifier(),standard:Ne.defineModifier(),local:Ne.defineModifier(),special:Ne.defineModifier()};Mu([{tag:p.link,class:"tok-link"},{tag:p.heading,class:"tok-heading"},{tag:p.emphasis,class:"tok-emphasis"},{tag:p.strong,class:"tok-strong"},{tag:p.keyword,class:"tok-keyword"},{tag:p.atom,class:"tok-atom"},{tag:p.bool,class:"tok-bool"},{tag:p.url,class:"tok-url"},{tag:p.labelName,class:"tok-labelName"},{tag:p.inserted,class:"tok-inserted"},{tag:p.deleted,class:"tok-deleted"},{tag:p.literal,class:"tok-literal"},{tag:p.string,class:"tok-string"},{tag:p.number,class:"tok-number"},{tag:[p.regexp,p.escape,p.special(p.string)],class:"tok-string2"},{tag:p.variableName,class:"tok-variableName"},{tag:p.local(p.variableName),class:"tok-variableName tok-local"},{tag:p.definition(p.variableName),class:"tok-variableName tok-definition"},{tag:p.special(p.variableName),class:"tok-variableName2"},{tag:p.definition(p.propertyName),class:"tok-propertyName tok-definition"},{tag:p.typeName,class:"tok-typeName"},{tag:p.namespace,class:"tok-namespace"},{tag:p.className,class:"tok-className"},{tag:p.macroName,class:"tok-macroName"},{tag:p.propertyName,class:"tok-propertyName"},{tag:p.operator,class:"tok-operator"},{tag:p.comment,class:"tok-comment"},{tag:p.meta,class:"tok-meta"},{tag:p.invalid,class:"tok-invalid"},{tag:p.punctuation,class:"tok-punctuation"}]);var Ar;const Xt=new X;function hr(n){return T.define({combine:n?e=>e.concat(n):void 0})}const $l=new X;class Ee{constructor(e,t,i=[],s=""){this.data=e,this.name=s,Y.prototype.hasOwnProperty("tree")||Object.defineProperty(Y.prototype,"tree",{get(){return F(this)}}),this.parser=t,this.extension=[zt.of(this),Y.languageData.of((r,o,l)=>{let a=Qh(r,o,l),h=a.type.prop(Xt);if(!h)return[];let c=r.facet(h),f=a.type.prop($l);if(f){let u=a.resolve(o-a.from,l);for(let d of f)if(d.test(u,r)){let O=r.facet(d.facet);return d.type=="replace"?O:O.concat(c)}}return c})].concat(i)}isActiveAt(e,t,i=-1){return Qh(e,t,i).type.prop(Xt)==this.data}findRegions(e){let t=e.facet(zt);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],s=(r,o)=>{if(r.prop(Xt)==this.data){i.push({from:o,to:o+r.length});return}let l=r.prop(X.mounted);if(l){if(l.tree.prop(Xt)==this.data){if(l.overlay)for(let a of l.overlay)i.push({from:a.from+o,to:a.to+o});else i.push({from:o,to:o+r.length});return}else if(l.overlay){let a=i.length;if(s(l.tree,l.overlay[0].from+o),i.length>a)return}}for(let a=0;ai.isTop?t:void 0)]}),e.name)}configure(e,t){return new ti(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function F(n){let e=n.field(Ee.state,!1);return e?e.tree:D.empty}class ub{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 i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let ji=null;class ii{constructor(e,t,i=[],s,r,o,l,a){this.parser=e,this.state=t,this.fragments=i,this.tree=s,this.treeLen=r,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new ii(e,t,[],D.empty,0,i,[],null)}startParse(){return this.parser.startParse(new ub(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=D.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let s=Date.now()+e;e=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||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(gt.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=ji;ji=this;try{return e()}finally{ji=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Ph(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:s,treeLen:r,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((h,c,f,u)=>a.push({fromA:h,toA:c,fromB:f,toB:u})),i=gt.applyChanges(i,a),s=D.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let h of this.skipped){let c=e.mapPos(h.from,1),f=e.mapPos(h.to,-1);ce.from&&(this.fragments=Ph(this.fragments,s,r),this.skipped.splice(i--,1))}return this.skipped.length>=t?!1:(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 ar{createParse(t,i,s){let r=s[0].from,o=s[s.length-1].to;return{parsedPos:r,advance(){let a=ji;if(a){for(let h of s)a.tempSkipped.push(h);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=o,new D(le.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return ji}}function Ph(n,e,t){return gt.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class vi{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),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new vi(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=ii.create(e.facet(zt).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new vi(i)}}Ee.state=ce.define({create:vi.init,update(n,e){for(let t of e.effects)if(t.is(Ee.setState))return t.value;return e.startState.facet(zt)!=e.state.facet(zt)?vi.init(e.state):n.apply(e)}});let Wu=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Wu=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const Xr=typeof navigator<"u"&&(!((Ar=navigator.scheduling)===null||Ar===void 0)&&Ar.isInputPending)?()=>navigator.scheduling.isInputPending():null,db=oe.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(Ee.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(Ee.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Wu(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnds+1e3,a=r.context.work(()=>Xr&&Xr()||Date.now()>o,s+(l?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:Ee.setState.of(new vi(r.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Ce(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),zt=T.define({combine(n){return n.length?n[0]:null},enables:n=>[Ee.state,db,$.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class Ci{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}class Ds{constructor(e,t,i,s,r,o=void 0){this.name=e,this.alias=t,this.extensions=i,this.filename=s,this.loadFunc=r,this.support=o,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:i}=e;if(!t){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(i)}return new Ds(e.name,(e.alias||[]).concat(e.name).map(s=>s.toLowerCase()),e.extensions||[],e.filename,t,i)}static matchFilename(e,t){for(let s of e)if(s.filename&&s.filename.test(t))return s;let i=/\.([^.]+)$/.exec(t);if(i){for(let s of e)if(s.extensions.indexOf(i[1])>-1)return s}return null}static matchLanguageName(e,t,i=!0){t=t.toLowerCase();for(let s of e)if(s.alias.some(r=>r==t))return s;if(i)for(let s of e)for(let r of s.alias){let o=t.indexOf(r);if(o>-1&&(r.length>2||!/\w/.test(t[o-1])&&!/\w/.test(t[o+r.length])))return s}return null}}const Eu=T.define(),Yi=T.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function ni(n){let e=n.facet(Yi);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function Zi(n,e){let t="",i=n.tabSize,s=n.facet(Yi)[0];if(s==" "){for(;e>=i;)t+=" ",e-=i;s=" "}for(let r=0;r=e?pb(n,t,e):null}function Ob(n,e,t){let i=Object.create(null),s=new Dn(n,{overrideIndentation:o=>{var l;return(l=i[o])!==null&&l!==void 0?l:-1}}),r=[];for(let o=e;o<=t;){let l=n.doc.lineAt(o);o=l.to+1;let a=cr(s,l.from);if(a==null)continue;/\S/.test(l.text)||(a=0);let h=/^\s*/.exec(l.text)[0],c=Zi(n,a);h!=c&&(i[l.from]=a,r.push({from:l.from,to:l.from+h.length,insert:c}))}return n.changes(r)}class Dn{constructor(e,t={}){this.state=e,this.options=t,this.unit=ni(e)}lineAt(e,t=1){let i=this.state.doc.lineAt(e),{simulateBreak:s,simulateDoubleBreak:r}=this.options;return s!=null&&s>=i.from&&s<=i.to?r&&s==e?{text:"",from:e}:(t<0?s-1&&(r+=o-this.countColumn(i,i.search(/\S|$/))),r}countColumn(e,t=e.length){return Ge(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:s}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let o=r(s);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Di=new X;function pb(n,e,t){let i=e.resolveStack(t),s=i.node.enterUnfinishedNodesBefore(t);if(s!=i.node){let r=[];for(let o=s;o!=i.node;o=o.parent)r.push(o);for(let o=r.length-1;o>=0;o--)i={node:r[o],next:i}}return Vu(i,n,t)}function Vu(n,e,t){for(let i=n;i;i=i.next){let s=gb(i.node);if(s)return s(vl.create(e,t,i))}return 0}function mb(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function gb(n){let e=n.type.prop(Di);if(e)return e;let t=n.firstChild,i;if(t&&(i=t.type.prop(X.closedBy))){let s=n.lastChild,r=s&&i.indexOf(s.name)>-1;return o=>Yu(o,!0,1,void 0,r&&!mb(o)?s.from:void 0)}return n.parent==null?bb:null}function bb(){return 0}class vl extends Dn{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.context=i}get node(){return this.context.node}static create(e,t,i){return new vl(e,t,i)}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 i=e.resolve(t.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(Sb(i,e))break;t=this.state.doc.lineAt(i.from)}return this.lineIndent(t.from)}continue(){return Vu(this.context.next,this.base,this.pos)}}function Sb(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function yb(n){let e=n.node,t=e.childAfter(e.from),i=e.lastChild;if(!t)return null;let s=n.options.simulateBreak,r=n.state.doc.lineAt(t.from),o=s==null||s<=r.from?r.to:Math.min(r.to,s);for(let l=t.to;;){let a=e.childAfter(l);if(!a||a==i)return null;if(!a.type.isSkipped)return a.fromYu(i,e,t,n)}function Yu(n,e,t,i,s){let r=n.textAfter,o=r.match(/^\s*/)[0].length,l=i&&r.slice(o,o+i.length)==i||s==n.pos+o,a=e?yb(n):null;return a?l?n.column(a.from):n.column(a.to):n.baseIndent+(l?0:n.unit*t)}const xb=n=>n.baseIndent;function yi({except:n,units:e=1}={}){return t=>{let i=n&&n.test(t.textAfter);return t.baseIndent+(i?0:e*t.unit)}}const wb=200;function Qb(){return Y.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:i}=n.newSelection.main,s=t.lineAt(i);if(i>s.from+wb)return n;let r=t.sliceString(s.from,i);if(!e.some(h=>h.test(r)))return n;let{state:o}=n,l=-1,a=[];for(let{head:h}of o.selection.ranges){let c=o.doc.lineAt(h);if(c.from==l)continue;l=c.from;let f=cr(o,c.from);if(f==null)continue;let u=/^\s*/.exec(c.text)[0],d=Zi(o,f);u!=d&&a.push({from:c.from,to:c.from+u.length,insert:d})}return a.length?[n,{changes:a,sequential:!0}]:n})}const Du=T.define(),li=new X;function Cl(n){let e=n.firstChild,t=n.lastChild;return e&&e.tot)continue;if(r&&l.from=e&&h.to>t&&(r=h)}}return r}function $b(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function qs(n,e,t){for(let i of n.facet(Du)){let s=i(n,e,t);if(s)return s}return Pb(n,e,t)}function qu(n,e){let t=e.mapPos(n.from,1),i=e.mapPos(n.to,-1);return t>=i?void 0:{from:t,to:i}}const fr=M.define({map:qu}),qn=M.define({map:qu});function zu(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(i=>i.from<=t&&i.to>=t)||e.push(n.lineBlockAt(t));return e}const si=ce.define({create(){return A.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)if(t.is(fr)&&!vb(n,t.value.from,t.value.to)){let{preparePlaceholder:i}=e.state.facet(Bu),s=i?A.replace({widget:new Mb(i(e.state,t.value))}):$h;n=n.update({add:[s.range(t.value.from,t.value.to)]})}else t.is(qn)&&(n=n.update({filter:(i,s)=>t.value.from!=i||t.value.to!=s,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:i}=e.selection.main;n.between(i,i,(s,r)=>{si&&(t=!0)}),t&&(n=n.update({filterFrom:i,filterTo:i,filter:(s,r)=>r<=i||s>=i}))}return n},provide:n=>$.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(i,s)=>{t.push(i,s)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!s||s.from>r)&&(s={from:r,to:o})}),s}function vb(n,e,t){let i=!1;return n.between(e,e,(s,r)=>{s==e&&r==t&&(i=!0)}),i}function Lu(n,e){return n.field(si,!1)?e:e.concat(M.appendConfig.of(Uu()))}const Cb=n=>{for(let e of zu(n)){let t=qs(n.state,e.from,e.to);if(t)return n.dispatch({effects:Lu(n.state,[fr.of(t),_u(n,t)])}),!0}return!1},Zb=n=>{if(!n.state.field(si,!1))return!1;let e=[];for(let t of zu(n)){let i=zs(n.state,t.from,t.to);i&&e.push(qn.of(i),_u(n,i,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function _u(n,e,t=!0){let i=n.state.doc.lineAt(e.from).number,s=n.state.doc.lineAt(e.to).number;return $.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${i} ${n.state.phrase("to")} ${s}.`)}const Tb=n=>{let{state:e}=n,t=[];for(let i=0;i{let e=n.state.field(si,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(i,s)=>{t.push(qn.of({from:i,to:s}))}),n.dispatch({effects:t}),!0},Ab=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Cb},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:Zb},{key:"Ctrl-Alt-[",run:Tb},{key:"Ctrl-Alt-]",run:Rb}],Xb={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Bu=T.define({combine(n){return dt(n,Xb)}});function Uu(n){return[si,Vb]}function Iu(n,e){let{state:t}=n,i=t.facet(Bu),s=o=>{let l=n.lineBlockAt(n.posAtDOM(o.target)),a=zs(n.state,l.from,l.to);a&&n.dispatch({effects:qn.of(a)}),o.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(n,s,e);let r=document.createElement("span");return r.textContent=i.placeholderText,r.setAttribute("aria-label",t.phrase("folded code")),r.title=t.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=s,r}const $h=A.replace({widget:new class extends wt{toDOM(n){return Iu(n,null)}}});class Mb extends wt{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Iu(e,this.value)}}const Wb={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Mr extends yt{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}}function Eb(n={}){let e=Object.assign(Object.assign({},Wb),n),t=new Mr(e,!0),i=new Mr(e,!1),s=oe.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(zt)!=o.state.facet(zt)||o.startState.field(si,!1)!=o.state.field(si,!1)||F(o.startState)!=F(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let l=new Et;for(let a of o.viewportLineBlocks){let h=zs(o.state,a.from,a.to)?i:qs(o.state,a.from,a.to)?t:null;h&&l.add(a.from,a.from,h)}return l.finish()}}),{domEventHandlers:r}=e;return[s,W0({class:"cm-foldGutter",markers(o){var l;return((l=o.plugin(s))===null||l===void 0?void 0:l.markers)||_.empty},initialSpacer(){return new Mr(e,!1)},domEventHandlers:Object.assign(Object.assign({},r),{click:(o,l,a)=>{if(r.click&&r.click(o,l,a))return!0;let h=zs(o.state,l.from,l.to);if(h)return o.dispatch({effects:qn.of(h)}),!0;let c=qs(o.state,l.from,l.to);return c?(o.dispatch({effects:fr.of(c)}),!0):!1}})}),Uu()]}const Vb=$.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 zn{constructor(e,t){this.specs=e;let i;function s(l){let a=Vt.newName();return(i||(i=Object.create(null)))["."+a]=l,a}const r=typeof t.all=="string"?t.all:t.all?s(t.all):void 0,o=t.scope;this.scope=o instanceof Ee?l=>l.prop(Xt)==o.data:o?l=>l==o:void 0,this.style=Mu(e.map(l=>({tag:l.tag,class:l.class||s(Object.assign({},l,{tag:null}))})),{all:r}).style,this.module=i?new Vt(i):null,this.themeType=t.themeType}static define(e,t){return new zn(e,t||{})}}const Lo=T.define(),ju=T.define({combine(n){return n.length?[n[0]]:null}});function Wr(n){let e=n.facet(Lo);return e.length?e:n.facet(ju)}function vh(n,e){let t=[Db],i;return n instanceof zn&&(n.module&&t.push($.styleModule.of(n.module)),i=n.themeType),e!=null&&e.fallback?t.push(ju.of(n)):i?t.push(Lo.computeN([$.darkTheme],s=>s.facet($.darkTheme)==(i=="dark")?[n]:[])):t.push(Lo.of(n)),t}class Yb{constructor(e){this.markCache=Object.create(null),this.tree=F(e.state),this.decorations=this.buildDeco(e,Wr(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=F(e.state),i=Wr(e.state),s=i!=Wr(e.startState),{viewport:r}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||s)&&(this.tree=t,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=r.to)}buildDeco(e,t){if(!t||!this.tree.length)return A.none;let i=new Et;for(let{from:s,to:r}of e.visibleRanges)hb(this.tree,t,(o,l,a)=>{i.add(o,l,this.markCache[a]||(this.markCache[a]=A.mark({class:a})))},s,r);return i.finish()}}const Db=kt.high(oe.fromClass(Yb,{decorations:n=>n.decorations})),qb=zn.define([{tag:p.meta,color:"#404740"},{tag:p.link,textDecoration:"underline"},{tag:p.heading,textDecoration:"underline",fontWeight:"bold"},{tag:p.emphasis,fontStyle:"italic"},{tag:p.strong,fontWeight:"bold"},{tag:p.strikethrough,textDecoration:"line-through"},{tag:p.keyword,color:"#708"},{tag:[p.atom,p.bool,p.url,p.contentSeparator,p.labelName],color:"#219"},{tag:[p.literal,p.inserted],color:"#164"},{tag:[p.string,p.deleted],color:"#a11"},{tag:[p.regexp,p.escape,p.special(p.string)],color:"#e40"},{tag:p.definition(p.variableName),color:"#00f"},{tag:p.local(p.variableName),color:"#30a"},{tag:[p.typeName,p.namespace],color:"#085"},{tag:p.className,color:"#167"},{tag:[p.special(p.variableName),p.macroName],color:"#256"},{tag:p.definition(p.propertyName),color:"#00c"},{tag:p.comment,color:"#940"},{tag:p.invalid,color:"#f00"}]),zb=$.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Nu=1e4,Gu="()[]{}",Fu=T.define({combine(n){return dt(n,{afterCursor:!0,brackets:Gu,maxScanDistance:Nu,renderMatch:Bb})}}),Lb=A.mark({class:"cm-matchingBracket"}),_b=A.mark({class:"cm-nonmatchingBracket"});function Bb(n){let e=[],t=n.matched?Lb:_b;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const Ub=ce.define({create(){return A.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],i=e.state.facet(Fu);for(let s of e.state.selection.ranges){if(!s.empty)continue;let r=ht(e.state,s.head,-1,i)||s.head>0&&ht(e.state,s.head-1,1,i)||i.afterCursor&&(ht(e.state,s.head,1,i)||s.head$.decorations.from(n)}),Ib=[Ub,zb];function jb(n={}){return[Fu.of(n),Ib]}const Hu=new X;function _o(n,e,t){let i=n.prop(e<0?X.openedBy:X.closedBy);if(i)return i;if(n.name.length==1){let s=t.indexOf(n.name);if(s>-1&&s%2==(e<0?1:0))return[t[s+e]]}return null}function Bo(n){let e=n.type.prop(Hu);return e?e(n.node):n}function ht(n,e,t,i={}){let s=i.maxScanDistance||Nu,r=i.brackets||Gu,o=F(n),l=o.resolveInner(e,t);for(let a=l;a;a=a.parent){let h=_o(a.type,t,r);if(h&&a.from0?e>=c.from&&ec.from&&e<=c.to))return Nb(n,e,t,a,c,h,r)}}return Gb(n,e,t,o,l.type,s,r)}function Nb(n,e,t,i,s,r,o){let l=i.parent,a={from:s.from,to:s.to},h=0,c=l==null?void 0:l.cursor();if(c&&(t<0?c.childBefore(i.from):c.childAfter(i.to)))do if(t<0?c.to<=i.from:c.from>=i.to){if(h==0&&r.indexOf(c.type.name)>-1&&c.from0)return null;let h={from:t<0?e-1:e,to:t>0?e+1:e},c=n.doc.iterRange(e,t>0?n.doc.length:0),f=0;for(let u=0;!c.next().done&&u<=r;){let d=c.value;t<0&&(u+=d.length);let O=e+u*t;for(let m=t>0?0:d.length-1,g=t>0?d.length:-1;m!=g;m+=t){let b=o.indexOf(d[m]);if(!(b<0||i.resolveInner(O+m,1).type!=s))if(b%2==0==t>0)f++;else{if(f==1)return{start:h,end:{from:O+m,to:O+m+1},matched:b>>1==a>>1};f--}}t>0&&(u+=d.length)}return c.done?{start:h,matched:!1}:null}function Ch(n,e,t,i=0,s=0){e==null&&(e=n.search(/[^\s\u00a0]/),e==-1&&(e=n.length));let r=s;for(let o=i;o=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.post}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPosi?o.toLowerCase():o,r=this.string.substr(this.pos,e.length);return s(r)==s(e)?(t!==!1&&(this.pos+=e.length),!0):null}else{let s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}}current(){return this.string.slice(this.start,this.pos)}}function Fb(n){return{name:n.name||"",token:n.token,blankLine:n.blankLine||(()=>{}),startState:n.startState||(()=>!0),copyState:n.copyState||Hb,indent:n.indent||(()=>null),languageData:n.languageData||{},tokenTable:n.tokenTable||Tl}}function Hb(n){if(typeof n!="object")return n;let e={};for(let t in n){let i=n[t];e[t]=i instanceof Array?i.slice():i}return e}const Zh=new WeakMap;class Ls extends Ee{constructor(e){let t=hr(e.languageData),i=Fb(e),s,r=new class extends ar{createParse(o,l,a){return new Jb(s,o,l,a)}};super(t,r,[Eu.of((o,l)=>this.getIndent(o,l))],e.name),this.topNode=i1(t),s=this,this.streamParser=i,this.stateAfter=new X({perNode:!0}),this.tokenTable=e.tokenTable?new id(i.tokenTable):t1}static define(e){return new Ls(e)}getIndent(e,t){let i=F(e.state),s=i.resolve(t);for(;s&&s.type!=this.topNode;)s=s.parent;if(!s)return null;let r,{overrideIndentation:o}=e.options;o&&(r=Zh.get(e.state),r!=null&&r1e4)return null;for(;a=i&&t+e.length<=s&&e.prop(n.stateAfter);if(r)return{state:n.streamParser.copyState(r),pos:t+e.length};for(let o=e.children.length-1;o>=0;o--){let l=e.children[o],a=t+e.positions[o],h=l instanceof D&&a=e.length)return e;!s&&e.type==n.topNode&&(s=!0);for(let r=e.children.length-1;r>=0;r--){let o=e.positions[r],l=e.children[r],a;if(ot&&Zl(n,s.tree,0-s.offset,t,o),a;if(l&&(a=Ju(n,s.tree,t+s.offset,l.pos+s.offset,!1)))return{state:l.state,tree:a}}return{state:n.streamParser.startState(i?ni(i):4),tree:D.empty}}let Jb=class{constructor(e,t,i,s){this.lang=e,this.input=t,this.fragments=i,this.ranges=s,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=s[s.length-1].to;let r=ii.get(),o=s[0].from,{state:l,tree:a}=Kb(e,i,o,r==null?void 0:r.state);this.state=l,this.parsedPos=this.chunkStart=o+a.length;for(let h=0;h=t?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,t),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let t=this.input.chunk(e);if(this.input.lineChunks)t==` +`){[e,t]=Qi(this,e,t);let s="";for(let r=0,o=0;re&&r&&(s+=i),eo&&(s+=l.sliceString(e-o,t-o,i)),o=a+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof ot))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let a=this.children[s],h=e.children[r];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let O of e)O.flatten(d);return new ne(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],a=0,h=-1,c=[];function f(d){let O;if(d.lines>r&&d instanceof ot)for(let m of d.children)f(m);else d.lines>o&&(a>o||!a)?(u(),l.push(d)):d instanceof ne&&a&&(O=c[c.length-1])instanceof ne&&d.lines+O.lines<=32?(a+=d.lines,h+=d.length+1,c[c.length-1]=new ne(O.text.concat(d.text),O.length+1+d.length)):(a+d.lines>s&&u(),a+=d.lines,h+=d.length+1,c.push(d))}function u(){a!=0&&(l.push(c.length==1?c[0]:ot.from(c,h)),h=-1,a=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new ot(l,t)}}B.empty=new ne([""],0);function Jp(n){let e=-1;for(let t of n)e+=t.length+1;return e}function gs(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r=t&&(a>i&&(l=l.slice(0,i-s)),s0?1:(e instanceof ne?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof ne?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(s instanceof ne){let a=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=s.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof ne?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Jc{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new rn(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}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 i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),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 ef{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=function(){return this.iter()},rn.prototype[Symbol.iterator]=Jc.prototype[Symbol.iterator]=ef.prototype[Symbol.iterator]=function(){return this});let em=class{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}};function Qi(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}let mi="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(n=>n?parseInt(n,36):1);for(let n=1;nn)return mi[e-1]<=n;return!1}function ua(n){return n>=127462&&n<=127487}const da=8205;function me(n,e,t=!0,i=!0){return(t?tf:im)(n,e,i)}function tf(n,e,t){if(e==n.length)return e;e&&nf(n.charCodeAt(e))&&sf(n.charCodeAt(e-1))&&e--;let i=ue(n,e);for(e+=ze(i);e=0&&ua(ue(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function im(n,e,t){for(;e>0;){let i=tf(n,e-2,t);if(i=56320&&n<57344}function sf(n){return n>=55296&&n<56320}function ue(n,e){let t=n.charCodeAt(e);if(!sf(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return nf(i)?(t-55296<<10)+(i-56320)+65536:t}function cl(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function ze(n){return n<65536?1:2}const to=/\r\n?|\n/;var Oe=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(Oe||(Oe={}));class ft{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return r+(e-s);r+=l}else{if(i!=Oe.Simple&&h>=e&&(i==Oe.TrackDel&&se||i==Oe.TrackBefore&&se))return null;if(h>e||h==e&&t<0&&!l)return e==s||t<0?r:r+a;r+=a}s=h}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i=0&&s<=t&&l>=e)return st?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ft(e)}static create(e){return new ft(e)}}class he extends ft{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 io(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return no(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s=0){t[s]=l,t[s+1]=o;let a=s>>1;for(;i.length0&&Tt(i,t,r.text),r.forward(c),l+=c}let h=e[o++];for(;l>1].toJSON()))}return e}static of(e,t,i){let s=[],r=[],o=0,l=null;function a(c=!1){if(!c&&!s.length)return;ou||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let O=d?typeof d=="string"?B.of(d.split(i||to)):d:B.empty,m=O.length;if(f==u&&m==0)return;fo&&ge(s,f-o,-1),ge(s,u-f,m),Tt(r,s,O),o=u}}return h(e),a(!l),l}static empty(e){return new he(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let s=0;sl&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;i.length=0&&t<=0&&t==n[s+1]?n[s]+=e:e==0&&n[s]==0?n[s+1]+=t:i?(n[s]+=e,n[s+1]+=t):n.push(e,t)}function Tt(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],a=n.sections[o++];e(s,h,r,c,f),s=h,r=c}}}function no(n,e,t,i=!1){let s=[],r=i?[]:null,o=new un(n),l=new un(e);for(let a=-1;;)if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);ge(s,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len=0&&a=0){let h=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);h+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.lena||o.ins>=0&&o.len>a)&&(l||i.length>h),r.forward2(a),o.forward(a)}}}}class un{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?B.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?B.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Gt{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new Gt(i,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return y.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return y.range(this.anchor,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return y.range(e.anchor,e.head)}static create(e,t,i){return new Gt(e,t,i)}}class y{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:y.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;ie.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new y(e.ranges.map(t=>Gt.fromJSON(t)),e.main)}static single(e,t=e){return new y([y.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;se?8:0)|r)}static normalized(e,t=0){let i=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(i);for(let s=1;sr.head?y.range(a,l):y.range(l,a))}}return new y(e,t)}}function of(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let fl=0;class Z{constructor(e,t,i,s,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=s,this.id=fl++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(e={}){return new Z(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:ul),!!e.static,e.enables)}of(e){return new bs([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new bs(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new bs(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function ul(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class bs{constructor(e,t,i,s){this.dependencies=e,this.facet=t,this.type=i,this.value=s,this.id=fl++}dynamicSlot(e){var t;let i=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,l=this.type==2,a=!1,h=!1,c=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?h=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(a&&u.docChanged||h&&(u.docChanged||u.selection)||so(f,c)){let d=i(f);if(l?!Oa(d,f.values[o],s):!s(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,u)=>{let d,O=u.config.address[r];if(O!=null){let m=Ts(u,O);if(this.dependencies.every(g=>g instanceof Z?u.facet(g)===f.facet(g):g instanceof ce?u.field(g,!1)==f.field(g,!1):!0)||(l?Oa(d=i(f),m,s):s(d=i(f),m)))return f.values[o]=m,0}else d=i(f);return f.values[o]=d,1}}}}function Oa(n,e,t){if(n.length!=e.length)return!1;for(let i=0;in[a.id]),s=t.map(a=>a.type),r=i.filter(a=>!(a&1)),o=n[e.id]>>1;function l(a){let h=[];for(let c=0;ci===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(pa).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,s)=>{let r=i.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[t]=o,1)},reconfigure:(i,s)=>s.config.address[this.id]!=null?(i.values[t]=s.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,pa.of({field:this,create:e})]}get extension(){return this}}const jt={lowest:4,low:3,default:2,high:1,highest:0};function _i(n){return e=>new lf(e,n)}const kt={highest:_i(jt.highest),high:_i(jt.high),default:_i(jt.default),low:_i(jt.low),lowest:_i(jt.lowest)};class lf{constructor(e,t){this.inner=e,this.prec=t}}class sr{of(e){return new ro(this,e)}reconfigure(e){return sr.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class ro{constructor(e,t){this.compartment=e,this.inner=t}}class Zs{constructor(e,t,i,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,i){let s=[],r=Object.create(null),o=new Map;for(let u of sm(e,t,o))u instanceof ce?s.push(u):(r[u.facet.id]||(r[u.facet.id]=[])).push(u);let l=Object.create(null),a=[],h=[];for(let u of s)l[u.id]=h.length<<1,h.push(d=>u.slot(d));let c=i==null?void 0:i.config.facets;for(let u in r){let d=r[u],O=d[0].facet,m=c&&c[u]||[];if(d.every(g=>g.type==0))if(l[O.id]=a.length<<1|1,ul(m,d))a.push(i.facet(O));else{let g=O.combine(d.map(b=>b.value));a.push(i&&O.compare(g,i.facet(O))?i.facet(O):g)}else{for(let g of d)g.type==0?(l[g.id]=a.length<<1|1,a.push(g.value)):(l[g.id]=h.length<<1,h.push(b=>g.dynamicSlot(b)));l[O.id]=h.length<<1,h.push(g=>nm(g,O,d))}}let f=h.map(u=>u(l));return new Zs(e,o,f,l,a,r)}}function sm(n,e,t){let i=[[],[],[],[],[]],s=new Map;function r(o,l){let a=s.get(o);if(a!=null){if(a<=l)return;let h=i[a].indexOf(o);h>-1&&i[a].splice(h,1),o instanceof ro&&t.delete(o.compartment)}if(s.set(o,l),Array.isArray(o))for(let h of o)r(h,l);else if(o instanceof ro){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),r(h,l)}else if(o instanceof lf)r(o.inner,o.prec);else if(o instanceof ce)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof bs)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,jt.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(h,l)}}return r(n,jt.default),i.reduce((o,l)=>o.concat(l))}function on(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let s=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|s}function Ts(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const af=Z.define(),oo=Z.define({combine:n=>n.some(e=>e),static:!0}),hf=Z.define({combine:n=>n.length?n[0]:void 0,static:!0}),cf=Z.define(),ff=Z.define(),uf=Z.define(),df=Z.define({combine:n=>n.length?n[0]:!1});class xt{constructor(e,t){this.type=e,this.value=t}static define(){return new rm}}class rm{of(e){return new xt(this,e)}}class om{constructor(e){this.map=e}of(e){return new M(this,e)}}class M{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new M(this.type,t)}is(e){return this.type==e}static define(e={}){return new om(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let s of e){let r=s.map(t);r&&i.push(r)}return i}}M.reconfigure=M.define();M.appendConfig=M.define();class se{constructor(e,t,i,s,r,o){this.startState=e,this.changes=t,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&of(i,t.newLength),r.some(l=>l.type==se.time)||(this.annotations=r.concat(se.time.of(Date.now())))}static create(e,t,i,s,r,o){return new se(e,t,i,s,r,o)}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(se.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}se.time=xt.define();se.userEvent=xt.define();se.addToHistory=xt.define();se.remote=xt.define();function lm(n,e){let t=[];for(let i=0,s=0;;){let r,o;if(i=n[i]))r=n[i++],o=n[i++];else if(s=0;s--){let r=i[s](n);r instanceof se?n=r:Array.isArray(r)&&r.length==1&&r[0]instanceof se?n=r[0]:n=pf(e,gi(r),!1)}return n}function hm(n){let e=n.startState,t=e.facet(uf),i=n;for(let s=t.length-1;s>=0;s--){let r=t[s](n);r&&Object.keys(r).length&&(i=Of(i,lo(e,r,n.changes.newLength),!0))}return i==n?n:se.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const cm=[];function gi(n){return n==null?cm:Array.isArray(n)?n:[n]}var te=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(te||(te={}));const fm=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let ao;try{ao=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function um(n){if(ao)return ao.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||fm.test(t)))return!0}return!1}function dm(n){return e=>{if(!/\S/.test(e))return te.Space;if(um(e))return te.Word;for(let t=0;t-1)return te.Word;return te.Other}}class Y{constructor(e,t,i,s,r,o){this.config=e,this.doc=t,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;ls.set(h,a)),t=null),s.set(l.value.compartment,l.value.extension)):l.is(M.reconfigure)?(t=null,i=l.value):l.is(M.appendConfig)&&(t=null,i=gi(i).concat(l.value));let r;t?r=e.startState.values.slice():(t=Zs.resolve(i,s,this),r=new Y(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,h)=>h.reconfigure(a,this),null).values);let o=e.startState.facet(oo)?e.newSelection:e.newSelection.asSingle();new Y(t,e.newDoc,o,r,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:y.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),s=this.changes(i.changes),r=[i.range],o=gi(i.effects);for(let l=1;lo.spec.fromJSON(l,a)))}}return Y.create({doc:e.doc,selection:y.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=Zs.resolve(e.extensions||[],new Map),i=e.doc instanceof B?e.doc:B.of((e.doc||"").split(t.staticFacet(Y.lineSeparator)||to)),s=e.selection?e.selection instanceof y?e.selection:y.single(e.selection.anchor,e.selection.head):y.single(0);return of(s,i.length),t.staticFacet(oo)||(s=s.asSingle()),new Y(t,i,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(Y.tabSize)}get lineBreak(){return this.facet(Y.lineSeparator)||` +`}get readOnly(){return this.facet(df)}phrase(e,...t){for(let i of this.facet(Y.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?i:t[r-1]})),e}languageDataAt(e,t,i=-1){let s=[];for(let r of this.facet(af))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return dm(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let a=me(t,o,!1);if(r(t.slice(a,o))!=te.Word)break;o=a}for(;ln.length?n[0]:4});Y.lineSeparator=hf;Y.readOnly=df;Y.phrases=Z.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(s=>n[s]==e[s])}});Y.languageData=af;Y.changeFilter=cf;Y.transactionFilter=ff;Y.transactionExtender=uf;sr.reconfigure=M.define();function dt(n,e,t={}){let i={};for(let s of n)for(let r of Object.keys(s)){let o=s[r],l=i[r];if(l===void 0)i[r]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,r))i[r]=t[r](l,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)i[s]===void 0&&(i[s]=e[s]);return i}class Ht{eq(e){return this==e}range(e,t=e){return ho.create(e,t,this)}}Ht.prototype.startSide=Ht.prototype.endSide=0;Ht.prototype.point=!1;Ht.prototype.mapMode=Oe.TrackDel;let ho=class mf{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new mf(e,t,i)}};function co(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class dl{constructor(e,t,i,s){this.from=e,this.to=t,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,s=0){let r=i?this.to:this.from;for(let o=s,l=r.length;;){if(o==l)return o;let a=o+l>>1,h=r[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-t;if(a==o)return h>=0?o:l;h>=0?l=a:o=a+1}}between(e,t,i,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,r);rd||u==d&&h.startSide>0&&h.endSide<=0)continue;(d-u||h.endSide-h.startSide)<0||(o<0&&(o=u),h.point&&(l=Math.max(l,d-u)),i.push(h),s.push(u-o),r.push(d-o))}return{mapped:i.length?new dl(s,r,i,l):null,pos:o}}}class _{constructor(e,t,i,s){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=s}static create(e,t,i,s){return new _(e,t,i,s)}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:i=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(co)),this.isEmpty)return t.length?_.of(t):this;let l=new gf(this,null,-1).goto(0),a=0,h=[],c=new Et;for(;l.value||a=0){let f=t[a++];c.addInner(f.from,f.to,f.value)||h.push(f)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||rl.to||r=r&&e<=r+o.length&&o.between(r,e-r,t-r,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return dn.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return dn.from(e).goto(t)}static compare(e,t,i,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),l=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),a=ma(o,l,i),h=new Bi(o,a,r),c=new Bi(l,a,r);i.iterGaps((f,u,d)=>ga(h,f,c,u,d,s)),i.empty&&i.length==0&&ga(h,0,c,0,0,s)}static eq(e,t,i=0,s){s==null&&(s=999999999);let r=e.filter(c=>!c.isEmpty&&t.indexOf(c)<0),o=t.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(r.length!=o.length)return!1;if(!r.length)return!0;let l=ma(r,o),a=new Bi(r,l,0).goto(i),h=new Bi(o,l,0).goto(i);for(;;){if(a.to!=h.to||!fo(a.active,h.active)||a.point&&(!h.point||!a.point.eq(h.point)))return!1;if(a.to>s)return!0;a.next(),h.next()}}static spans(e,t,i,s,r=-1){let o=new Bi(e,null,r).goto(t),l=t,a=o.openStart;for(;;){let h=Math.min(o.to,i);if(o.point){let c=o.activeForPoint(o.to),f=o.pointFroml&&(s.span(l,h,o.active,a),a=o.openEnd(h));if(o.to>i)return a+(o.point&&o.to>i?1:0);l=o.to,o.next()}}static of(e,t=!1){let i=new Et;for(let s of e instanceof ho?[e]:t?Om(e):e)i.add(s.from,s.to,s.value);return i.finish()}static join(e){if(!e.length)return _.empty;let t=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let s=e[i];s!=_.empty;s=s.nextLayer)t=new _(s.chunkPos,s.chunk,t,Math.max(s.maxPoint,t.maxPoint));return t}}_.empty=new _([],[],null,-1);function Om(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(co);e=i}return n}_.empty.nextLayer=_.empty;class Et{finishChunk(e){this.chunks.push(new dl(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,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new Et)).add(e,t,i)}addInner(e,t,i){let s=e-this.lastTo||i.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.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 i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(_.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=_.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function ma(n,e,t){let i=new Map;for(let r of n)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&s.push(new gf(o,t,i,r));return s.length==1?s[0]:new dn(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let i=this.heap.length>>1;i>=0;i--)br(this.heap,i);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let i=this.heap.length>>1;i>=0;i--)br(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)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(),br(this.heap,0)}}}function br(n,e){for(let t=n[e];;){let i=(e<<1)+1;if(i>=n.length)break;let s=n[i];if(i+1=0&&(s=n[i+1],i++),t.compare(s)<0)break;n[i]=t,n[e]=s,e=i}}class Bi{constructor(e,t,i){this.minPoint=i,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=dn.from(e,t,i)}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){In(this.active,e),In(this.activeTo,e),In(this.activeRank,e),this.minActive=ba(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:s,rank:r}=this.cursor;for(;t0;)t++;jn(this.active,t,i),jn(this.activeTo,t,s),jn(this.activeRank,t,r),e&&jn(e,t,this.cursor.from),this.minActive=ba(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&In(i,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(i),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function ga(n,e,t,i,s,r){n.goto(e),t.goto(i);let o=i+s,l=i,a=i-e;for(;;){let h=n.to+a-t.to||n.endSide-t.endSide,c=h<0?n.to+a:t.to,f=Math.min(c,o);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&fo(n.activeForPoint(n.to),t.activeForPoint(t.to))||r.comparePoint(l,f,n.point,t.point):f>l&&!fo(n.active,t.active)&&r.compareRange(l,f,n.active,t.active),c>o)break;l=c,h<=0&&n.next(),h>=0&&t.next()}}function fo(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;i--)n[i+1]=n[i];n[e]=t}function ba(n,e){let t=-1,i=1e9;for(let s=0;s=e)return s;if(s==n.length)break;r+=n.charCodeAt(s)==9?t-r%t:1,s=me(n,s)}return i===!0?-1:n.length}const Oo="ͼ",Sa=typeof Symbol>"u"?"__"+Oo:Symbol.for(Oo),po=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),ya=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Vt{constructor(e,t){this.rules=[];let{finish:i}=t||{};function s(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function r(o,l,a,h){let c=[],f=/^@(\w+)\b/.exec(o[0]),u=f&&f[1]=="keyframes";if(f&&l==null)return a.push(o[0]+";");for(let d in l){let O=l[d];if(/&/.test(d))r(d.split(/,\s*/).map(m=>o.map(g=>m.replace(/&/,g))).reduce((m,g)=>m.concat(g)),O,a);else if(O&&typeof O=="object"){if(!f)throw new RangeError("The value of a property ("+d+") should be a primitive value.");r(s(d),O,c,u)}else O!=null&&c.push(d.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+O+";")}(c.length||u)&&a.push((i&&!f&&!h?o.map(i):o).join(", ")+" {"+c.join(" ")+"}")}for(let o in e)r(s(o),e[o],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=ya[Sa]||1;return ya[Sa]=e+1,Oo+e.toString(36)}static mount(e,t,i){let s=e[po],r=i&&i.nonce;s?r&&s.setNonce(r):s=new pm(e,r),s.mount(Array.isArray(t)?t:[t],e)}}let ka=new Map;class pm{constructor(e,t){let i=e.ownerDocument||e,s=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let r=ka.get(i);if(r)return e[po]=r;this.sheet=new s.CSSStyleSheet,ka.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[po]=this}mount(e,t){let i=this.sheet,s=0,r=0;for(let o=0;o-1&&(this.modules.splice(a,1),r--,a=-1),a==-1){if(this.modules.splice(r++,0,l),i)for(let h=0;h",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},mm=typeof navigator<"u"&&/Mac/.test(navigator.platform),gm=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var de=0;de<10;de++)Yt[48+de]=Yt[96+de]=String(de);for(var de=1;de<=24;de++)Yt[de+111]="F"+de;for(var de=65;de<=90;de++)Yt[de]=String.fromCharCode(de+32),On[de]=String.fromCharCode(de);for(var Sr in Yt)On.hasOwnProperty(Sr)||(On[Sr]=Yt[Sr]);function bm(n){var e=mm&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||gm&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?On:Yt)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function pn(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function mo(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Sm(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Ss(n,e){if(!e.anchorNode)return!1;try{return mo(n,e.anchorNode)}catch{return!1}}function mn(n){return n.nodeType==3?Jt(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function ln(n,e,t,i){return t?xa(n,e,t,i,-1)||xa(n,e,t,i,1):!1}function Kt(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Rs(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function xa(n,e,t,i,s){for(;;){if(n==t&&e==i)return!0;if(e==(s<0?0:bt(n))){if(n.nodeName=="DIV")return!1;let r=n.parentNode;if(!r||r.nodeType!=1)return!1;e=Kt(n)+(s<0?0:1),n=r}else if(n.nodeType==1){if(n=n.childNodes[e+(s<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=s<0?bt(n):0}else return!1}}function bt(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Ol(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function ym(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function bf(n,e){let t=e.width/n.offsetWidth,i=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-n.offsetHeight)<1)&&(i=1),{scaleX:t,scaleY:i}}function km(n,e,t,i,s,r,o,l){let a=n.ownerDocument,h=a.defaultView||window;for(let c=n,f=!1;c&&!f;)if(c.nodeType==1){let u,d=c==a.body,O=1,m=1;if(d)u=ym(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(f=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let S=c.getBoundingClientRect();({scaleX:O,scaleY:m}=bf(c,S)),u={left:S.left,right:S.left+c.clientWidth*O,top:S.top,bottom:S.top+c.clientHeight*m}}let g=0,b=0;if(s=="nearest")e.top0&&e.bottom>u.bottom+b&&(b=e.bottom-u.bottom+b+o)):e.bottom>u.bottom&&(b=e.bottom-u.bottom+o,t<0&&e.top-b0&&e.right>u.right+g&&(g=e.right-u.right+g+r)):e.right>u.right&&(g=e.right-u.right+r,t<0&&e.leftt.clientHeight||t.scrollWidth>t.clientWidth)return t;t=t.assignedSlot||t.parentNode}else if(t.nodeType==11)t=t.host;else break;return null}class wm{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:i}=e;this.set(t,Math.min(e.anchorOffset,t?bt(t):0),i,Math.min(e.focusOffset,i?bt(i):0))}set(e,t,i,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=s}}let ci=null;function Sf(n){if(n.setActive)return n.setActive();if(ci)return n.focus(ci);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(ci==null?{get preventScroll(){return ci={preventScroll:!0},!0}}:void 0),!ci){ci=!1;for(let t=0;tMath.max(1,n.scrollHeight-n.clientHeight-4)}function xf(n,e){for(let t=n,i=e;;){if(t.nodeType==3&&i>0)return{node:t,offset:i};if(t.nodeType==1&&i>0){if(t.contentEditable=="false")return null;t=t.childNodes[i-1],i=bt(t)}else if(t.parentNode&&!Rs(t))i=Kt(t),t=t.parentNode;else return null}}function wf(n,e){for(let t=n,i=e;;){if(t.nodeType==3&&it)return f.domBoundsAround(e,t,h);if(u>=e&&s==-1&&(s=a,r=h),h>t&&f.dom.parentNode==this.dom){o=a,l=c;break}c=u,h=u+f.breakAfter}return{from:r,to:l<0?i+this.length:l,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].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),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&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,i=pl){this.markDirty();for(let s=e;sthis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function Pf(n,e,t,i,s,r,o,l,a){let{children:h}=n,c=h.length?h[e]:null,f=r.length?r[r.length-1]:null,u=f?f.breakAfter:o;if(!(e==i&&c&&!o&&!u&&r.length<2&&c.merge(t,s,r.length?f:null,t==0,l,a))){if(i0&&(!o&&r.length&&c.merge(t,c.length,r[0],!1,l,0)?c.breakAfter=r.shift().breakAfter:(t2);var T={mac:va||/Mac/.test(ve.platform),windows:/Win/.test(ve.platform),linux:/Linux|X11/.test(ve.platform),ie:rr,ie_version:vf?go.documentMode||6:So?+So[1]:bo?+bo[1]:0,gecko:Pa,gecko_version:Pa?+(/Firefox\/(\d+)/.exec(ve.userAgent)||[0,0])[1]:0,chrome:!!yr,chrome_version:yr?+yr[1]:0,ios:va,android:/Android\b/.test(ve.userAgent),webkit:$a,safari:Cf,webkit_version:$a?+(/\bAppleWebKit\/(\d+)/.exec(ve.userAgent)||[0,0])[1]:0,tabSize:go.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const $m=256;class Fe extends G{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){e.nodeType==3&&this.createDOM(e)}merge(e,t,i){return this.flags&8||i&&(!(i instanceof Fe)||this.length-(t-e)+i.length>$m||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new Fe(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new be(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return vm(this.dom,e,t)}}class St extends G{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let s of t)s.setParent(this)}setAttrs(e){if(yf(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)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,i,s,r,o){return i&&(!(i instanceof St&&i.mark.eq(this.mark))||e&&r<=0||te&&t.push(i=e&&(s=r),i=a,r++}let o=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new St(this.mark,t,o)}domAtPos(e){return Zf(this,e)}coordsAt(e,t){return Rf(this,e,t)}}function vm(n,e,t){let i=n.nodeValue.length;e>i&&(e=i);let s=e,r=e,o=0;e==0&&t<0||e==i&&t>=0?T.chrome||T.gecko||(e?(s--,o=1):r=0)?0:l.length-1];return T.safari&&!o&&a.width==0&&(a=Array.prototype.find.call(l,h=>h.width)||a),o?Ol(a,o<0):a||null}class Rt extends G{static create(e,t,i){return new Rt(e,t,i)}constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}split(e){let t=Rt.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.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,i,s,r,o){return i&&(!(i instanceof Rt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0)?be.before(this.dom):be.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;let s=this.dom.getClientRects(),r=null;if(!s.length)return null;let o=this.side?this.side<0:e>0;for(let l=o?s.length-1:0;r=s[l],!(e>0?l==0:l==s.length-1||r.top0?be.before(this.dom):be.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return B.empty}get isHidden(){return!0}}Fe.prototype.children=Rt.prototype.children=Pi.prototype.children=pl;function Zf(n,e){let t=n.dom,{children:i}=n,s=0;for(let r=0;sr&&e0;r--){let o=i[r-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let r=s;r0&&e instanceof St&&s.length&&(i=s[s.length-1])instanceof St&&i.mark.eq(e.mark)?Tf(i,e.children[0],t-1):(s.push(e),e.setParent(n)),n.length+=e.length}function Rf(n,e,t){let i=null,s=-1,r=null,o=-1;function l(h,c){for(let f=0,u=0;f=c&&(d.children.length?l(d,c-u):(!r||r.isHidden&&t>0)&&(O>c||u==O&&d.getSide()>0)?(r=d,o=c-u):(u-1?1:0)!=s.length-(t&&s.indexOf(t)>-1?1:0))return!1;for(let r of i)if(r!=t&&(s.indexOf(r)==-1||n[r]!==e[r]))return!1;return!0}function ko(n,e,t){let i=!1;if(e)for(let s in e)t&&s in t||(i=!0,s=="style"?n.style.cssText="":n.removeAttribute(s));if(t)for(let s in t)e&&e[s]==t[s]||(i=!0,s=="style"?n.style.cssText=t[s]:n.setAttribute(s,t[s]));return i}function Zm(n){let e=Object.create(null);for(let t=0;t0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){ml(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Tf(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=yo(t,this.attrs||{})),i&&(this.attrs=yo({class:i},this.attrs||{}))}domAtPos(e){return Zf(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var i;this.dom?this.flags&4&&(yf(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),this.prevAttrs!==void 0&&(ko(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let s=this.dom.lastChild;for(;s&&G.get(s)instanceof St;)s=s.lastChild;if(!s||!this.length||s.nodeName!="BR"&&((i=G.get(s))===null||i===void 0?void 0:i.isEditable)==!1&&(!T.ios||!this.children.some(r=>r instanceof Fe))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let i of this.children){if(!(i instanceof Fe)||/[^ -~]/.test(i.text))return null;let s=mn(i.dom);if(s.length!=1)return null;e+=s[0].width,t=s[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let i=Rf(this,e,t);if(!this.children.length&&i&&this.parent){let{heightOracle:s}=this.parent.view.viewState,r=i.bottom-i.top;if(Math.abs(r-s.lineHeight)<2&&s.textHeight=t){if(r instanceof ae)return r;if(o>t)break}s=o+r.breakAfter}return null}}class mt extends G{constructor(e,t,i){super(),this.widget=e,this.length=t,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,s,r,o){return i&&(!(i instanceof mt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0}}class wt{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,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var xe=function(n){return n[n.Text=0]="Text",n[n.WidgetBefore=1]="WidgetBefore",n[n.WidgetAfter=2]="WidgetAfter",n[n.WidgetRange=3]="WidgetRange",n}(xe||(xe={}));class A extends Ht{constructor(e,t,i,s){super(),this.startSide=e,this.endSide=t,this.widget=i,this.spec=s}get heightRelevant(){return!1}static mark(e){return new Wn(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return t+=i&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Dt(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,s;if(e.isBlockGap)i=-5e8,s=4e8;else{let{start:r,end:o}=Af(e,t);i=(r?t?-3e8:-1:5e8)-1,s=(o?t?2e8:1:-6e8)+1}return new Dt(e,i,s,t,e.widget||null,!0)}static line(e){return new En(e)}static set(e,t=!1){return _.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}A.none=_.empty;class Wn extends A{constructor(e){let{start:t,end:i}=Af(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,i;return this==e||e instanceof Wn&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&ml(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)}}Wn.prototype.point=!1;class En extends A{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof En&&this.spec.class==e.spec.class&&ml(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)}}En.prototype.mapMode=Oe.TrackBefore;En.prototype.point=!0;class Dt extends A{constructor(e,t,i,s,r,o){super(t,i,r,e),this.block=s,this.isReplace=o,this.mapMode=s?t<=0?Oe.TrackBefore:Oe.TrackAfter:Oe.TrackDel}get type(){return this.startSide!=this.endSide?xe.WidgetRange:this.startSide<=0?xe.WidgetBefore:xe.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Dt&&Tm(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)}}Dt.prototype.point=!0;function Af(n,e=!1){let{inclusiveStart:t,inclusiveEnd:i}=n;return t==null&&(t=n.inclusive),i==null&&(i=n.inclusive),{start:t??e,end:i??e}}function Tm(n,e){return n==e||!!(n&&e&&n.compare(e))}function xo(n,e,t,i=0){let s=t.length-1;s>=0&&t[s]+i>=n?t[s]=Math.max(t[s],e):t.push(n,e)}class an{constructor(e,t,i,s){this.doc=e,this.pos=t,this.end=i,this.disallowBlockEffectsFor=s,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(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof mt&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new ae),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Nn(new Pi(-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 mt)&&this.getLine()}buildText(e,t,i){for(;e>0;){if(this.textOff==this.text.length){let{value:r,lineBreak:o,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(o){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}else this.text=r,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append(Nn(new Fe(this.text.slice(this.textOff,this.textOff+s)),t),i),this.atCursorPos=!0,this.textOff+=s,e-=s,i=0}}span(e,t,i,s){this.buildText(t-e,i,s),this.pos=t,this.openStart<0&&(this.openStart=s)}point(e,t,i,s,r,o){if(this.disallowBlockEffectsFor[o]&&i instanceof Dt){if(i.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 l=t-e;if(i instanceof Dt)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new mt(i.widget||$i.block,l,i));else{let a=Rt.create(i.widget||$i.inline,l,l?0:i.startSide),h=this.atCursorPos&&!a.isEditable&&r<=s.length&&(e0),c=!a.isEditable&&(es.length||i.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!h&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),h&&(f.append(Nn(new Pi(1),s),r),r=s.length+Math.max(0,r-s.length)),f.append(Nn(a,s),r),this.atCursorPos=c,this.pendingBuffer=c?es.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=r)}static build(e,t,i,s,r){let o=new an(e,t,i,r);return o.openEnd=_.spans(s,t,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function Nn(n,e){for(let t of e)n=new St(t,[n],n.length);return n}class $i extends wt{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}}$i.inline=new $i("span");$i.block=new $i("div");var ee=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(ee||(ee={}));const ei=ee.LTR,gl=ee.RTL;function Xf(n){let e=[];for(let t=0;t=t){if(l.level==i)return o;(r<0||(s!=0?s<0?l.fromt:e[r].level>l.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}function Wf(n,e){if(n.length!=e.length)return!1;for(let t=0;t=0;m-=3)if(tt[m+1]==-d){let g=tt[m+2],b=g&2?s:g&4?g&1?r:s:0;b&&(N[f]=N[tt[m]]=b),l=m;break}}else{if(tt.length==189)break;tt[l++]=f,tt[l++]=u,tt[l++]=a}else if((O=N[f])==2||O==1){let m=O==s;a=m?0:1;for(let g=l-3;g>=0;g-=3){let b=tt[g+2];if(b&2)break;if(m)tt[g+2]|=2;else{if(b&4)break;tt[g+2]|=4}}}}}function Em(n,e,t,i){for(let s=0,r=i;s<=t.length;s++){let o=s?t[s-1].to:n,l=sa;)O==g&&(O=t[--m].from,g=m?t[m-1].to:n),N[--O]=d;a=c}else r=h,a++}}}function Qo(n,e,t,i,s,r,o){let l=i%2?2:1;if(i%2==s%2)for(let a=e,h=0;aa&&o.push(new At(a,m.from,d));let g=m.direction==ei!=!(d%2);Po(n,g?i+1:i,s,m.inner,m.from,m.to,o),a=m.to}O=m.to}else{if(O==t||(c?N[O]!=l:N[O]==l))break;O++}u?Qo(n,a,O,i+1,s,u,o):ae;){let c=!0,f=!1;if(!h||a>r[h-1].to){let m=N[a-1];m!=l&&(c=!1,f=m==16)}let u=!c&&l==1?[]:null,d=c?i:i+1,O=a;e:for(;;)if(h&&O==r[h-1].to){if(f)break e;let m=r[--h];if(!c)for(let g=m.from,b=h;;){if(g==e)break e;if(b&&r[b-1].to==g)g=r[--b].from;else{if(N[g-1]==l)break e;break}}if(u)u.push(m);else{m.toN.length;)N[N.length]=256;let i=[],s=e==ei?0:1;return Po(n,s,s,t,0,n.length,i),i}function Ef(n){return[new At(0,n,0)]}let Vf="";function Ym(n,e,t,i,s){var r;let o=i.head-n.from,l=At.find(e,o,(r=i.bidiLevel)!==null&&r!==void 0?r:-1,i.assoc),a=e[l],h=a.side(s,t);if(o==h){let u=l+=s?1:-1;if(u<0||u>=e.length)return null;a=e[l=u],o=a.side(!s,t),h=a.side(s,t)}let c=me(n.text,o,a.forward(s,t));(ca.to)&&(c=h),Vf=n.text.slice(Math.min(o,c),Math.max(o,c));let f=l==(s?e.length-1:0)?null:e[l+(s?1:-1)];return f&&c==h&&f.level+(s?0:1)n.some(e=>e)}),Uf=Z.define({combine:n=>n.some(e=>e)}),If=Z.define();class Si{constructor(e,t="nearest",i="nearest",s=5,r=5,o=!1){this.range=e,this.y=t,this.x=i,this.yMargin=s,this.xMargin=r,this.isSnapshot=o}map(e){return e.empty?this:new Si(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 Si(y.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Gn=M.define({map:(n,e)=>n.map(e)}),jf=M.define();function Ze(n,e,t){let i=n.facet(zf);i.length?i[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const Ct=Z.define({combine:n=>n.length?n[0]:!0});let qm=0;const Ki=Z.define();class re{constructor(e,t,i,s,r){this.id=e,this.create=t,this.domEventHandlers=i,this.domEventObservers=s,this.extension=r(this)}static define(e,t){const{eventHandlers:i,eventObservers:s,provide:r,decorations:o}=t||{};return new re(qm++,e,i,s,l=>{let a=[Ki.of(l)];return o&&a.push(gn.of(h=>{let c=h.plugin(l);return c?o(c):A.none})),r&&a.push(r(l)),a})}static fromClass(e,t){return re.define(i=>new e(i),t)}}class kr{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(i){if(Ze(t.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Ze(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(i){Ze(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Nf=Z.define(),bl=Z.define(),gn=Z.define(),Gf=Z.define(),Sl=Z.define(),Ff=Z.define();function Za(n,e){let t=n.state.facet(Ff);if(!t.length)return t;let i=t.map(r=>r instanceof Function?r(n):r),s=[];return _.spans(i,e.from,e.to,{point(){},span(r,o,l,a){let h=r-e.from,c=o-e.from,f=s;for(let u=l.length-1;u>=0;u--,a--){let d=l[u].spec.bidiIsolate,O;if(d==null&&(d=Dm(e.text,h,c)),a>0&&f.length&&(O=f[f.length-1]).to==h&&O.direction==d)O.to=c,f=O.inner;else{let m={from:h,to:c,direction:d,inner:[]};f.push(m),f=m.inner}}}}),s}const Hf=Z.define();function Kf(n){let e=0,t=0,i=0,s=0;for(let r of n.state.facet(Hf)){let o=r(n);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(i=Math.max(i,o.top)),o.bottom!=null&&(s=Math.max(s,o.bottom)))}return{left:e,right:t,top:i,bottom:s}}const Ji=Z.define();class Be{constructor(e,t,i,s){this.fromA=e,this.toA=t,this.fromB=i,this.toB=s}join(e){return new Be(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,i=this;for(;t>0;t--){let s=e[t-1];if(!(s.fromA>i.toA)){if(s.toAc)break;r+=2}if(!a)return i;new Be(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),o=a.toA,l=a.toB}}}class As{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=he.empty(this.startState.doc.length);for(let r of i)this.changes=this.changes.compose(r.changes);let s=[];this.changes.iterChangedRanges((r,o,l,a)=>s.push(new Be(r,o,l,a))),this.changedRanges=s}static create(e,t,i){return new As(e,t,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class Ta extends G{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=A.none,this.lastCompositionAfterCursor=!1,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 ae],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Be(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:h,toA:c})=>cthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?s=this.domChanged.newSel.head:!jm(e.changes,this.hasComposition)&&!e.selectionSet&&(s=e.state.selection.main.head));let r=s>-1?Lm(this.view,e.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:h,to:c}=this.hasComposition;i=new Be(h,c,e.changes.mapPos(h,-1),e.changes.mapPos(c,1)).addToSet(i.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(T.ie||T.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.updateDeco(),a=Um(o,l,e.changes);return i=Be.extendWithRanges(i,a),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,i);let{observer:s}=this.view;s.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=T.chrome||T.ios?{node:s.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||s.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let r=[];if(this.view.viewport.from||this.view.viewport.to=0?s[o]:null;if(!l)break;let{fromA:a,toA:h,fromB:c,toB:f}=l,u,d,O,m;if(i&&i.range.fromBc){let w=an.build(this.view.state.doc,c,i.range.fromB,this.decorations,this.dynamicDecorationMap),k=an.build(this.view.state.doc,i.range.toB,f,this.decorations,this.dynamicDecorationMap);d=w.breakAtStart,O=w.openStart,m=k.openEnd;let C=this.compositionView(i);k.breakAtStart?C.breakAfter=1:k.content.length&&C.merge(C.length,C.length,k.content[0],!1,k.openStart,0)&&(C.breakAfter=k.content[0].breakAfter,k.content.shift()),w.content.length&&C.merge(0,0,w.content[w.content.length-1],!0,0,w.openEnd)&&w.content.pop(),u=w.content.concat(C).concat(k.content)}else({content:u,breakAtStart:d,openStart:O,openEnd:m}=an.build(this.view.state.doc,c,f,this.decorations,this.dynamicDecorationMap));let{i:g,off:b}=r.findPos(h,1),{i:S,off:x}=r.findPos(a,-1);Pf(this,S,x,g,b,u,d,O,m)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let i of t.effects)i.is(jf)&&(this.editContextFormatting=i.value)}compositionView(e){let t=new Fe(e.text.nodeValue);t.flags|=8;for(let{deco:s}of e.marks)t=new St(s,[t],t.length);let i=new ae;return i.append(t,0),i}fixCompositionDOM(e){let t=(r,o)=>{o.flags|=8|(o.children.some(a=>a.flags&7)?1:0),this.markedForComposition.add(o);let l=G.get(r);l&&l!=o&&(l.dom=null),o.setDOM(r)},i=this.childPos(e.range.fromB,1),s=this.children[i.i];t(e.line,s);for(let r=e.marks.length-1;r>=-1;r--)i=s.childPos(i.off,1),s=s.children[i.i],t(r>=0?e.marks[r].node:e.text,s)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,s=i==this.dom,r=!s&&Ss(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(s||t||r))return;let o=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(l.anchor)),h=l.empty?a:this.moveToLine(this.domAtPos(l.head));if(T.gecko&&l.empty&&!this.hasComposition&&zm(a)){let f=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(f,a.node.childNodes[a.offset]||null)),a=h=new be(f,0),o=!0}let c=this.view.observer.selectionRange;(o||!c.focusNode||(!ln(a.node,a.offset,c.anchorNode,c.anchorOffset)||!ln(h.node,h.offset,c.focusNode,c.focusOffset))&&!this.suppressWidgetCursorChange(c,l))&&(this.view.observer.ignore(()=>{T.android&&T.chrome&&this.dom.contains(c.focusNode)&&Im(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=pn(this.view.root);if(f)if(l.empty){if(T.gecko){let u=_m(a.node,a.offset);if(u&&u!=3){let d=(u==1?xf:wf)(a.node,a.offset);d&&(a=new be(d.node,d.offset))}}f.collapse(a.node,a.offset),l.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=l.bidiLevel)}else if(f.extend){f.collapse(a.node,a.offset);try{f.extend(h.node,h.offset)}catch{}}else{let u=document.createRange();l.anchor>l.head&&([a,h]=[h,a]),u.setEnd(h.node,h.offset),u.setStart(a.node,a.offset),f.removeAllRanges(),f.addRange(u)}r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(a,h)),this.impreciseAnchor=a.precise?null:new be(c.anchorNode,c.anchorOffset),this.impreciseHead=h.precise?null:new be(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&ln(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,i=pn(e.root),{anchorNode:s,anchorOffset:r}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let o=ae.find(this,t.head);if(!o)return;let l=o.posAtStart;if(t.head==l||t.head==l+o.length)return;let a=this.coordsAt(t.head,-1),h=this.coordsAt(t.head,1);if(!a||!h||a.bottom>h.top)return;let c=this.domAtPos(t.head+t.assoc);i.collapse(c.node,c.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&i.collapse(s,r)}moveToLine(e){let t=this.dom,i;if(e.node!=t)return e;for(let s=e.offset;!i&&s=0;s--){let r=G.get(t.childNodes[s]);r instanceof ae&&(i=r.domAtPos(r.length))}return i?new be(i.node,i.offset,!0):e}nearest(e){for(let t=e;t;){let i=G.get(t);if(i&&i.rootView==this)return i;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;t=0;o--){let l=this.children[o],a=r-l.breakAfter,h=a-l.length;if(ae||l.covers(1))&&(!i||l instanceof ae&&!(i instanceof ae&&t>=0)))i=l,s=h;else if(i&&h==e&&a==e&&l instanceof mt&&Math.abs(t)<2){if(l.deco.startSide<0)break;o&&(i=null)}r=h}return i?i.coordsAt(e-s,t):null}coordsForChar(e){let{i:t,off:i}=this.childPos(e,1),s=this.children[t];if(!(s instanceof ae))return null;for(;s.children.length;){let{i:l,off:a}=s.childPos(i,1);for(;;l++){if(l==s.children.length)return null;if((s=s.children[l]).length)break}i=a}if(!(s instanceof Fe))return null;let r=me(s.text,i);if(r==i)return null;let o=Jt(s.dom,i,r).getClientRects();for(let l=0;lMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==ee.LTR;for(let h=0,c=0;cs)break;if(h>=i){let d=f.dom.getBoundingClientRect();if(t.push(d.height),o){let O=f.dom.lastChild,m=O?mn(O):[];if(m.length){let g=m[m.length-1],b=a?g.right-d.left:d.right-g.left;b>l&&(l=b,this.minWidth=r,this.minWidthFrom=h,this.minWidthTo=u)}}}h=u+f.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?ee.RTL:ee.LTR}measureTextSize(){for(let r of this.children)if(r instanceof ae){let o=r.measureTextSize();if(o)return o}let e=document.createElement("div"),t,i,s;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let r=mn(e.firstChild)[0];t=e.getBoundingClientRect().height,i=r?r.width/27:7,s=r?r.height:t,e.remove()}),{lineHeight:t,charWidth:i,textHeight:s}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Qf(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,s=0;;s++){let r=s==t.viewports.length?null:t.viewports[s],o=r?r.from-1:this.length;if(o>i){let l=(t.lineBlockAt(o).bottom-t.lineBlockAt(i).top)/this.view.scaleY;e.push(A.replace({widget:new Ra(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!r)break;i=r.to+1}return A.set(e)}updateDeco(){let e=1,t=this.view.state.facet(gn).map(r=>(this.dynamicDecorationMap[e++]=typeof r=="function")?r(this.view):r),i=!1,s=this.view.state.facet(Gf).map((r,o)=>{let l=typeof r=="function";return l&&(i=!0),l?r(this.view):r});for(s.length&&(this.dynamicDecorationMap[e++]=i,t.push(_.join(s))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),s;if(!i)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let r=Kf(this.view),o={left:i.left-r.left,top:i.top-r.top,right:i.right+r.right,bottom:i.bottom+r.bottom},{offsetWidth:l,offsetHeight:a}=this.view.scrollDOM;km(this.view.scrollDOM,o,t.head{ie.from&&(t=!0)}),t}function Nm(n,e,t=1){let i=n.charCategorizer(e),s=n.doc.lineAt(e),r=e-s.from;if(s.length==0)return y.cursor(e);r==0?t=1:r==s.length&&(t=-1);let o=r,l=r;t<0?o=me(s.text,r,!1):l=me(s.text,r);let a=i(s.text.slice(o,l));for(;o>0;){let h=me(s.text,o,!1);if(i(s.text.slice(h,o))!=a)break;o=h}for(;ln?e.left-n:Math.max(0,n-e.right)}function Fm(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function xr(n,e){return n.tope.top+1}function Aa(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function vo(n,e,t){let i,s,r,o,l=!1,a,h,c,f;for(let O=n.firstChild;O;O=O.nextSibling){let m=mn(O);for(let g=0;gx||o==x&&r>S){i=O,s=b,r=S,o=x;let w=x?t0?g0)}S==0?t>b.bottom&&(!c||c.bottomb.top)&&(h=O,f=b):c&&xr(c,b)?c=Xa(c,b.bottom):f&&xr(f,b)&&(f=Aa(f,b.top))}}if(c&&c.bottom>=t?(i=a,s=c):f&&f.top<=t&&(i=h,s=f),!i)return{node:n,offset:0};let u=Math.max(s.left,Math.min(s.right,e));if(i.nodeType==3)return Ma(i,u,t);if(l&&i.contentEditable!="false")return vo(i,u,t);let d=Array.prototype.indexOf.call(n.childNodes,i)+(e>=(s.left+s.right)/2?1:0);return{node:n,offset:d}}function Ma(n,e,t){let i=n.nodeValue.length,s=-1,r=1e9,o=0;for(let l=0;lt?c.top-t:t-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&f=(c.left+c.right)/2,d=u;if((T.chrome||T.gecko)&&Jt(n,l).getBoundingClientRect().left==c.right&&(d=!u),f<=0)return{node:n,offset:l+(d?1:0)};s=l+(d?1:0),r=f}}}return{node:n,offset:s>-1?s:o>0?n.nodeValue.length:0}}function eu(n,e,t,i=-1){var s,r;let o=n.contentDOM.getBoundingClientRect(),l=o.top+n.viewState.paddingTop,a,{docHeight:h}=n.viewState,{x:c,y:f}=e,u=f-l;if(u<0)return 0;if(u>h)return n.state.doc.length;for(let w=n.viewState.heightOracle.textHeight/2,k=!1;a=n.elementAtHeight(u),a.type!=xe.Text;)for(;u=i>0?a.bottom+w:a.top-w,!(u>=0&&u<=h);){if(k)return t?null:0;k=!0,i=-i}f=l+u;let d=a.from;if(dn.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:Wa(n,o,a,c,f);let O=n.dom.ownerDocument,m=n.root.elementFromPoint?n.root:O,g=m.elementFromPoint(c,f);g&&!n.contentDOM.contains(g)&&(g=null),g||(c=Math.max(o.left+1,Math.min(o.right-1,c)),g=m.elementFromPoint(c,f),g&&!n.contentDOM.contains(g)&&(g=null));let b,S=-1;if(g&&((s=n.docView.nearest(g))===null||s===void 0?void 0:s.isEditable)!=!1){if(O.caretPositionFromPoint){let w=O.caretPositionFromPoint(c,f);w&&({offsetNode:b,offset:S}=w)}else if(O.caretRangeFromPoint){let w=O.caretRangeFromPoint(c,f);w&&({startContainer:b,startOffset:S}=w,(!n.contentDOM.contains(b)||T.safari&&Hm(b,S,c)||T.chrome&&Km(b,S,c))&&(b=void 0))}}if(!b||!n.docView.dom.contains(b)){let w=ae.find(n.docView,d);if(!w)return u>a.top+a.height/2?a.to:a.from;({node:b,offset:S}=vo(w.dom,c,f))}let x=n.docView.nearest(b);if(!x)return null;if(x.isWidget&&((r=x.dom)===null||r===void 0?void 0:r.nodeType)==1){let w=x.dom.getBoundingClientRect();return e.yn.defaultLineHeight*1.5){let l=n.viewState.heightOracle.textHeight,a=Math.floor((s-t.top-(n.defaultLineHeight-l)*.5)/l);r+=a*n.viewState.heightOracle.lineLength}let o=n.state.sliceDoc(t.from,t.to);return t.from+uo(o,r,n.state.tabSize)}function Hm(n,e,t){let i;if(n.nodeType!=3||e!=(i=n.nodeValue.length))return!1;for(let s=n.nextSibling;s;s=s.nextSibling)if(s.nodeType!=1||s.nodeName!="BR")return!1;return Jt(n,i-1,i).getBoundingClientRect().left>t}function Km(n,e,t){if(e!=0)return!1;for(let s=n;;){let r=s.parentNode;if(!r||r.nodeType!=1||r.firstChild!=s)return!1;if(r.classList.contains("cm-line"))break;s=r}let i=n.nodeType==1?n.getBoundingClientRect():Jt(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-i.left>5}function Co(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let i of t.type)if(i.to>e||i.to==e&&(i.to==t.to||i.type==xe.Text))return i}return t}function Jm(n,e,t,i){let s=Co(n,e.head),r=!i||s.type!=xe.Text||!(n.lineWrapping||s.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(r){let o=n.dom.getBoundingClientRect(),l=n.textDirectionAt(s.from),a=n.posAtCoords({x:t==(l==ee.LTR)?o.right-1:o.left+1,y:(r.top+r.bottom)/2});if(a!=null)return y.cursor(a,t?-1:1)}return y.cursor(t?s.to:s.from,t?-1:1)}function Ea(n,e,t,i){let s=n.state.doc.lineAt(e.head),r=n.bidiSpans(s),o=n.textDirectionAt(s.from);for(let l=e,a=null;;){let h=Ym(s,r,o,l,t),c=Vf;if(!h){if(s.number==(t?n.state.doc.lines:1))return l;c=` +`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),h=n.visualLineSide(s,!t)}if(a){if(!a(c))return l}else{if(!i)return h;a=i(c)}l=h}}function eg(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==te.Space&&(s=o),s==o}}function tg(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return y.cursor(s,e.assoc);let o=e.goalColumn,l,a=n.contentDOM.getBoundingClientRect(),h=n.coordsAtPos(s,e.assoc||-1),c=n.documentTop;if(h)o==null&&(o=h.left-a.left),l=r<0?h.top:h.bottom;else{let d=n.viewState.lineBlockAt(s);o==null&&(o=Math.min(a.right-a.left,n.defaultCharacterWidth*(s-d.from))),l=(r<0?d.top:d.bottom)+c}let f=a.left+o,u=i??n.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let O=l+(u+d)*r,m=eu(n,{x:f,y:O},!1,r);if(Oa.bottom||(r<0?ms)){let g=n.docView.coordsForChar(m),b=!g||O{if(e>r&&es(n)),t.from,e.head>t.from?-1:1);return i==t.from?t:y.cursor(i,inull),T.gecko&&bg(e.contentDOM.ownerDocument)}handleEvent(e){!cg(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let i=this.handlers[e];if(i){for(let s of i.observers)s(this.view,t);for(let s of i.handlers){if(t.defaultPrevented)break;if(s(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=ng(e),i=this.handlers,s=this.view.contentDOM;for(let r in t)if(r!="scroll"){let o=!t[r].handlers.length,l=i[r];l&&o!=!l.handlers.length&&(s.removeEventListener(r,this.handleEvent),l=null),l||s.addEventListener(r,this.handleEvent,{passive:o})}for(let r in i)r!="scroll"&&!t[r]&&s.removeEventListener(r,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&iu.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),T.android&&T.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return T.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=tu.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||sg.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:T.safari&&!T.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.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 Va(n,e){return(t,i)=>{try{return e.call(n,i,t)}catch(s){Ze(t.state,s)}}}function ng(n){let e=Object.create(null);function t(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of n){let s=i.spec;if(s&&s.domEventHandlers)for(let r in s.domEventHandlers){let o=s.domEventHandlers[r];o&&t(r).handlers.push(Va(i.value,o))}if(s&&s.domEventObservers)for(let r in s.domEventObservers){let o=s.domEventObservers[r];o&&t(r).observers.push(Va(i.value,o))}}for(let i in He)t(i).handlers.push(He[i]);for(let i in Ue)t(i).observers.push(Ue[i]);return e}const tu=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],sg="dthko",iu=[16,17,18,20,91,92,224,225],Fn=6;function Hn(n){return Math.max(0,n)*.7+8}function rg(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class og{constructor(e,t,i,s){this.view=e,this.startEvent=t,this.style=i,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=xm(e.contentDOM),this.atoms=e.state.facet(Sl).map(o=>o(e));let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Y.allowMultipleSelections)&&lg(e,t),this.dragging=hg(e,t)&&ou(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){var t;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&rg(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let i=0,s=0,r=((t=this.scrollParent)===null||t===void 0?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},o=Kf(this.view);e.clientX-o.left<=r.left+Fn?i=-Hn(r.left-e.clientX):e.clientX+o.right>=r.right-Fn&&(i=Hn(e.clientX-r.right)),e.clientY-o.top<=r.top+Fn?s=-Hn(r.top-e.clientY):e.clientY+o.bottom>=r.bottom-Fn&&(s=Hn(e.clientY-r.bottom)),this.setScrollSpeed(i,s)}up(e){this.dragging==null&&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),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let i=0;it.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function lg(n,e){let t=n.state.facet(Yf);return t.length?t[0](e):T.mac?e.metaKey:e.ctrlKey}function ag(n,e){let t=n.state.facet(Df);return t.length?t[0](e):T.mac?!e.altKey:!e.ctrlKey}function hg(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let i=pn(n.root);if(!i||i.rangeCount==0)return!0;let s=i.getRangeAt(0).getClientRects();for(let r=0;r=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function cg(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,i;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(i=G.get(t))&&i.ignoreEvent(e))return!1;return!0}const He=Object.create(null),Ue=Object.create(null),nu=T.ie&&T.ie_version<15||T.ios&&T.webkit_version<604;function fg(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),su(n,t.value)},50)}function su(n,e){let{state:t}=n,i,s=1,r=t.toText(e),o=r.lines==t.selection.ranges.length;if(Zo!=null&&t.selection.ranges.every(a=>a.empty)&&Zo==r.toString()){let a=-1;i=t.changeByRange(h=>{let c=t.doc.lineAt(h.from);if(c.from==a)return{range:h};a=c.from;let f=t.toText((o?r.line(s++).text:e)+t.lineBreak);return{changes:{from:c.from,insert:f},range:y.cursor(h.from+f.length)}})}else o?i=t.changeByRange(a=>{let h=r.line(s++);return{changes:{from:a.from,to:a.to,insert:h.text},range:y.cursor(a.from+h.length)}}):i=t.replaceSelection(r);n.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}Ue.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};He.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);Ue.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};Ue.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};He.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let i of n.state.facet(qf))if(t=i(n,e),t)break;if(!t&&e.button==0&&(t=Og(n,e)),t){let i=!n.hasFocus;n.inputState.startMouseSelection(new og(n,e,t,i)),i&&n.observer.ignore(()=>{Sf(n.contentDOM);let r=n.root.activeElement;r&&!r.contains(n.contentDOM)&&r.blur()});let s=n.inputState.mouseSelection;if(s)return s.start(e),s.dragging===!1}return!1};function Ya(n,e,t,i){if(i==1)return y.cursor(e,t);if(i==2)return Nm(n.state,e,t);{let s=ae.find(n.docView,e),r=n.state.doc.lineAt(s?s.posAtEnd:e),o=s?s.posAtStart:r.from,l=s?s.posAtEnd:r.to;return ln>=e.top&&n<=e.bottom,Da=(n,e,t)=>ru(e,t)&&n>=t.left&&n<=t.right;function ug(n,e,t,i){let s=ae.find(n.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(r==0)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&Da(t,i,o))return-1;let l=s.coordsAt(r,1);return l&&Da(t,i,l)?1:o&&ru(i,o)?-1:1}function qa(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:ug(n,t,e.clientX,e.clientY)}}const dg=T.ie&&T.ie_version<=11;let za=null,La=0,_a=0;function ou(n){if(!dg)return n.detail;let e=za,t=_a;return za=n,_a=Date.now(),La=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(La+1)%3:1}function Og(n,e){let t=qa(n,e),i=ou(e),s=n.state.selection;return{update(r){r.docChanged&&(t.pos=r.changes.mapPos(t.pos),s=s.map(r.changes))},get(r,o,l){let a=qa(n,r),h,c=Ya(n,a.pos,a.bias,i);if(t.pos!=a.pos&&!o){let f=Ya(n,t.pos,t.bias,i),u=Math.min(f.from,c.from),d=Math.max(f.to,c.to);c=u1&&(h=pg(s,a.pos))?h:l?s.addRange(c):y.create([c])}}}function pg(n,e){for(let t=0;t=e)return y.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}He.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let s=n.docView.nearest(e.target);if(s&&s.isWidget){let r=s.posAtStart,o=r+s.length;(r>=t.to||o<=t.from)&&(t=y.range(r,o))}}let{inputState:i}=n;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",n.state.sliceDoc(t.from,t.to)),e.dataTransfer.effectAllowed="copyMove"),!1};He.dragend=n=>(n.inputState.draggedContent=null,!1);function Ba(n,e,t,i){if(!t)return;let s=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:r}=n.inputState,o=i&&r&&ag(n,e)?{from:r.from,to:r.to}:null,l={from:s,insert:t},a=n.state.changes(o?[o,l]:l);n.focus(),n.dispatch({changes:a,selection:{anchor:a.mapPos(s,-1),head:a.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"}),n.inputState.draggedContent=null}He.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let i=Array(t.length),s=0,r=()=>{++s==t.length&&Ba(n,e,i.filter(o=>o!=null).join(n.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[o]=l.result),r()},l.readAsText(t[o])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return Ba(n,e,i,!0),!0}return!1};He.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=nu?null:e.clipboardData;return t?(su(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(fg(n),!1)};function mg(n,e){let t=n.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),n.focus()},50)}function gg(n){let e=[],t=[],i=!1;for(let s of n.selection.ranges)s.empty||(e.push(n.sliceDoc(s.from,s.to)),t.push(s));if(!e.length){let s=-1;for(let{from:r}of n.selection.ranges){let o=n.doc.lineAt(r);o.number>s&&(e.push(o.text),t.push({from:o.from,to:Math.min(n.doc.length,o.to+1)})),s=o.number}i=!0}return{text:e.join(n.lineBreak),ranges:t,linewise:i}}let Zo=null;He.copy=He.cut=(n,e)=>{let{text:t,ranges:i,linewise:s}=gg(n.state);if(!t&&!s)return!1;Zo=s?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let r=nu?null:e.clipboardData;return r?(r.clearData(),r.setData("text/plain",t),!0):(mg(n,t),!1)};const lu=xt.define();function au(n,e){let t=[];for(let i of n.facet(_f)){let s=i(n,e);s&&t.push(s)}return t?n.update({effects:t,annotations:lu.of(!0)}):null}function hu(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=au(n.state,e);t?n.dispatch(t):n.update([])}},10)}Ue.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),hu(n)};Ue.blur=n=>{n.observer.clearSelectionRange(),hu(n)};Ue.compositionstart=Ue.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};Ue.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,T.chrome&&T.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};Ue.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};He.beforeinput=(n,e)=>{var t;let i;if(T.chrome&&T.android&&(i=tu.find(s=>s.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((t=window.visualViewport)===null||t===void 0?void 0:t.height)||0;setTimeout(()=>{var r;(((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0)>s+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return T.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),T.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>Ue.compositionend(n,e),20),!1};const Ua=new Set;function bg(n){Ua.has(n)||(Ua.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const Ia=["pre-wrap","normal","pre-line","break-spaces"];class Sg{constructor(e){this.lineWrapping=e,this.doc=B.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}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 Ia.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=i,this.textHeight=s,this.lineLength=r,a){this.heightSamples={};for(let h=0;h0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>ks&&(e.heightChanged=!0),this.height=t)}replace(e,t,i){return we.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,s){let r=this,o=i.doc;for(let l=s.length-1;l>=0;l--){let{fromA:a,toA:h,fromB:c,toB:f}=s[l],u=r.lineAt(a,J.ByPosNoHeight,i.setDoc(t),0,0),d=u.to>=h?u:r.lineAt(h,J.ByPosNoHeight,i,0,0);for(f+=d.to-h,h=d.to;l>0&&u.from<=s[l-1].toA;)a=s[l-1].fromA,c=s[l-1].fromB,l--,ar*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),i+=1+l.break,s-=l.size}else if(r>s*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,r-=l.size}else break;else if(s=r&&o(this.blockAt(0,i,s,r))}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more&&this.setHeight(e,s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class We extends cu{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,i,s){return new lt(s,this.length,i,this.height,this.breaks)}replace(e,t,i){let s=i[0];return i.length==1&&(s instanceof We||s instanceof fe&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof fe?s=new We(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):we.of(i)}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more?this.setHeight(e,s.heights[s.index++]):(i||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 fe extends we{constructor(e){super(e,0)}heightMetrics(e,t){let i=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,r=s-i+1,o,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*r);o=a/r,this.length>r+1&&(l=(this.height-a)/(this.length-r-1))}else o=this.height/r;return{firstLine:i,lastLine:s,perLine:o,perChar:l}}blockAt(e,t,i,s){let{firstLine:r,lastLine:o,perLine:l,perChar:a}=this.heightMetrics(t,s);if(t.lineWrapping){let h=s+(e0){let r=i[i.length-1];r instanceof fe?i[i.length-1]=new fe(r.length+s):i.push(null,new fe(s-1))}if(e>0){let r=i[0];r instanceof fe?i[0]=new fe(e+r.length):i.unshift(new fe(e-1),null)}return we.of(i)}decomposeLeft(e,t){t.push(new fe(e-1),null)}decomposeRight(e,t){t.push(null,new fe(this.length-e-1))}updateHeight(e,t=0,i=!1,s){let r=t+this.length;if(s&&s.from<=t+this.length&&s.more){let o=[],l=Math.max(t,s.from),a=-1;for(s.from>t&&o.push(new fe(s.from-t-1).updateHeight(e,t));l<=r&&s.more;){let c=e.doc.lineAt(l).length;o.length&&o.push(null);let f=s.heights[s.index++];a==-1?a=f:Math.abs(f-a)>=ks&&(a=-2);let u=new We(c,f);u.outdated=!1,o.push(u),l+=c+1}l<=r&&o.push(null,new fe(r-l).updateHeight(e,l));let h=we.of(o);return(a<0||Math.abs(h.height-this.height)>=ks||Math.abs(a-this.heightMetrics(e,t).perLine)>=ks)&&(e.heightChanged=!0),h}else(i||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class kg extends we{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,t,i,s){let r=i+this.left.height;return el))return h;let c=t==J.ByPosNoHeight?J.ByPosNoHeight:J.ByPos;return a?h.join(this.right.lineAt(l,c,i,o,l)):this.left.lineAt(l,c,i,s,r).join(h)}forEachLine(e,t,i,s,r,o){let l=s+this.left.height,a=r+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,i,l,a,o);else{let h=this.lineAt(a,J.ByPos,i,s,r);e=e&&h.from<=t&&o(h),t>h.to&&this.right.forEachLine(h.to+1,t,i,l,a,o)}}replace(e,t,i){let s=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-s,t-s,i));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let l of i)r.push(l);if(e>0&&ja(r,o-1),t=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,s=i+this.break;if(e>=s)return this.right.decomposeRight(e-s,t);e2*t.size||t.size>2*e.size?we.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,i=!1,s){let{left:r,right:o}=this,l=t+r.length+this.break,a=null;return s&&s.from<=t+r.length&&s.more?a=r=r.updateHeight(e,t,i,s):r.updateHeight(e,t,i),s&&s.from<=l+o.length&&s.more?a=o=o.updateHeight(e,l,i,s):o.updateHeight(e,l,i),a?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function ja(n,e){let t,i;n[e]==null&&(t=n[e-1])instanceof fe&&(i=n[e+1])instanceof fe&&n.splice(e-1,3,new fe(t.length+1+i.length))}const xg=5;class yl{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 i=Math.min(t,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof We?s.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new We(i-this.pos,-1)),this.writtenTo=i,t>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e=xg)&&this.addLineDeco(s,r,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new We(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new fe(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof We)return e;let t=new We(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,i){let s=this.ensureLine();s.length+=i,s.collapsed+=i,s.widgetHeight=Math.max(s.widgetHeight,e),s.breaks+=t,this.writtenTo=this.pos=this.pos+i}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof We)&&!this.isCovered?this.nodes.push(new We(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&f.overflow!="visible"){let u=c.getBoundingClientRect();r=Math.max(r,u.left),o=Math.min(o,u.right),l=Math.max(l,u.top),a=h==n.parentNode?u.bottom:Math.min(a,u.bottom)}h=f.position=="absolute"||f.position=="fixed"?c.offsetParent:c.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:r-t.left,right:Math.max(r,o)-t.left,top:l-(t.top+e),bottom:Math.max(l,a)-(t.top+e)}}function $g(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Qr{constructor(e,t,i){this.from=e,this.to=t,this.size=i}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new Sg(t),this.stateDeco=e.facet(gn).filter(i=>typeof i!="function"),this.heightMap=we.empty().applyChanges(this.stateDeco,B.empty,this.heightOracle.setDoc(e.doc),[new Be(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=A.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let s=i?t.head:t.anchor;if(!e.some(({from:r,to:o})=>s>=r&&s<=o)){let{from:r,to:o}=this.lineBlockAt(s);e.push(new Kn(r,o))}}return this.viewports=e.sort((i,s)=>i.from-s.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Ga:new kl(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(en(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(gn).filter(c=>typeof c!="function");let s=e.changedRanges,r=Be.extendWithRanges(s,wg(i,this.stateDeco,e?e.changes:he.empty(this.state.doc.length))),o=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),this.heightMap.height!=o&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let h=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&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(Uf)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),s=this.heightOracle,r=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?ee.RTL:ee.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),l=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let h=0,c=0;if(l.width&&l.height){let{scaleX:w,scaleY:k}=bf(t,l);(w>.005&&Math.abs(this.scaleX-w)>.005||k>.005&&Math.abs(this.scaleY-k)>.005)&&(this.scaleX=w,this.scaleY=k,h|=8,o=a=!0)}let f=(parseInt(i.paddingTop)||0)*this.scaleY,u=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=u)&&(this.paddingTop=f,this.paddingBottom=u,h|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=8);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=kf(e.scrollDOM);let O=(this.printing?$g:Pg)(t,this.paddingTop),m=O.top-this.pixelViewport.top,g=O.bottom-this.pixelViewport.bottom;this.pixelViewport=O;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let S=l.width;if((this.contentDOMWidth!=S||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,h|=8),a){let w=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(w)&&(o=!0),o||s.lineWrapping&&Math.abs(S-this.contentDOMWidth)>s.charWidth){let{lineHeight:k,charWidth:C,textHeight:v}=e.docView.measureTextSize();o=k>0&&s.refresh(r,k,C,v,S/C,w),o&&(e.docView.minWidth=0,h|=8)}m>0&&g>0?c=Math.max(m,g):m<0&&g<0&&(c=Math.min(m,g)),s.heightChanged=!1;for(let k of this.viewports){let C=k.from==this.viewport.from?w:e.docView.measureVisibleLineHeights(k);this.heightMap=(o?we.empty().applyChanges(this.stateDeco,B.empty,this.heightOracle,[new Be(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new yg(k.from,C))}s.heightChanged&&(h|=2)}let x=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return x&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),h|=this.updateForViewport()),(h&2||x)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,a=new Kn(s.lineAt(o-i*1e3,J.ByHeight,r,0,0).from,s.lineAt(l+(1-i)*1e3,J.ByHeight,r,0,0).to);if(t){let{head:h}=t.range;if(ha.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=s.lineAt(h,J.ByPos,r,0,0),u;t.y=="center"?u=(f.top+f.bottom)/2-c/2:t.y=="start"||t.y=="nearest"&&h=l+Math.max(10,Math.min(i,250)))&&s>o-2*1e3&&r>1,o=s<<1;if(this.defaultTextDirection!=ee.LTR&&!i)return[];let l=[],a=(c,f,u,d)=>{if(f-cc&&bb.from>=u.from&&b.to<=u.to&&Math.abs(b.from-c)b.fromS));if(!g){if(fb.from<=f&&b.to>=f)){let b=t.moveToLineBoundary(y.cursor(f),!1,!0).head;b>c&&(f=b)}g=new Qr(c,f,this.gapSize(u,c,f,d))}l.push(g)},h=c=>{if(c.lengthc.from&&a(c.from,d,c,f),Ot.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];_.spans(e,this.viewport.from,this.viewport.to,{span(s,r){t.push({from:s,to:r})},point(){}},20);let i=t.length!=this.visibleRanges.length||this.visibleRanges.some((s,r)=>s.from!=t[r].from||s.to!=t[r].to);return this.visibleRanges=t,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||en(this.heightMap.lineAt(e,J.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||en(this.heightMap.lineAt(this.scaler.fromDOM(e),J.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 en(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 Kn{constructor(e,t){this.from=e,this.to=t}}function Cg(n,e,t){let i=[],s=n,r=0;return _.spans(t,n,e,{span(){},point(o,l){o>s&&(i.push({from:s,to:o}),r+=o-s),s=l}},20),s=1)return e[e.length-1].to;let i=Math.floor(n*t);for(let s=0;;s++){let{from:r,to:o}=e[s],l=o-r;if(i<=l)return r+i;i-=l}}function es(n,e){let t=0;for(let{from:i,to:s}of n.ranges){if(e<=s){t+=e-i;break}t+=s-i}return t/n.total}function Zg(n,e){for(let t of n)if(e(t))return t}const Ga={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};class kl{constructor(e,t,i){let s=0,r=0,o=0;this.viewports=i.map(({from:l,to:a})=>{let h=t.lineAt(l,J.ByPos,e,0,0).top,c=t.lineAt(a,J.ByPos,e,0,0).bottom;return s+=c-h,{from:l,to:a,top:h,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let l of this.viewports)l.domTop=o+(l.top-r)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),r=l.bottom}toDOM(e){for(let t=0,i=0,s=0;;t++){let r=tt.from==e.viewports[i].from&&t.to==e.viewports[i].to):!1}}function en(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),i=e.toDOM(n.bottom);return new lt(n.from,n.length,t,i-t,Array.isArray(n._content)?n._content.map(s=>en(s,e)):n._content)}const ts=Z.define({combine:n=>n.join(" ")}),To=Z.define({combine:n=>n.indexOf(!0)>-1}),Ro=Vt.newName(),fu=Vt.newName(),uu=Vt.newName(),du={"&light":"."+fu,"&dark":"."+uu};function Ao(n,e,t){return new Vt(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,s=>{if(s=="&")return n;if(!t||!t[s])throw new RangeError(`Unsupported selector: ${s}`);return t[s]}):n+" "+i}})}const Tg=Ao("."+Ro,{"&":{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-iso":{unicodeBidi:"isolate"},".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,')`,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"}},du),tn="￿";class Rg{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(Y.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=tn}readRange(e,t){if(!e)return this;let i=e.parentNode;for(let s=e;;){this.findPointBefore(i,s);let r=this.text.length;this.readNode(s);let o=s.nextSibling;if(o==t)break;let l=G.get(s),a=G.get(o);(l&&a?l.breakAfter:(l?l.breakAfter:Rs(s))||Rs(o)&&(s.nodeName!="BR"||s.cmIgnore)&&this.text.length>r)&&this.lineBreak(),s=o}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,o=1,l;if(this.lineSeparator?(r=t.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(l=s.exec(t))&&(r=l.index,o=l[0].length),this.append(t.slice(i,r<0?t.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);i=r+o}}readNode(e){if(e.cmIgnore)return;let t=G.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let s=i.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(Ag(e,i.node,i.offset)?t:0))}}function Ag(n,e,t){for(;;){if(!e||t-1;let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let l=r||o?[]:Eg(e),a=new Rg(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=Vg(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=r&&r.node==l.focusNode&&r.offset==l.focusOffset||!mo(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),h=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!mo(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),c=e.viewport;if((T.ios||T.chrome)&&e.state.selection.main.empty&&a!=h&&(c.from>0||c.toDate.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:l}=e.bounds,a=s.from,h=null;(r===8||T.android&&e.text.length=s.from&&t.to<=s.to&&(t.from!=s.from||t.to!=s.to)&&s.to-s.from-(t.to-t.from)<=4?t={from:s.from,to:s.to,insert:n.state.doc.slice(s.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,s.to))}:(T.mac||T.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(i&&t.insert.length==2&&(i=y.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:B.of([" "])}):T.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==` + `&&n.lineWrapping&&(i&&(i=y.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:B.of([" "])}),t)return pu(n,t,i,r);if(i&&!i.main.eq(s)){let o=!1,l="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(o=!0),l=n.inputState.lastSelectionOrigin),n.dispatch({selection:i,scrollIntoView:o,userEvent:l}),!0}else return!1}function pu(n,e,t,i=-1){if(T.ios&&n.inputState.flushIOSKey(e))return!0;let s=n.state.selection.main;if(T.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&n.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&bi(n.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||i==8&&e.insert.lengths.head)&&bi(n.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&bi(n.contentDOM,"Delete",46)))return!0;let r=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let o,l=()=>o||(o=Mg(n,e,t));return n.state.facet(Lf).some(a=>a(n,e.from,e.to,r,l))||n.dispatch(l()),!0}function Mg(n,e,t){let i,s=n.state,r=s.selection.main;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let l=r.frome.to?s.sliceDoc(e.to,r.to):"";i=s.replaceSelection(n.state.toText(l+e.insert.sliceString(0,void 0,n.state.lineBreak)+a))}else{let l=s.changes(e),a=t&&t.main.to<=l.newLength?t.main:void 0;if(s.selection.ranges.length>1&&n.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let h=n.state.sliceDoc(e.from,e.to),c,f=t&&Jf(n,t.main.head);if(f){let O=e.insert.length-(e.to-e.from);c={from:f.from,to:f.to-O}}else c=n.state.doc.lineAt(r.head);let u=r.to-e.to,d=r.to-r.from;i=s.changeByRange(O=>{if(O.from==r.from&&O.to==r.to)return{changes:l,range:a||O.map(l)};let m=O.to-u,g=m-h.length;if(O.to-O.from!=d||n.state.sliceDoc(g,m)!=h||O.to>=c.from&&O.from<=c.to)return{range:O};let b=s.changes({from:g,to:m,insert:e.insert}),S=O.to-r.to;return{changes:b,range:a?y.range(Math.max(0,a.anchor+S),Math.max(0,a.head+S)):O.map(b)}})}else i={changes:l,selection:a&&s.selection.replaceRange(a)}}let o="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,o+=".compose",n.inputState.compositionFirstChange&&(o+=".start",n.inputState.compositionFirstChange=!1)),s.update(i,{userEvent:o,scrollIntoView:!0})}function Wg(n,e,t,i){let s=Math.min(n.length,e.length),r=0;for(;r0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let a=Math.max(0,r-Math.min(o,l));t-=o+a-r}if(o=o?r-t:0;r-=a,l=r+(l-o),o=r}else if(l=l?r-t:0;r-=a,o=r+(o-l),l=r}return{from:r,toA:o,toB:l}}function Eg(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}=n.observer.selectionRange;return t&&(e.push(new Fa(t,i)),(s!=t||r!=i)&&e.push(new Fa(s,r))),e}function Vg(n,e){if(n.length==0)return null;let t=n[0].pos,i=n.length==2?n[1].pos:t;return t>-1&&i>-1?y.single(t+e,i+e):null}const Yg={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Pr=T.ie&&T.ie_version<=11;class Dg{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new wm,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.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let i of t)this.queue.push(i);(T.ie&&T.ie_version<=11||T.ios&&e.composing)&&t.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT===!0&&(this.editContext=new zg(e),e.state.facet(Ct)&&(e.contentDOM.editContext=this.editContext.editContext)),Pr&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.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),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.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(t=>{t.length>0&&t[t.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.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){e.type=="change"&&!e.matches||(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,i)=>t!=e[i]))){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:i}=this,s=this.selectionRange;if(i.state.facet(Ct)?i.root.activeElement!=this.dom:!Ss(i.dom,s))return;let r=s.anchorNode&&i.docView.nearest(s.anchorNode);if(r&&r.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(T.ie&&T.ie_version<=11||T.android&&T.chrome)&&!i.state.selection.main.empty&&s.focusNode&&ln(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=pn(e.root);if(!t)return!1;let i=T.safari&&e.root.nodeType==11&&Sm(this.dom.ownerDocument)==this.dom&&qg(this.view,t)||t;if(!i||this.selectionRange.eq(i))return!1;let s=Ss(this.dom,i);return s&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=r.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&r.force&&bi(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{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,i=-1,s=!1;for(let r of e){let o=this.readMutation(r);o&&(o.typeOver&&(s=!0),t==-1?{from:t,to:i}=o:(t=Math.min(o.from,t),i=Math.max(o.to,i)))}return{from:t,to:i,typeOver:s}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),s=this.selectionChanged&&Ss(this.dom,this.selectionRange);if(e<0&&!s)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new Xg(this.view,e,t,i);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}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 i=this.view.state,s=Ou(this.view,t);return this.view.state==i&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),s}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let i=Ha(t,e.previousSibling||e.target.previousSibling,-1),s=Ha(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:s?t.posBefore(s):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{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),this.printQuery?this.printQuery.addEventListener("change",this.onPrint):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),this.printQuery?this.printQuery.removeEventListener("change",this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Ct)!=e.state.facet(Ct)&&(e.view.contentDOM.editContext=e.state.facet(Ct)?this.editContext.editContext:null))}destroy(){var e,t,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let s of this.scrollTargets)s.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 Ha(n,e,t){for(;e;){let i=G.get(e);if(i&&i.parent==n)return i;let s=e.parentNode;e=s!=n.dom?s:t>0?e.nextSibling:e.previousSibling}return null}function Ka(n,e){let t=e.startContainer,i=e.startOffset,s=e.endContainer,r=e.endOffset,o=n.docView.domAtPos(n.state.selection.main.anchor);return ln(o.node,o.offset,s,r)&&([t,i,s,r]=[s,r,t,i]),{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}}function qg(n,e){if(e.getComposedRanges){let s=e.getComposedRanges(n.root)[0];if(s)return Ka(n,s)}let t=null;function i(s){s.preventDefault(),s.stopImmediatePropagation(),t=s.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",i,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",i,!0),t?Ka(n,t):null}class zg{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});t.addEventListener("textupdate",i=>{let{anchor:s}=e.state.selection.main,r={from:this.toEditorPos(i.updateRangeStart),to:this.toEditorPos(i.updateRangeEnd),insert:B.of(i.text.split(` +`))};r.from==this.from&&sthis.to&&(r.to=s),!(r.from==r.to&&!r.insert.length)&&(this.pendingContextChange=r,pu(e,r,y.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd))),this.pendingContextChange&&this.revertPending(e.state))}),t.addEventListener("characterboundsupdate",i=>{let s=[],r=null;for(let o=this.toEditorPos(i.rangeStart),l=this.toEditorPos(i.rangeEnd);o{let s=[];for(let r of i.getTextFormats()){let o=r.underlineStyle,l=r.underlineThickness;if(o!="None"&&l!="None"){let a=`text-decoration: underline ${o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${l=="Thin"?1:2}px`;s.push(A.mark({attributes:{style:a}}).range(this.toEditorPos(r.rangeStart),this.toEditorPos(r.rangeEnd)))}}e.dispatch({effects:jf.of(A.set(s))})}),t.addEventListener("compositionstart",()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)}),t.addEventListener("compositionend",()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null}),this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let s=pn(i.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,i=!1,s=this.pendingContextChange;return e.changes.iterChanges((r,o,l,a,h)=>{if(i)return;let c=h.length-(o-r);if(s&&o>=s.to)if(s.from==r&&s.to==o&&s.insert.eq(h)){s=this.pendingContextChange=null,t+=c;return}else s=null,this.revertPending(e.state);if(r+=t,o+=t,o<=this.from)this.from+=c,this.to+=c;else if(rthis.to||this.to-this.from+h.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),h.toString()),this.to+=c}t+=c}),s&&!i&&this.revertPending(e.state),!i}update(e){!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.to+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),s=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(i,s)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}}class ${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),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(i=>i.forEach(s=>t(s,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||Qm(e.parent)||document,this.viewState=new Na(e.state||Y.create(e)),e.scrollTo&&e.scrollTo.is(Gn)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Ki).map(i=>new kr(i));for(let i of this.plugins)i.update(this);this.observer=new Dg(this),this.inputState=new ig(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Ta(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}dispatch(...e){let t=e.length==1&&e[0]instanceof se?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,s,r=this.state;for(let u of e){if(u.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=u.state}if(this.destroyed){this.viewState.state=r;return}let o=this.hasFocus,l=0,a=null;e.some(u=>u.annotation(lu))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=au(r,o),a||(l=1));let h=this.observer.delayedAndroidKey,c=null;if(h?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(c=null)):this.observer.clear(),r.facet(Y.phrases)!=this.state.facet(Y.phrases))return this.setState(r);s=As.create(this,r,e),s.flags|=l;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let u of e){if(f&&(f=f.map(u.changes)),u.scrollIntoView){let{main:d}=u.state.selection;f=new Si(d.empty?d:y.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of u.effects)d.is(Gn)&&(f=d.value.clip(this.state))}this.viewState.update(s,f),this.bidiCache=Xs.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),t=this.docView.update(s),this.state.facet(Ji)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(u=>u.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(ts)!=s.state.facet(ts)&&(this.viewState.mustMeasureContent=!0),(t||i||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!s.empty)for(let u of this.state.facet($o))try{u(s)}catch(d){Ze(this.state,d,"update listener")}(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!Ou(this,c)&&h.force&&bi(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new Na(e),this.plugins=e.facet(Ki).map(i=>new kr(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new Ta(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(Ki),i=e.state.facet(Ki);if(t!=i){let s=[];for(let r of i){let o=t.indexOf(r);if(o<0)s.push(new kr(r));else{let l=this.plugins[o];l.mustUpdate=e,s.push(l)}}for(let r of this.plugins)r.mustUpdate!=e&&r.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let s of this.plugins)s.mustUpdate=e;for(let s=0;s-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,i=this.scrollDOM,s=i.scrollTop*this.scaleY,{scrollAnchorPos:r,scrollAnchorHeight:o}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(o<0)if(kf(i))r=-1,o=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(s);r=d.from,o=d.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];a&4||([this.measureRequests,h]=[h,this.measureRequests]);let c=h.map(d=>{try{return d.read(this)}catch(O){return Ze(this.state,O),Ja}}),f=As.create(this,this.state,[]),u=!1;f.flags|=a,t?t.flags|=a:t=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),u=this.docView.update(f),u&&this.docViewUpdate());for(let d=0;d1||O<-1){s=s+O,i.scrollTop=s/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet($o))l(t)}get themeClasses(){return Ro+" "+(this.state.facet(To)?uu:fu)+" "+this.state.facet(ts)}updateAttrs(){let e=eh(this,Nf,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Ct)?"true":"false",class:"cm-content",style:`${T.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),eh(this,bl,t);let i=this.observer.ignore(()=>{let s=ko(this.contentDOM,this.contentAttrs,t),r=ko(this.dom,this.editorAttrs,e);return s||r});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let s of i.effects)if(s.is($.announce)){t&&(this.announceDOM.textContent=""),t=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(Ji);let e=this.state.facet($.cspNonce);Vt.mount(this.root,this.styleModules.concat(Tg).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&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(e.key!=null){for(let t=0;ti.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,i){return wr(this,e,Ea(this,e,t,i))}moveByGroup(e,t){return wr(this,e,Ea(this,e,t,i=>eg(this,e.head,i)))}visualLineSide(e,t){let i=this.bidiSpans(e),s=this.textDirectionAt(e.from),r=i[t?i.length-1:0];return y.cursor(r.side(t,s)+e.from,r.forward(!t,s)?1:-1)}moveToLineBoundary(e,t,i=!0){return Jm(this,e,t,i)}moveVertically(e,t,i){return wr(this,e,tg(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),eu(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let s=this.state.doc.lineAt(e),r=this.bidiSpans(s),o=r[At.find(r,e-s.from,-1,t)];return Ol(i,o.dir==ee.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(Bf)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Lg)return Ef(e.length);let t=this.textDirectionAt(e.from),i;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||Wf(r.isolates,i=Za(this,e))))return r.order;i||(i=Za(this,e));let s=Vm(e.text,t,i);return this.bidiCache.push(new Xs(e.from,e.to,t,i,!0,s)),s}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||T.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Sf(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();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 Gn.of(new Si(typeof e=="number"?y.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return Gn.of(new Si(y.cursor(i.from),"start","start",i.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return re.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return re.define(()=>({}),{eventObservers:e})}static theme(e,t){let i=Vt.newName(),s=[ts.of(i),Ji.of(Ao(`.${i}`,e))];return t&&t.dark&&s.push(To.of(!0)),s}static baseTheme(e){return kt.lowest(Ji.of(Ao("."+Ro,e,du)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),s=i&&G.get(i)||G.get(e);return((t=s==null?void 0:s.rootView)===null||t===void 0?void 0:t.view)||null}}$.styleModule=Ji;$.inputHandler=Lf;$.scrollHandler=If;$.focusChangeEffect=_f;$.perLineTextDirection=Bf;$.exceptionSink=zf;$.updateListener=$o;$.editable=Ct;$.mouseSelectionStyle=qf;$.dragMovesSelection=Df;$.clickAddsSelectionRange=Yf;$.decorations=gn;$.outerDecorations=Gf;$.atomicRanges=Sl;$.bidiIsolatedRanges=Ff;$.scrollMargins=Hf;$.darkTheme=To;$.cspNonce=Z.define({combine:n=>n.length?n[0]:""});$.contentAttributes=bl;$.editorAttributes=Nf;$.lineWrapping=$.contentAttributes.of({class:"cm-lineWrapping"});$.announce=M.define();const Lg=4096,Ja={};class Xs{constructor(e,t,i,s,r,o){this.from=e,this.to=t,this.dir=i,this.isolates=s,this.fresh=r,this.order=o}static update(e,t){if(t.empty&&!e.some(r=>r.fresh))return e;let i=[],s=e.length?e[e.length-1].dir:ee.LTR;for(let r=Math.max(0,e.length-10);r=0;s--){let r=i[s],o=typeof r=="function"?r(n):r;o&&yo(o,t)}return t}const _g=T.mac?"mac":T.windows?"win":T.linux?"linux":"key";function Bg(n,e){const t=n.split(/-(?!$)/);let i=t[t.length-1];i=="Space"&&(i=" ");let s,r,o,l;for(let a=0;ai.concat(s),[]))),t}function Ig(n,e,t){return gu(mu(n.state),e,n,t)}let Zt=null;const jg=4e3;function Ng(n,e=_g){let t=Object.create(null),i=Object.create(null),s=(o,l)=>{let a=i[o];if(a==null)i[o]=l;else if(a!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},r=(o,l,a,h,c)=>{var f,u;let d=t[o]||(t[o]=Object.create(null)),O=l.split(/ (?!$)/).map(b=>Bg(b,e));for(let b=1;b{let w=Zt={view:x,prefix:S,scope:o};return setTimeout(()=>{Zt==w&&(Zt=null)},jg),!0}]})}let m=O.join(" ");s(m,!1);let g=d[m]||(d[m]={preventDefault:!1,stopPropagation:!1,run:((u=(f=d._any)===null||f===void 0?void 0:f.run)===null||u===void 0?void 0:u.slice())||[]});a&&g.run.push(a),h&&(g.preventDefault=!0),c&&(g.stopPropagation=!0)};for(let o of n){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let h of l){let c=t[h]||(t[h]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let u in c)c[u].run.push(d=>f(d,Xo))}let a=o[e]||o.key;if(a)for(let h of l)r(h,a,o.run,o.preventDefault,o.stopPropagation),o.shift&&r(h,"Shift-"+a,o.shift,o.preventDefault,o.stopPropagation)}return t}let Xo=null;function gu(n,e,t,i){Xo=e;let s=bm(e),r=ue(s,0),o=ze(r)==s.length&&s!=" ",l="",a=!1,h=!1,c=!1;Zt&&Zt.view==t&&Zt.scope==i&&(l=Zt.prefix+" ",iu.indexOf(e.keyCode)<0&&(h=!0,Zt=null));let f=new Set,u=g=>{if(g){for(let b of g.run)if(!f.has(b)&&(f.add(b),b(t)))return g.stopPropagation&&(c=!0),!0;g.preventDefault&&(g.stopPropagation&&(c=!0),h=!0)}return!1},d=n[i],O,m;return d&&(u(d[l+is(s,e,!o)])?a=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(T.windows&&e.ctrlKey&&e.altKey)&&(O=Yt[e.keyCode])&&O!=s?(u(d[l+is(O,e,!0)])||e.shiftKey&&(m=On[e.keyCode])!=s&&m!=O&&u(d[l+is(m,e,!1)]))&&(a=!0):o&&e.shiftKey&&u(d[l+is(s,e,!0)])&&(a=!0),!a&&u(d._any)&&(a=!0)),h&&(a=!0),a&&c&&e.stopPropagation(),Xo=null,a}class Yn{constructor(e,t,i,s,r){this.className=e,this.left=t,this.top=i,this.width=s,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(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,i){if(i.empty){let s=e.coordsAtPos(i.head,i.assoc||1);if(!s)return[];let r=bu(e);return[new Yn(t,s.left-r.left,s.top-r.top,null,s.bottom-s.top)]}else return Gg(e,t,i)}}function bu(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==ee.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function ih(n,e,t,i){let s=n.coordsAtPos(e,t*2);if(!s)return i;let r=n.dom.getBoundingClientRect(),o=(s.top+s.bottom)/2,l=n.posAtCoords({x:r.left+1,y:o}),a=n.posAtCoords({x:r.right-1,y:o});return l==null||a==null?i:{from:Math.max(i.from,Math.min(l,a)),to:Math.min(i.to,Math.max(l,a))}}function Gg(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let i=Math.max(t.from,n.viewport.from),s=Math.min(t.to,n.viewport.to),r=n.textDirection==ee.LTR,o=n.contentDOM,l=o.getBoundingClientRect(),a=bu(n),h=o.querySelector(".cm-line"),c=h&&window.getComputedStyle(h),f=l.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),u=l.right-(c?parseInt(c.paddingRight):0),d=Co(n,i),O=Co(n,s),m=d.type==xe.Text?d:null,g=O.type==xe.Text?O:null;if(m&&(n.lineWrapping||d.widgetLineBreaks)&&(m=ih(n,i,1,m)),g&&(n.lineWrapping||O.widgetLineBreaks)&&(g=ih(n,s,-1,g)),m&&g&&m.from==g.from&&m.to==g.to)return S(x(t.from,t.to,m));{let k=m?x(t.from,null,m):w(d,!1),C=g?x(null,t.to,g):w(O,!0),v=[];return(m||d).to<(g||O).from-(m&&g?1:0)||d.widgetLineBreaks>1&&k.bottom+n.defaultLineHeight/2E&&U.from=Qe)break;le>ie&&V(Math.max(Ye,ie),k==null&&Ye<=E,Math.min(le,Qe),C==null&&le>=I,Re.dir)}if(ie=Pe.to+1,ie>=Qe)break}return z.length==0&&V(E,k==null,I,C==null,n.textDirection),{top:W,bottom:q,horizontal:z}}function w(k,C){let v=l.top+(C?k.top:k.bottom);return{top:v,bottom:v,horizontal:[]}}}function Fg(n,e){return n.constructor==e.constructor&&n.eq(e)}class Hg{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(xs)!=e.state.facet(xs)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,i=e.facet(xs);for(;t!Fg(t,this.drawn[i]))){let t=this.dom.firstChild,i=0;for(let s of e)s.update&&t&&s.constructor&&this.drawn[i].constructor&&s.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(s.draw(),t);for(;t;){let s=t.nextSibling;t.remove(),t=s}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const xs=Z.define();function Su(n){return[re.define(e=>new Hg(e,n)),xs.of(n)]}const yu=!T.ios,bn=Z.define({combine(n){return dt(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function Kg(n={}){return[bn.of(n),Jg,e0,t0,Uf.of(!0)]}function ku(n){return n.startState.facet(bn)!=n.state.facet(bn)}const Jg=Su({above:!0,markers(n){let{state:e}=n,t=e.facet(bn),i=[];for(let s of e.selection.ranges){let r=s==e.selection.main;if(s.empty?!r||yu:t.drawRangeCursor){let o=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=s.empty?s:y.cursor(s.head,s.head>s.anchor?-1:1);for(let a of Yn.forRange(n,o,l))i.push(a)}}return i},update(n,e){n.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=ku(n);return t&&nh(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){nh(e.state,n)},class:"cm-cursorLayer"});function nh(n,e){e.style.animationDuration=n.facet(bn).cursorBlinkRate+"ms"}const e0=Su({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:Yn.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||ku(n)},class:"cm-selectionLayer"}),Mo={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};yu&&(Mo[".cm-line"].caretColor=Mo[".cm-content"].caretColor="transparent !important");const t0=kt.highest($.theme(Mo)),xu=M.define({map(n,e){return n==null?null:e.mapPos(n)}}),nn=ce.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,i)=>i.is(xu)?i.value:t,n)}}),i0=re.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(nn);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(nn)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field(nn),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let i=n.scrollDOM.getBoundingClientRect();return{left:t.left-i.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-i.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(nn)!=n&&this.view.dispatch({effects:xu.of(n)})}},{eventObservers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function n0(){return[nn,i0]}function sh(n,e,t,i,s){e.lastIndex=0;for(let r=n.iterRange(t,i),o=t,l;!r.next().done;o+=r.value.length)if(!r.lineBreak)for(;l=e.exec(r.value);)s(o+l.index,l)}function s0(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let i=[];for(let{from:s,to:r}of t)s=Math.max(n.state.doc.lineAt(s).from,s-e),r=Math.min(n.state.doc.lineAt(r).to,r+e),i.length&&i[i.length-1].to>=s?i[i.length-1].to=r:i.push({from:s,to:r});return i}class r0{constructor(e){const{regexp:t,decoration:i,decorate:s,boundary:r,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,s)this.addMatch=(l,a,h,c)=>s(c,h,h+l[0].length,l,a);else if(typeof i=="function")this.addMatch=(l,a,h,c)=>{let f=i(l,a,h);f&&c(h,h+l[0].length,f)};else if(i)this.addMatch=(l,a,h,c)=>c(h,h+l[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=o}createDeco(e){let t=new Et,i=t.add.bind(t);for(let{from:s,to:r}of s0(e,this.maxLength))sh(e.state.doc,this.regexp,s,r,(o,l)=>this.addMatch(l,e,o,i));return t.finish()}updateDeco(e,t){let i=1e9,s=-1;return e.docChanged&&e.changes.iterChanges((r,o,l,a)=>{a>e.view.viewport.from&&l1e3?this.createDeco(e.view):s>-1?this.updateRange(e.view,t.map(e.changes),i,s):t}updateRange(e,t,i,s){for(let r of e.visibleRanges){let o=Math.max(r.from,i),l=Math.min(r.to,s);if(l>o){let a=e.state.doc.lineAt(o),h=a.toa.from;o--)if(this.boundary.test(a.text[o-1-a.from])){c=o;break}for(;lu.push(b.range(m,g));if(a==h)for(this.regexp.lastIndex=c-a.from;(d=this.regexp.exec(a.text))&&d.indexthis.addMatch(g,e,m,O));t=t.update({filterFrom:c,filterTo:f,filter:(m,g)=>mf,add:u})}}return t}}const Wo=/x/.unicode!=null?"gu":"g",o0=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Wo),l0={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 $r=null;function a0(){var n;if($r==null&&typeof document<"u"&&document.body){let e=document.body.style;$r=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return $r||!1}const ws=Z.define({combine(n){let e=dt(n,{render:null,specialChars:o0,addSpecialChars:null});return(e.replaceTabs=!a0())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Wo)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Wo)),e}});function h0(n={}){return[ws.of(n),c0()]}let rh=null;function c0(){return rh||(rh=re.fromClass(class{constructor(n){this.view=n,this.decorations=A.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(ws)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new r0({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=ue(e[0],0);if(r==9){let o=s.lineAt(i),l=t.state.tabSize,a=Ge(o.text,l,i-o.from);return A.replace({widget:new O0((l-a%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=A.replace({widget:new d0(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(ws);n.startState.facet(ws)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const f0="•";function u0(n){return n>=32?f0:n==10?"␤":String.fromCharCode(9216+n)}class d0 extends wt{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=u0(this.code),i=e.state.phrase("Control character")+" "+(l0[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class O0 extends wt{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function p0(){return g0}const m0=A.line({class:"cm-activeLine"}),g0=re.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let i of n.state.selection.ranges){let s=n.lineBlockAt(i.head);s.from>e&&(t.push(m0.range(s.from)),e=s.from)}return A.set(t)}},{decorations:n=>n.decorations}),Eo=2e3;function b0(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>Eo||t.off>Eo||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let a=i;a<=s;a++){let h=n.doc.line(a);h.length<=l&&r.push(y.range(h.from+o,h.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let a=i;a<=s;a++){let h=n.doc.line(a),c=uo(h.text,o,n.tabSize,!0);if(c<0)r.push(y.cursor(h.to));else{let f=uo(h.text,l,n.tabSize);r.push(y.range(h.from+c,h.from+f))}}}return r}function S0(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function oh(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),s=t-i.from,r=s>Eo?-1:s==i.length?S0(n,e.clientX):Ge(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function y0(n,e){let t=oh(n,e),i=n.state.selection;return t?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(r);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},i=i.map(s.changes)}},get(s,r,o){let l=oh(n,s);if(!l)return i;let a=b0(n.state,t,l);return a.length?o?y.create(a.concat(i.ranges)):y.create(a):i}}:null}function k0(n){let e=t=>t.altKey&&t.button==0;return $.mouseSelectionStyle.of((t,i)=>e(i)?y0(t,i):null)}const x0={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},w0={style:"cursor: crosshair"};function Q0(n={}){let[e,t]=x0[n.key||"Alt"],i=re.fromClass(class{constructor(s){this.view=s,this.isDown=!1}set(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}},{eventObservers:{keydown(s){this.set(s.keyCode==e||t(s))},keyup(s){(s.keyCode==e||!t(s))&&this.set(!1)},mousemove(s){this.set(t(s))}}});return[i,$.contentAttributes.of(s=>{var r;return!((r=s.plugin(i))===null||r===void 0)&&r.isDown?w0:null})]}const Ui="-10000px";class wu{constructor(e,t,i,s){this.facet=t,this.createTooltipView=i,this.removeTooltipView=s,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let r=null;this.tooltipViews=this.tooltips.map(o=>r=i(o,r))}update(e,t){var i;let s=e.state.facet(this.facet),r=s.filter(a=>a);if(s===this.input){for(let a of this.tooltipViews)a.update&&a.update(e);return!1}let o=[],l=t?[]:null;for(let a=0;at[h]=a),t.length=l.length),this.input=s,this.tooltips=r,this.tooltipViews=o,!0}}function P0(n){let{win:e}=n;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const vr=Z.define({combine:n=>{var e,t,i;return{position:T.ios?"absolute":((e=n.find(s=>s.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(s=>s.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((i=n.find(s=>s.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||P0}}}),lh=new WeakMap,xl=re.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(vr);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new wu(n,wl,(t,i)=>this.createTooltip(t,i),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.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 n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,i=n.state.facet(vr);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let s of this.manager.tooltipViews)s.dom.style.position=this.position;t=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let s of this.manager.tooltipViews)this.container.appendChild(s.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),i=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let s=document.createElement("div");s.className="cm-tooltip-arrow",t.dom.appendChild(s)}return t.dom.style.position=this.position,t.dom.style.top=Ui,t.dom.style.left="0px",this.container.insertBefore(t.dom,i),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(n=i.destroy)===null||n===void 0||n.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect(),e=1,t=1,i=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(T.gecko)i=s.offsetParent!=this.container.ownerDocument.body;else if(s.style.top==Ui&&s.style.left=="0px"){let r=s.getBoundingClientRect();i=Math.abs(r.top+1e4)>1||Math.abs(r.left)>1}}if(i||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(e=s.width/this.parent.offsetWidth,t=s.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((s,r)=>{let o=this.manager.tooltipViews[r];return o.getCoords?o.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(vr).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:i}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{editor:t,space:i,scaleX:s,scaleY:r}=n,o=[];for(let l=0;l=Math.min(t.bottom,i.bottom)||f.rightMath.min(t.right,i.right)+.1){c.style.top=Ui;continue}let d=a.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,O=d?7:0,m=u.right-u.left,g=(e=lh.get(h))!==null&&e!==void 0?e:u.bottom-u.top,b=h.offset||v0,S=this.view.textDirection==ee.LTR,x=u.width>i.right-i.left?S?i.left:i.right-u.width:S?Math.min(f.left-(d?14:0)+b.x,i.right-m):Math.max(i.left,f.left-m+(d?14:0)-b.x),w=this.above[l];!a.strictSide&&(w?f.top-(u.bottom-u.top)-b.yi.bottom)&&w==i.bottom-f.bottom>f.top-i.top&&(w=this.above[l]=!w);let k=(w?f.top-i.top:i.bottom-f.bottom)-O;if(kx&&W.topC&&(C=w?W.top-g-2-O:W.bottom+O+2);if(this.position=="absolute"?(c.style.top=(C-n.parent.top)/r+"px",c.style.left=(x-n.parent.left)/s+"px"):(c.style.top=C/r+"px",c.style.left=x/s+"px"),d){let W=f.left+(S?b.x:-b.x)-(x+14-7);d.style.left=W/s+"px"}h.overlap!==!0&&o.push({left:x,top:C,right:v,bottom:C+g}),c.classList.toggle("cm-tooltip-above",w),c.classList.toggle("cm-tooltip-below",!w),h.positioned&&h.positioned(n.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 n of this.manager.tooltipViews)n.dom.style.top=Ui}},{eventObservers:{scroll(){this.maybeMeasure()}}}),$0=$.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:`${7*2}px`,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"}}}),v0={x:0,y:0},wl=Z.define({enables:[xl,$0]}),Ms=Z.define({combine:n=>n.reduce((e,t)=>e.concat(t),[])});class or{static create(e){return new or(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new wu(e,Ms,(t,i)=>this.createHostedView(t,i),t=>t.dom.remove())}createHostedView(e,t){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}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)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let i of this.manager.tooltipViews){let s=i[e];if(s!==void 0){if(t===void 0)t=s;else if(t!==s)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 C0=wl.compute([Ms],n=>{let e=n.facet(Ms);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var i;return(i=t.end)!==null&&i!==void 0?i:t.pos})),create:or.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class Z0{constructor(e,t,i,s,r){this.view=e,this.source=t,this.field=i,this.setHover=s,this.hoverTime=r,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.length)return;let e=Date.now()-this.lastMove.time;el.bottom||t.xl.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(s)).find(c=>c.from<=s&&c.to>=s),h=a&&a.dir==ee.RTL?-1:1;r=t.x{this.pending==l&&(this.pending=null,a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])}))},a=>Ze(e.state,a,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(xl),t=e?e.manager.tooltips.findIndex(i=>i.create==or.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,i;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:s,tooltip:r}=this;if(s.length&&r&&!T0(r.dom,e)||this.pending){let{pos:o}=s[0]||this.pending,l=(i=(t=s[0])===null||t===void 0?void 0:t.end)!==null&&i!==void 0?i:o;(o==l?this.view.posAtCoords(this.lastMove)!=o:!R0(this.view,o,l,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=i=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const ns=4;function T0(n,e){let t=n.getBoundingClientRect();return e.clientX>=t.left-ns&&e.clientX<=t.right+ns&&e.clientY>=t.top-ns&&e.clientY<=t.bottom+ns}function R0(n,e,t,i,s,r){let o=n.scrollDOM.getBoundingClientRect(),l=n.documentTop+n.documentPadding.top+n.contentHeight;if(o.left>i||o.rights||Math.min(o.bottom,l)=e&&a<=t}function A0(n,e={}){let t=M.define(),i=ce.define({create(){return[]},update(s,r){if(s.length&&(e.hideOnChange&&(r.docChanged||r.selection)?s=[]:e.hideOn&&(s=s.filter(o=>!e.hideOn(r,o))),r.docChanged)){let o=[];for(let l of s){let a=r.changes.mapPos(l.pos,-1,Oe.TrackDel);if(a!=null){let h=Object.assign(Object.create(null),l);h.pos=a,h.end!=null&&(h.end=r.changes.mapPos(h.end)),o.push(h)}}s=o}for(let o of r.effects)o.is(t)&&(s=o.value),o.is(X0)&&(s=[]);return s},provide:s=>Ms.from(s)});return[i,re.define(s=>new Z0(s,n,i,t,e.hoverTime||300)),C0]}function Qu(n,e){let t=n.plugin(xl);if(!t)return null;let i=t.manager.tooltips.indexOf(e);return i<0?null:t.manager.tooltipViews[i]}const X0=M.define(),ah=Z.define({combine(n){let e,t;for(let i of n)e=e||i.topContainer,t=t||i.bottomContainer;return{topContainer:e,bottomContainer:t}}});function Sn(n,e){let t=n.plugin(Pu),i=t?t.specs.indexOf(e):-1;return i>-1?t.panels[i]:null}const Pu=re.fromClass(class{constructor(n){this.input=n.state.facet(yn),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(ah);this.top=new ss(n,!0,e.topContainer),this.bottom=new ss(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(ah);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new ss(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new ss(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(yn);if(t!=this.input){let i=t.filter(a=>a),s=[],r=[],o=[],l=[];for(let a of i){let h=this.specs.indexOf(a),c;h<0?(c=a(n.view),l.push(c)):(c=this.panels[h],c.update&&c.update(n)),s.push(c),(c.top?r:o).push(c)}this.specs=i,this.panels=s,this.top.sync(r),this.bottom.sync(o);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let i of this.panels)i.update&&i.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>$.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class ss{constructor(e,t,i){this.view=e,this.top=t,this.container=i,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(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}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 t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=hh(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=hh(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 hh(n){let e=n.nextSibling;return n.remove(),e}const yn=Z.define({enables:Pu});class yt extends Ht{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}yt.prototype.elementClass="";yt.prototype.toDOM=void 0;yt.prototype.mapMode=Oe.TrackBefore;yt.prototype.startSide=yt.prototype.endSide=-1;yt.prototype.point=!0;const Qs=Z.define(),M0={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>_.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},hn=Z.define();function W0(n){return[$u(),hn.of(Object.assign(Object.assign({},M0),n))]}const ch=Z.define({combine:n=>n.some(e=>e)});function $u(n){return[E0]}const E0=re.fromClass(class{constructor(n){this.view=n,this.prevViewport=n.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=n.state.facet(hn).map(e=>new uh(n,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!n.state.facet(ch),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,i=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(i<(t.to-t.from)*.8)}n.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(ch)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&this.dom.remove();let t=_.iter(this.view.state.facet(Qs),this.view.viewport.from),i=[],s=this.gutters.map(r=>new V0(r,this.view.viewport,-this.view.documentPadding.top));for(let r of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(r.type)){let o=!0;for(let l of r.type)if(l.type==xe.Text&&o){Vo(t,i,l.from);for(let a of s)a.line(this.view,l,i);o=!1}else if(l.widget)for(let a of s)a.widget(this.view,l)}else if(r.type==xe.Text){Vo(t,i,r.from);for(let o of s)o.line(this.view,r,i)}else if(r.widget)for(let o of s)o.widget(this.view,r);for(let r of s)r.finish();n&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(n){let e=n.startState.facet(hn),t=n.state.facet(hn),i=n.docChanged||n.heightChanged||n.viewportChanged||!_.eq(n.startState.facet(Qs),n.state.facet(Qs),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let s of this.gutters)s.update(n)&&(i=!0);else{i=!0;let s=[];for(let r of t){let o=e.indexOf(r);o<0?s.push(new uh(this.view,r)):(this.gutters[o].update(n),s.push(this.gutters[o]))}for(let r of this.gutters)r.dom.remove(),s.indexOf(r)<0&&r.destroy();for(let r of s)this.dom.appendChild(r.dom);this.gutters=s}return i}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove()}},{provide:n=>$.scrollMargins.of(e=>{let t=e.plugin(n);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==ee.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function fh(n){return Array.isArray(n)?n:[n]}function Vo(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class V0{constructor(e,t,i){this.gutter=e,this.height=i,this.i=0,this.cursor=_.iter(e.markers,t.from)}addElement(e,t,i){let{gutter:s}=this,r=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==s.elements.length){let l=new vu(e,o,r,i);s.elements.push(l),s.dom.appendChild(l.dom)}else s.elements[this.i].update(e,o,r,i);this.height=t.bottom,this.i++}line(e,t,i){let s=[];Vo(this.cursor,s,t.from),i.length&&(s=s.concat(i));let r=this.gutter.config.lineMarker(e,t,s);r&&s.unshift(r);let o=this.gutter;s.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,s)}widget(e,t){let i=this.gutter.config.widgetMarker(e,t.widget,t);i&&this.addElement(e,t,[i])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class uh{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 i in t.domEventHandlers)this.dom.addEventListener(i,s=>{let r=s.target,o;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let a=r.getBoundingClientRect();o=(a.top+a.bottom)/2}else o=s.clientY;let l=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[i](e,l,s)&&s.preventDefault()});this.markers=fh(t.markers(e)),t.initialSpacer&&(this.spacer=new vu(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=fh(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let s=this.config.updateSpacer(this.spacer.markers[0],e);s!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[s])}let i=e.view.viewport;return!_.eq(this.markers,t,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class vu{constructor(e,t,i,s){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,i,s)}update(e,t,i,s){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),Y0(this.markers,s)||this.setMarkers(e,s)}setMarkers(e,t){let i="cm-gutterElement",s=this.dom.firstChild;for(let r=0,o=0;;){let l=o,a=rr(l,a,h)||o(l,a,h):o}return i}})}});class Cr extends yt{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Zr(n,e){return n.state.facet(Oi).formatNumber(e,n.state)}const q0=hn.compute([Oi],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(D0)},lineMarker(e,t,i){return i.some(s=>s.toDOM)?null:new Cr(Zr(e,e.state.doc.lineAt(t.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(Oi)!=e.state.facet(Oi),initialSpacer(e){return new Cr(Zr(e,dh(e.state.doc.lines)))},updateSpacer(e,t){let i=Zr(t.view,dh(t.view.state.doc.lines));return i==e.number?e:new Cr(i)},domEventHandlers:n.facet(Oi).domEventHandlers}));function z0(n={}){return[Oi.of(n),$u(),q0]}function dh(n){let e=9;for(;e{let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.head).from;s>t&&(t=s,e.push(L0.range(s)))}return _.of(e)});function B0(){return _0}const Cu=1024;let U0=0;class Le{constructor(e,t){this.from=e,this.to=t}}class X{constructor(e={}){this.id=U0++,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 typeof e!="function"&&(e=oe.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}X.closedBy=new X({deserialize:n=>n.split(" ")});X.openedBy=new X({deserialize:n=>n.split(" ")});X.group=new X({deserialize:n=>n.split(" ")});X.isolate=new X({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});X.contextHash=new X({perNode:!0});X.lookAhead=new X({perNode:!0});X.mounted=new X({perNode:!0});class kn{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[X.mounted.id]}}const I0=Object.create(null);class oe{constructor(e,t,i,s=0){this.name=e,this.props=t,this.id=i,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):I0,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new oe(e.name||"",t,e.id,i);if(e.props){for(let r of e.props)if(Array.isArray(r)||(r=r(s)),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 s}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(X.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let s of i.split(" "))t[s]=e[i];return i=>{for(let s=i.prop(X.group),r=-1;r<(s?s.length:0);r++){let o=t[r<0?i.name:s[r]];if(o)return o}}}}oe.none=new oe("",Object.create(null),0,8);class Vi{constructor(e){this.types=e;for(let t=0;t0;for(let a=this.cursor(o|K.IncludeAnonymous);;){let h=!1;if(a.from<=r&&a.to>=s&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;h=!0}for(;h&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;h=!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:$l(oe.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,s)=>new D(this.type,t,i,s,this.propValues),e.makeTree||((t,i,s)=>new D(oe.none,t,i,s)))}static build(e){return F0(e)}}D.empty=new D(oe.none,[],[],0);class Ql{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 Ql(this.buffer,this.index)}}class qt{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return oe.none}toString(){let e=[];for(let t=0;t0));a=o[a+3]);return l}slice(e,t,i){let s=this.buffer,r=new Uint16Array(t-e),o=0;for(let l=e,a=0;l=e&&te;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function xn(n,e,t,i){for(var s;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?l.length:-1;e!=h;e+=t){let c=l[e],f=a[e]+o.from;if(Zu(s,i,f,f+c.length)){if(c instanceof qt){if(r&K.ExcludeBuffers)continue;let u=c.findChild(0,c.buffer.length,t,i-f,s);if(u>-1)return new at(new j0(o,c,e,f),null,u)}else if(r&K.IncludeAnonymous||!c.type.isAnonymous||Pl(c)){let u;if(!(r&K.IgnoreMounts)&&(u=kn.get(c))&&!u.overlay)return new Se(u.tree,f,e,o);let d=new Se(c,f,e,o);return r&K.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?c.children.length-1:0,t,i,s)}}}if(r&K.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))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,i=0){let s;if(!(i&K.IgnoreOverlays)&&(s=kn.get(this._tree))&&s.overlay){let r=e-this.from;for(let{from:o,to:l}of s.overlay)if((t>0?o<=r:o=r:l>r))return new Se(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}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 ph(n,e,t,i){let s=n.cursor(),r=[];if(!s.firstChild())return r;if(t!=null){for(let o=!1;!o;)if(o=s.type.is(t),!s.nextSibling())return r}for(;;){if(i!=null&&s.type.is(i))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return i==null?r:[]}}function Yo(n,e,t=e.length-1){for(let i=n.parent;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class j0{constructor(e,t,i,s){this.parent=e,this.buffer=t,this.index=i,this.start=s}}class at extends Tu{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,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,i);return r<0?null:new at(this.context,this,r)}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,i=0){if(i&K.ExcludeBuffers)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new at(this.context,this,r)}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 at(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 at(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,s=this.index+4,r=i.buffer[this.index+3];if(r>s){let o=i.buffer[this.index+1];e.push(i.slice(s,r,o)),t.push(0)}return new D(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Ru(n){if(!n.length)return null;let e=0,t=n[0];for(let r=1;rt.from||o.to=e){let l=new Se(o.tree,o.overlay[0].from+r.from,-1,r);(s||(s=[i])).push(xn(l,e,t,!1))}}return s?Ru(s):i}class Ws{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 Se)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.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):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:s}=this.buffer;return this.type=t||s.set.types[s.buffer[e]],this.from=i+s.buffer[e+1],this.to=i+s.buffer[e+2],!0}yield(e){return e?e instanceof Se?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:s}=this.buffer,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,i);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}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,i=this.mode){return this.buffer?i&K.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&K.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&K.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)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let s=i<0?0:this.stack[i]+4;if(this.index!=s)return this.yieldBuf(t.findChild(s,this.index,-1,0,4))}else{let s=t.buffer[this.index+3];if(s<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(s)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:s}=this;if(s){if(e>0){if(this.index-1)for(let r=t+e,o=e<0?-1:i._tree.children.length;r!=o;r+=e){let l=i._tree.children[r];if(this.mode&K.IncludeAnonymous||l instanceof qt||!l.type.isAnonymous||Pl(l))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=0;){for(let o=e;o;o=o._parent)if(o.index==s){if(s==this.index)return o;t=o,i=r+1;break e}s=this.stack[--r]}for(let s=i;s=0;r--){if(r<0)return Yo(this.node,e,s);let o=i[t.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[s]&&e[s]!=o.name)return!1;s--}}return!0}}function Pl(n){return n.children.some(e=>e instanceof qt||!e.type.isAnonymous||Pl(e))}function F0(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:s=Cu,reused:r=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new Ql(t,t.length):t,a=i.types,h=0,c=0;function f(k,C,v,W,q,z){let{id:V,start:E,end:I,size:U}=l,ie=c;for(;U<0;)if(l.next(),U==-1){let le=r[V];v.push(le),W.push(E-k);return}else if(U==-3){h=V;return}else if(U==-4){c=V;return}else throw new RangeError(`Unrecognized record size: ${U}`);let Qe=a[V],Pe,Re,Ye=E-k;if(I-E<=s&&(Re=g(l.pos-C,q))){let le=new Uint16Array(Re.size-Re.skip),De=l.pos-Re.size,et=le.length;for(;l.pos>De;)et=b(Re.start,le,et);Pe=new qt(le,I-Re.start,i),Ye=Re.start-k}else{let le=l.pos-U;l.next();let De=[],et=[],_t=V>=o?V:-1,hi=0,Bn=I;for(;l.pos>le;)_t>=0&&l.id==_t&&l.size>=0?(l.end<=Bn-s&&(O(De,et,E,hi,l.end,Bn,_t,ie),hi=De.length,Bn=l.end),l.next()):z>2500?u(E,le,De,et):f(E,le,De,et,_t,z+1);if(_t>=0&&hi>0&&hi-1&&hi>0){let ha=d(Qe);Pe=$l(Qe,De,et,0,De.length,0,I-E,ha,ha)}else Pe=m(Qe,De,et,I-E,ie-I)}v.push(Pe),W.push(Ye)}function u(k,C,v,W){let q=[],z=0,V=-1;for(;l.pos>C;){let{id:E,start:I,end:U,size:ie}=l;if(ie>4)l.next();else{if(V>-1&&I=0;U-=3)E[ie++]=q[U],E[ie++]=q[U+1]-I,E[ie++]=q[U+2]-I,E[ie++]=ie;v.push(new qt(E,q[2]-I,i)),W.push(I-k)}}function d(k){return(C,v,W)=>{let q=0,z=C.length-1,V,E;if(z>=0&&(V=C[z])instanceof D){if(!z&&V.type==k&&V.length==W)return V;(E=V.prop(X.lookAhead))&&(q=v[z]+V.length+E)}return m(k,C,v,W,q)}}function O(k,C,v,W,q,z,V,E){let I=[],U=[];for(;k.length>W;)I.push(k.pop()),U.push(C.pop()+v-q);k.push(m(i.types[V],I,U,z-q,E-z)),C.push(q-v)}function m(k,C,v,W,q=0,z){if(h){let V=[X.contextHash,h];z=z?[V].concat(z):[V]}if(q>25){let V=[X.lookAhead,q];z=z?[V].concat(z):[V]}return new D(k,C,v,W,z)}function g(k,C){let v=l.fork(),W=0,q=0,z=0,V=v.end-s,E={size:0,start:0,skip:0};e:for(let I=v.pos-k;v.pos>I;){let U=v.size;if(v.id==C&&U>=0){E.size=W,E.start=q,E.skip=z,z+=4,W+=4,v.next();continue}let ie=v.pos-U;if(U<0||ie=o?4:0,Pe=v.start;for(v.next();v.pos>ie;){if(v.size<0)if(v.size==-3)Qe+=4;else break e;else v.id>=o&&(Qe+=4);v.next()}q=Pe,W+=U,z+=Qe}return(C<0||W==k)&&(E.size=W,E.start=q,E.skip=z),E.size>4?E:void 0}function b(k,C,v){let{id:W,start:q,end:z,size:V}=l;if(l.next(),V>=0&&W4){let I=l.pos-(V-4);for(;l.pos>I;)v=b(k,C,v)}C[--v]=E,C[--v]=z-k,C[--v]=q-k,C[--v]=W}else V==-3?h=W:V==-4&&(c=W);return v}let S=[],x=[];for(;l.pos>0;)f(n.start||0,n.bufferStart||0,S,x,-1,0);let w=(e=n.length)!==null&&e!==void 0?e:S.length?x[0]+S[0].length:0;return new D(a[n.topID],S.reverse(),x.reverse(),w)}const mh=new WeakMap;function Ps(n,e){if(!n.isAnonymous||e instanceof qt||e.type!=n)return 1;let t=mh.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof D)){t=1;break}t+=Ps(n,i)}mh.set(e,t)}return t}function $l(n,e,t,i,s,r,o,l,a){let h=0;for(let O=i;O=c)break;C+=v}if(x==w+1){if(C>c){let v=O[w];d(v.children,v.positions,0,v.children.length,m[w]+S);continue}f.push(O[w])}else{let v=m[x-1]+O[x-1].length-k;f.push($l(n,O,m,w,x,k,v,null,a))}u.push(k+S-r)}}return d(e,t,i,s,0),(l||a)(f,u,o)}class Au{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof at?this.setBuffer(e.context.buffer,e.index,t):e instanceof Se&&this.map.set(e.tree,t)}get(e){return e instanceof at?this.getBuffer(e.context.buffer,e.index):e instanceof Se?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 gt{constructor(e,t,i,s,r=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=s,this.open=(r?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let s=[new gt(0,e.length,e,0,!1,i)];for(let r of t)r.to>e.length&&s.push(r);return s}static applyChanges(e,t,i=128){if(!t.length)return e;let s=[],r=1,o=e.length?e[0]:null;for(let l=0,a=0,h=0;;l++){let c=l=i)for(;o&&o.from=u.from||f<=u.to||h){let d=Math.max(u.from,a)-h,O=Math.min(u.to,f)-h;u=d>=O?null:new gt(d,O,u.tree,u.offset+h,l>0,!!c)}if(u&&s.push(u),o.to>f)break;o=rnew Le(s.from,s.to)):[new Le(0,0)]:[new Le(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let s=this.startParse(e,t,i);for(;;){let r=s.advance();if(r)return r}}}class H0{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 Xu(n){return(e,t,i,s)=>new J0(e,n,t,i,s)}class gh{constructor(e,t,i,s,r){this.parser=e,this.parse=t,this.overlay=i,this.target=s,this.from=r}}function bh(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class K0{constructor(e,t,i,s,r,o,l){this.parser=e,this.predicate=t,this.mounts=i,this.index=s,this.start=r,this.target=o,this.prev=l,this.depth=0,this.ranges=[]}}const Do=new X({perNode:!0});class J0{constructor(e,t,i,s,r){this.nest=t,this.input=i,this.fragments=s,this.ranges=r,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let s of this.inner)s.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new D(i.type,i.children,i.positions,i.length,i.propValues.concat([[Do,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[X.mounted.id]=new kn(t,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t=this.stoppedAt)l=!1;else if(e.hasNode(s)){if(t){let h=t.mounts.find(c=>c.frag.from<=s.from&&c.frag.to>=s.to&&c.mount.overlay);if(h)for(let c of h.mount.overlay){let f=c.from+h.pos,u=c.to+h.pos;f>=s.from&&u<=s.to&&!t.ranges.some(d=>d.fromf)&&t.ranges.push({from:f,to:u})}}l=!1}else if(i&&(o=eb(i.ranges,s.from,s.to)))l=o!=2;else if(!s.type.isAnonymous&&(r=this.nest(s,this.input))&&(s.fromnew Le(f.from-s.from,f.to-s.from)):null,s.tree,c.length?c[0].from:s.from)),r.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):l=!1}}else t&&(a=t.predicate(s))&&(a===!0&&(a=new Le(s.from,s.to)),a.fromnew Le(c.from-t.start,c.to-t.start)),t.target,h[0].from))),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function eb(n,e,t){for(let i of n){if(i.from>=t)break;if(i.to>e)return i.from<=e&&i.to>=t?2:1}return 0}function Sh(n,e,t,i,s,r){if(e=e&&t.enter(i,1,K.IgnoreOverlays|K.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&&t.positions[0]==0&&t.children[0]instanceof D)t=t.children[0];else break}return!1}}let ib=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(t=i.tree.prop(Do))!==null&&t!==void 0?t:i.to,this.inner=new yh(i.tree,-i.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=(e=t.tree.prop(Do))!==null&&e!==void 0?e:t.to,this.inner=new yh(t.tree,-t.offset)}}findMounts(e,t){var i;let s=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let r=this.inner.cursor.node;r;r=r.parent){let o=(i=r.tree)===null||i===void 0?void 0:i.prop(X.mounted);if(o&&o.parser==t)for(let l=this.fragI;l=r.to)break;a.tree==this.curFrag.tree&&s.push({frag:a,pos:r.from-a.offset,mount:o})}}}return s}};function kh(n,e){let t=null,i=e;for(let s=1,r=0;s=l)break;a.to<=o||(t||(i=t=e.slice()),a.froml&&t.splice(r+1,0,new Le(l,a.to))):a.to>l?t[r--]=new Le(l,a.to):t.splice(r--,1))}}return i}function nb(n,e,t,i){let s=0,r=0,o=!1,l=!1,a=-1e9,h=[];for(;;){let c=s==n.length?1e9:o?n[s].to:n[s].from,f=r==e.length?1e9:l?e[r].to:e[r].from;if(o!=l){let u=Math.max(a,t),d=Math.min(c,f,i);unew Le(u.from+i,u.to+i)),f=nb(e,c,a,h);for(let u=0,d=a;;u++){let O=u==f.length,m=O?h:f[u].from;if(m>d&&t.push(new gt(d,m,s.tree,-o,r.from>=d||r.openStart,r.to<=m||r.openEnd)),O)break;d=f[u].to}}else t.push(new gt(a,h,s.tree,-o,r.from>=o||r.openStart,r.to<=l||r.openEnd))}return t}let sb=0;class Ne{constructor(e,t,i){this.set=e,this.base=t,this.modified=i,this.id=sb++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let t=new Ne([],null,[]);if(t.set.push(t),e)for(let i of e.set)t.set.push(i);return t}static defineModifier(){let e=new Es;return t=>t.modified.indexOf(e)>-1?t:Es.get(t.base||t,t.modified.concat(e).sort((i,s)=>i.id-s.id))}}let rb=0;class Es{constructor(){this.instances=[],this.id=rb++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(l=>l.base==e&&ob(t,l.modified));if(i)return i;let s=[],r=new Ne(s,e,t);for(let l of t)l.instances.push(r);let o=lb(t);for(let l of e.set)if(!l.modified.length)for(let a of o)s.push(Es.get(l,a));return r}}function ob(n,e){return n.length==e.length&&n.every((t,i)=>t==e[i])}function lb(n){let e=[[]];for(let t=0;ti.length-t.length)}function oi(n){let e=Object.create(null);for(let t in n){let i=n[t];Array.isArray(i)||(i=[i]);for(let s of t.split(" "))if(s){let r=[],o=2,l=s;for(let f=0;;){if(l=="..."&&f>0&&f+3==s.length){o=1;break}let u=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!u)throw new RangeError("Invalid path: "+s);if(r.push(u[0]=="*"?"":u[0][0]=='"'?JSON.parse(u[0]):u[0]),f+=u[0].length,f==s.length)break;let d=s[f++];if(f==s.length&&d=="!"){o=0;break}if(d!="/")throw new RangeError("Invalid path: "+s);l=s.slice(f)}let a=r.length-1,h=r[a];if(!h)throw new RangeError("Invalid path: "+s);let c=new Vs(i,o,a>0?r.slice(0,a):null);e[h]=c.sort(e[h])}}return Mu.add(e)}const Mu=new X;class Vs{constructor(e,t,i,s){this.tags=e,this.mode=t,this.context=i,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=s;for(let l of r)for(let a of l.set){let h=t[a.id];if(h){o=o?o+" "+h:h;break}}return o},scope:i}}function ab(n,e){let t=null;for(let i of n){let s=i.style(e);s&&(t=t?t+" "+s:s)}return t}function hb(n,e,t,i=0,s=n.length){let r=new cb(i,Array.isArray(e)?e:[e],t);r.highlightRange(n.cursor(),i,s,"",r.highlighters),r.flush(s)}class cb{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,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,i,s,r){let{type:o,from:l,to:a}=e;if(l>=i||a<=t)return;o.isTop&&(r=this.highlighters.filter(d=>!d.scope||d.scope(o)));let h=s,c=fb(e)||Vs.empty,f=ab(r,c.tags);if(f&&(h&&(h+=" "),h+=f,c.mode==1&&(s+=(s?" ":"")+f)),this.startSpan(Math.max(t,l),h),c.opaque)return;let u=e.tree&&e.tree.prop(X.mounted);if(u&&u.overlay){let d=e.node.enter(u.overlay[0].from+l,1),O=this.highlighters.filter(g=>!g.scope||g.scope(u.tree.type)),m=e.firstChild();for(let g=0,b=l;;g++){let S=g=x||!e.nextSibling())););if(!S||x>i)break;b=S.to+l,b>t&&(this.highlightRange(d.cursor(),Math.max(t,S.from+l),Math.min(i,b),"",O),this.startSpan(Math.min(i,b),h))}m&&e.parent()}else if(e.firstChild()){u&&(s="");do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,s,r),this.startSpan(Math.min(i,e.to),h)}while(e.nextSibling());e.parent()}}}function fb(n){let e=n.type.prop(Mu);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const P=Ne.define,os=P(),$t=P(),wh=P($t),Qh=P($t),vt=P(),ls=P(vt),Tr=P(vt),st=P(),Bt=P(st),it=P(),nt=P(),qo=P(),Ii=P(qo),as=P(),p={comment:os,lineComment:P(os),blockComment:P(os),docComment:P(os),name:$t,variableName:P($t),typeName:wh,tagName:P(wh),propertyName:Qh,attributeName:P(Qh),className:P($t),labelName:P($t),namespace:P($t),macroName:P($t),literal:vt,string:ls,docString:P(ls),character:P(ls),attributeValue:P(ls),number:Tr,integer:P(Tr),float:P(Tr),bool:P(vt),regexp:P(vt),escape:P(vt),color:P(vt),url:P(vt),keyword:it,self:P(it),null:P(it),atom:P(it),unit:P(it),modifier:P(it),operatorKeyword:P(it),controlKeyword:P(it),definitionKeyword:P(it),moduleKeyword:P(it),operator:nt,derefOperator:P(nt),arithmeticOperator:P(nt),logicOperator:P(nt),bitwiseOperator:P(nt),compareOperator:P(nt),updateOperator:P(nt),definitionOperator:P(nt),typeOperator:P(nt),controlOperator:P(nt),punctuation:qo,separator:P(qo),bracket:Ii,angleBracket:P(Ii),squareBracket:P(Ii),paren:P(Ii),brace:P(Ii),content:st,heading:Bt,heading1:P(Bt),heading2:P(Bt),heading3:P(Bt),heading4:P(Bt),heading5:P(Bt),heading6:P(Bt),contentSeparator:P(st),list:P(st),quote:P(st),emphasis:P(st),strong:P(st),link:P(st),monospace:P(st),strikethrough:P(st),inserted:P(),deleted:P(),changed:P(),invalid:P(),meta:as,documentMeta:P(as),annotation:P(as),processingInstruction:P(as),definition:Ne.defineModifier(),constant:Ne.defineModifier(),function:Ne.defineModifier(),standard:Ne.defineModifier(),local:Ne.defineModifier(),special:Ne.defineModifier()};Wu([{tag:p.link,class:"tok-link"},{tag:p.heading,class:"tok-heading"},{tag:p.emphasis,class:"tok-emphasis"},{tag:p.strong,class:"tok-strong"},{tag:p.keyword,class:"tok-keyword"},{tag:p.atom,class:"tok-atom"},{tag:p.bool,class:"tok-bool"},{tag:p.url,class:"tok-url"},{tag:p.labelName,class:"tok-labelName"},{tag:p.inserted,class:"tok-inserted"},{tag:p.deleted,class:"tok-deleted"},{tag:p.literal,class:"tok-literal"},{tag:p.string,class:"tok-string"},{tag:p.number,class:"tok-number"},{tag:[p.regexp,p.escape,p.special(p.string)],class:"tok-string2"},{tag:p.variableName,class:"tok-variableName"},{tag:p.local(p.variableName),class:"tok-variableName tok-local"},{tag:p.definition(p.variableName),class:"tok-variableName tok-definition"},{tag:p.special(p.variableName),class:"tok-variableName2"},{tag:p.definition(p.propertyName),class:"tok-propertyName tok-definition"},{tag:p.typeName,class:"tok-typeName"},{tag:p.namespace,class:"tok-namespace"},{tag:p.className,class:"tok-className"},{tag:p.macroName,class:"tok-macroName"},{tag:p.propertyName,class:"tok-propertyName"},{tag:p.operator,class:"tok-operator"},{tag:p.comment,class:"tok-comment"},{tag:p.meta,class:"tok-meta"},{tag:p.invalid,class:"tok-invalid"},{tag:p.punctuation,class:"tok-punctuation"}]);var Rr;const Xt=new X;function ar(n){return Z.define({combine:n?e=>e.concat(n):void 0})}const vl=new X;class Ee{constructor(e,t,i=[],s=""){this.data=e,this.name=s,Y.prototype.hasOwnProperty("tree")||Object.defineProperty(Y.prototype,"tree",{get(){return F(this)}}),this.parser=t,this.extension=[zt.of(this),Y.languageData.of((r,o,l)=>{let a=Ph(r,o,l),h=a.type.prop(Xt);if(!h)return[];let c=r.facet(h),f=a.type.prop(vl);if(f){let u=a.resolve(o-a.from,l);for(let d of f)if(d.test(u,r)){let O=r.facet(d.facet);return d.type=="replace"?O:O.concat(c)}}return c})].concat(i)}isActiveAt(e,t,i=-1){return Ph(e,t,i).type.prop(Xt)==this.data}findRegions(e){let t=e.facet(zt);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],s=(r,o)=>{if(r.prop(Xt)==this.data){i.push({from:o,to:o+r.length});return}let l=r.prop(X.mounted);if(l){if(l.tree.prop(Xt)==this.data){if(l.overlay)for(let a of l.overlay)i.push({from:a.from+o,to:a.to+o});else i.push({from:o,to:o+r.length});return}else if(l.overlay){let a=i.length;if(s(l.tree,l.overlay[0].from+o),i.length>a)return}}for(let a=0;ai.isTop?t:void 0)]}),e.name)}configure(e,t){return new ti(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function F(n){let e=n.field(Ee.state,!1);return e?e.tree:D.empty}class ub{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 i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let ji=null;class ii{constructor(e,t,i=[],s,r,o,l,a){this.parser=e,this.state=t,this.fragments=i,this.tree=s,this.treeLen=r,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new ii(e,t,[],D.empty,0,i,[],null)}startParse(){return this.parser.startParse(new ub(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=D.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let s=Date.now()+e;e=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||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(gt.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=ji;ji=this;try{return e()}finally{ji=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=$h(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:s,treeLen:r,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((h,c,f,u)=>a.push({fromA:h,toA:c,fromB:f,toB:u})),i=gt.applyChanges(i,a),s=D.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let h of this.skipped){let c=e.mapPos(h.from,1),f=e.mapPos(h.to,-1);ce.from&&(this.fragments=$h(this.fragments,s,r),this.skipped.splice(i--,1))}return this.skipped.length>=t?!1:(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 lr{createParse(t,i,s){let r=s[0].from,o=s[s.length-1].to;return{parsedPos:r,advance(){let a=ji;if(a){for(let h of s)a.tempSkipped.push(h);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=o,new D(oe.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return ji}}function $h(n,e,t){return gt.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class vi{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),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new vi(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=ii.create(e.facet(zt).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new vi(i)}}Ee.state=ce.define({create:vi.init,update(n,e){for(let t of e.effects)if(t.is(Ee.setState))return t.value;return e.startState.facet(zt)!=e.state.facet(zt)?vi.init(e.state):n.apply(e)}});let Eu=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Eu=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const Ar=typeof navigator<"u"&&(!((Rr=navigator.scheduling)===null||Rr===void 0)&&Rr.isInputPending)?()=>navigator.scheduling.isInputPending():null,db=re.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(Ee.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(Ee.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Eu(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnds+1e3,a=r.context.work(()=>Ar&&Ar()||Date.now()>o,s+(l?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:Ee.setState.of(new vi(r.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Ze(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),zt=Z.define({combine(n){return n.length?n[0]:null},enables:n=>[Ee.state,db,$.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class Ci{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}class Ys{constructor(e,t,i,s,r,o=void 0){this.name=e,this.alias=t,this.extensions=i,this.filename=s,this.loadFunc=r,this.support=o,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:i}=e;if(!t){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(i)}return new Ys(e.name,(e.alias||[]).concat(e.name).map(s=>s.toLowerCase()),e.extensions||[],e.filename,t,i)}static matchFilename(e,t){for(let s of e)if(s.filename&&s.filename.test(t))return s;let i=/\.([^.]+)$/.exec(t);if(i){for(let s of e)if(s.extensions.indexOf(i[1])>-1)return s}return null}static matchLanguageName(e,t,i=!0){t=t.toLowerCase();for(let s of e)if(s.alias.some(r=>r==t))return s;if(i)for(let s of e)for(let r of s.alias){let o=t.indexOf(r);if(o>-1&&(r.length>2||!/\w/.test(t[o-1])&&!/\w/.test(t[o+r.length])))return s}return null}}const Vu=Z.define(),Yi=Z.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function ni(n){let e=n.facet(Yi);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function Zi(n,e){let t="",i=n.tabSize,s=n.facet(Yi)[0];if(s==" "){for(;e>=i;)t+=" ",e-=i;s=" "}for(let r=0;r=e?pb(n,t,e):null}function Ob(n,e,t){let i=Object.create(null),s=new Dn(n,{overrideIndentation:o=>{var l;return(l=i[o])!==null&&l!==void 0?l:-1}}),r=[];for(let o=e;o<=t;){let l=n.doc.lineAt(o);o=l.to+1;let a=hr(s,l.from);if(a==null)continue;/\S/.test(l.text)||(a=0);let h=/^\s*/.exec(l.text)[0],c=Zi(n,a);h!=c&&(i[l.from]=a,r.push({from:l.from,to:l.from+h.length,insert:c}))}return n.changes(r)}class Dn{constructor(e,t={}){this.state=e,this.options=t,this.unit=ni(e)}lineAt(e,t=1){let i=this.state.doc.lineAt(e),{simulateBreak:s,simulateDoubleBreak:r}=this.options;return s!=null&&s>=i.from&&s<=i.to?r&&s==e?{text:"",from:e}:(t<0?s-1&&(r+=o-this.countColumn(i,i.search(/\S|$/))),r}countColumn(e,t=e.length){return Ge(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:s}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let o=r(s);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Di=new X;function pb(n,e,t){let i=e.resolveStack(t),s=i.node.enterUnfinishedNodesBefore(t);if(s!=i.node){let r=[];for(let o=s;o!=i.node;o=o.parent)r.push(o);for(let o=r.length-1;o>=0;o--)i={node:r[o],next:i}}return Yu(i,n,t)}function Yu(n,e,t){for(let i=n;i;i=i.next){let s=gb(i.node);if(s)return s(Cl.create(e,t,i))}return 0}function mb(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function gb(n){let e=n.type.prop(Di);if(e)return e;let t=n.firstChild,i;if(t&&(i=t.type.prop(X.closedBy))){let s=n.lastChild,r=s&&i.indexOf(s.name)>-1;return o=>Du(o,!0,1,void 0,r&&!mb(o)?s.from:void 0)}return n.parent==null?bb:null}function bb(){return 0}class Cl extends Dn{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.context=i}get node(){return this.context.node}static create(e,t,i){return new Cl(e,t,i)}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 i=e.resolve(t.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(Sb(i,e))break;t=this.state.doc.lineAt(i.from)}return this.lineIndent(t.from)}continue(){return Yu(this.context.next,this.base,this.pos)}}function Sb(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function yb(n){let e=n.node,t=e.childAfter(e.from),i=e.lastChild;if(!t)return null;let s=n.options.simulateBreak,r=n.state.doc.lineAt(t.from),o=s==null||s<=r.from?r.to:Math.min(r.to,s);for(let l=t.to;;){let a=e.childAfter(l);if(!a||a==i)return null;if(!a.type.isSkipped)return a.fromDu(i,e,t,n)}function Du(n,e,t,i,s){let r=n.textAfter,o=r.match(/^\s*/)[0].length,l=i&&r.slice(o,o+i.length)==i||s==n.pos+o,a=e?yb(n):null;return a?l?n.column(a.from):n.column(a.to):n.baseIndent+(l?0:n.unit*t)}const xb=n=>n.baseIndent;function yi({except:n,units:e=1}={}){return t=>{let i=n&&n.test(t.textAfter);return t.baseIndent+(i?0:e*t.unit)}}const wb=200;function Qb(){return Y.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:i}=n.newSelection.main,s=t.lineAt(i);if(i>s.from+wb)return n;let r=t.sliceString(s.from,i);if(!e.some(h=>h.test(r)))return n;let{state:o}=n,l=-1,a=[];for(let{head:h}of o.selection.ranges){let c=o.doc.lineAt(h);if(c.from==l)continue;l=c.from;let f=hr(o,c.from);if(f==null)continue;let u=/^\s*/.exec(c.text)[0],d=Zi(o,f);u!=d&&a.push({from:c.from,to:c.from+u.length,insert:d})}return a.length?[n,{changes:a,sequential:!0}]:n})}const qu=Z.define(),li=new X;function Zl(n){let e=n.firstChild,t=n.lastChild;return e&&e.tot)continue;if(r&&l.from=e&&h.to>t&&(r=h)}}return r}function $b(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function Ds(n,e,t){for(let i of n.facet(qu)){let s=i(n,e,t);if(s)return s}return Pb(n,e,t)}function zu(n,e){let t=e.mapPos(n.from,1),i=e.mapPos(n.to,-1);return t>=i?void 0:{from:t,to:i}}const cr=M.define({map:zu}),qn=M.define({map:zu});function Lu(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(i=>i.from<=t&&i.to>=t)||e.push(n.lineBlockAt(t));return e}const si=ce.define({create(){return A.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)if(t.is(cr)&&!vb(n,t.value.from,t.value.to)){let{preparePlaceholder:i}=e.state.facet(Uu),s=i?A.replace({widget:new Mb(i(e.state,t.value))}):vh;n=n.update({add:[s.range(t.value.from,t.value.to)]})}else t.is(qn)&&(n=n.update({filter:(i,s)=>t.value.from!=i||t.value.to!=s,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:i}=e.selection.main;n.between(i,i,(s,r)=>{si&&(t=!0)}),t&&(n=n.update({filterFrom:i,filterTo:i,filter:(s,r)=>r<=i||s>=i}))}return n},provide:n=>$.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(i,s)=>{t.push(i,s)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!s||s.from>r)&&(s={from:r,to:o})}),s}function vb(n,e,t){let i=!1;return n.between(e,e,(s,r)=>{s==e&&r==t&&(i=!0)}),i}function _u(n,e){return n.field(si,!1)?e:e.concat(M.appendConfig.of(Iu()))}const Cb=n=>{for(let e of Lu(n)){let t=Ds(n.state,e.from,e.to);if(t)return n.dispatch({effects:_u(n.state,[cr.of(t),Bu(n,t)])}),!0}return!1},Zb=n=>{if(!n.state.field(si,!1))return!1;let e=[];for(let t of Lu(n)){let i=qs(n.state,t.from,t.to);i&&e.push(qn.of(i),Bu(n,i,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function Bu(n,e,t=!0){let i=n.state.doc.lineAt(e.from).number,s=n.state.doc.lineAt(e.to).number;return $.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${i} ${n.state.phrase("to")} ${s}.`)}const Tb=n=>{let{state:e}=n,t=[];for(let i=0;i{let e=n.state.field(si,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(i,s)=>{t.push(qn.of({from:i,to:s}))}),n.dispatch({effects:t}),!0},Ab=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Cb},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:Zb},{key:"Ctrl-Alt-[",run:Tb},{key:"Ctrl-Alt-]",run:Rb}],Xb={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Uu=Z.define({combine(n){return dt(n,Xb)}});function Iu(n){return[si,Vb]}function ju(n,e){let{state:t}=n,i=t.facet(Uu),s=o=>{let l=n.lineBlockAt(n.posAtDOM(o.target)),a=qs(n.state,l.from,l.to);a&&n.dispatch({effects:qn.of(a)}),o.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(n,s,e);let r=document.createElement("span");return r.textContent=i.placeholderText,r.setAttribute("aria-label",t.phrase("folded code")),r.title=t.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=s,r}const vh=A.replace({widget:new class extends wt{toDOM(n){return ju(n,null)}}});class Mb extends wt{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return ju(e,this.value)}}const Wb={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Xr extends yt{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}}function Eb(n={}){let e=Object.assign(Object.assign({},Wb),n),t=new Xr(e,!0),i=new Xr(e,!1),s=re.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(zt)!=o.state.facet(zt)||o.startState.field(si,!1)!=o.state.field(si,!1)||F(o.startState)!=F(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let l=new Et;for(let a of o.viewportLineBlocks){let h=qs(o.state,a.from,a.to)?i:Ds(o.state,a.from,a.to)?t:null;h&&l.add(a.from,a.from,h)}return l.finish()}}),{domEventHandlers:r}=e;return[s,W0({class:"cm-foldGutter",markers(o){var l;return((l=o.plugin(s))===null||l===void 0?void 0:l.markers)||_.empty},initialSpacer(){return new Xr(e,!1)},domEventHandlers:Object.assign(Object.assign({},r),{click:(o,l,a)=>{if(r.click&&r.click(o,l,a))return!0;let h=qs(o.state,l.from,l.to);if(h)return o.dispatch({effects:qn.of(h)}),!0;let c=Ds(o.state,l.from,l.to);return c?(o.dispatch({effects:cr.of(c)}),!0):!1}})}),Iu()]}const Vb=$.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 zn{constructor(e,t){this.specs=e;let i;function s(l){let a=Vt.newName();return(i||(i=Object.create(null)))["."+a]=l,a}const r=typeof t.all=="string"?t.all:t.all?s(t.all):void 0,o=t.scope;this.scope=o instanceof Ee?l=>l.prop(Xt)==o.data:o?l=>l==o:void 0,this.style=Wu(e.map(l=>({tag:l.tag,class:l.class||s(Object.assign({},l,{tag:null}))})),{all:r}).style,this.module=i?new Vt(i):null,this.themeType=t.themeType}static define(e,t){return new zn(e,t||{})}}const zo=Z.define(),Nu=Z.define({combine(n){return n.length?[n[0]]:null}});function Mr(n){let e=n.facet(zo);return e.length?e:n.facet(Nu)}function Ch(n,e){let t=[Db],i;return n instanceof zn&&(n.module&&t.push($.styleModule.of(n.module)),i=n.themeType),e!=null&&e.fallback?t.push(Nu.of(n)):i?t.push(zo.computeN([$.darkTheme],s=>s.facet($.darkTheme)==(i=="dark")?[n]:[])):t.push(zo.of(n)),t}class Yb{constructor(e){this.markCache=Object.create(null),this.tree=F(e.state),this.decorations=this.buildDeco(e,Mr(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=F(e.state),i=Mr(e.state),s=i!=Mr(e.startState),{viewport:r}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||s)&&(this.tree=t,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=r.to)}buildDeco(e,t){if(!t||!this.tree.length)return A.none;let i=new Et;for(let{from:s,to:r}of e.visibleRanges)hb(this.tree,t,(o,l,a)=>{i.add(o,l,this.markCache[a]||(this.markCache[a]=A.mark({class:a})))},s,r);return i.finish()}}const Db=kt.high(re.fromClass(Yb,{decorations:n=>n.decorations})),qb=zn.define([{tag:p.meta,color:"#404740"},{tag:p.link,textDecoration:"underline"},{tag:p.heading,textDecoration:"underline",fontWeight:"bold"},{tag:p.emphasis,fontStyle:"italic"},{tag:p.strong,fontWeight:"bold"},{tag:p.strikethrough,textDecoration:"line-through"},{tag:p.keyword,color:"#708"},{tag:[p.atom,p.bool,p.url,p.contentSeparator,p.labelName],color:"#219"},{tag:[p.literal,p.inserted],color:"#164"},{tag:[p.string,p.deleted],color:"#a11"},{tag:[p.regexp,p.escape,p.special(p.string)],color:"#e40"},{tag:p.definition(p.variableName),color:"#00f"},{tag:p.local(p.variableName),color:"#30a"},{tag:[p.typeName,p.namespace],color:"#085"},{tag:p.className,color:"#167"},{tag:[p.special(p.variableName),p.macroName],color:"#256"},{tag:p.definition(p.propertyName),color:"#00c"},{tag:p.comment,color:"#940"},{tag:p.invalid,color:"#f00"}]),zb=$.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Gu=1e4,Fu="()[]{}",Hu=Z.define({combine(n){return dt(n,{afterCursor:!0,brackets:Fu,maxScanDistance:Gu,renderMatch:Bb})}}),Lb=A.mark({class:"cm-matchingBracket"}),_b=A.mark({class:"cm-nonmatchingBracket"});function Bb(n){let e=[],t=n.matched?Lb:_b;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const Ub=ce.define({create(){return A.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],i=e.state.facet(Hu);for(let s of e.state.selection.ranges){if(!s.empty)continue;let r=ht(e.state,s.head,-1,i)||s.head>0&&ht(e.state,s.head-1,1,i)||i.afterCursor&&(ht(e.state,s.head,1,i)||s.head$.decorations.from(n)}),Ib=[Ub,zb];function jb(n={}){return[Hu.of(n),Ib]}const Ku=new X;function Lo(n,e,t){let i=n.prop(e<0?X.openedBy:X.closedBy);if(i)return i;if(n.name.length==1){let s=t.indexOf(n.name);if(s>-1&&s%2==(e<0?1:0))return[t[s+e]]}return null}function _o(n){let e=n.type.prop(Ku);return e?e(n.node):n}function ht(n,e,t,i={}){let s=i.maxScanDistance||Gu,r=i.brackets||Fu,o=F(n),l=o.resolveInner(e,t);for(let a=l;a;a=a.parent){let h=Lo(a.type,t,r);if(h&&a.from0?e>=c.from&&ec.from&&e<=c.to))return Nb(n,e,t,a,c,h,r)}}return Gb(n,e,t,o,l.type,s,r)}function Nb(n,e,t,i,s,r,o){let l=i.parent,a={from:s.from,to:s.to},h=0,c=l==null?void 0:l.cursor();if(c&&(t<0?c.childBefore(i.from):c.childAfter(i.to)))do if(t<0?c.to<=i.from:c.from>=i.to){if(h==0&&r.indexOf(c.type.name)>-1&&c.from0)return null;let h={from:t<0?e-1:e,to:t>0?e+1:e},c=n.doc.iterRange(e,t>0?n.doc.length:0),f=0;for(let u=0;!c.next().done&&u<=r;){let d=c.value;t<0&&(u+=d.length);let O=e+u*t;for(let m=t>0?0:d.length-1,g=t>0?d.length:-1;m!=g;m+=t){let b=o.indexOf(d[m]);if(!(b<0||i.resolveInner(O+m,1).type!=s))if(b%2==0==t>0)f++;else{if(f==1)return{start:h,end:{from:O+m,to:O+m+1},matched:b>>1==a>>1};f--}}t>0&&(u+=d.length)}return c.done?{start:h,matched:!1}:null}function Zh(n,e,t,i=0,s=0){e==null&&(e=n.search(/[^\s\u00a0]/),e==-1&&(e=n.length));let r=s;for(let o=i;o=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.post}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPosi?o.toLowerCase():o,r=this.string.substr(this.pos,e.length);return s(r)==s(e)?(t!==!1&&(this.pos+=e.length),!0):null}else{let s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}}current(){return this.string.slice(this.start,this.pos)}}function Fb(n){return{name:n.name||"",token:n.token,blankLine:n.blankLine||(()=>{}),startState:n.startState||(()=>!0),copyState:n.copyState||Hb,indent:n.indent||(()=>null),languageData:n.languageData||{},tokenTable:n.tokenTable||Rl}}function Hb(n){if(typeof n!="object")return n;let e={};for(let t in n){let i=n[t];e[t]=i instanceof Array?i.slice():i}return e}const Th=new WeakMap;class zs extends Ee{constructor(e){let t=ar(e.languageData),i=Fb(e),s,r=new class extends lr{createParse(o,l,a){return new Jb(s,o,l,a)}};super(t,r,[Vu.of((o,l)=>this.getIndent(o,l))],e.name),this.topNode=i1(t),s=this,this.streamParser=i,this.stateAfter=new X({perNode:!0}),this.tokenTable=e.tokenTable?new nd(i.tokenTable):t1}static define(e){return new zs(e)}getIndent(e,t){let i=F(e.state),s=i.resolve(t);for(;s&&s.type!=this.topNode;)s=s.parent;if(!s)return null;let r,{overrideIndentation:o}=e.options;o&&(r=Th.get(e.state),r!=null&&r1e4)return null;for(;a=i&&t+e.length<=s&&e.prop(n.stateAfter);if(r)return{state:n.streamParser.copyState(r),pos:t+e.length};for(let o=e.children.length-1;o>=0;o--){let l=e.children[o],a=t+e.positions[o],h=l instanceof D&&a=e.length)return e;!s&&e.type==n.topNode&&(s=!0);for(let r=e.children.length-1;r>=0;r--){let o=e.positions[r],l=e.children[r],a;if(ot&&Tl(n,s.tree,0-s.offset,t,o),a;if(l&&(a=ed(n,s.tree,t+s.offset,l.pos+s.offset,!1)))return{state:l.state,tree:a}}return{state:n.streamParser.startState(i?ni(i):4),tree:D.empty}}let Jb=class{constructor(e,t,i,s){this.lang=e,this.input=t,this.fragments=i,this.ranges=s,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=s[s.length-1].to;let r=ii.get(),o=s[0].from,{state:l,tree:a}=Kb(e,i,o,r==null?void 0:r.state);this.state=l,this.parsedPos=this.chunkStart=o+a.length;for(let h=0;h=t?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,t),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let t=this.input.chunk(e);if(this.input.lineChunks)t==` `&&(t="");else{let i=t.indexOf(` -`);i>-1&&(t=t.slice(0,i))}return e+t.length<=this.to?t:t.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,t=this.lineAfter(e),i=e+t.length;for(let s=this.rangeIndex;;){let r=this.ranges[s].to;if(r>=i||(t=t.slice(0,r-(i-t.length)),s++,s==this.ranges.length))break;let o=this.ranges[s].from,l=this.lineAfter(o);t+=l,i=o+l.length}return{line:t,end:i}}skipGapsTo(e,t,i){for(;;){let s=this.ranges[this.rangeIndex].to,r=e+t;if(i>0?s>r:s>=r)break;let o=this.ranges[++this.rangeIndex].from;t+=o-s}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){r=this.skipGapsTo(t,r,1),t+=r;let o=this.chunk.length;r=this.skipGapsTo(i,r,-1),i+=r,s+=this.chunk.length-o}return this.chunk.push(e,t,i,s),r}parseLine(e){let{line:t,end:i}=this.nextLine(),s=0,{streamParser:r}=this.lang,o=new Ku(t,e?e.state.tabSize:4,e?ni(e.state):2);if(o.eol())r.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=ed(r.token,o,this.state);if(l&&(s=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,4,s)),o.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPose.start)return s}throw new Error("Stream parser failed to advance stream.")}const Tl=Object.create(null),wn=[le.none],e1=new Vi(wn),Th=[],Rh=Object.create(null),td=Object.create(null);for(let[n,e]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"]])td[n]=nd(Tl,e);class id{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),td)}resolve(e){return e?this.table[e]||(this.table[e]=nd(this.extra,e)):0}}const t1=new id(Tl);function Er(n,e){Th.indexOf(n)>-1||(Th.push(n),console.warn(e))}function nd(n,e){let t=[];for(let l of e.split(" ")){let a=[];for(let h of l.split(".")){let c=n[h]||p[h];c?typeof c=="function"?a.length?a=a.map(c):Er(h,`Modifier ${h} used at start of tag`):a.length?Er(h,`Tag ${h} used as modifier`):a=Array.isArray(c)?c:[c]:Er(h,`Unknown highlighting tag ${h}`)}for(let h of a)t.push(h)}if(!t.length)return 0;let i=e.replace(/ /g,"_"),s=i+" "+t.map(l=>l.id),r=Rh[s];if(r)return r.id;let o=Rh[s]=le.define({id:wn.length,name:i,props:[oi({[i]:t})]});return wn.push(o),o.id}function i1(n){let e=le.define({id:wn.length,name:"Document",props:[Xt.add(()=>n)],top:!0});return wn.push(e),e}ee.RTL,ee.LTR;class Rl{constructor(e,t,i,s){this.state=e,this.pos=t,this.explicit=i,this.view=s,this.abortListeners=[]}tokenBefore(e){let t=F(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),i=Math.max(t.from,this.pos-250),s=t.text.slice(i-t.from,this.pos-t.from),r=s.search(rd(e,!1));return r<0?null:{from:i+r,to:this.pos,text:s.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(e,t){e=="abort"&&this.abortListeners&&this.abortListeners.push(t)}}function Ah(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function n1(n){let e=Object.create(null),t=Object.create(null);for(let{label:s}of n){e[s[0]]=!0;for(let r=1;rtypeof s=="string"?{label:s}:s),[t,i]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:n1(e);return s=>{let r=s.matchBefore(i);return r||s.explicit?{from:r?r.from:s.pos,options:e,validFor:t}:null}}function s1(n,e){return t=>{for(let i=F(t.state).resolveInner(t.pos,-1);i;i=i.parent){if(n.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(t)}}class Xh{constructor(e,t,i,s){this.completion=e,this.source=t,this.match=i,this.score=s}}function Mt(n){return n.selection.main.from}function rd(n,e){var t;let{source:i}=n,s=e&&i[0]!="^",r=i[i.length-1]!="$";return!s&&!r?n:new RegExp(`${s?"^":""}(?:${i})${r?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const Al=xt.define();function r1(n,e,t,i){let{main:s}=n.selection,r=t-s.from,o=i-s.from;return Object.assign(Object.assign({},n.changeByRange(l=>l!=s&&t!=i&&n.sliceDoc(l.from+r,l.from+o)!=n.sliceDoc(t,i)?{range:l}:{changes:{from:l.from+r,to:i==s.from?l.to:l.from+o,insert:e},range:y.cursor(l.from+r+e.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}const Mh=new WeakMap;function o1(n){if(!Array.isArray(n))return n;let e=Mh.get(n);return e||Mh.set(n,e=sd(n)),e}const _s=M.define(),Qn=M.define();class l1{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=48&&k<=57||k>=97&&k<=122?2:k>=65&&k<=90?1:0:(C=cl(k))!=C.toLowerCase()?1:C!=C.toUpperCase()?2:0;(!S||v==1&&g||w==0&&v!=0)&&(t[f]==k||i[f]==k&&(u=!0)?o[f++]=S:o.length&&(b=!1)),w=v,S+=ze(k)}return f==a&&o[0]==0&&b?this.result(-100+(u?-200:0),o,e):d==a&&O==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):d==a?this.ret(-900-e.length,[O,m]):f==a?this.result(-100+(u?-200:0)+-700+(b?0:-1100),o,e):t.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,i){let s=[],r=0;for(let o of t){let l=o+(this.astral?ze(ue(i,o)):1);r&&s[r-1]==o?s[r-1]=l:(s[r++]=o,s[r++]=l)}return this.ret(e-i.length,s)}}class a1{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:h1,filterStrict:!1,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)=>i=>Wh(e(i),t(i)),optionClass:(e,t)=>i=>Wh(e(i),t(i)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function Wh(n,e){return n?e?n+" "+e:n:e}function h1(n,e,t,i,s,r){let o=n.textDirection==ee.RTL,l=o,a=!1,h="top",c,f,u=e.left-s.left,d=s.right-e.right,O=i.right-i.left,m=i.bottom-i.top;if(l&&u=m||S>e.top?c=t.bottom-e.top:(h="bottom",c=e.bottom-t.top)}let g=(e.bottom-e.top)/r.offsetHeight,b=(e.right-e.left)/r.offsetWidth;return{style:`${h}: ${c/g}px; max-width: ${f/b}px`,class:"cm-completionInfo-"+(a?o?"left-narrow":"right-narrow":l?"left":"right")}}function c1(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),t.type&&i.classList.add(...t.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(t,i,s,r){let o=document.createElement("span");o.className="cm-completionLabel";let l=t.displayLabel||t.label,a=0;for(let h=0;ha&&o.appendChild(document.createTextNode(l.slice(a,c)));let u=o.appendChild(document.createElement("span"));u.appendChild(document.createTextNode(l.slice(c,f))),u.className="cm-completionMatchedText",a=f}return at.position-i.position).map(t=>t.render)}function Vr(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let s=Math.floor(e/t);return{from:s*t,to:(s+1)*t}}let i=Math.floor((n-e)/t);return{from:n-(i+1)*t,to:n-i*t}}class f1{constructor(e,t,i){this.view=e,this.stateField=t,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:a=>this.placeInfo(a),key:this},this.space=null,this.currentClass="";let s=e.state.field(t),{options:r,selected:o}=s.open,l=e.state.facet(pe);this.optionContent=c1(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=Vr(r.length,o,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",a=>{let{options:h}=e.state.field(t).open;for(let c=a.target,f;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(f=/-(\d+)$/.exec(c.id))&&+f[1]{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(pe).closeOnBlur&&a.relatedTarget!=e.contentDOM&&e.dispatch({effects:Qn.of(null)})}),this.showOptions(r,s.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 i=e.state.field(this.stateField),s=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=s){let{options:r,selected:o,disabled:l}=i.open;(!s.open||s.open.options!=r)&&(this.range=Vr(r.length,o,e.state.facet(pe).maxRenderedOptions),this.showOptions(r,i.id)),this.updateSel(),l!=((t=s.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of t.split(" "))i&&this.dom.classList.add(i);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.to)&&(this.range=Vr(t.options.length,t.selected,this.view.state.facet(pe).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:i}=t.options[t.selected],{info:s}=i;if(!s)return;let r=typeof s=="string"?document.createTextNode(s):s(i);if(!r)return;"then"in r?r.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,i)}).catch(o=>Ce(this.view.state,o,"completion info")):this.addInfoPane(r,i)}}addInfoPane(e,t){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:s,destroy:r}=e;i.appendChild(s),this.infoDestroy=r||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let i=this.list.firstChild,s=this.range.from;i;i=i.nextSibling,s++)i.nodeName!="LI"||!i.id?s--:s==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),t=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return t&&d1(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),r=this.space;if(!r){let o=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return s.top>Math.min(r.bottom,t.bottom)-10||s.bottomi.from||i.from==0))if(r=u,typeof h!="string"&&h.header)s.appendChild(h.header(h));else{let d=s.appendChild(document.createElement("completion-section"));d.textContent=u}}const c=s.appendChild(document.createElement("li"));c.id=t+"-"+o,c.setAttribute("role","option");let f=this.optionClass(l);f&&(c.className=f);for(let u of this.optionContent){let d=u(l,this.view.state,this.view,a);d&&c.appendChild(d)}}return i.from&&s.classList.add("cm-completionListIncompleteTop"),i.tonew f1(t,n,e)}function d1(n,e){let t=n.getBoundingClientRect(),i=e.getBoundingClientRect(),s=t.height/n.offsetHeight;i.topt.bottom&&(n.scrollTop+=(i.bottom-t.bottom)/s)}function Eh(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function O1(n,e){let t=[],i=null,s=h=>{t.push(h);let{section:c}=h.completion;if(c){i||(i=[]);let f=typeof c=="string"?c:c.name;i.some(u=>u.name==f)||i.push(typeof c=="string"?{name:f}:c)}},r=e.facet(pe);for(let h of n)if(h.hasResult()){let c=h.result.getMatch;if(h.result.filter===!1)for(let f of h.result.options)s(new Xh(f,h.source,c?c(f):[],1e9-t.length));else{let f=e.sliceDoc(h.from,h.to),u,d=r.filterStrict?new a1(f):new l1(f);for(let O of h.result.options)if(u=d.match(O.label)){let m=O.displayLabel?c?c(O,u.matched):[]:u.matched;s(new Xh(O,h.source,m,u.score+(O.boost||0)))}}}if(i){let h=Object.create(null),c=0,f=(u,d)=>{var O,m;return((O=u.rank)!==null&&O!==void 0?O:1e9)-((m=d.rank)!==null&&m!==void 0?m:1e9)||(u.namef.score-c.score||a(c.completion,f.completion))){let c=h.completion;!l||l.label!=c.label||l.detail!=c.detail||l.type!=null&&c.type!=null&&l.type!=c.type||l.apply!=c.apply||l.boost!=c.boost?o.push(h):Eh(h.completion)>Eh(l)&&(o[o.length-1]=h),l=h.completion}return o}class pi{constructor(e,t,i,s,r,o){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=s,this.selected=r,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new pi(this.options,Vh(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,i,s,r){let o=O1(e,t);if(!o.length)return s&&e.some(a=>a.state==1)?new pi(s.options,s.attrs,s.tooltip,s.timestamp,s.selected,!0):null;let l=t.facet(pe).selectOnOpen?0:-1;if(s&&s.selected!=l&&s.selected!=-1){let a=s.options[s.selected].completion;for(let h=0;hh.hasResult()?Math.min(a,h.from):a,1e8),create:y1,above:r.aboveCursor},s?s.timestamp:Date.now(),l,!1)}map(e){return new pi(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Bs{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new Bs(b1,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,i=t.facet(pe),r=(i.override||t.languageDataAt("autocomplete",Mt(t)).map(o1)).map(l=>(this.active.find(h=>h.source==l)||new We(l,this.active.some(h=>h.state!=0)?1:0)).update(e,i));r.length==this.active.length&&r.every((l,a)=>l==this.active[a])&&(r=this.active);let o=this.open;o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!p1(r,this.active)?o=pi.build(r,t,this.id,o,i):o&&o.disabled&&!r.some(l=>l.state==1)&&(o=null),!o&&r.every(l=>l.state!=1)&&r.some(l=>l.hasResult())&&(r=r.map(l=>l.hasResult()?new We(l.source,0):l));for(let l of e.effects)l.is(ad)&&(o=o&&o.setSelected(l.value,this.id));return r==this.active&&o==this.open?this:new Bs(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?m1:g1}}function p1(n,e){if(n==e)return!0;for(let t=0,i=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const b1=[];function od(n,e){if(n.isUserEvent("input.complete")){let i=n.annotation(Al);if(i&&e.activateOnCompletion(i))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class We{constructor(e,t,i=-1){this.source=e,this.state=t,this.explicitPos=i}hasResult(){return!1}update(e,t){let i=od(e,t),s=this;(i&8||i&16&&this.touches(e))&&(s=new We(s.source,0)),i&4&&s.state==0&&(s=new We(this.source,1)),s=s.updateFor(e,i);for(let r of e.effects)if(r.is(_s))s=new We(s.source,1,r.value?Mt(e.state):-1);else if(r.is(Qn))s=new We(s.source,0);else if(r.is(ld))for(let o of r.value)o.source==s.source&&(s=o);return s}updateFor(e,t){return this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new We(this.source,this.state,e.mapPos(this.explicitPos))}touches(e){return e.changes.touchesRange(Mt(e.state))}}class ki extends We{constructor(e,t,i,s,r){super(e,2,t),this.result=i,this.from=s,this.to=r}hasResult(){return!0}updateFor(e,t){var i;if(!(t&3))return this.map(e.changes);let s=this.result;s.map&&!e.changes.empty&&(s=s.map(s,e.changes));let r=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),l=Mt(e.state);if((this.explicitPos<0?l<=r:lo||!s||t&2&&Mt(e.startState)==this.from)return new We(this.source,t&4?1:0);let a=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return S1(s.validFor,e.state,r,o)?new ki(this.source,a,s,r,o):s.update&&(s=s.update(s,r,o,new Rl(e.state,l,a>=0)))?new ki(this.source,a,s,s.from,(i=s.to)!==null&&i!==void 0?i:Mt(e.state)):new We(this.source,1,a)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new ki(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new We(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function S1(n,e,t,i){if(!n)return!1;let s=e.sliceDoc(t,i);return typeof n=="function"?n(s,t,i,e):rd(n,!0).test(s)}const ld=M.define({map(n,e){return n.map(t=>t.map(e))}}),ad=M.define(),ve=ce.define({create(){return Bs.start()},update(n,e){return n.update(e)},provide:n=>[xl.from(n,e=>e.tooltip),$.contentAttributes.from(n,e=>e.attrs)]});function Xl(n,e){const t=e.completion.apply||e.completion.label;let i=n.state.field(ve).active.find(s=>s.source==e.source);return i instanceof ki?(typeof t=="string"?n.dispatch(Object.assign(Object.assign({},r1(n.state,t,i.from,i.to)),{annotations:Al.of(e.completion)})):t(n,e.completion,i.from,i.to),!0):!1}const y1=u1(ve,Xl);function hs(n,e="option"){return t=>{let i=t.state.field(ve,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+s*(n?1:-1):n?0:o-1;return l<0?l=e=="page"?0:o-1:l>=o&&(l=e=="page"?o-1:0),t.dispatch({effects:ad.of(l)}),!0}}const k1=n=>{let e=n.state.field(ve,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampn.state.field(ve,!1)?(n.dispatch({effects:_s.of(!0)}),!0):!1,w1=n=>{let e=n.state.field(ve,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:Qn.of(null)}),!0)};class Q1{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const P1=50,$1=1e3,v1=oe.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(ve).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(ve),t=n.state.facet(pe);if(!n.selectionSet&&!n.docChanged&&n.startState.field(ve)==e)return;let i=n.transactions.some(r=>{let o=od(r,t);return o&8||(r.selection||r.docChanged)&&!(o&3)});for(let r=0;rP1&&Date.now()-o.time>$1){for(let l of o.context.abortListeners)try{l()}catch(a){Ce(this.view.state,a)}o.context.abortListeners=null,this.running.splice(r--,1)}else o.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(r=>r.effects.some(o=>o.is(_s)))&&(this.pendingStart=!0);let s=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(r=>r.state==1&&!this.running.some(o=>o.active.source==r.source))?setTimeout(()=>this.startUpdate(),s):-1,this.composing!=0)for(let r of n.transactions)r.isUserEvent("input.type")?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(ve);for(let t of e.active)t.state==1&&!this.running.some(i=>i.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=Mt(e),i=new Rl(e,t,n.explicitPos==t,this.view),s=new Q1(n,i);this.running.push(s),Promise.resolve(n.source(i)).then(r=>{s.context.aborted||(s.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:Qn.of(null)}),Ce(this.view.state,r)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(pe).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(pe);for(let i=0;io.source==s.active.source);if(r&&r.state==1)if(s.done==null){let o=new We(s.active.source,0);for(let l of s.updates)o=o.update(l,t);o.state!=1&&e.push(o)}else this.startQuery(r)}e.length&&this.view.dispatch({effects:ld.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(ve,!1);if(e&&e.tooltip&&this.view.state.facet(pe).closeOnBlur){let t=e.open&&wu(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Qn.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:_s.of(!1)}),20),this.composing=0}}}),C1=typeof navigator=="object"&&/Win/.test(navigator.platform),Z1=kt.highest($.domEventHandlers({keydown(n,e){let t=e.state.field(ve,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(C1&&n.altKey)||n.metaKey)return!1;let i=t.open.options[t.open.selected],s=t.active.find(o=>o.source==i.source),r=i.completion.commitCharacters||s.result.commitCharacters;return r&&r.indexOf(n.key)>-1&&Xl(e,i),!1}})),hd=$.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 T1{constructor(e,t,i,s){this.field=e,this.line=t,this.from=i,this.to=s}}class Ml{constructor(e,t,i){this.field=e,this.from=t,this.to=i}map(e){let t=e.mapPos(this.from,-1,Oe.TrackDel),i=e.mapPos(this.to,1,Oe.TrackDel);return t==null||i==null?null:new Ml(this.field,t,i)}}class Wl{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let i=[],s=[t],r=e.doc.lineAt(t),o=/^\s*/.exec(r.text)[0];for(let a of this.lines){if(i.length){let h=o,c=/^\t*/.exec(a)[0].length;for(let f=0;fnew Ml(a.field,s[a.line]+a.from,s[a.line]+a.to));return{text:i,ranges:l}}static parse(e){let t=[],i=[],s=[],r;for(let o of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o);){let l=r[1]?+r[1]:null,a=r[2]||r[3]||"",h=-1,c=a.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f=h&&u.field++}s.push(new T1(h,i.length,r.index,r.index+c.length)),o=o.slice(0,r.index)+a+o.slice(r.index+r[0].length)}o=o.replace(/\\([{}])/g,(l,a,h)=>{for(let c of s)c.line==i.length&&c.from>h&&(c.from--,c.to--);return a}),i.push(o)}return new Wl(i,s)}}let R1=A.widget({widget:new class extends wt{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),A1=A.mark({class:"cm-snippetField"});class qi{constructor(e,t){this.ranges=e,this.active=t,this.deco=A.set(e.map(i=>(i.from==i.to?R1:A1).range(i.from,i.to)))}map(e){let t=[];for(let i of this.ranges){let s=i.map(e);if(!s)return null;t.push(s)}return new qi(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(i=>i.field==this.active&&i.from<=t.from&&i.to>=t.to))}}const Ln=M.define({map(n,e){return n&&n.map(e)}}),X1=M.define(),Pn=ce.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(Ln))return t.value;if(t.is(X1)&&n)return new qi(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>$.decorations.from(n,e=>e?e.deco:A.none)});function El(n,e){return y.create(n.filter(t=>t.field==e).map(t=>y.range(t.from,t.to)))}function M1(n){let e=Wl.parse(n);return(t,i,s,r)=>{let{text:o,ranges:l}=e.instantiate(t.state,s),a={changes:{from:s,to:r,insert:B.of(o)},scrollIntoView:!0,annotations:i?[Al.of(i),re.userEvent.of("input.complete")]:void 0};if(l.length&&(a.selection=El(l,0)),l.some(h=>h.field>0)){let h=new qi(l,0),c=a.effects=[Ln.of(h)];t.state.field(Pn,!1)===void 0&&c.push(M.appendConfig.of([Pn,D1,q1,hd]))}t.dispatch(t.state.update(a))}}function cd(n){return({state:e,dispatch:t})=>{let i=e.field(Pn,!1);if(!i||n<0&&i.active==0)return!1;let s=i.active+n,r=n>0&&!i.ranges.some(o=>o.field==s+n);return t(e.update({selection:El(i.ranges,s),effects:Ln.of(r?null:new qi(i.ranges,s)),scrollIntoView:!0})),!0}}const W1=({state:n,dispatch:e})=>n.field(Pn,!1)?(e(n.update({effects:Ln.of(null)})),!0):!1,E1=cd(1),V1=cd(-1),Y1=[{key:"Tab",run:E1,shift:V1},{key:"Escape",run:W1}],Yh=T.define({combine(n){return n.length?n[0]:Y1}}),D1=kt.highest(Vn.compute([Yh],n=>n.facet(Yh)));function Pe(n,e){return Object.assign(Object.assign({},e),{apply:M1(n)})}const q1=$.domEventHandlers({mousedown(n,e){let t=e.state.field(Pn,!1),i;if(!t||(i=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let s=t.ranges.find(r=>r.from<=i&&r.to>=i);return!s||s.field==t.active?!1:(e.dispatch({selection:El(t.ranges,s.field),effects:Ln.of(t.ranges.some(r=>r.field>s.field)?new qi(t.ranges,s.field):null),scrollIntoView:!0}),!0)}}),$n={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Ft=M.define({map(n,e){let t=e.mapPos(n,-1,Oe.TrackAfter);return t??void 0}}),Vl=new class extends Ht{};Vl.startSide=1;Vl.endSide=-1;const fd=ce.define({create(){return _.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:i=>i>=t.from&&i<=t.to})}for(let t of e.effects)t.is(Ft)&&(n=n.update({add:[Vl.range(t.value,t.value+1)]}));return n}});function z1(){return[_1,fd]}const Yr="()[]{}<>";function ud(n){for(let e=0;e{if((L1?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let s=n.state.selection.main;if(i.length>2||i.length==2&&ze(ue(i,0))==1||e!=s.from||t!=s.to)return!1;let r=I1(n.state,i);return r?(n.dispatch(r),!0):!1}),B1=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let i=dd(n,n.selection.main.head).brackets||$n.brackets,s=null,r=n.changeByRange(o=>{if(o.empty){let l=j1(n.doc,o.head);for(let a of i)if(a==l&&ur(n.doc,o.head)==ud(ue(a,0)))return{changes:{from:o.head-a.length,to:o.head+a.length},range:y.cursor(o.head-a.length)}}return{range:s=o}});return s||e(n.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!s},U1=[{key:"Backspace",run:B1}];function I1(n,e){let t=dd(n,n.selection.main.head),i=t.brackets||$n.brackets;for(let s of i){let r=ud(ue(s,0));if(e==s)return r==s?F1(n,s,i.indexOf(s+s+s)>-1,t):N1(n,s,r,t.before||$n.before);if(e==r&&Od(n,n.selection.main.from))return G1(n,s,r)}return null}function Od(n,e){let t=!1;return n.field(fd).between(0,n.doc.length,i=>{i==e&&(t=!0)}),t}function ur(n,e){let t=n.sliceString(e,e+2);return t.slice(0,ze(ue(t,0)))}function j1(n,e){let t=n.sliceString(e-2,e);return ze(ue(t,0))==t.length?t:t.slice(1)}function N1(n,e,t,i){let s=null,r=n.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:Ft.of(o.to+e.length),range:y.range(o.anchor+e.length,o.head+e.length)};let l=ur(n.doc,o.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:e+t,from:o.head},effects:Ft.of(o.head+e.length),range:y.cursor(o.head+e.length)}:{range:s=o}});return s?null:n.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function G1(n,e,t){let i=null,s=n.changeByRange(r=>r.empty&&ur(n.doc,r.head)==t?{changes:{from:r.head,to:r.head+t.length,insert:t},range:y.cursor(r.head+t.length)}:i={range:r});return i?null:n.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function F1(n,e,t,i){let s=i.stringPrefixes||$n.stringPrefixes,r=null,o=n.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:Ft.of(l.to+e.length),range:y.range(l.anchor+e.length,l.head+e.length)};let a=l.head,h=ur(n.doc,a),c;if(h==e){if(Dh(n,a))return{changes:{insert:e+e,from:a},effects:Ft.of(a+e.length),range:y.cursor(a+e.length)};if(Od(n,a)){let u=t&&n.sliceDoc(a,a+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+u.length,insert:u},range:y.cursor(a+u.length)}}}else{if(t&&n.sliceDoc(a-2*e.length,a)==e+e&&(c=qh(n,a-2*e.length,s))>-1&&Dh(n,c))return{changes:{insert:e+e+e+e,from:a},effects:Ft.of(a+e.length),range:y.cursor(a+e.length)};if(n.charCategorizer(a)(h)!=te.Word&&qh(n,a,s)>-1&&!H1(n,a,e,s))return{changes:{insert:e+e,from:a},effects:Ft.of(a+e.length),range:y.cursor(a+e.length)}}return{range:r=l}});return r?null:n.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Dh(n,e){let t=F(n).resolveInner(e+1);return t.parent&&t.from==e}function H1(n,e,t,i){let s=F(n).resolveInner(e,-1),r=i.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=n.sliceDoc(s.from,Math.min(s.to,s.from+t.length+r)),a=l.indexOf(t);if(!a||a>-1&&i.indexOf(l.slice(0,a))>-1){let c=s.firstChild;for(;c&&c.from==s.from&&c.to-c.from>t.length+a;){if(n.sliceDoc(c.to-t.length,c.to)==t)return!1;c=c.firstChild}return!0}let h=s.to==e&&s.parent;if(!h)break;s=h}return!1}function qh(n,e,t){let i=n.charCategorizer(e);if(i(n.sliceDoc(e-1,e))!=te.Word)return e;for(let s of t){let r=e-s.length;if(n.sliceDoc(r,e)==s&&i(n.sliceDoc(r-1,r))!=te.Word)return r}return-1}function K1(n={}){return[Z1,ve,pe.of(n),v1,J1,hd]}const pd=[{key:"Ctrl-Space",run:x1},{key:"Escape",run:w1},{key:"ArrowDown",run:hs(!0)},{key:"ArrowUp",run:hs(!1)},{key:"PageDown",run:hs(!0,"page")},{key:"PageUp",run:hs(!1,"page")},{key:"Enter",run:k1}],J1=kt.highest(Vn.computeN([pe],n=>n.facet(pe).defaultKeymap?[pd]:[]));function H(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=t[i];typeof s=="string"?n.setAttribute(i,s):s!=null&&(n[i]=s)}e++}for(;en.normalize("NFKD"):n=>n;class Ti{constructor(e,t,i=0,s=e.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,s),this.bufferStart=i,this.normalize=r?l=>r(zh(l)):zh,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 ue(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=cl(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=ze(e);let s=this.normalize(t);for(let r=0,o=i;;r++){let l=s.charCodeAt(r),a=this.match(l,o,this.bufferPos+this.bufferStart);if(r==s.length-1){if(a)return this.value=a,this;break}o==i&&rthis.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 i=this.curLineStart+t.index,s=i+t[0].length;if(this.matchPos=Us(this.text,s+(i==s?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||s.to<=t){let l=new xi(t,e.sliceString(t,i));return Dr.set(e,l),l}if(s.from==t&&s.to==i)return s;let{text:r,from:o}=s;return o>t&&(r=e.sliceString(t,o)+r,o=t),s.to=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 i=this.flat.from+t.index,s=i+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this.matchPos=Us(this.text,s+(i==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=xi.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(bd.prototype[Symbol.iterator]=Sd.prototype[Symbol.iterator]=function(){return this});function eS(n){try{return new RegExp(n,Yl),!0}catch{return!1}}function Us(n,e){if(e>=n.length)return e;let t=n.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function Uo(n){let e=String(n.state.doc.lineAt(n.state.selection.main.head).number),t=H("input",{class:"cm-textfield",name:"line",value:e}),i=H("form",{class:"cm-gotoLine",onkeydown:r=>{r.keyCode==27?(r.preventDefault(),n.dispatch({effects:Is.of(!1)}),n.focus()):r.keyCode==13&&(r.preventDefault(),s())},onsubmit:r=>{r.preventDefault(),s()}},H("label",n.state.phrase("Go to line"),": ",t)," ",H("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function s(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!r)return;let{state:o}=n,l=o.doc.lineAt(o.selection.main.head),[,a,h,c,f]=r,u=c?+c.slice(1):0,d=h?+h:l.number;if(h&&f){let g=d/100;a&&(g=g*(a=="-"?-1:1)+l.number/o.doc.lines),d=Math.round(o.doc.lines*g)}else h&&a&&(d=d*(a=="-"?-1:1)+l.number);let O=o.doc.line(Math.max(1,Math.min(o.doc.lines,d))),m=y.cursor(O.from+Math.max(0,Math.min(u,O.length)));n.dispatch({effects:[Is.of(!1),$.scrollIntoView(m.from,{y:"center"})],selection:m}),n.focus()}return{dom:i}}const Is=M.define(),Lh=ce.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(Is)&&(n=t.value);return n},provide:n=>yn.from(n,e=>e?Uo:null)}),tS=n=>{let e=Sn(n,Uo);if(!e){let t=[Is.of(!0)];n.state.field(Lh,!1)==null&&t.push(M.appendConfig.of([Lh,iS])),n.dispatch({effects:t}),e=Sn(n,Uo)}return e&&e.dom.querySelector("input").select(),!0},iS=$.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),nS={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},sS=T.define({combine(n){return dt(n,nS,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function rS(n){return[cS,hS]}const oS=A.mark({class:"cm-selectionMatch"}),lS=A.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function _h(n,e,t,i){return(t==0||n(e.sliceDoc(t-1,t))!=te.Word)&&(i==e.doc.length||n(e.sliceDoc(i,i+1))!=te.Word)}function aS(n,e,t,i){return n(e.sliceDoc(t,t+1))==te.Word&&n(e.sliceDoc(i-1,i))==te.Word}const hS=oe.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(sS),{state:t}=n,i=t.selection;if(i.ranges.length>1)return A.none;let s=i.main,r,o=null;if(s.empty){if(!e.highlightWordAroundCursor)return A.none;let a=t.wordAt(s.head);if(!a)return A.none;o=t.charCategorizer(s.head),r=t.sliceDoc(a.from,a.to)}else{let a=s.to-s.from;if(a200)return A.none;if(e.wholeWords){if(r=t.sliceDoc(s.from,s.to),o=t.charCategorizer(s.head),!(_h(o,t,s.from,s.to)&&aS(o,t,s.from,s.to)))return A.none}else if(r=t.sliceDoc(s.from,s.to),!r)return A.none}let l=[];for(let a of n.visibleRanges){let h=new Ti(t.doc,r,a.from,a.to);for(;!h.next().done;){let{from:c,to:f}=h.value;if((!o||_h(o,t,c,f))&&(s.empty&&c<=s.from&&f>=s.to?l.push(lS.range(c,f)):(c>=s.to||f<=s.from)&&l.push(oS.range(c,f)),l.length>e.maxMatches))return A.none}}return A.set(l)}},{decorations:n=>n.decorations}),cS=$.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),fS=({state:n,dispatch:e})=>{let{selection:t}=n,i=y.create(t.ranges.map(s=>n.wordAt(s.head)||y.cursor(s.head)),t.mainIndex);return i.eq(t)?!1:(e(n.update({selection:i})),!0)};function uS(n,e){let{main:t,ranges:i}=n.selection,s=n.wordAt(t.head),r=s&&s.from==t.from&&s.to==t.to;for(let o=!1,l=new Ti(n.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new Ti(n.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(a=>a.from==l.value.from))continue;if(r){let a=n.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}const dS=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(r=>r.from===r.to))return fS({state:n,dispatch:e});let i=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(r=>n.sliceDoc(r.from,r.to)!=i))return!1;let s=uS(n,i);return s?(e(n.update({selection:n.selection.addRange(y.range(s.from,s.to),!1),effects:$.scrollIntoView(s.to)})),!0):!1},ai=T.define({combine(n){return dt(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new $S(e),scrollToMatch:e=>$.scrollIntoView(e)})}});function OS(n){return n?[ai.of(n),jo]:jo}class Dl{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||eS(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,i)=>i=="n"?` -`:i=="r"?"\r":i=="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 bS(this):new mS(this)}getCursor(e,t=0,i){let s=e.doc?e:Y.create({doc:e});return i==null&&(i=s.doc.length),this.regexp?ui(this,s,t,i):fi(this,s,t,i)}}class yd{constructor(e){this.spec=e}}function fi(n,e,t,i){return new Ti(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:s=>s.toLowerCase(),n.wholeWord?pS(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function pS(n,e){return(t,i,s,r)=>((r>t||r+s.length=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=fi(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function ui(n,e,t,i){return new bd(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?gS(e.charCategorizer(e.selection.main.head)):void 0},t,i)}function js(n,e){return n.slice(me(n,e,!1),e)}function Ns(n,e){return n.slice(e,me(n,e))}function gS(n){return(e,t,i)=>!i[0].length||(n(js(i.input,i.index))!=te.Word||n(Ns(i.input,i.index))!=te.Word)&&(n(Ns(i.input,i.index+i[0].length))!=te.Word||n(js(i.input,i.index+i[0].length))!=te.Word)}class bS extends yd{nextMatch(e,t,i){let s=ui(this.spec,e,i,e.doc.length).next();return s.done&&(s=ui(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=1;;s++){let r=Math.max(t,i-s*1e4),o=ui(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==t||l.from>r+10))return l;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=ui(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const Ri=M.define(),ql=M.define(),Wt=ce.define({create(n){return new qr(Io(n).create(),null)},update(n,e){for(let t of e.effects)t.is(Ri)?n=new qr(t.value.create(),n.panel):t.is(ql)&&(n=new qr(n.query,t.value?zl:null));return n},provide:n=>yn.from(n,e=>e.panel)});class qr{constructor(e,t){this.query=e,this.panel=t}}const SS=A.mark({class:"cm-searchMatch"}),yS=A.mark({class:"cm-searchMatch cm-searchMatch-selected"}),kS=oe.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(Wt))}update(n){let e=n.state.field(Wt);(e!=n.startState.field(Wt)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return A.none;let{view:t}=this,i=new Et;for(let s=0,r=t.visibleRanges,o=r.length;sr[s+1].from-2*250;)a=r[++s].to;n.highlight(t.state,l,a,(h,c)=>{let f=t.state.selection.ranges.some(u=>u.from==h&&u.to==c);i.add(h,c,f?yS:SS)})}return i.finish()}},{decorations:n=>n.decorations});function _n(n){return e=>{let t=e.state.field(Wt,!1);return t&&t.query.spec.valid?n(e,t):wd(e)}}const vn=_n((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state,t,t);if(!i)return!1;let s=y.single(i.from,i.to),r=n.state.facet(ai);return n.dispatch({selection:s,effects:[_l(n,i),r.scrollToMatch(s.main,n)],userEvent:"select.search"}),xd(n),!0}),Cn=_n((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,s=e.prevMatch(t,i,i);if(!s)return!1;let r=y.single(s.from,s.to),o=n.state.facet(ai);return n.dispatch({selection:r,effects:[_l(n,s),o.scrollToMatch(r.main,n)],userEvent:"select.search"}),xd(n),!0}),xS=_n((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:y.create(t.map(i=>y.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),wS=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:i,to:s}=t.main,r=[],o=0;for(let l=new Ti(n.doc,n.sliceDoc(i,s));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(o=r.length),r.push(y.range(l.value.from,l.value.to))}return e(n.update({selection:y.create(r,o),userEvent:"select.search.matches"})),!0},Bh=_n((n,{query:e})=>{let{state:t}=n,{from:i,to:s}=t.selection.main;if(t.readOnly)return!1;let r=e.nextMatch(t,i,i);if(!r)return!1;let o=[],l,a,h=[];if(r.from==i&&r.to==s&&(a=t.toText(e.getReplacement(r)),o.push({from:r.from,to:r.to,insert:a}),r=e.nextMatch(t,r.from,r.to),h.push($.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(i).number)+"."))),r){let c=o.length==0||o[0].from>=r.to?0:r.to-r.from-a.length;l=y.single(r.from-c,r.to-c),h.push(_l(n,r)),h.push(t.facet(ai).scrollToMatch(l.main,n))}return n.dispatch({changes:o,selection:l,effects:h,userEvent:"input.replace"}),!0}),QS=_n((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getReplacement(s)}});if(!t.length)return!1;let i=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:$.announce.of(i),userEvent:"input.replace.all"}),!0});function zl(n){return n.state.facet(ai).createPanel(n)}function Io(n,e){var t,i,s,r,o;let l=n.selection.main,a=l.empty||l.to>l.from+100?"":n.sliceDoc(l.from,l.to);if(e&&!a)return e;let h=n.facet(ai);return new Dl({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:h.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:h.caseSensitive,literal:(s=e==null?void 0:e.literal)!==null&&s!==void 0?s:h.literal,regexp:(r=e==null?void 0:e.regexp)!==null&&r!==void 0?r:h.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:h.wholeWord})}function kd(n){let e=Sn(n,zl);return e&&e.dom.querySelector("[main-field]")}function xd(n){let e=kd(n);e&&e==n.root.activeElement&&e.select()}const wd=n=>{let e=n.state.field(Wt,!1);if(e&&e.panel){let t=kd(n);if(t&&t!=n.root.activeElement){let i=Io(n.state,e.query.spec);i.valid&&n.dispatch({effects:Ri.of(i)}),t.focus(),t.select()}}else n.dispatch({effects:[ql.of(!0),e?Ri.of(Io(n.state,e.query.spec)):M.appendConfig.of(jo)]});return!0},Ll=n=>{let e=n.state.field(Wt,!1);if(!e||!e.panel)return!1;let t=Sn(n,zl);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:ql.of(!1)}),!0},PS=[{key:"Mod-f",run:wd,scope:"editor search-panel"},{key:"F3",run:vn,shift:Cn,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:vn,shift:Cn,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Ll,scope:"editor search-panel"},{key:"Mod-Shift-l",run:wS},{key:"Mod-Alt-g",run:tS},{key:"Mod-d",run:dS,preventDefault:!0}];let $S=class{constructor(e){this.view=e;let t=this.query=e.state.field(Wt).query.spec;this.commit=this.commit.bind(this),this.searchField=H("input",{value:t.search,placeholder:Re(e,"Find"),"aria-label":Re(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=H("input",{value:t.replace,placeholder:Re(e,"Replace"),"aria-label":Re(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=H("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=H("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=H("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function i(s,r,o){return H("button",{class:"cm-button",name:s,onclick:r,type:"button"},o)}this.dom=H("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,i("next",()=>vn(e),[Re(e,"next")]),i("prev",()=>Cn(e),[Re(e,"previous")]),i("select",()=>xS(e),[Re(e,"all")]),H("label",null,[this.caseField,Re(e,"match case")]),H("label",null,[this.reField,Re(e,"regexp")]),H("label",null,[this.wordField,Re(e,"by word")]),...e.state.readOnly?[]:[H("br"),this.replaceField,i("replace",()=>Bh(e),[Re(e,"replace")]),i("replaceAll",()=>QS(e),[Re(e,"replace all")])],H("button",{name:"close",onclick:()=>Ll(e),"aria-label":Re(e,"close"),type:"button"},["×"])])}commit(){let e=new Dl({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:Ri.of(e)}))}keydown(e){Ig(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Cn:vn)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Bh(this.view))}update(e){for(let t of e.transactions)for(let i of t.effects)i.is(Ri)&&!i.value.eq(this.query)&&this.setQuery(i.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(ai).top}};function Re(n,e){return n.state.phrase(e)}const cs=30,fs=/[\s\.,:;?!]/;function _l(n,{from:e,to:t}){let i=n.state.doc.lineAt(e),s=n.state.doc.lineAt(t).to,r=Math.max(i.from,e-cs),o=Math.min(s,t+cs),l=n.state.sliceDoc(r,o);if(r!=i.from){for(let a=0;al.length-cs;a--)if(!fs.test(l[a-1])&&fs.test(l[a])){l=l.slice(0,a);break}}return $.announce.of(`${n.state.phrase("current match")}. ${l} ${n.state.phrase("on line")} ${i.number}.`)}const vS=$.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"}}),jo=[Wt,kt.low(kS),vS],CS=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),i=Ul(n.state,t.from);return i.line?ZS(n):i.block?RS(n):!1};function Bl(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let s=n(e,t);return s?(i(t.update(s)),!0):!1}}const ZS=Bl(MS,0),TS=Bl(Qd,0),RS=Bl((n,e)=>Qd(n,e,XS(e)),0);function Ul(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const Ni=50;function AS(n,{open:e,close:t},i,s){let r=n.sliceDoc(i-Ni,i),o=n.sliceDoc(s,s+Ni),l=/\s*$/.exec(r)[0].length,a=/^\s*/.exec(o)[0].length,h=r.length-l;if(r.slice(h-e.length,h)==e&&o.slice(a,a+t.length)==t)return{open:{pos:i-l,margin:l&&1},close:{pos:s+a,margin:a&&1}};let c,f;s-i<=2*Ni?c=f=n.sliceDoc(i,s):(c=n.sliceDoc(i,i+Ni),f=n.sliceDoc(s-Ni,s));let u=/^\s*/.exec(c)[0].length,d=/\s*$/.exec(f)[0].length,O=f.length-d-t.length;return c.slice(u,u+e.length)==e&&f.slice(O,O+t.length)==t?{open:{pos:i+u+e.length,margin:/\s/.test(c.charAt(u+e.length))?1:0},close:{pos:s-d-t.length,margin:/\s/.test(f.charAt(O-1))?1:0}}:null}function XS(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),s=t.to<=i.to?i:n.doc.lineAt(t.to),r=e.length-1;r>=0&&e[r].to>i.from?e[r].to=s.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:s.to})}return e}function Qd(n,e,t=e.selection.ranges){let i=t.map(r=>Ul(e,r.from).block);if(!i.every(r=>r))return null;let s=t.map((r,o)=>AS(e,i[o],r.from,r.to));if(n!=2&&!s.every(r=>r))return{changes:e.changes(t.map((r,o)=>s[o]?[]:[{from:r.from,insert:i[o].open+" "},{from:r.to,insert:" "+i[o].close}]))};if(n!=1&&s.some(r=>r)){let r=[];for(let o=0,l;os&&(r==o||o>f.from)){s=f.from;let u=/^\s*/.exec(f.text)[0].length,d=u==f.length,O=f.text.slice(u,u+h.length)==h?u:-1;ur.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:l,token:a,indent:h,empty:c,single:f}of i)(f||!c)&&r.push({from:l.from+h,insert:a+" "});let o=e.changes(r);return{changes:o,selection:e.selection.map(o,1)}}else if(n!=1&&i.some(r=>r.comment>=0)){let r=[];for(let{line:o,comment:l,token:a}of i)if(l>=0){let h=o.from+l,c=h+a.length;o.text[c-o.from]==" "&&c++,r.push({from:h,to:c})}return{changes:r}}return null}const No=xt.define(),WS=xt.define(),ES=T.define(),Pd=T.define({combine(n){return dt(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(i,s)=>e(i,s)||t(i,s)})}}),$d=ce.define({create(){return ct.empty},update(n,e){let t=e.state.facet(Pd),i=e.annotation(No);if(i){let a=Ze.fromTransaction(e,i.selection),h=i.side,c=h==0?n.undone:n.done;return a?c=Gs(c,c.length,t.minDepth,a):c=Zd(c,e.startState.selection),new ct(h==0?i.rest:c,h==0?c:i.rest)}let s=e.annotation(WS);if((s=="full"||s=="before")&&(n=n.isolate()),e.annotation(re.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let r=Ze.fromTransaction(e),o=e.annotation(re.time),l=e.annotation(re.userEvent);return r?n=n.addChanges(r,o,l,t,e):e.selection&&(n=n.addSelection(e.startState.selection,o,l,t.newGroupDelay)),(s=="full"||s=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new ct(n.done.map(Ze.fromJSON),n.undone.map(Ze.fromJSON))}});function VS(n={}){return[$d,Pd.of(n),$.domEventHandlers({beforeinput(e,t){let i=e.inputType=="historyUndo"?vd:e.inputType=="historyRedo"?Go:null;return i?(e.preventDefault(),i(t)):!1}})]}function dr(n,e){return function({state:t,dispatch:i}){if(!e&&t.readOnly)return!1;let s=t.field($d,!1);if(!s)return!1;let r=s.pop(n,t,e);return r?(i(r),!0):!1}}const vd=dr(0,!1),Go=dr(1,!1),YS=dr(0,!0),DS=dr(1,!0);class Ze{constructor(e,t,i,s,r){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=s,this.selectionsAfter=r}setSelAfter(e){return new Ze(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(s=>s.toJSON())}}static fromJSON(e){return new Ze(e.changes&&he.fromJSON(e.changes),[],e.mapped&&ft.fromJSON(e.mapped),e.startSelection&&y.fromJSON(e.startSelection),e.selectionsAfter.map(y.fromJSON))}static fromTransaction(e,t){let i=_e;for(let s of e.startState.facet(ES)){let r=s(e);r.length&&(i=i.concat(r))}return!i.length&&e.changes.empty?null:new Ze(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,_e)}static selection(e){return new Ze(void 0,_e,void 0,void 0,e)}}function Gs(n,e,t,i){let s=e+1>t+20?e-t-1:0,r=n.slice(s,e);return r.push(i),r}function qS(n,e){let t=[],i=!1;return n.iterChangedRanges((s,r)=>t.push(s,r)),e.iterChangedRanges((s,r,o,l)=>{for(let a=0;a=h&&o<=c&&(i=!0)}}),i}function zS(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length===0}function Cd(n,e){return n.length?e.length?n.concat(e):n:e}const _e=[],LS=200;function Zd(n,e){if(n.length){let t=n[n.length-1],i=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-LS));return i.length&&i[i.length-1].eq(e)?n:(i.push(e),Gs(n,n.length-1,1e9,t.setSelAfter(i)))}else return[Ze.selection([e])]}function _S(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function zr(n,e){if(!n.length)return n;let t=n.length,i=_e;for(;t;){let s=BS(n[t-1],e,i);if(s.changes&&!s.changes.empty||s.effects.length){let r=n.slice(0,t);return r[t-1]=s,r}else e=s.mapped,t--,i=s.selectionsAfter}return i.length?[Ze.selection(i)]:_e}function BS(n,e,t){let i=Cd(n.selectionsAfter.length?n.selectionsAfter.map(l=>l.map(e)):_e,t);if(!n.changes)return Ze.selection(i);let s=n.changes.map(e),r=e.mapDesc(n.changes,!0),o=n.mapped?n.mapped.composeDesc(r):r;return new Ze(s,M.mapEffects(n.effects,e),o,n.startSelection.map(r),i)}const US=/^(input\.type|delete)($|\.)/;class ct{constructor(e,t,i=0,s=void 0){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=s}isolate(){return this.prevTime?new ct(this.done,this.undone):this}addChanges(e,t,i,s,r){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||US.test(i))&&(!l.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):Or(t,e))}function ye(n){return n.textDirectionAt(n.state.selection.main.head)==ee.LTR}const Il=n=>Td(n,!ye(n)),jl=n=>Td(n,ye(n));function Rd(n,e){return Ke(n,t=>t.empty?n.moveByGroup(t,e):Or(t,e))}const Ad=n=>Rd(n,!ye(n)),Xd=n=>Rd(n,ye(n));function jS(n,e,t){if(e.type.prop(t))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function pr(n,e,t){let i=F(n).resolveInner(e.head),s=t?X.closedBy:X.openedBy;for(let a=e.head;;){let h=t?i.childAfter(a):i.childBefore(a);if(!h)break;jS(n,h,s)?i=h:a=t?h.to:h.from}let r=i.type.prop(s),o,l;return r&&(o=t?ht(n,i.from,1):ht(n,i.to,-1))&&o.matched?l=t?o.end.to:o.end.from:l=t?i.to:i.from,y.cursor(l,t?-1:1)}const Md=n=>Ke(n,e=>pr(n.state,e,!ye(n))),Wd=n=>Ke(n,e=>pr(n.state,e,ye(n)));function Ed(n,e){return Ke(n,t=>{if(!t.empty)return Or(t,e);let i=n.moveVertically(t,e);return i.head!=t.head?i:n.moveToLineBoundary(t,e)})}const Vd=n=>Ed(n,!1),Yd=n=>Ed(n,!0);function Dd(n){let e=n.scrollDOM.clientHeighto.empty?n.moveVertically(o,e,t.height):Or(o,e));if(s.eq(i.selection))return!1;let r;if(t.selfScroll){let o=n.coordsAtPos(i.selection.main.head),l=n.scrollDOM.getBoundingClientRect(),a=l.top+t.marginTop,h=l.bottom-t.marginBottom;o&&o.top>a&&o.bottomqd(n,!1),Fo=n=>qd(n,!0);function Lt(n,e,t){let i=n.lineBlockAt(e.head),s=n.moveToLineBoundary(e,t);if(s.head==e.head&&s.head!=(t?i.to:i.from)&&(s=n.moveToLineBoundary(e,t,!1)),!t&&s.head==i.from&&i.length){let r=/^\s*/.exec(n.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;r&&e.head!=i.from+r&&(s=y.cursor(i.from+r))}return s}const zd=n=>Ke(n,e=>Lt(n,e,!0)),Ld=n=>Ke(n,e=>Lt(n,e,!1)),_d=n=>Ke(n,e=>Lt(n,e,!ye(n))),Bd=n=>Ke(n,e=>Lt(n,e,ye(n))),NS=n=>Ke(n,e=>y.cursor(n.lineBlockAt(e.head).from,1)),GS=n=>Ke(n,e=>y.cursor(n.lineBlockAt(e.head).to,-1));function FS(n,e,t){let i=!1,s=zi(n.selection,r=>{let o=ht(n,r.head,-1)||ht(n,r.head,1)||r.head>0&&ht(n,r.head-1,1)||r.headFS(n,e);function Ie(n,e){let t=zi(n.state.selection,i=>{let s=e(i);return y.range(i.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Ot(n.state,t)),!0)}function Ud(n,e){return Ie(n,t=>n.moveByChar(t,e))}const Nl=n=>Ud(n,!ye(n)),Gl=n=>Ud(n,ye(n));function Id(n,e){return Ie(n,t=>n.moveByGroup(t,e))}const jd=n=>Id(n,!ye(n)),Nd=n=>Id(n,ye(n)),Gd=n=>Ie(n,e=>pr(n.state,e,!ye(n))),Fd=n=>Ie(n,e=>pr(n.state,e,ye(n)));function Hd(n,e){return Ie(n,t=>n.moveVertically(t,e))}const Kd=n=>Hd(n,!1),Jd=n=>Hd(n,!0);function eO(n,e){return Ie(n,t=>n.moveVertically(t,e,Dd(n).height))}const Ih=n=>eO(n,!1),jh=n=>eO(n,!0),tO=n=>Ie(n,e=>Lt(n,e,!0)),iO=n=>Ie(n,e=>Lt(n,e,!1)),nO=n=>Ie(n,e=>Lt(n,e,!ye(n))),sO=n=>Ie(n,e=>Lt(n,e,ye(n))),KS=n=>Ie(n,e=>y.cursor(n.lineBlockAt(e.head).from)),JS=n=>Ie(n,e=>y.cursor(n.lineBlockAt(e.head).to)),Nh=({state:n,dispatch:e})=>(e(Ot(n,{anchor:0})),!0),Gh=({state:n,dispatch:e})=>(e(Ot(n,{anchor:n.doc.length})),!0),Fh=({state:n,dispatch:e})=>(e(Ot(n,{anchor:n.selection.main.anchor,head:0})),!0),Hh=({state:n,dispatch:e})=>(e(Ot(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),ey=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),ty=({state:n,dispatch:e})=>{let t=mr(n).map(({from:i,to:s})=>y.range(i,Math.min(s+1,n.doc.length)));return e(n.update({selection:y.create(t),userEvent:"select"})),!0},iy=({state:n,dispatch:e})=>{let t=zi(n.selection,i=>{var s;let r=F(n).resolveStack(i.from,1);for(let o=r;o;o=o.next){let{node:l}=o;if((l.from=i.to||l.to>i.to&&l.from<=i.from)&&(!((s=l.parent)===null||s===void 0)&&s.parent))return y.range(l.to,l.from)}return i});return e(Ot(n,t)),!0},ny=({state:n,dispatch:e})=>{let t=n.selection,i=null;return t.ranges.length>1?i=y.create([t.main]):t.main.empty||(i=y.create([y.cursor(t.main.head)])),i?(e(Ot(n,i)),!0):!1};function Li(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:i}=n,s=i.changeByRange(r=>{let{from:o,to:l}=r;if(o==l){let a=e(r);ao&&(t="delete.forward",a=us(n,a,!0)),o=Math.min(o,a),l=Math.max(l,a)}else o=us(n,o,!1),l=us(n,l,!0);return o==l?{range:r}:{changes:{from:o,to:l},range:y.cursor(o,os(n)))i.between(e,e,(s,r)=>{se&&(e=t?r:s)});return e}const rO=(n,e,t)=>Li(n,i=>{let s=i.from,{state:r}=n,o=r.doc.lineAt(s),l,a;if(t&&!e&&s>o.from&&srO(n,!1,!0),Hs=n=>rO(n,!0,!1),oO=(n,e)=>Li(n,t=>{let i=t.head,{state:s}=n,r=s.doc.lineAt(i),o=s.charCategorizer(i);for(let l=null;;){if(i==(e?r.to:r.from)){i==t.head&&r.number!=(e?s.doc.lines:1)&&(i+=e?1:-1);break}let a=me(r.text,i-r.from,e)+r.from,h=r.text.slice(Math.min(i,a)-r.from,Math.max(i,a)-r.from),c=o(h);if(l!=null&&c!=l)break;(h!=" "||i!=t.head)&&(l=c),i=a}return i}),Fl=n=>oO(n,!1),lO=n=>oO(n,!0),aO=n=>Li(n,e=>{let t=n.lineBlockAt(e.head).to;return e.headLi(n,e=>{let t=n.lineBlockAt(e.head).from;return e.head>t?t:Math.max(0,e.head-1)}),ry=n=>Li(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),oy=n=>Li(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head{if(n.readOnly)return!1;let t=n.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:B.of(["",""])},range:y.cursor(i.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},ay=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>{if(!i.empty||i.from==0||i.from==n.doc.length)return{range:i};let s=i.from,r=n.doc.lineAt(s),o=s==r.from?s-1:me(r.text,s-r.from,!1)+r.from,l=s==r.to?s+1:me(r.text,s-r.from,!0)+r.from;return{changes:{from:o,to:l,insert:n.doc.slice(s,l).append(n.doc.slice(o,s))},range:y.cursor(l)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function mr(n){let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.from),r=n.doc.lineAt(i.to);if(!i.empty&&i.to==r.from&&(r=n.doc.lineAt(i.to-1)),t>=s.number){let o=e[e.length-1];o.to=r.to,o.ranges.push(i)}else e.push({from:s.from,to:r.to,ranges:[i]});t=r.number+1}return e}function hO(n,e,t){if(n.readOnly)return!1;let i=[],s=[];for(let r of mr(n)){if(t?r.to==n.doc.length:r.from==0)continue;let o=n.doc.lineAt(t?r.to+1:r.from-1),l=o.length+1;if(t){i.push({from:r.to,to:o.to},{from:r.from,insert:o.text+n.lineBreak});for(let a of r.ranges)s.push(y.range(Math.min(n.doc.length,a.anchor+l),Math.min(n.doc.length,a.head+l)))}else{i.push({from:o.from,to:r.from},{from:r.to,insert:n.lineBreak+o.text});for(let a of r.ranges)s.push(y.range(a.anchor-l,a.head-l))}}return i.length?(e(n.update({changes:i,scrollIntoView:!0,selection:y.create(s,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const hy=({state:n,dispatch:e})=>hO(n,e,!1),cy=({state:n,dispatch:e})=>hO(n,e,!0);function cO(n,e,t){if(n.readOnly)return!1;let i=[];for(let s of mr(n))t?i.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):i.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});return e(n.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const fy=({state:n,dispatch:e})=>cO(n,e,!1),uy=({state:n,dispatch:e})=>cO(n,e,!0),dy=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(mr(e).map(({from:s,to:r})=>(s>0?s--:r{let r;if(n.lineWrapping){let o=n.lineBlockAt(s.head),l=n.coordsAtPos(s.head,s.assoc||1);l&&(r=o.bottom+n.documentTop-l.bottom+n.defaultLineHeight/2)}return n.moveVertically(s,!0,r)}).map(t);return n.dispatch({changes:t,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Oy(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=F(n).resolveInner(e),i=t.childBefore(e),s=t.childAfter(e),r;return i&&s&&i.to<=e&&s.from>=e&&(r=i.type.prop(X.closedBy))&&r.indexOf(s.name)>-1&&n.doc.lineAt(i.to).from==n.doc.lineAt(s.from).from&&!/\S/.test(n.sliceDoc(i.to,s.from))?{from:i.to,to:s.from}:null}const py=fO(!1),my=fO(!0);function fO(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(s=>{let{from:r,to:o}=s,l=e.doc.lineAt(r),a=!n&&r==o&&Oy(e,r);n&&(r=o=(o<=l.to?l:e.doc.lineAt(o)).to);let h=new Dn(e,{simulateBreak:r,simulateDoubleBreak:!!a}),c=cr(h,r);for(c==null&&(c=Ge(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));ol.from&&r{let s=[];for(let o=i.from;o<=i.to;){let l=n.doc.lineAt(o);l.number>t&&(i.empty||i.to>l.from)&&(e(l,s,i),t=l.number),o=l.to+1}let r=n.changes(s);return{changes:s,range:y.range(r.mapPos(i.anchor,1),r.mapPos(i.head,1))}})}const uO=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),i=new Dn(n,{overrideIndentation:r=>{let o=t[r];return o??-1}}),s=Hl(n,(r,o,l)=>{let a=cr(i,r.from);if(a==null)return;/\S/.test(r.text)||(a=0);let h=/^\s*/.exec(r.text)[0],c=Zi(n,a);(h!=c||l.fromn.readOnly?!1:(e(n.update(Hl(n,(t,i)=>{i.push({from:t.from,insert:n.facet(Yi)})}),{userEvent:"input.indent"})),!0),OO=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(Hl(n,(t,i)=>{let s=/^\s*/.exec(t.text)[0];if(!s)return;let r=Ge(s,n.tabSize),o=0,l=Zi(n,Math.max(0,r-ni(n)));for(;o(n.setTabFocusMode(),!0),by=[{key:"Ctrl-b",run:Il,shift:Nl,preventDefault:!0},{key:"Ctrl-f",run:jl,shift:Gl},{key:"Ctrl-p",run:Vd,shift:Kd},{key:"Ctrl-n",run:Yd,shift:Jd},{key:"Ctrl-a",run:NS,shift:KS},{key:"Ctrl-e",run:GS,shift:JS},{key:"Ctrl-d",run:Hs},{key:"Ctrl-h",run:Fs},{key:"Ctrl-k",run:aO},{key:"Ctrl-Alt-h",run:Fl},{key:"Ctrl-o",run:ly},{key:"Ctrl-t",run:ay},{key:"Ctrl-v",run:Fo}],Sy=[{key:"ArrowLeft",run:Il,shift:Nl,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Ad,shift:jd,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:_d,shift:nO,preventDefault:!0},{key:"ArrowRight",run:jl,shift:Gl,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Xd,shift:Nd,preventDefault:!0},{mac:"Cmd-ArrowRight",run:Bd,shift:sO,preventDefault:!0},{key:"ArrowUp",run:Vd,shift:Kd,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Nh,shift:Fh},{mac:"Ctrl-ArrowUp",run:Uh,shift:Ih},{key:"ArrowDown",run:Yd,shift:Jd,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Gh,shift:Hh},{mac:"Ctrl-ArrowDown",run:Fo,shift:jh},{key:"PageUp",run:Uh,shift:Ih},{key:"PageDown",run:Fo,shift:jh},{key:"Home",run:Ld,shift:iO,preventDefault:!0},{key:"Mod-Home",run:Nh,shift:Fh},{key:"End",run:zd,shift:tO,preventDefault:!0},{key:"Mod-End",run:Gh,shift:Hh},{key:"Enter",run:py},{key:"Mod-a",run:ey},{key:"Backspace",run:Fs,shift:Fs},{key:"Delete",run:Hs},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Fl},{key:"Mod-Delete",mac:"Alt-Delete",run:lO},{mac:"Mod-Backspace",run:ry},{mac:"Mod-Delete",run:oy}].concat(by.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),Kh=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:Md,shift:Gd},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Wd,shift:Fd},{key:"Alt-ArrowUp",run:hy},{key:"Shift-Alt-ArrowUp",run:fy},{key:"Alt-ArrowDown",run:cy},{key:"Shift-Alt-ArrowDown",run:uy},{key:"Escape",run:ny},{key:"Mod-Enter",run:my},{key:"Alt-l",mac:"Ctrl-l",run:ty},{key:"Mod-i",run:iy,preventDefault:!0},{key:"Mod-[",run:OO},{key:"Mod-]",run:dO},{key:"Mod-Alt-\\",run:uO},{key:"Shift-Mod-k",run:dy},{key:"Shift-Mod-\\",run:HS},{key:"Mod-/",run:CS},{key:"Alt-A",run:TS},{key:"Ctrl-m",mac:"Shift-Alt-m",run:gy}].concat(Sy),yy={key:"Tab",run:dO,shift:OO};class ky{constructor(e,t,i){this.from=e,this.to=t,this.diagnostic=i}}class Nt{constructor(e,t,i){this.diagnostics=e,this.panel=t,this.selected=i}static init(e,t,i){let s=e,r=i.facet(Zn).markerFilter;r&&(s=r(s,i));let o=A.set(s.map(l=>l.from==l.to||l.from==l.to-1&&i.doc.lineAt(l.from).to==l.from?A.widget({widget:new Ty(l),diagnostic:l}).range(l.from):A.mark({attributes:{class:"cm-lintRange cm-lintRange-"+l.severity+(l.markClass?" "+l.markClass:"")},diagnostic:l}).range(l.from,l.to)),!0);return new Nt(o,t,Ai(o))}}function Ai(n,e=null,t=0){let i=null;return n.between(t,1e9,(s,r,{spec:o})=>{if(!(e&&o.diagnostic!=e))return i=new ky(s,r,o.diagnostic),!1}),i}function xy(n,e){let t=e.pos,i=e.end||t,s=n.state.facet(Zn).hideOn(n,t,i);if(s!=null)return s;let r=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(o=>o.is(pO))||n.changes.touchesRange(r.from,Math.max(r.to,i)))}function wy(n,e){return n.field(Ve,!1)?e:e.concat(M.appendConfig.of(Xy))}const pO=M.define(),Kl=M.define(),mO=M.define(),Ve=ce.define({create(){return new Nt(A.none,null,null)},update(n,e){if(e.docChanged&&n.diagnostics.size){let t=n.diagnostics.map(e.changes),i=null,s=n.panel;if(n.selected){let r=e.changes.mapPos(n.selected.from,1);i=Ai(t,n.selected.diagnostic,r)||Ai(t,null,r)}!t.size&&s&&e.state.facet(Zn).autoPanel&&(s=null),n=new Nt(t,s,i)}for(let t of e.effects)if(t.is(pO)){let i=e.state.facet(Zn).autoPanel?t.value.length?Tn.open:null:n.panel;n=Nt.init(t.value,i,e.state)}else t.is(Kl)?n=new Nt(n.diagnostics,t.value?Tn.open:null,n.selected):t.is(mO)&&(n=new Nt(n.diagnostics,n.panel,t.value));return n},provide:n=>[yn.from(n,e=>e.panel),$.decorations.from(n,e=>e.diagnostics)]}),Qy=A.mark({class:"cm-lintRange cm-lintRange-active"});function Py(n,e,t){let{diagnostics:i}=n.state.field(Ve),s=[],r=2e8,o=0;i.between(e-(t<0?1:0),e+(t>0?1:0),(a,h,{spec:c})=>{e>=a&&e<=h&&(a==h||(e>a||t>0)&&(ebO(n,t,!1)))}const vy=n=>{let e=n.state.field(Ve,!1);(!e||!e.panel)&&n.dispatch({effects:wy(n.state,[Kl.of(!0)])});let t=Sn(n,Tn.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},Jh=n=>{let e=n.state.field(Ve,!1);return!e||!e.panel?!1:(n.dispatch({effects:Kl.of(!1)}),!0)},Cy=n=>{let e=n.state.field(Ve,!1);if(!e)return!1;let t=n.state.selection.main,i=e.diagnostics.iter(t.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==t.from&&i.to==t.to)?!1:(n.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},Zy=[{key:"Mod-Shift-m",run:vy,preventDefault:!0},{key:"F8",run:Cy}],Zn=T.define({combine(n){return Object.assign({sources:n.map(e=>e.source).filter(e=>e!=null)},dt(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?i=>e(i)||t(i):e:t}))}});function gO(n){let e=[];if(n)e:for(let{name:t}of n){for(let i=0;ir.toLowerCase()==s.toLowerCase())){e.push(s);continue e}}e.push("")}return e}function bO(n,e,t){var i;let s=t?gO(e.actions):[];return H("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},H("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(n):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((r,o)=>{let l=!1,a=u=>{if(u.preventDefault(),l)return;l=!0;let d=Ai(n.state.field(Ve).diagnostics,e);d&&r.apply(n,d.from,d.to)},{name:h}=r,c=s[o]?h.indexOf(s[o]):-1,f=c<0?h:[h.slice(0,c),H("u",h.slice(c,c+1)),h.slice(c+1)];return H("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${h}${c<0?"":` (access key "${s[o]})"`}.`},f)}),e.source&&H("div",{class:"cm-diagnosticSource"},e.source))}class Ty extends wt{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return H("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class ec{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=bO(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Tn{constructor(e){this.view=e,this.items=[];let t=s=>{if(s.keyCode==27)Jh(this.view),this.view.focus();else if(s.keyCode==38||s.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(s.keyCode==40||s.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(s.keyCode==36)this.moveSelection(0);else if(s.keyCode==35)this.moveSelection(this.items.length-1);else if(s.keyCode==13)this.view.focus();else if(s.keyCode>=65&&s.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:r}=this.items[this.selectedIndex],o=gO(r.actions);for(let l=0;l{for(let r=0;rJh(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Ve).selected;if(!e)return-1;for(let t=0;t{let h=-1,c;for(let f=i;fi&&(this.items.splice(i,h-i),s=!0)),t&&c.diagnostic==t.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),r=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),i++});i({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:o,panel:l})=>{let a=l.height/this.list.offsetHeight;o.topl.bottom&&(this.list.scrollTop+=(o.bottom-l.bottom)/a)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}sync(){let e=this.list.firstChild;function t(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)t();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Ve),i=Ai(t.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:mO.of(i)})}static open(e){return new Tn(e)}}function Ry(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function ds(n){return Ry(``,'width="6" height="3"')}const Ay=$.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:ds("#d11")},".cm-lintRange-warning":{backgroundImage:ds("orange")},".cm-lintRange-info":{backgroundImage:ds("#999")},".cm-lintRange-hint":{backgroundImage:ds("#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}}}),Xy=[Ve,$.decorations.compute([Ve],n=>{let{selected:e,panel:t}=n.field(Ve);return!e||!t||e.from==e.to?A.none:A.set([Qy.range(e.from,e.to)])}),A0(Py,{hideOn:xy}),Ay];var tc={};class Ks{constructor(e,t,i,s,r,o,l,a,h,c=0,f){this.p=e,this.stack=t,this.state=i,this.reducePos=s,this.pos=r,this.score=o,this.buffer=l,this.bufferBase=a,this.curContext=h,this.lookAhead=c,this.parent=f}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let s=e.parser.context;return new Ks(e,[],t,i,i,0,[],0,s?new ic(s,s.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 i=e>>19,s=e&65535,{parser:r}=this.p;this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[s])===null||t===void 0)&&t.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=h):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(s,a)}storeNode(e,t,i,s=4,r=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&o.buffer[l-4]==0&&o.buffer[l-1]>-1){if(t==i)return;if(o.buffer[l-2]>=t){o.buffer[l-2]=i;return}}}if(!r||this.pos==i)this.buffer.push(e,t,i,s);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0)for(;o>0&&this.buffer[o-2]>i;)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,s>4&&(s-=4);this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=i,this.buffer[o+3]=s}}shift(e,t,i,s){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=s,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,s,4);else{let r=e,{parser:o}=this.p;(s>this.pos||t<=o.maxNode)&&(this.pos=s,o.stateFlag(r,1)||(this.reducePos=s)),this.pushState(r,i),this.shiftContext(t,i),t<=o.maxNode&&this.buffer.push(t,i,s,4)}}apply(e,t,i,s){e&65536?this.reduce(e):this.shift(e,t,i,s)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let s=this.pos;this.reducePos=this.pos=s+e.length,this.pushState(t,s),this.buffer.push(i,s,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 i=e.buffer.slice(t),s=e.bufferBase+t;for(;e&&s==e.bufferBase;)e=e.parent;return new Ks(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,s,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new My(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(i==0)return!1;if(!(i&65536))return!0;t.reduce(i)}}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 s=[];for(let r=0,o;ra&1&&l==o)||s.push(t[r],o)}t=s}let i=[];for(let s=0;s>19,s=t&65535,r=this.stack.length-i*3;if(r<0||e.getGoto(this.stack[r],s,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}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=[],i=(s,r)=>{if(!t.includes(s))return t.push(s),e.allActions(s,o=>{if(!(o&393216))if(o&65536){let l=(o>>19)-r;if(l>1){let a=o&65535,h=this.stack.length-l*3;if(h>=0&&e.getGoto(this.stack[h],a,!1)>=0)return l<<19|65536|a}}else{let l=i(o,r+1);if(l!=null)return l}})};return i(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(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!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;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class ic{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class My{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=s}}class Js{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Js(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(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,this.index==0&&this.maybeNext()}fork(){return new Js(this.stack,this.pos,this.index)}}function sn(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let i=0,s=0;i=92&&o--,o>=34&&o--;let a=o-32;if(a>=46&&(a-=46,l=!0),r+=a,l)break;r*=46}t?t[s++]=r:t=new e(r)}return t}class $s{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const nc=new $s;class Wy{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=nc,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 i=this.range,s=this.rangeIndex,r=this.pos+e;for(;ri.to:r>=i.to;){if(s==this.ranges.length-1)return null;let o=this.ranges[++s];r+=o.from-i.to,i=o}return r}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,i,s;if(t>=0&&t=this.chunk2Pos&&il.to&&(this.chunk2=this.chunk2.slice(0,l.to-i)),s=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),s}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.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=nc,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&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 i="";for(let s of this.ranges){if(s.from>=t)break;s.to>e&&(i+=this.input.read(Math.max(s.from,e),Math.min(s.to,t)))}return i}}class wi{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;SO(this.data,e,t,this.id,i.data,i.tokenPrecTable)}}wi.prototype.contextual=wi.prototype.fallback=wi.prototype.extend=!1;class er{constructor(e,t,i){this.precTable=t,this.elseToken=i,this.data=typeof e=="string"?sn(e):e}token(e,t){let i=e.pos,s=0;for(;;){let r=e.next<0,o=e.resolveOffset(1,1);if(SO(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(r||s++,o==null)break;e.reset(o,e.token)}s&&(e.reset(i,e.token),e.acceptToken(this.elseToken,s))}}er.prototype.contextual=wi.prototype.fallback=wi.prototype.extend=!1;class Je{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function SO(n,e,t,i,s,r){let o=0,l=1<0){let O=n[d];if(a.allows(O)&&(e.token.value==-1||e.token.value==O||Ey(O,e.token.value,s,r))){e.acceptToken(O);break}}let c=e.next,f=0,u=n[o+2];if(e.next<0&&u>f&&n[h+u*3-3]==65535){o=n[h+u*3-1];continue e}for(;f>1,O=h+d+(d<<1),m=n[O],g=n[O+1]||65536;if(c=g)f=d+1;else{o=n[O+2],e.advance();continue e}}break}}function sc(n,e,t){for(let i=e,s;(s=n[i])!=65535;i++)if(s==t)return i-e;return-1}function Ey(n,e,t,i){let s=sc(t,i,e);return s<0||sc(t,i,n)e)&&!i.type.isError)return t<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(n.length,Math.max(i.from+1,e+25));if(t<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return t<0?0:n.length}}let Vy=class{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?rc(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?rc(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(ee)return this.nextStart=o,null;if(r instanceof D){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+r.length}}};class Yy{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new $s)}getActions(e){let t=0,i=null,{parser:s}=e.p,{tokenizers:r}=s,o=s.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,a=0;for(let h=0;hf.end+25&&(a=Math.max(f.lookAhead,a)),f.value!=0)){let u=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!c.extend&&(i=f,t>u))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),!i&&e.pos==this.stream.end&&(i=new $s,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new $s,{pos:i,p:s}=e;return t.start=i,t.end=Math.min(i+1,s.stream.end),t.value=i==s.stream.end?s.parser.eofTerm:0,t}updateCachedToken(e,t,i){let s=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(s,e),i),e.value>-1){let{parser:r}=i.p;for(let o=0;o=0&&i.p.parser.dialect.allows(l>>1)){l&1?e.extended=l>>1:e.value=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(s+1)}putAction(e,t,i,s){for(let r=0;re.bufferLength*4?new Vy(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,i=this.stacks=[],s,r;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;ot)i.push(l);else{if(this.advanceStack(l,i,e))continue;{s||(s=[],r=[]),s.push(l);let a=this.tokens.getMainToken(l);r.push(a.value,a.end)}}break}}if(!i.length){let o=s&&zy(s);if(o)return Ae&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Ae&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&s){let o=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,r,i);if(o)return Ae&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(i.length>o)for(i.sort((l,a)=>a.score-l.score);i.length>o;)i.pop();i.some(l=>l.reducePos>t)&&this.recovering--}else if(i.length>1){e:for(let o=0;o500&&h.buffer.length>500)if((l.score-h.score||l.buffer.length-h.buffer.length)>0)i.splice(a--,1);else{i.splice(o--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let o=1;o ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,c=h?e.curContext.hash:0;for(let f=this.fragments.nodeAt(s);f;){let u=this.parser.nodeSet.types[f.type.id]==f.type?r.getGoto(e.state,f.type.id):-1;if(u>-1&&f.length&&(!h||(f.prop(X.contextHash)||0)==c))return e.useNode(f,u),Ae&&console.log(o+this.stackID(e)+` (via reuse of ${r.getName(f.type.id)})`),!0;if(!(f instanceof D)||f.children.length==0||f.positions[0]>0)break;let d=f.children[0];if(d instanceof D&&f.positions[0]==0)f=d;else break}}let l=r.stateSlot(e.state,4);if(l>0)return e.reduce(l),Ae&&console.log(o+this.stackID(e)+` (via always-reduce ${r.getName(l&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let h=0;hs?t.push(O):i.push(O)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return oc(e,t),!0}}runRecovery(e,t,i){let s=null,r=!1;for(let o=0;o ":"";if(l.deadEnd&&(r||(r=!0,l.restart(),Ae&&console.log(c+this.stackID(l)+" (restarted)"),this.advanceFully(l,i))))continue;let f=l.split(),u=c;for(let d=0;f.forceReduce()&&d<10&&(Ae&&console.log(u+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,i));d++)Ae&&(u=this.stackID(f)+" -> ");for(let d of l.recoverByInsert(a))Ae&&console.log(c+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,i);this.stream.end>l.pos?(h==l.pos&&(h++,a=0),l.recoverByDelete(a,h),Ae&&console.log(c+this.stackID(l)+` (via recover-delete ${this.parser.getName(a)})`),oc(l,i)):(!s||s.scoren;class yO{constructor(e){this.start=e.start,this.shift=e.shift||_r,this.reduce=e.reduce||_r,this.reuse=e.reuse||_r,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class ri extends ar{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let l=0;le.topRules[l][1]),s=[];for(let l=0;l=0)r(c,a,l[h++]);else{let f=l[h+-c];for(let u=-c;u>0;u--)r(l[h++],a,f);h++}}}this.nodeSet=new Vi(t.map((l,a)=>le.define({name:a>=this.minRepeatTerm?void 0:l,id:a,props:s[a],top:i.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=vu;let o=sn(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new wi(o,l):l),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,i){let s=new Dy(this,e,t,i);for(let r of this.wrappers)s=r(s,e,t,i);return s}getGoto(e,t,i=!1){let s=this.goto;if(t>=s[0])return-1;for(let r=s[t+1];;){let o=s[r++],l=o&1,a=s[r++];if(l&&i)return a;for(let h=r+(o>>1);r0}validAction(e,t){return!!this.allActions(e,i=>i==t?!0:null)}allActions(e,t){let i=this.stateSlot(e,4),s=i?t(i):void 0;for(let r=this.stateSlot(e,1);s==null;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=pt(this.data,r+2);else break;s=t(pt(this.data,r+1))}return s}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=pt(this.data,i+2);else break;if(!(this.data[i+2]&1)){let s=this.data[i+1];t.some((r,o)=>o&1&&r==s)||t.push(this.data[i],s)}}return t}configure(e){let t=Object.assign(Object.create(ri.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(i=>{let s=e.tokenizers.find(r=>r.from==i);return s?s.to:i})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((i,s)=>{let r=e.specializers.find(l=>l.from==i.external);if(!r)return i;let o=Object.assign(Object.assign({},i),{external:r.to});return t.specializers[s]=lc(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(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 t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map(()=>!1);if(e)for(let r of e.split(" ")){let o=t.indexOf(r);o>=0&&(i[o]=!0)}let s=null;for(let r=0;ri)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scoren.external(t,i)<<1|e}return n.get}const Ly=312,ac=1,_y=2,By=3,Uy=4,Iy=313,jy=315,Ny=316,Gy=5,Fy=6,Hy=0,Ho=[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],kO=125,Ky=59,Ko=47,Jy=42,ek=43,tk=45,ik=60,nk=44,sk=63,rk=46,ok=new yO({start:!1,shift(n,e){return e==Gy||e==Fy||e==jy?n:e==Ny},strict:!1}),lk=new Je((n,e)=>{let{next:t}=n;(t==kO||t==-1||e.context)&&n.acceptToken(Iy)},{contextual:!0,fallback:!0}),ak=new Je((n,e)=>{let{next:t}=n,i;Ho.indexOf(t)>-1||t==Ko&&((i=n.peek(1))==Ko||i==Jy)||t!=kO&&t!=Ky&&t!=-1&&!e.context&&n.acceptToken(Ly)},{contextual:!0}),hk=new Je((n,e)=>{let{next:t}=n;if(t==ek||t==tk){if(n.advance(),t==n.next){n.advance();let i=!e.context&&e.canShift(ac);n.acceptToken(i?ac:_y)}}else t==sk&&n.peek(1)==rk&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(By))},{contextual:!0});function Br(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const ck=new Je((n,e)=>{if(n.next!=ik||!e.dialectEnabled(Hy)||(n.advance(),n.next==Ko))return;let t=0;for(;Ho.indexOf(n.next)>-1;)n.advance(),t++;if(Br(n.next,!0)){for(n.advance(),t++;Br(n.next,!1);)n.advance(),t++;for(;Ho.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==nk)return;for(let i=0;;i++){if(i==7){if(!Br(n.next,!0))return;break}if(n.next!="extends".charCodeAt(i))break;n.advance(),t++}}n.acceptToken(Uy,-t)}),fk=oi({"get set async static":p.modifier,"for while do if else switch try catch finally return throw break continue default case":p.controlKeyword,"in of await yield void typeof delete instanceof":p.operatorKeyword,"let var const using function class extends":p.definitionKeyword,"import export from":p.moduleKeyword,"with debugger as new":p.keyword,TemplateString:p.special(p.string),super:p.atom,BooleanLiteral:p.bool,this:p.self,null:p.null,Star:p.modifier,VariableName:p.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":p.function(p.variableName),VariableDefinition:p.definition(p.variableName),Label:p.labelName,PropertyName:p.propertyName,PrivatePropertyName:p.special(p.propertyName),"CallExpression/MemberExpression/PropertyName":p.function(p.propertyName),"FunctionDeclaration/VariableDefinition":p.function(p.definition(p.variableName)),"ClassDeclaration/VariableDefinition":p.definition(p.className),PropertyDefinition:p.definition(p.propertyName),PrivatePropertyDefinition:p.definition(p.special(p.propertyName)),UpdateOp:p.updateOperator,"LineComment Hashbang":p.lineComment,BlockComment:p.blockComment,Number:p.number,String:p.string,Escape:p.escape,ArithOp:p.arithmeticOperator,LogicOp:p.logicOperator,BitOp:p.bitwiseOperator,CompareOp:p.compareOperator,RegExp:p.regexp,Equals:p.definitionOperator,Arrow:p.function(p.punctuation),": Spread":p.punctuation,"( )":p.paren,"[ ]":p.squareBracket,"{ }":p.brace,"InterpolationStart InterpolationEnd":p.special(p.brace),".":p.derefOperator,", ;":p.separator,"@":p.meta,TypeName:p.typeName,TypeDefinition:p.definition(p.typeName),"type enum interface implements namespace module declare":p.definitionKeyword,"abstract global Privacy readonly override":p.modifier,"is keyof unique infer":p.operatorKeyword,JSXAttributeValue:p.attributeValue,JSXText:p.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":p.angleBracket,"JSXIdentifier JSXNameSpacedName":p.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":p.attributeName,"JSXBuiltin/JSXIdentifier":p.standard(p.tagName)}),uk={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},dk={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},Ok={__proto__:null,"<":187},pk=ri.deserialize({version:14,states:"$@QO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ?NdO'#CiO+RO!bO'#CjO+aO#tO'#CjO+oO!0LbO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DwO0fQ^O'#EPOOQ?Mr'#EX'#EXO1PQWO'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQWO'#GpO1dQWO'#ElO1iQWO'#ElO3hQ?NdO'#JmO6[Q?NdO'#JnO6uQWO'#F[O6zQ&jO'#FsOOQ?Mr'#Fe'#FeO7VO,YO'#FeO7eQ7[O'#FzO9RQWO'#FyOOQ?Mr'#Jn'#JnOOQ?Mp'#Jm'#JmO9WQWO'#GtOOQU'#KZ'#KZO9cQWO'#IUO9hQ?MxO'#IVOOQU'#JZ'#JZOOQU'#IZ'#IZQ`Q^OOO`Q^OOO9pQMnO'#DsO9wQ^O'#D{O:OQ^O'#D}O9^QWO'#GpO:VQ7[O'#CoO:eQWO'#EkO:pQWO'#EvO:uQ7[O'#FdO;dQWO'#GpOOQO'#K['#K[O;iQWO'#K[O;wQWO'#GxO;wQWO'#GyO;wQWO'#G{O9^QWO'#HOOVQWO'#CeO>gQWO'#H_O>oQWO'#HeO>oQWO'#HgO`Q^O'#HiO>oQWO'#HkO>oQWO'#HnO>tQWO'#HtO>yQ?MyO'#HzO%[Q^O'#H|O?UQ?MyO'#IOO?aQ?MyO'#IQO9hQ?MxO'#ISO?lQ?NdO'#CiO@nQ`O'#DiQOQWOOO%[Q^O'#D}OAUQWO'#EQO:VQ7[O'#EkOAaQWO'#EkOAlQpO'#FdOOQU'#Cg'#CgOOQ?Mp'#Dn'#DnOOQ?Mp'#Jq'#JqO%[Q^O'#JqOOQO'#Jt'#JtOOQO'#Id'#IdOBlQ`O'#EdOOQ?Mp'#Ec'#EcOOQ?Mp'#Jx'#JxOChQ?NQO'#EdOCrQ`O'#ETOOQO'#Js'#JsODWQ`O'#JtOEeQ`O'#ETOCrQ`O'#EdPErO#@ItO'#CbPOOO)CDx)CDxOOOO'#I['#I[OE}O!bO,59UOOQ?Mr,59U,59UOOOO'#I]'#I]OF]O#tO,59UO%[Q^O'#D`OOOO'#I_'#I_OFkO!0LbO,59xOOQ?Mr,59x,59xOFyQ^O'#I`OG^QWO'#JoOI]QrO'#JoO+}Q^O'#JoOIdQWO,5:OOIzQWO'#EmOJXQWO'#KOOJdQWO'#J}OJdQWO'#J}OJlQWO,5;ZOJqQWO'#J|OOQ?Mv,5:Z,5:ZOJxQ^O,5:ZOLvQ?NdO,5:cOMgQWO,5:kONQQ?MxO'#J{ONXQWO'#JzO9WQWO'#JzONmQWO'#JzONuQWO,5;YONzQWO'#JzO!#PQrO'#JnOOQ?Mr'#Ci'#CiO%[Q^O'#EPO!#oQrO,5:pOOQQ'#Ju'#JuOOQO-EpOOQU'#Jc'#JcOOQU,5>q,5>qOOQU-EtQWO'#HTO9^QWO'#HVO!DgQWO'#HVO:VQ7[O'#HXO!DlQWO'#HXOOQU,5=m,5=mO!DqQWO'#HYO!ESQWO'#CoO!EXQWO,59PO!EcQWO,59PO!GhQ^O,59POOQU,59P,59PO!GxQ?MxO,59PO%[Q^O,59PO!JTQ^O'#HaOOQU'#Hb'#HbOOQU'#Hc'#HcO`Q^O,5=yO!JkQWO,5=yO`Q^O,5>PO`Q^O,5>RO!JpQWO,5>TO`Q^O,5>VO!JuQWO,5>YO!JzQ^O,5>`OOQU,5>f,5>fO%[Q^O,5>fO9hQ?MxO,5>hOOQU,5>j,5>jO# UQWO,5>jOOQU,5>l,5>lO# UQWO,5>lOOQU,5>n,5>nO# rQ`O'#D[O%[Q^O'#JqO# |Q`O'#JqO#!kQ`O'#DjO#!|Q`O'#DjO#%_Q^O'#DjO#%fQWO'#JpO#%nQWO,5:TO#%sQWO'#EqO#&RQWO'#KPO#&ZQWO,5;[O#&`Q`O'#DjO#&mQ`O'#ESOOQ?Mr,5:l,5:lO%[Q^O,5:lO#&tQWO,5:lO>tQWO,5;VO!A}Q`O,5;VO!BVQ7[O,5;VO:VQ7[O,5;VO#&|QWO,5@]O#'RQ(CYO,5:pOOQO-EzO+}Q^O,5>zOOQO,5?Q,5?QO#*ZQ^O'#I`OOQO-E<^-E<^O#*hQWO,5@ZO#*pQrO,5@ZO#*wQWO,5@iOOQ?Mr1G/j1G/jO%[Q^O,5@jO#+PQWO'#IfOOQO-EuQ?NdO1G0|O#>|Q?NdO1G0|O#AZQ07bO'#CiO#CUQ07bO1G1_O#C]Q07bO'#JnO#CpQ?NdO,5?WOOQ?Mp-EoQWO1G3oO$3VQ^O1G3qO$7ZQ^O'#HpOOQU1G3t1G3tO$7hQWO'#HvO>tQWO'#HxOOQU1G3z1G3zO$7pQ^O1G3zO9hQ?MxO1G4QOOQU1G4S1G4SOOQ?Mp'#G]'#G]O9hQ?MxO1G4UO9hQ?MxO1G4WO$;wQWO,5@]O!(oQ^O,5;]O9WQWO,5;]O>tQWO,5:UO!(oQ^O,5:UO!A}Q`O,5:UO$;|Q07bO,5:UOOQO,5;],5;]O$tQWO1G0qO!A}Q`O1G0qO!BVQ7[O1G0qOOQ?Mp1G5w1G5wO!ArQ?MxO1G0ZOOQO1G0j1G0jO%[Q^O1G0jO$=aQ?MxO1G0jO$=lQ?MxO1G0jO!A}Q`O1G0ZOCrQ`O1G0ZO$=zQ?MxO1G0jOOQO1G0Z1G0ZO$>`Q?NdO1G0jPOOO-EjQpO,5rQrO1G4fOOQO1G4l1G4lO%[Q^O,5>zO$>|QWO1G5uO$?UQWO1G6TO$?^QrO1G6UO9WQWO,5?QO$?hQ?NdO1G6RO%[Q^O1G6RO$?xQ?MxO1G6RO$@ZQWO1G6QO$@ZQWO1G6QO9WQWO1G6QO$@cQWO,5?TO9WQWO,5?TOOQO,5?T,5?TO$@wQWO,5?TO$(PQWO,5?TOOQO-E[OOQU,5>[,5>[O%[Q^O'#HqO%8mQWO'#HsOOQU,5>b,5>bO9WQWO,5>bOOQU,5>d,5>dOOQU7+)f7+)fOOQU7+)l7+)lOOQU7+)p7+)pOOQU7+)r7+)rO%8rQ`O1G5wO%9WQ07bO1G0wO%9bQWO1G0wOOQO1G/p1G/pO%9mQ07bO1G/pO>tQWO1G/pO!(oQ^O'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQWO7+&]O!A}Q`O7+&]OOQO7+%u7+%uO$>`Q?NdO7+&UOOQO7+&U7+&UO%[Q^O7+&UO%9wQ?MxO7+&UO!ArQ?MxO7+%uO!A}Q`O7+%uO%:SQ?MxO7+&UO%:bQ?NdO7++mO%[Q^O7++mO%:rQWO7++lO%:rQWO7++lOOQO1G4o1G4oO9WQWO1G4oO%:zQWO1G4oOOQQ7+%z7+%zO#&wQWO<|O%[Q^O,5>|OOQO-E<`-E<`O%FwQWO1G5xOOQ?Mr<]OOQU,5>_,5>_O&8uQWO1G3|O9WQWO7+&cO!(oQ^O7+&cOOQO7+%[7+%[O&8zQ07bO1G6UO>tQWO7+%[OOQ?Mr<tQWO<`Q?NdO<pQ?NdO,5?_O&@xQ?NdO7+'zO&CWQrO1G4hO&CbQ07bO7+&^O&EcQ07bO,5=UO&GgQ07bO,5=WO&GwQ07bO,5=UO&HXQ07bO,5=WO&HiQ07bO,59rO&JlQ07bO,5tQWO7+)hO'(OQWO<`Q?NdOAN?[OOQOAN>{AN>{O%[Q^OAN?[OOQO<`Q?NdOG24vO#&wQWOLD,nOOQULD,nLD,nO!&_Q7[OLD,nO'5TQrOLD,nO'5[Q07bO7+'xO'6}Q07bO,5?]O'8}Q07bO,5?_O':}Q07bO7+'zO'kOh%VOk+aO![']O%f+`O~O!d+cOa(WX![(WX'u(WX!Y(WX~Oa%lO![XO'u%lO~Oh%VO!i%cO~Oh%VO!i%cO(O%eO~O!d#vO#h(tO~Ob+nO%g+oO(O+kO(QTO(TUO!Z)TP~O!Y+pO`)SX~O[+tO~O`+uO~O![%}O(O%eO(P!lO`)SP~Oh%VO#]+zO~Oh%VOk+}O![$|O~O![,PO~O},RO![XO~O%k%tO~O!u,WO~Oe,]O~Ob,^O(O#nO(QTO(TUO!Z)RP~Oe%{O~O%g!QO(O&WO~P=RO[,cO`,bO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(QTO(TUO([VO(j[O(yiO~O![!eO!r!gO$V!kO(O!dO~P!EkO`,bOa%lO'u%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oa,hO!rwO#t!OO%i!OO%j!OO%k!OO~P!HTO!i&lO~O&Y,nO~O![,pO~O&k,rO&m,sOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(O&ha(Q&ha(T&ha([&ha(j&ha(y&ha!Z&ha&a&hab&ha&f&ha~O(O,xO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# ZO!d,}O#],|Oh(eX!Y#eX!Y(eX!Z#eX!Z(eX!d(eX!i(eX~Oh%VO!d-PO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(QTO(TUO(`!mO~OP;POQ;POSfOdkOg'XX!Y'XX~P!+hO!Y.wOg(ka~OSfO![3uO$c3vO~O!Z3zO~Os3{O~P#.aOa$lq!Y$lq'u$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9mO!V3|O~P#.aO})zO!P){O(u%POk'ea(t'ea!Y'ea#]'ea~Og'ea#}'ea~P%)nO})zO!P){Ok'ga(t'ga(u'ga!Y'ga#]'ga~Og'ga#}'ga~P%*aO(m$YO~P#.aO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/gO(OQ#>g#@V#@e#@l#BR#Ba#C|#D[#Db#Dh#Dn#Dx#EO#EU#E`#Er#ExPPPPPPPPPP#FOPPPPPPP#Fs#Iz#KZ#Kb#KjPPP$!sP$!|$%t$,^$,a$,d$-P$-S$-Z$-cP$-i$-lP$.Y$.^$/U$0d$0i$1PPP$1U$1[$1`P$1c$1g$1k$2a$2x$3a$3e$3h$3k$3q$3t$3x$3|R!|RoqOXst!Z#d%k&o&q&r&t,k,p1|2PY!vQ']-]1a5eQ%rvQ%zyQ&R|Q&g!VS'T!e-TQ'c!iS'i!r!yU*e$|*V*jQ+i%{Q+v&TQ,[&aQ-Z'[Q-e'dQ-m'jQ0R*lQ1k,]R;v;T%QdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V,h,k,p-a-i-w-}.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3^5b5m5}6O6R6f8R8X8h8rS#q];Q!r)Z$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{ < 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 : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < 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 InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression 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:376,context:ok,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[fk],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!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#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Rp(U!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$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(RpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(RpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Rp(U!b'w0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(S#S$h&j'x0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Rp(U!b'x0/lOY%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)3p/x`$h&j!m),Q(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Rp(U!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'At3l_(Q':f$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(U!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Rp(U!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(U!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(RpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(RpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Rp(U!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(U!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(U!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(U!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(U!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(U!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Rp(U!bp'9tOY%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'Ad#?rd$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Rp(U!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)[#Jv_al$h&j(Rp(U!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%Z04f#LS^h#)`#O-uk[n]||-1},{term:338,get:n=>dk[n]||-1},{term:92,get:n=>Ok[n]||-1}],tokenPrec:14749}),xO=[Pe("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Pe("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Pe("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Pe("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Pe("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Pe(`try { +`);i>-1&&(t=t.slice(0,i))}return e+t.length<=this.to?t:t.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,t=this.lineAfter(e),i=e+t.length;for(let s=this.rangeIndex;;){let r=this.ranges[s].to;if(r>=i||(t=t.slice(0,r-(i-t.length)),s++,s==this.ranges.length))break;let o=this.ranges[s].from,l=this.lineAfter(o);t+=l,i=o+l.length}return{line:t,end:i}}skipGapsTo(e,t,i){for(;;){let s=this.ranges[this.rangeIndex].to,r=e+t;if(i>0?s>r:s>=r)break;let o=this.ranges[++this.rangeIndex].from;t+=o-s}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){r=this.skipGapsTo(t,r,1),t+=r;let o=this.chunk.length;r=this.skipGapsTo(i,r,-1),i+=r,s+=this.chunk.length-o}return this.chunk.push(e,t,i,s),r}parseLine(e){let{line:t,end:i}=this.nextLine(),s=0,{streamParser:r}=this.lang,o=new Ju(t,e?e.state.tabSize:4,e?ni(e.state):2);if(o.eol())r.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=td(r.token,o,this.state);if(l&&(s=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,4,s)),o.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPose.start)return s}throw new Error("Stream parser failed to advance stream.")}const Rl=Object.create(null),wn=[oe.none],e1=new Vi(wn),Rh=[],Ah=Object.create(null),id=Object.create(null);for(let[n,e]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"]])id[n]=sd(Rl,e);class nd{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),id)}resolve(e){return e?this.table[e]||(this.table[e]=sd(this.extra,e)):0}}const t1=new nd(Rl);function Wr(n,e){Rh.indexOf(n)>-1||(Rh.push(n),console.warn(e))}function sd(n,e){let t=[];for(let l of e.split(" ")){let a=[];for(let h of l.split(".")){let c=n[h]||p[h];c?typeof c=="function"?a.length?a=a.map(c):Wr(h,`Modifier ${h} used at start of tag`):a.length?Wr(h,`Tag ${h} used as modifier`):a=Array.isArray(c)?c:[c]:Wr(h,`Unknown highlighting tag ${h}`)}for(let h of a)t.push(h)}if(!t.length)return 0;let i=e.replace(/ /g,"_"),s=i+" "+t.map(l=>l.id),r=Ah[s];if(r)return r.id;let o=Ah[s]=oe.define({id:wn.length,name:i,props:[oi({[i]:t})]});return wn.push(o),o.id}function i1(n){let e=oe.define({id:wn.length,name:"Document",props:[Xt.add(()=>n)],top:!0});return wn.push(e),e}ee.RTL,ee.LTR;class Al{constructor(e,t,i){this.state=e,this.pos=t,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let t=F(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),i=Math.max(t.from,this.pos-250),s=t.text.slice(i-t.from,this.pos-t.from),r=s.search(od(e,!1));return r<0?null:{from:i+r,to:this.pos,text:s.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(e,t){e=="abort"&&this.abortListeners&&this.abortListeners.push(t)}}function Xh(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function n1(n){let e=Object.create(null),t=Object.create(null);for(let{label:s}of n){e[s[0]]=!0;for(let r=1;rtypeof s=="string"?{label:s}:s),[t,i]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:n1(e);return s=>{let r=s.matchBefore(i);return r||s.explicit?{from:r?r.from:s.pos,options:e,validFor:t}:null}}function s1(n,e){return t=>{for(let i=F(t.state).resolveInner(t.pos,-1);i;i=i.parent){if(n.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(t)}}class Mh{constructor(e,t,i,s){this.completion=e,this.source=t,this.match=i,this.score=s}}function Mt(n){return n.selection.main.from}function od(n,e){var t;let{source:i}=n,s=e&&i[0]!="^",r=i[i.length-1]!="$";return!s&&!r?n:new RegExp(`${s?"^":""}(?:${i})${r?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const Xl=xt.define();function r1(n,e,t,i){let{main:s}=n.selection,r=t-s.from,o=i-s.from;return Object.assign(Object.assign({},n.changeByRange(l=>l!=s&&t!=i&&n.sliceDoc(l.from+r,l.from+o)!=n.sliceDoc(t,i)?{range:l}:{changes:{from:l.from+r,to:i==s.from?l.to:l.from+o,insert:e},range:y.cursor(l.from+r+e.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}const Wh=new WeakMap;function o1(n){if(!Array.isArray(n))return n;let e=Wh.get(n);return e||Wh.set(n,e=rd(n)),e}const Ls=M.define(),Qn=M.define();class l1{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=48&&k<=57||k>=97&&k<=122?2:k>=65&&k<=90?1:0:(C=cl(k))!=C.toLowerCase()?1:C!=C.toUpperCase()?2:0;(!S||v==1&&g||w==0&&v!=0)&&(t[f]==k||i[f]==k&&(u=!0)?o[f++]=S:o.length&&(b=!1)),w=v,S+=ze(k)}return f==a&&o[0]==0&&b?this.result(-100+(u?-200:0),o,e):d==a&&O==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):d==a?this.ret(-900-e.length,[O,m]):f==a?this.result(-100+(u?-200:0)+-700+(b?0:-1100),o,e):t.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,i){let s=[],r=0;for(let o of t){let l=o+(this.astral?ze(ue(i,o)):1);r&&s[r-1]==o?s[r-1]=l:(s[r++]=o,s[r++]=l)}return this.ret(e-i.length,s)}}class a1{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:h1,filterStrict:!1,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)=>i=>Eh(e(i),t(i)),optionClass:(e,t)=>i=>Eh(e(i),t(i)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function Eh(n,e){return n?e?n+" "+e:n:e}function h1(n,e,t,i,s,r){let o=n.textDirection==ee.RTL,l=o,a=!1,h="top",c,f,u=e.left-s.left,d=s.right-e.right,O=i.right-i.left,m=i.bottom-i.top;if(l&&u=m||S>e.top?c=t.bottom-e.top:(h="bottom",c=e.bottom-t.top)}let g=(e.bottom-e.top)/r.offsetHeight,b=(e.right-e.left)/r.offsetWidth;return{style:`${h}: ${c/g}px; max-width: ${f/b}px`,class:"cm-completionInfo-"+(a?o?"left-narrow":"right-narrow":l?"left":"right")}}function c1(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),t.type&&i.classList.add(...t.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(t,i,s,r){let o=document.createElement("span");o.className="cm-completionLabel";let l=t.displayLabel||t.label,a=0;for(let h=0;ha&&o.appendChild(document.createTextNode(l.slice(a,c)));let u=o.appendChild(document.createElement("span"));u.appendChild(document.createTextNode(l.slice(c,f))),u.className="cm-completionMatchedText",a=f}return at.position-i.position).map(t=>t.render)}function Er(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let s=Math.floor(e/t);return{from:s*t,to:(s+1)*t}}let i=Math.floor((n-e)/t);return{from:n-(i+1)*t,to:n-i*t}}class f1{constructor(e,t,i){this.view=e,this.stateField=t,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:a=>this.placeInfo(a),key:this},this.space=null,this.currentClass="";let s=e.state.field(t),{options:r,selected:o}=s.open,l=e.state.facet(pe);this.optionContent=c1(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=Er(r.length,o,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",a=>{let{options:h}=e.state.field(t).open;for(let c=a.target,f;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(f=/-(\d+)$/.exec(c.id))&&+f[1]{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(pe).closeOnBlur&&a.relatedTarget!=e.contentDOM&&e.dispatch({effects:Qn.of(null)})}),this.showOptions(r,s.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 i=e.state.field(this.stateField),s=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=s){let{options:r,selected:o,disabled:l}=i.open;(!s.open||s.open.options!=r)&&(this.range=Er(r.length,o,e.state.facet(pe).maxRenderedOptions),this.showOptions(r,i.id)),this.updateSel(),l!=((t=s.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of t.split(" "))i&&this.dom.classList.add(i);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.to)&&(this.range=Er(t.options.length,t.selected,this.view.state.facet(pe).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:i}=t.options[t.selected],{info:s}=i;if(!s)return;let r=typeof s=="string"?document.createTextNode(s):s(i);if(!r)return;"then"in r?r.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,i)}).catch(o=>Ze(this.view.state,o,"completion info")):this.addInfoPane(r,i)}}addInfoPane(e,t){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:s,destroy:r}=e;i.appendChild(s),this.infoDestroy=r||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let i=this.list.firstChild,s=this.range.from;i;i=i.nextSibling,s++)i.nodeName!="LI"||!i.id?s--:s==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),t=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return t&&d1(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),r=this.space;if(!r){let o=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return s.top>Math.min(r.bottom,t.bottom)-10||s.bottomi.from||i.from==0))if(r=u,typeof h!="string"&&h.header)s.appendChild(h.header(h));else{let d=s.appendChild(document.createElement("completion-section"));d.textContent=u}}const c=s.appendChild(document.createElement("li"));c.id=t+"-"+o,c.setAttribute("role","option");let f=this.optionClass(l);f&&(c.className=f);for(let u of this.optionContent){let d=u(l,this.view.state,this.view,a);d&&c.appendChild(d)}}return i.from&&s.classList.add("cm-completionListIncompleteTop"),i.tonew f1(t,n,e)}function d1(n,e){let t=n.getBoundingClientRect(),i=e.getBoundingClientRect(),s=t.height/n.offsetHeight;i.topt.bottom&&(n.scrollTop+=(i.bottom-t.bottom)/s)}function Vh(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function O1(n,e){let t=[],i=null,s=h=>{t.push(h);let{section:c}=h.completion;if(c){i||(i=[]);let f=typeof c=="string"?c:c.name;i.some(u=>u.name==f)||i.push(typeof c=="string"?{name:f}:c)}},r=e.facet(pe);for(let h of n)if(h.hasResult()){let c=h.result.getMatch;if(h.result.filter===!1)for(let f of h.result.options)s(new Mh(f,h.source,c?c(f):[],1e9-t.length));else{let f=e.sliceDoc(h.from,h.to),u,d=r.filterStrict?new a1(f):new l1(f);for(let O of h.result.options)if(u=d.match(O.label)){let m=O.displayLabel?c?c(O,u.matched):[]:u.matched;s(new Mh(O,h.source,m,u.score+(O.boost||0)))}}}if(i){let h=Object.create(null),c=0,f=(u,d)=>{var O,m;return((O=u.rank)!==null&&O!==void 0?O:1e9)-((m=d.rank)!==null&&m!==void 0?m:1e9)||(u.namef.score-c.score||a(c.completion,f.completion))){let c=h.completion;!l||l.label!=c.label||l.detail!=c.detail||l.type!=null&&c.type!=null&&l.type!=c.type||l.apply!=c.apply||l.boost!=c.boost?o.push(h):Vh(h.completion)>Vh(l)&&(o[o.length-1]=h),l=h.completion}return o}class pi{constructor(e,t,i,s,r,o){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=s,this.selected=r,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new pi(this.options,Yh(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,i,s,r){let o=O1(e,t);if(!o.length)return s&&e.some(a=>a.state==1)?new pi(s.options,s.attrs,s.tooltip,s.timestamp,s.selected,!0):null;let l=t.facet(pe).selectOnOpen?0:-1;if(s&&s.selected!=l&&s.selected!=-1){let a=s.options[s.selected].completion;for(let h=0;hh.hasResult()?Math.min(a,h.from):a,1e8),create:y1,above:r.aboveCursor},s?s.timestamp:Date.now(),l,!1)}map(e){return new pi(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class _s{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new _s(b1,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,i=t.facet(pe),r=(i.override||t.languageDataAt("autocomplete",Mt(t)).map(o1)).map(l=>(this.active.find(h=>h.source==l)||new ke(l,this.active.some(h=>h.state!=0)?1:0)).update(e,i));r.length==this.active.length&&r.every((l,a)=>l==this.active[a])&&(r=this.active);let o=this.open;o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!p1(r,this.active)?o=pi.build(r,t,this.id,o,i):o&&o.disabled&&!r.some(l=>l.state==1)&&(o=null),!o&&r.every(l=>l.state!=1)&&r.some(l=>l.hasResult())&&(r=r.map(l=>l.hasResult()?new ke(l.source,0):l));for(let l of e.effects)l.is(ad)&&(o=o&&o.setSelected(l.value,this.id));return r==this.active&&o==this.open?this:new _s(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?m1:g1}}function p1(n,e){if(n==e)return!0;for(let t=0,i=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const b1=[];function Bo(n,e){if(n.isUserEvent("input.complete")){let t=n.annotation(Xl);if(t&&e.activateOnCompletion(t))return"input"}return n.isUserEvent("input.type")?"input":n.isUserEvent("delete.backward")?"delete":null}class ke{constructor(e,t,i=-1){this.source=e,this.state=t,this.explicitPos=i}hasResult(){return!1}update(e,t){let i=Bo(e,t),s=this;i?s=s.handleUserEvent(e,i,t):e.docChanged?s=s.handleChange(e):e.selection&&s.state!=0&&(s=new ke(s.source,0));for(let r of e.effects)if(r.is(Ls))s=new ke(s.source,1,r.value?Mt(e.state):-1);else if(r.is(Qn))s=new ke(s.source,0);else if(r.is(ld))for(let o of r.value)o.source==s.source&&(s=o);return s}handleUserEvent(e,t,i){return t=="delete"||!i.activateOnTyping?this.map(e.changes):new ke(this.source,1)}handleChange(e){return e.changes.touchesRange(Mt(e.startState))?new ke(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new ke(this.source,this.state,e.mapPos(this.explicitPos))}}class ki extends ke{constructor(e,t,i,s,r){super(e,2,t),this.result=i,this.from=s,this.to=r}hasResult(){return!0}handleUserEvent(e,t,i){var s;let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let o=e.changes.mapPos(this.from),l=e.changes.mapPos(this.to,1),a=Mt(e.state);if((this.explicitPos<0?a<=o:al||!r||t=="delete"&&Mt(e.startState)==this.from)return new ke(this.source,t=="input"&&i.activateOnTyping?1:0);let h=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return S1(r.validFor,e.state,o,l)?new ki(this.source,h,r,o,l):r.update&&(r=r.update(r,o,l,new Al(e.state,a,h>=0)))?new ki(this.source,h,r,r.from,(s=r.to)!==null&&s!==void 0?s:Mt(e.state)):new ke(this.source,1,h)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new ke(this.source,0):this.map(e.changes)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new ki(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new ke(this.source,0)}}function S1(n,e,t,i){if(!n)return!1;let s=e.sliceDoc(t,i);return typeof n=="function"?n(s,t,i,e):od(n,!0).test(s)}const ld=M.define({map(n,e){return n.map(t=>t.map(e))}}),ad=M.define(),Ce=ce.define({create(){return _s.start()},update(n,e){return n.update(e)},provide:n=>[wl.from(n,e=>e.tooltip),$.contentAttributes.from(n,e=>e.attrs)]});function Ml(n,e){const t=e.completion.apply||e.completion.label;let i=n.state.field(Ce).active.find(s=>s.source==e.source);return i instanceof ki?(typeof t=="string"?n.dispatch(Object.assign(Object.assign({},r1(n.state,t,i.from,i.to)),{annotations:Xl.of(e.completion)})):t(n,e.completion,i.from,i.to),!0):!1}const y1=u1(Ce,Ml);function hs(n,e="option"){return t=>{let i=t.state.field(Ce,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+s*(n?1:-1):n?0:o-1;return l<0?l=e=="page"?0:o-1:l>=o&&(l=e=="page"?o-1:0),t.dispatch({effects:ad.of(l)}),!0}}const k1=n=>{let e=n.state.field(Ce,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampn.state.field(Ce,!1)?(n.dispatch({effects:Ls.of(!0)}),!0):!1,w1=n=>{let e=n.state.field(Ce,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:Qn.of(null)}),!0)};class Q1{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const P1=50,$1=1e3,v1=re.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(Ce).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(Ce),t=n.state.facet(pe);if(!n.selectionSet&&!n.docChanged&&n.startState.field(Ce)==e)return;let i=n.transactions.some(r=>(r.selection||r.docChanged)&&!Bo(r,t));for(let r=0;rP1&&Date.now()-o.time>$1){for(let l of o.context.abortListeners)try{l()}catch(a){Ze(this.view.state,a)}o.context.abortListeners=null,this.running.splice(r--,1)}else o.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(r=>r.effects.some(o=>o.is(Ls)))&&(this.pendingStart=!0);let s=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(r=>r.state==1&&!this.running.some(o=>o.active.source==r.source))?setTimeout(()=>this.startUpdate(),s):-1,this.composing!=0)for(let r of n.transactions)Bo(r,t)=="input"?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(Ce);for(let t of e.active)t.state==1&&!this.running.some(i=>i.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=Mt(e),i=new Al(e,t,n.explicitPos==t),s=new Q1(n,i);this.running.push(s),Promise.resolve(n.source(i)).then(r=>{s.context.aborted||(s.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:Qn.of(null)}),Ze(this.view.state,r)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(pe).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(pe);for(let i=0;io.source==s.active.source);if(r&&r.state==1)if(s.done==null){let o=new ke(s.active.source,0);for(let l of s.updates)o=o.update(l,t);o.state!=1&&e.push(o)}else this.startQuery(r)}e.length&&this.view.dispatch({effects:ld.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(Ce,!1);if(e&&e.tooltip&&this.view.state.facet(pe).closeOnBlur){let t=e.open&&Qu(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Qn.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Ls.of(!1)}),20),this.composing=0}}}),C1=typeof navigator=="object"&&/Win/.test(navigator.platform),Z1=kt.highest($.domEventHandlers({keydown(n,e){let t=e.state.field(Ce,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(C1&&n.altKey)||n.metaKey)return!1;let i=t.open.options[t.open.selected],s=t.active.find(o=>o.source==i.source),r=i.completion.commitCharacters||s.result.commitCharacters;return r&&r.indexOf(n.key)>-1&&Ml(e,i),!1}})),hd=$.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 T1{constructor(e,t,i,s){this.field=e,this.line=t,this.from=i,this.to=s}}class Wl{constructor(e,t,i){this.field=e,this.from=t,this.to=i}map(e){let t=e.mapPos(this.from,-1,Oe.TrackDel),i=e.mapPos(this.to,1,Oe.TrackDel);return t==null||i==null?null:new Wl(this.field,t,i)}}class El{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let i=[],s=[t],r=e.doc.lineAt(t),o=/^\s*/.exec(r.text)[0];for(let a of this.lines){if(i.length){let h=o,c=/^\t*/.exec(a)[0].length;for(let f=0;fnew Wl(a.field,s[a.line]+a.from,s[a.line]+a.to));return{text:i,ranges:l}}static parse(e){let t=[],i=[],s=[],r;for(let o of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o);){let l=r[1]?+r[1]:null,a=r[2]||r[3]||"",h=-1,c=a.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f=h&&u.field++}s.push(new T1(h,i.length,r.index,r.index+c.length)),o=o.slice(0,r.index)+a+o.slice(r.index+r[0].length)}o=o.replace(/\\([{}])/g,(l,a,h)=>{for(let c of s)c.line==i.length&&c.from>h&&(c.from--,c.to--);return a}),i.push(o)}return new El(i,s)}}let R1=A.widget({widget:new class extends wt{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),A1=A.mark({class:"cm-snippetField"});class qi{constructor(e,t){this.ranges=e,this.active=t,this.deco=A.set(e.map(i=>(i.from==i.to?R1:A1).range(i.from,i.to)))}map(e){let t=[];for(let i of this.ranges){let s=i.map(e);if(!s)return null;t.push(s)}return new qi(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(i=>i.field==this.active&&i.from<=t.from&&i.to>=t.to))}}const Ln=M.define({map(n,e){return n&&n.map(e)}}),X1=M.define(),Pn=ce.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(Ln))return t.value;if(t.is(X1)&&n)return new qi(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>$.decorations.from(n,e=>e?e.deco:A.none)});function Vl(n,e){return y.create(n.filter(t=>t.field==e).map(t=>y.range(t.from,t.to)))}function M1(n){let e=El.parse(n);return(t,i,s,r)=>{let{text:o,ranges:l}=e.instantiate(t.state,s),a={changes:{from:s,to:r,insert:B.of(o)},scrollIntoView:!0,annotations:i?[Xl.of(i),se.userEvent.of("input.complete")]:void 0};if(l.length&&(a.selection=Vl(l,0)),l.some(h=>h.field>0)){let h=new qi(l,0),c=a.effects=[Ln.of(h)];t.state.field(Pn,!1)===void 0&&c.push(M.appendConfig.of([Pn,D1,q1,hd]))}t.dispatch(t.state.update(a))}}function cd(n){return({state:e,dispatch:t})=>{let i=e.field(Pn,!1);if(!i||n<0&&i.active==0)return!1;let s=i.active+n,r=n>0&&!i.ranges.some(o=>o.field==s+n);return t(e.update({selection:Vl(i.ranges,s),effects:Ln.of(r?null:new qi(i.ranges,s)),scrollIntoView:!0})),!0}}const W1=({state:n,dispatch:e})=>n.field(Pn,!1)?(e(n.update({effects:Ln.of(null)})),!0):!1,E1=cd(1),V1=cd(-1),Y1=[{key:"Tab",run:E1,shift:V1},{key:"Escape",run:W1}],Dh=Z.define({combine(n){return n.length?n[0]:Y1}}),D1=kt.highest(Vn.compute([Dh],n=>n.facet(Dh)));function $e(n,e){return Object.assign(Object.assign({},e),{apply:M1(n)})}const q1=$.domEventHandlers({mousedown(n,e){let t=e.state.field(Pn,!1),i;if(!t||(i=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let s=t.ranges.find(r=>r.from<=i&&r.to>=i);return!s||s.field==t.active?!1:(e.dispatch({selection:Vl(t.ranges,s.field),effects:Ln.of(t.ranges.some(r=>r.field>s.field)?new qi(t.ranges,s.field):null),scrollIntoView:!0}),!0)}}),$n={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Ft=M.define({map(n,e){let t=e.mapPos(n,-1,Oe.TrackAfter);return t??void 0}}),Yl=new class extends Ht{};Yl.startSide=1;Yl.endSide=-1;const fd=ce.define({create(){return _.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:i=>i>=t.from&&i<=t.to})}for(let t of e.effects)t.is(Ft)&&(n=n.update({add:[Yl.range(t.value,t.value+1)]}));return n}});function z1(){return[_1,fd]}const Vr="()[]{}<>";function ud(n){for(let e=0;e{if((L1?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let s=n.state.selection.main;if(i.length>2||i.length==2&&ze(ue(i,0))==1||e!=s.from||t!=s.to)return!1;let r=I1(n.state,i);return r?(n.dispatch(r),!0):!1}),B1=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let i=dd(n,n.selection.main.head).brackets||$n.brackets,s=null,r=n.changeByRange(o=>{if(o.empty){let l=j1(n.doc,o.head);for(let a of i)if(a==l&&fr(n.doc,o.head)==ud(ue(a,0)))return{changes:{from:o.head-a.length,to:o.head+a.length},range:y.cursor(o.head-a.length)}}return{range:s=o}});return s||e(n.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!s},U1=[{key:"Backspace",run:B1}];function I1(n,e){let t=dd(n,n.selection.main.head),i=t.brackets||$n.brackets;for(let s of i){let r=ud(ue(s,0));if(e==s)return r==s?F1(n,s,i.indexOf(s+s+s)>-1,t):N1(n,s,r,t.before||$n.before);if(e==r&&Od(n,n.selection.main.from))return G1(n,s,r)}return null}function Od(n,e){let t=!1;return n.field(fd).between(0,n.doc.length,i=>{i==e&&(t=!0)}),t}function fr(n,e){let t=n.sliceString(e,e+2);return t.slice(0,ze(ue(t,0)))}function j1(n,e){let t=n.sliceString(e-2,e);return ze(ue(t,0))==t.length?t:t.slice(1)}function N1(n,e,t,i){let s=null,r=n.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:Ft.of(o.to+e.length),range:y.range(o.anchor+e.length,o.head+e.length)};let l=fr(n.doc,o.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:e+t,from:o.head},effects:Ft.of(o.head+e.length),range:y.cursor(o.head+e.length)}:{range:s=o}});return s?null:n.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function G1(n,e,t){let i=null,s=n.changeByRange(r=>r.empty&&fr(n.doc,r.head)==t?{changes:{from:r.head,to:r.head+t.length,insert:t},range:y.cursor(r.head+t.length)}:i={range:r});return i?null:n.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function F1(n,e,t,i){let s=i.stringPrefixes||$n.stringPrefixes,r=null,o=n.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:Ft.of(l.to+e.length),range:y.range(l.anchor+e.length,l.head+e.length)};let a=l.head,h=fr(n.doc,a),c;if(h==e){if(qh(n,a))return{changes:{insert:e+e,from:a},effects:Ft.of(a+e.length),range:y.cursor(a+e.length)};if(Od(n,a)){let u=t&&n.sliceDoc(a,a+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+u.length,insert:u},range:y.cursor(a+u.length)}}}else{if(t&&n.sliceDoc(a-2*e.length,a)==e+e&&(c=zh(n,a-2*e.length,s))>-1&&qh(n,c))return{changes:{insert:e+e+e+e,from:a},effects:Ft.of(a+e.length),range:y.cursor(a+e.length)};if(n.charCategorizer(a)(h)!=te.Word&&zh(n,a,s)>-1&&!H1(n,a,e,s))return{changes:{insert:e+e,from:a},effects:Ft.of(a+e.length),range:y.cursor(a+e.length)}}return{range:r=l}});return r?null:n.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function qh(n,e){let t=F(n).resolveInner(e+1);return t.parent&&t.from==e}function H1(n,e,t,i){let s=F(n).resolveInner(e,-1),r=i.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=n.sliceDoc(s.from,Math.min(s.to,s.from+t.length+r)),a=l.indexOf(t);if(!a||a>-1&&i.indexOf(l.slice(0,a))>-1){let c=s.firstChild;for(;c&&c.from==s.from&&c.to-c.from>t.length+a;){if(n.sliceDoc(c.to-t.length,c.to)==t)return!1;c=c.firstChild}return!0}let h=s.to==e&&s.parent;if(!h)break;s=h}return!1}function zh(n,e,t){let i=n.charCategorizer(e);if(i(n.sliceDoc(e-1,e))!=te.Word)return e;for(let s of t){let r=e-s.length;if(n.sliceDoc(r,e)==s&&i(n.sliceDoc(r-1,r))!=te.Word)return r}return-1}function K1(n={}){return[Z1,Ce,pe.of(n),v1,J1,hd]}const pd=[{key:"Ctrl-Space",run:x1},{key:"Escape",run:w1},{key:"ArrowDown",run:hs(!0)},{key:"ArrowUp",run:hs(!1)},{key:"PageDown",run:hs(!0,"page")},{key:"PageUp",run:hs(!1,"page")},{key:"Enter",run:k1}],J1=kt.highest(Vn.computeN([pe],n=>n.facet(pe).defaultKeymap?[pd]:[]));function H(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=t[i];typeof s=="string"?n.setAttribute(i,s):s!=null&&(n[i]=s)}e++}for(;en.normalize("NFKD"):n=>n;class Ti{constructor(e,t,i=0,s=e.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,s),this.bufferStart=i,this.normalize=r?l=>r(Lh(l)):Lh,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 ue(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=cl(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=ze(e);let s=this.normalize(t);for(let r=0,o=i;;r++){let l=s.charCodeAt(r),a=this.match(l,o,this.bufferPos+this.bufferStart);if(r==s.length-1){if(a)return this.value=a,this;break}o==i&&rthis.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 i=this.curLineStart+t.index,s=i+t[0].length;if(this.matchPos=Bs(this.text,s+(i==s?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||s.to<=t){let l=new xi(t,e.sliceString(t,i));return Yr.set(e,l),l}if(s.from==t&&s.to==i)return s;let{text:r,from:o}=s;return o>t&&(r=e.sliceString(t,o)+r,o=t),s.to=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 i=this.flat.from+t.index,s=i+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this.matchPos=Bs(this.text,s+(i==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=xi.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(bd.prototype[Symbol.iterator]=Sd.prototype[Symbol.iterator]=function(){return this});function eS(n){try{return new RegExp(n,Dl),!0}catch{return!1}}function Bs(n,e){if(e>=n.length)return e;let t=n.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function Uo(n){let e=String(n.state.doc.lineAt(n.state.selection.main.head).number),t=H("input",{class:"cm-textfield",name:"line",value:e}),i=H("form",{class:"cm-gotoLine",onkeydown:r=>{r.keyCode==27?(r.preventDefault(),n.dispatch({effects:Us.of(!1)}),n.focus()):r.keyCode==13&&(r.preventDefault(),s())},onsubmit:r=>{r.preventDefault(),s()}},H("label",n.state.phrase("Go to line"),": ",t)," ",H("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function s(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!r)return;let{state:o}=n,l=o.doc.lineAt(o.selection.main.head),[,a,h,c,f]=r,u=c?+c.slice(1):0,d=h?+h:l.number;if(h&&f){let g=d/100;a&&(g=g*(a=="-"?-1:1)+l.number/o.doc.lines),d=Math.round(o.doc.lines*g)}else h&&a&&(d=d*(a=="-"?-1:1)+l.number);let O=o.doc.line(Math.max(1,Math.min(o.doc.lines,d))),m=y.cursor(O.from+Math.max(0,Math.min(u,O.length)));n.dispatch({effects:[Us.of(!1),$.scrollIntoView(m.from,{y:"center"})],selection:m}),n.focus()}return{dom:i}}const Us=M.define(),_h=ce.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(Us)&&(n=t.value);return n},provide:n=>yn.from(n,e=>e?Uo:null)}),tS=n=>{let e=Sn(n,Uo);if(!e){let t=[Us.of(!0)];n.state.field(_h,!1)==null&&t.push(M.appendConfig.of([_h,iS])),n.dispatch({effects:t}),e=Sn(n,Uo)}return e&&e.dom.querySelector("input").select(),!0},iS=$.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),nS={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},sS=Z.define({combine(n){return dt(n,nS,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function rS(n){return[cS,hS]}const oS=A.mark({class:"cm-selectionMatch"}),lS=A.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Bh(n,e,t,i){return(t==0||n(e.sliceDoc(t-1,t))!=te.Word)&&(i==e.doc.length||n(e.sliceDoc(i,i+1))!=te.Word)}function aS(n,e,t,i){return n(e.sliceDoc(t,t+1))==te.Word&&n(e.sliceDoc(i-1,i))==te.Word}const hS=re.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(sS),{state:t}=n,i=t.selection;if(i.ranges.length>1)return A.none;let s=i.main,r,o=null;if(s.empty){if(!e.highlightWordAroundCursor)return A.none;let a=t.wordAt(s.head);if(!a)return A.none;o=t.charCategorizer(s.head),r=t.sliceDoc(a.from,a.to)}else{let a=s.to-s.from;if(a200)return A.none;if(e.wholeWords){if(r=t.sliceDoc(s.from,s.to),o=t.charCategorizer(s.head),!(Bh(o,t,s.from,s.to)&&aS(o,t,s.from,s.to)))return A.none}else if(r=t.sliceDoc(s.from,s.to),!r)return A.none}let l=[];for(let a of n.visibleRanges){let h=new Ti(t.doc,r,a.from,a.to);for(;!h.next().done;){let{from:c,to:f}=h.value;if((!o||Bh(o,t,c,f))&&(s.empty&&c<=s.from&&f>=s.to?l.push(lS.range(c,f)):(c>=s.to||f<=s.from)&&l.push(oS.range(c,f)),l.length>e.maxMatches))return A.none}}return A.set(l)}},{decorations:n=>n.decorations}),cS=$.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),fS=({state:n,dispatch:e})=>{let{selection:t}=n,i=y.create(t.ranges.map(s=>n.wordAt(s.head)||y.cursor(s.head)),t.mainIndex);return i.eq(t)?!1:(e(n.update({selection:i})),!0)};function uS(n,e){let{main:t,ranges:i}=n.selection,s=n.wordAt(t.head),r=s&&s.from==t.from&&s.to==t.to;for(let o=!1,l=new Ti(n.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new Ti(n.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(a=>a.from==l.value.from))continue;if(r){let a=n.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}const dS=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(r=>r.from===r.to))return fS({state:n,dispatch:e});let i=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(r=>n.sliceDoc(r.from,r.to)!=i))return!1;let s=uS(n,i);return s?(e(n.update({selection:n.selection.addRange(y.range(s.from,s.to),!1),effects:$.scrollIntoView(s.to)})),!0):!1},ai=Z.define({combine(n){return dt(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new $S(e),scrollToMatch:e=>$.scrollIntoView(e)})}});function OS(n){return n?[ai.of(n),jo]:jo}class ql{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||eS(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,i)=>i=="n"?` +`:i=="r"?"\r":i=="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 bS(this):new mS(this)}getCursor(e,t=0,i){let s=e.doc?e:Y.create({doc:e});return i==null&&(i=s.doc.length),this.regexp?ui(this,s,t,i):fi(this,s,t,i)}}class yd{constructor(e){this.spec=e}}function fi(n,e,t,i){return new Ti(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:s=>s.toLowerCase(),n.wholeWord?pS(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function pS(n,e){return(t,i,s,r)=>((r>t||r+s.length=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=fi(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function ui(n,e,t,i){return new bd(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?gS(e.charCategorizer(e.selection.main.head)):void 0},t,i)}function Is(n,e){return n.slice(me(n,e,!1),e)}function js(n,e){return n.slice(e,me(n,e))}function gS(n){return(e,t,i)=>!i[0].length||(n(Is(i.input,i.index))!=te.Word||n(js(i.input,i.index))!=te.Word)&&(n(js(i.input,i.index+i[0].length))!=te.Word||n(Is(i.input,i.index+i[0].length))!=te.Word)}class bS extends yd{nextMatch(e,t,i){let s=ui(this.spec,e,i,e.doc.length).next();return s.done&&(s=ui(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=1;;s++){let r=Math.max(t,i-s*1e4),o=ui(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==t||l.from>r+10))return l;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=ui(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const Ri=M.define(),zl=M.define(),Wt=ce.define({create(n){return new Dr(Io(n).create(),null)},update(n,e){for(let t of e.effects)t.is(Ri)?n=new Dr(t.value.create(),n.panel):t.is(zl)&&(n=new Dr(n.query,t.value?Ll:null));return n},provide:n=>yn.from(n,e=>e.panel)});class Dr{constructor(e,t){this.query=e,this.panel=t}}const SS=A.mark({class:"cm-searchMatch"}),yS=A.mark({class:"cm-searchMatch cm-searchMatch-selected"}),kS=re.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(Wt))}update(n){let e=n.state.field(Wt);(e!=n.startState.field(Wt)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return A.none;let{view:t}=this,i=new Et;for(let s=0,r=t.visibleRanges,o=r.length;sr[s+1].from-2*250;)a=r[++s].to;n.highlight(t.state,l,a,(h,c)=>{let f=t.state.selection.ranges.some(u=>u.from==h&&u.to==c);i.add(h,c,f?yS:SS)})}return i.finish()}},{decorations:n=>n.decorations});function _n(n){return e=>{let t=e.state.field(Wt,!1);return t&&t.query.spec.valid?n(e,t):wd(e)}}const vn=_n((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state,t,t);if(!i)return!1;let s=y.single(i.from,i.to),r=n.state.facet(ai);return n.dispatch({selection:s,effects:[Bl(n,i),r.scrollToMatch(s.main,n)],userEvent:"select.search"}),xd(n),!0}),Cn=_n((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,s=e.prevMatch(t,i,i);if(!s)return!1;let r=y.single(s.from,s.to),o=n.state.facet(ai);return n.dispatch({selection:r,effects:[Bl(n,s),o.scrollToMatch(r.main,n)],userEvent:"select.search"}),xd(n),!0}),xS=_n((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:y.create(t.map(i=>y.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),wS=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:i,to:s}=t.main,r=[],o=0;for(let l=new Ti(n.doc,n.sliceDoc(i,s));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(o=r.length),r.push(y.range(l.value.from,l.value.to))}return e(n.update({selection:y.create(r,o),userEvent:"select.search.matches"})),!0},Uh=_n((n,{query:e})=>{let{state:t}=n,{from:i,to:s}=t.selection.main;if(t.readOnly)return!1;let r=e.nextMatch(t,i,i);if(!r)return!1;let o=[],l,a,h=[];if(r.from==i&&r.to==s&&(a=t.toText(e.getReplacement(r)),o.push({from:r.from,to:r.to,insert:a}),r=e.nextMatch(t,r.from,r.to),h.push($.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(i).number)+"."))),r){let c=o.length==0||o[0].from>=r.to?0:r.to-r.from-a.length;l=y.single(r.from-c,r.to-c),h.push(Bl(n,r)),h.push(t.facet(ai).scrollToMatch(l.main,n))}return n.dispatch({changes:o,selection:l,effects:h,userEvent:"input.replace"}),!0}),QS=_n((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getReplacement(s)}});if(!t.length)return!1;let i=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:$.announce.of(i),userEvent:"input.replace.all"}),!0});function Ll(n){return n.state.facet(ai).createPanel(n)}function Io(n,e){var t,i,s,r,o;let l=n.selection.main,a=l.empty||l.to>l.from+100?"":n.sliceDoc(l.from,l.to);if(e&&!a)return e;let h=n.facet(ai);return new ql({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:h.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:h.caseSensitive,literal:(s=e==null?void 0:e.literal)!==null&&s!==void 0?s:h.literal,regexp:(r=e==null?void 0:e.regexp)!==null&&r!==void 0?r:h.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:h.wholeWord})}function kd(n){let e=Sn(n,Ll);return e&&e.dom.querySelector("[main-field]")}function xd(n){let e=kd(n);e&&e==n.root.activeElement&&e.select()}const wd=n=>{let e=n.state.field(Wt,!1);if(e&&e.panel){let t=kd(n);if(t&&t!=n.root.activeElement){let i=Io(n.state,e.query.spec);i.valid&&n.dispatch({effects:Ri.of(i)}),t.focus(),t.select()}}else n.dispatch({effects:[zl.of(!0),e?Ri.of(Io(n.state,e.query.spec)):M.appendConfig.of(jo)]});return!0},_l=n=>{let e=n.state.field(Wt,!1);if(!e||!e.panel)return!1;let t=Sn(n,Ll);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:zl.of(!1)}),!0},PS=[{key:"Mod-f",run:wd,scope:"editor search-panel"},{key:"F3",run:vn,shift:Cn,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:vn,shift:Cn,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:_l,scope:"editor search-panel"},{key:"Mod-Shift-l",run:wS},{key:"Mod-Alt-g",run:tS},{key:"Mod-d",run:dS,preventDefault:!0}];let $S=class{constructor(e){this.view=e;let t=this.query=e.state.field(Wt).query.spec;this.commit=this.commit.bind(this),this.searchField=H("input",{value:t.search,placeholder:Ae(e,"Find"),"aria-label":Ae(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=H("input",{value:t.replace,placeholder:Ae(e,"Replace"),"aria-label":Ae(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=H("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=H("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=H("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function i(s,r,o){return H("button",{class:"cm-button",name:s,onclick:r,type:"button"},o)}this.dom=H("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,i("next",()=>vn(e),[Ae(e,"next")]),i("prev",()=>Cn(e),[Ae(e,"previous")]),i("select",()=>xS(e),[Ae(e,"all")]),H("label",null,[this.caseField,Ae(e,"match case")]),H("label",null,[this.reField,Ae(e,"regexp")]),H("label",null,[this.wordField,Ae(e,"by word")]),...e.state.readOnly?[]:[H("br"),this.replaceField,i("replace",()=>Uh(e),[Ae(e,"replace")]),i("replaceAll",()=>QS(e),[Ae(e,"replace all")])],H("button",{name:"close",onclick:()=>_l(e),"aria-label":Ae(e,"close"),type:"button"},["×"])])}commit(){let e=new ql({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:Ri.of(e)}))}keydown(e){Ig(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Cn:vn)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Uh(this.view))}update(e){for(let t of e.transactions)for(let i of t.effects)i.is(Ri)&&!i.value.eq(this.query)&&this.setQuery(i.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(ai).top}};function Ae(n,e){return n.state.phrase(e)}const cs=30,fs=/[\s\.,:;?!]/;function Bl(n,{from:e,to:t}){let i=n.state.doc.lineAt(e),s=n.state.doc.lineAt(t).to,r=Math.max(i.from,e-cs),o=Math.min(s,t+cs),l=n.state.sliceDoc(r,o);if(r!=i.from){for(let a=0;al.length-cs;a--)if(!fs.test(l[a-1])&&fs.test(l[a])){l=l.slice(0,a);break}}return $.announce.of(`${n.state.phrase("current match")}. ${l} ${n.state.phrase("on line")} ${i.number}.`)}const vS=$.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"}}),jo=[Wt,kt.low(kS),vS],CS=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),i=Il(n.state,t.from);return i.line?ZS(n):i.block?RS(n):!1};function Ul(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let s=n(e,t);return s?(i(t.update(s)),!0):!1}}const ZS=Ul(MS,0),TS=Ul(Qd,0),RS=Ul((n,e)=>Qd(n,e,XS(e)),0);function Il(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const Ni=50;function AS(n,{open:e,close:t},i,s){let r=n.sliceDoc(i-Ni,i),o=n.sliceDoc(s,s+Ni),l=/\s*$/.exec(r)[0].length,a=/^\s*/.exec(o)[0].length,h=r.length-l;if(r.slice(h-e.length,h)==e&&o.slice(a,a+t.length)==t)return{open:{pos:i-l,margin:l&&1},close:{pos:s+a,margin:a&&1}};let c,f;s-i<=2*Ni?c=f=n.sliceDoc(i,s):(c=n.sliceDoc(i,i+Ni),f=n.sliceDoc(s-Ni,s));let u=/^\s*/.exec(c)[0].length,d=/\s*$/.exec(f)[0].length,O=f.length-d-t.length;return c.slice(u,u+e.length)==e&&f.slice(O,O+t.length)==t?{open:{pos:i+u+e.length,margin:/\s/.test(c.charAt(u+e.length))?1:0},close:{pos:s-d-t.length,margin:/\s/.test(f.charAt(O-1))?1:0}}:null}function XS(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),s=t.to<=i.to?i:n.doc.lineAt(t.to),r=e.length-1;r>=0&&e[r].to>i.from?e[r].to=s.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:s.to})}return e}function Qd(n,e,t=e.selection.ranges){let i=t.map(r=>Il(e,r.from).block);if(!i.every(r=>r))return null;let s=t.map((r,o)=>AS(e,i[o],r.from,r.to));if(n!=2&&!s.every(r=>r))return{changes:e.changes(t.map((r,o)=>s[o]?[]:[{from:r.from,insert:i[o].open+" "},{from:r.to,insert:" "+i[o].close}]))};if(n!=1&&s.some(r=>r)){let r=[];for(let o=0,l;os&&(r==o||o>f.from)){s=f.from;let u=/^\s*/.exec(f.text)[0].length,d=u==f.length,O=f.text.slice(u,u+h.length)==h?u:-1;ur.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:l,token:a,indent:h,empty:c,single:f}of i)(f||!c)&&r.push({from:l.from+h,insert:a+" "});let o=e.changes(r);return{changes:o,selection:e.selection.map(o,1)}}else if(n!=1&&i.some(r=>r.comment>=0)){let r=[];for(let{line:o,comment:l,token:a}of i)if(l>=0){let h=o.from+l,c=h+a.length;o.text[c-o.from]==" "&&c++,r.push({from:h,to:c})}return{changes:r}}return null}const No=xt.define(),WS=xt.define(),ES=Z.define(),Pd=Z.define({combine(n){return dt(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(i,s)=>e(i,s)||t(i,s)})}}),$d=ce.define({create(){return ct.empty},update(n,e){let t=e.state.facet(Pd),i=e.annotation(No);if(i){let a=Te.fromTransaction(e,i.selection),h=i.side,c=h==0?n.undone:n.done;return a?c=Ns(c,c.length,t.minDepth,a):c=Zd(c,e.startState.selection),new ct(h==0?i.rest:c,h==0?c:i.rest)}let s=e.annotation(WS);if((s=="full"||s=="before")&&(n=n.isolate()),e.annotation(se.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let r=Te.fromTransaction(e),o=e.annotation(se.time),l=e.annotation(se.userEvent);return r?n=n.addChanges(r,o,l,t,e):e.selection&&(n=n.addSelection(e.startState.selection,o,l,t.newGroupDelay)),(s=="full"||s=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new ct(n.done.map(Te.fromJSON),n.undone.map(Te.fromJSON))}});function VS(n={}){return[$d,Pd.of(n),$.domEventHandlers({beforeinput(e,t){let i=e.inputType=="historyUndo"?vd:e.inputType=="historyRedo"?Go:null;return i?(e.preventDefault(),i(t)):!1}})]}function ur(n,e){return function({state:t,dispatch:i}){if(!e&&t.readOnly)return!1;let s=t.field($d,!1);if(!s)return!1;let r=s.pop(n,t,e);return r?(i(r),!0):!1}}const vd=ur(0,!1),Go=ur(1,!1),YS=ur(0,!0),DS=ur(1,!0);class Te{constructor(e,t,i,s,r){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=s,this.selectionsAfter=r}setSelAfter(e){return new Te(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(s=>s.toJSON())}}static fromJSON(e){return new Te(e.changes&&he.fromJSON(e.changes),[],e.mapped&&ft.fromJSON(e.mapped),e.startSelection&&y.fromJSON(e.startSelection),e.selectionsAfter.map(y.fromJSON))}static fromTransaction(e,t){let i=_e;for(let s of e.startState.facet(ES)){let r=s(e);r.length&&(i=i.concat(r))}return!i.length&&e.changes.empty?null:new Te(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,_e)}static selection(e){return new Te(void 0,_e,void 0,void 0,e)}}function Ns(n,e,t,i){let s=e+1>t+20?e-t-1:0,r=n.slice(s,e);return r.push(i),r}function qS(n,e){let t=[],i=!1;return n.iterChangedRanges((s,r)=>t.push(s,r)),e.iterChangedRanges((s,r,o,l)=>{for(let a=0;a=h&&o<=c&&(i=!0)}}),i}function zS(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length===0}function Cd(n,e){return n.length?e.length?n.concat(e):n:e}const _e=[],LS=200;function Zd(n,e){if(n.length){let t=n[n.length-1],i=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-LS));return i.length&&i[i.length-1].eq(e)?n:(i.push(e),Ns(n,n.length-1,1e9,t.setSelAfter(i)))}else return[Te.selection([e])]}function _S(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function qr(n,e){if(!n.length)return n;let t=n.length,i=_e;for(;t;){let s=BS(n[t-1],e,i);if(s.changes&&!s.changes.empty||s.effects.length){let r=n.slice(0,t);return r[t-1]=s,r}else e=s.mapped,t--,i=s.selectionsAfter}return i.length?[Te.selection(i)]:_e}function BS(n,e,t){let i=Cd(n.selectionsAfter.length?n.selectionsAfter.map(l=>l.map(e)):_e,t);if(!n.changes)return Te.selection(i);let s=n.changes.map(e),r=e.mapDesc(n.changes,!0),o=n.mapped?n.mapped.composeDesc(r):r;return new Te(s,M.mapEffects(n.effects,e),o,n.startSelection.map(r),i)}const US=/^(input\.type|delete)($|\.)/;class ct{constructor(e,t,i=0,s=void 0){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=s}isolate(){return this.prevTime?new ct(this.done,this.undone):this}addChanges(e,t,i,s,r){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||US.test(i))&&(!l.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):dr(t,e))}function ye(n){return n.textDirectionAt(n.state.selection.main.head)==ee.LTR}const jl=n=>Td(n,!ye(n)),Nl=n=>Td(n,ye(n));function Rd(n,e){return Ke(n,t=>t.empty?n.moveByGroup(t,e):dr(t,e))}const Ad=n=>Rd(n,!ye(n)),Xd=n=>Rd(n,ye(n));function jS(n,e,t){if(e.type.prop(t))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Or(n,e,t){let i=F(n).resolveInner(e.head),s=t?X.closedBy:X.openedBy;for(let a=e.head;;){let h=t?i.childAfter(a):i.childBefore(a);if(!h)break;jS(n,h,s)?i=h:a=t?h.to:h.from}let r=i.type.prop(s),o,l;return r&&(o=t?ht(n,i.from,1):ht(n,i.to,-1))&&o.matched?l=t?o.end.to:o.end.from:l=t?i.to:i.from,y.cursor(l,t?-1:1)}const Md=n=>Ke(n,e=>Or(n.state,e,!ye(n))),Wd=n=>Ke(n,e=>Or(n.state,e,ye(n)));function Ed(n,e){return Ke(n,t=>{if(!t.empty)return dr(t,e);let i=n.moveVertically(t,e);return i.head!=t.head?i:n.moveToLineBoundary(t,e)})}const Vd=n=>Ed(n,!1),Yd=n=>Ed(n,!0);function Dd(n){let e=n.scrollDOM.clientHeighto.empty?n.moveVertically(o,e,t.height):dr(o,e));if(s.eq(i.selection))return!1;let r;if(t.selfScroll){let o=n.coordsAtPos(i.selection.main.head),l=n.scrollDOM.getBoundingClientRect(),a=l.top+t.marginTop,h=l.bottom-t.marginBottom;o&&o.top>a&&o.bottomqd(n,!1),Fo=n=>qd(n,!0);function Lt(n,e,t){let i=n.lineBlockAt(e.head),s=n.moveToLineBoundary(e,t);if(s.head==e.head&&s.head!=(t?i.to:i.from)&&(s=n.moveToLineBoundary(e,t,!1)),!t&&s.head==i.from&&i.length){let r=/^\s*/.exec(n.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;r&&e.head!=i.from+r&&(s=y.cursor(i.from+r))}return s}const zd=n=>Ke(n,e=>Lt(n,e,!0)),Ld=n=>Ke(n,e=>Lt(n,e,!1)),_d=n=>Ke(n,e=>Lt(n,e,!ye(n))),Bd=n=>Ke(n,e=>Lt(n,e,ye(n))),NS=n=>Ke(n,e=>y.cursor(n.lineBlockAt(e.head).from,1)),GS=n=>Ke(n,e=>y.cursor(n.lineBlockAt(e.head).to,-1));function FS(n,e,t){let i=!1,s=zi(n.selection,r=>{let o=ht(n,r.head,-1)||ht(n,r.head,1)||r.head>0&&ht(n,r.head-1,1)||r.headFS(n,e);function Ie(n,e){let t=zi(n.state.selection,i=>{let s=e(i);return y.range(i.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Ot(n.state,t)),!0)}function Ud(n,e){return Ie(n,t=>n.moveByChar(t,e))}const Gl=n=>Ud(n,!ye(n)),Fl=n=>Ud(n,ye(n));function Id(n,e){return Ie(n,t=>n.moveByGroup(t,e))}const jd=n=>Id(n,!ye(n)),Nd=n=>Id(n,ye(n)),Gd=n=>Ie(n,e=>Or(n.state,e,!ye(n))),Fd=n=>Ie(n,e=>Or(n.state,e,ye(n)));function Hd(n,e){return Ie(n,t=>n.moveVertically(t,e))}const Kd=n=>Hd(n,!1),Jd=n=>Hd(n,!0);function eO(n,e){return Ie(n,t=>n.moveVertically(t,e,Dd(n).height))}const jh=n=>eO(n,!1),Nh=n=>eO(n,!0),tO=n=>Ie(n,e=>Lt(n,e,!0)),iO=n=>Ie(n,e=>Lt(n,e,!1)),nO=n=>Ie(n,e=>Lt(n,e,!ye(n))),sO=n=>Ie(n,e=>Lt(n,e,ye(n))),KS=n=>Ie(n,e=>y.cursor(n.lineBlockAt(e.head).from)),JS=n=>Ie(n,e=>y.cursor(n.lineBlockAt(e.head).to)),Gh=({state:n,dispatch:e})=>(e(Ot(n,{anchor:0})),!0),Fh=({state:n,dispatch:e})=>(e(Ot(n,{anchor:n.doc.length})),!0),Hh=({state:n,dispatch:e})=>(e(Ot(n,{anchor:n.selection.main.anchor,head:0})),!0),Kh=({state:n,dispatch:e})=>(e(Ot(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),ey=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),ty=({state:n,dispatch:e})=>{let t=pr(n).map(({from:i,to:s})=>y.range(i,Math.min(s+1,n.doc.length)));return e(n.update({selection:y.create(t),userEvent:"select"})),!0},iy=({state:n,dispatch:e})=>{let t=zi(n.selection,i=>{var s;let r=F(n).resolveStack(i.from,1);for(let o=r;o;o=o.next){let{node:l}=o;if((l.from=i.to||l.to>i.to&&l.from<=i.from)&&(!((s=l.parent)===null||s===void 0)&&s.parent))return y.range(l.to,l.from)}return i});return e(Ot(n,t)),!0},ny=({state:n,dispatch:e})=>{let t=n.selection,i=null;return t.ranges.length>1?i=y.create([t.main]):t.main.empty||(i=y.create([y.cursor(t.main.head)])),i?(e(Ot(n,i)),!0):!1};function Li(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:i}=n,s=i.changeByRange(r=>{let{from:o,to:l}=r;if(o==l){let a=e(r);ao&&(t="delete.forward",a=us(n,a,!0)),o=Math.min(o,a),l=Math.max(l,a)}else o=us(n,o,!1),l=us(n,l,!0);return o==l?{range:r}:{changes:{from:o,to:l},range:y.cursor(o,os(n)))i.between(e,e,(s,r)=>{se&&(e=t?r:s)});return e}const rO=(n,e,t)=>Li(n,i=>{let s=i.from,{state:r}=n,o=r.doc.lineAt(s),l,a;if(t&&!e&&s>o.from&&srO(n,!1,!0),Fs=n=>rO(n,!0,!1),oO=(n,e)=>Li(n,t=>{let i=t.head,{state:s}=n,r=s.doc.lineAt(i),o=s.charCategorizer(i);for(let l=null;;){if(i==(e?r.to:r.from)){i==t.head&&r.number!=(e?s.doc.lines:1)&&(i+=e?1:-1);break}let a=me(r.text,i-r.from,e)+r.from,h=r.text.slice(Math.min(i,a)-r.from,Math.max(i,a)-r.from),c=o(h);if(l!=null&&c!=l)break;(h!=" "||i!=t.head)&&(l=c),i=a}return i}),Hl=n=>oO(n,!1),lO=n=>oO(n,!0),aO=n=>Li(n,e=>{let t=n.lineBlockAt(e.head).to;return e.headLi(n,e=>{let t=n.lineBlockAt(e.head).from;return e.head>t?t:Math.max(0,e.head-1)}),ry=n=>Li(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),oy=n=>Li(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head{if(n.readOnly)return!1;let t=n.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:B.of(["",""])},range:y.cursor(i.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},ay=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>{if(!i.empty||i.from==0||i.from==n.doc.length)return{range:i};let s=i.from,r=n.doc.lineAt(s),o=s==r.from?s-1:me(r.text,s-r.from,!1)+r.from,l=s==r.to?s+1:me(r.text,s-r.from,!0)+r.from;return{changes:{from:o,to:l,insert:n.doc.slice(s,l).append(n.doc.slice(o,s))},range:y.cursor(l)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function pr(n){let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.from),r=n.doc.lineAt(i.to);if(!i.empty&&i.to==r.from&&(r=n.doc.lineAt(i.to-1)),t>=s.number){let o=e[e.length-1];o.to=r.to,o.ranges.push(i)}else e.push({from:s.from,to:r.to,ranges:[i]});t=r.number+1}return e}function hO(n,e,t){if(n.readOnly)return!1;let i=[],s=[];for(let r of pr(n)){if(t?r.to==n.doc.length:r.from==0)continue;let o=n.doc.lineAt(t?r.to+1:r.from-1),l=o.length+1;if(t){i.push({from:r.to,to:o.to},{from:r.from,insert:o.text+n.lineBreak});for(let a of r.ranges)s.push(y.range(Math.min(n.doc.length,a.anchor+l),Math.min(n.doc.length,a.head+l)))}else{i.push({from:o.from,to:r.from},{from:r.to,insert:n.lineBreak+o.text});for(let a of r.ranges)s.push(y.range(a.anchor-l,a.head-l))}}return i.length?(e(n.update({changes:i,scrollIntoView:!0,selection:y.create(s,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const hy=({state:n,dispatch:e})=>hO(n,e,!1),cy=({state:n,dispatch:e})=>hO(n,e,!0);function cO(n,e,t){if(n.readOnly)return!1;let i=[];for(let s of pr(n))t?i.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):i.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});return e(n.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const fy=({state:n,dispatch:e})=>cO(n,e,!1),uy=({state:n,dispatch:e})=>cO(n,e,!0),dy=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(pr(e).map(({from:s,to:r})=>(s>0?s--:r{let r;if(n.lineWrapping){let o=n.lineBlockAt(s.head),l=n.coordsAtPos(s.head,s.assoc||1);l&&(r=o.bottom+n.documentTop-l.bottom+n.defaultLineHeight/2)}return n.moveVertically(s,!0,r)}).map(t);return n.dispatch({changes:t,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Oy(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=F(n).resolveInner(e),i=t.childBefore(e),s=t.childAfter(e),r;return i&&s&&i.to<=e&&s.from>=e&&(r=i.type.prop(X.closedBy))&&r.indexOf(s.name)>-1&&n.doc.lineAt(i.to).from==n.doc.lineAt(s.from).from&&!/\S/.test(n.sliceDoc(i.to,s.from))?{from:i.to,to:s.from}:null}const py=fO(!1),my=fO(!0);function fO(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(s=>{let{from:r,to:o}=s,l=e.doc.lineAt(r),a=!n&&r==o&&Oy(e,r);n&&(r=o=(o<=l.to?l:e.doc.lineAt(o)).to);let h=new Dn(e,{simulateBreak:r,simulateDoubleBreak:!!a}),c=hr(h,r);for(c==null&&(c=Ge(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));ol.from&&r{let s=[];for(let o=i.from;o<=i.to;){let l=n.doc.lineAt(o);l.number>t&&(i.empty||i.to>l.from)&&(e(l,s,i),t=l.number),o=l.to+1}let r=n.changes(s);return{changes:s,range:y.range(r.mapPos(i.anchor,1),r.mapPos(i.head,1))}})}const uO=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),i=new Dn(n,{overrideIndentation:r=>{let o=t[r];return o??-1}}),s=Kl(n,(r,o,l)=>{let a=hr(i,r.from);if(a==null)return;/\S/.test(r.text)||(a=0);let h=/^\s*/.exec(r.text)[0],c=Zi(n,a);(h!=c||l.fromn.readOnly?!1:(e(n.update(Kl(n,(t,i)=>{i.push({from:t.from,insert:n.facet(Yi)})}),{userEvent:"input.indent"})),!0),OO=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(Kl(n,(t,i)=>{let s=/^\s*/.exec(t.text)[0];if(!s)return;let r=Ge(s,n.tabSize),o=0,l=Zi(n,Math.max(0,r-ni(n)));for(;o(n.setTabFocusMode(),!0),by=[{key:"Ctrl-b",run:jl,shift:Gl,preventDefault:!0},{key:"Ctrl-f",run:Nl,shift:Fl},{key:"Ctrl-p",run:Vd,shift:Kd},{key:"Ctrl-n",run:Yd,shift:Jd},{key:"Ctrl-a",run:NS,shift:KS},{key:"Ctrl-e",run:GS,shift:JS},{key:"Ctrl-d",run:Fs},{key:"Ctrl-h",run:Gs},{key:"Ctrl-k",run:aO},{key:"Ctrl-Alt-h",run:Hl},{key:"Ctrl-o",run:ly},{key:"Ctrl-t",run:ay},{key:"Ctrl-v",run:Fo}],Sy=[{key:"ArrowLeft",run:jl,shift:Gl,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Ad,shift:jd,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:_d,shift:nO,preventDefault:!0},{key:"ArrowRight",run:Nl,shift:Fl,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Xd,shift:Nd,preventDefault:!0},{mac:"Cmd-ArrowRight",run:Bd,shift:sO,preventDefault:!0},{key:"ArrowUp",run:Vd,shift:Kd,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Gh,shift:Hh},{mac:"Ctrl-ArrowUp",run:Ih,shift:jh},{key:"ArrowDown",run:Yd,shift:Jd,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Fh,shift:Kh},{mac:"Ctrl-ArrowDown",run:Fo,shift:Nh},{key:"PageUp",run:Ih,shift:jh},{key:"PageDown",run:Fo,shift:Nh},{key:"Home",run:Ld,shift:iO,preventDefault:!0},{key:"Mod-Home",run:Gh,shift:Hh},{key:"End",run:zd,shift:tO,preventDefault:!0},{key:"Mod-End",run:Fh,shift:Kh},{key:"Enter",run:py},{key:"Mod-a",run:ey},{key:"Backspace",run:Gs,shift:Gs},{key:"Delete",run:Fs},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Hl},{key:"Mod-Delete",mac:"Alt-Delete",run:lO},{mac:"Mod-Backspace",run:ry},{mac:"Mod-Delete",run:oy}].concat(by.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),Jh=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:Md,shift:Gd},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Wd,shift:Fd},{key:"Alt-ArrowUp",run:hy},{key:"Shift-Alt-ArrowUp",run:fy},{key:"Alt-ArrowDown",run:cy},{key:"Shift-Alt-ArrowDown",run:uy},{key:"Escape",run:ny},{key:"Mod-Enter",run:my},{key:"Alt-l",mac:"Ctrl-l",run:ty},{key:"Mod-i",run:iy,preventDefault:!0},{key:"Mod-[",run:OO},{key:"Mod-]",run:dO},{key:"Mod-Alt-\\",run:uO},{key:"Shift-Mod-k",run:dy},{key:"Shift-Mod-\\",run:HS},{key:"Mod-/",run:CS},{key:"Alt-A",run:TS},{key:"Ctrl-m",mac:"Shift-Alt-m",run:gy}].concat(Sy),yy={key:"Tab",run:dO,shift:OO};class ky{constructor(e,t,i){this.from=e,this.to=t,this.diagnostic=i}}class Nt{constructor(e,t,i){this.diagnostics=e,this.panel=t,this.selected=i}static init(e,t,i){let s=e,r=i.facet(Zn).markerFilter;r&&(s=r(s,i));let o=A.set(s.map(l=>l.from==l.to||l.from==l.to-1&&i.doc.lineAt(l.from).to==l.from?A.widget({widget:new Ty(l),diagnostic:l}).range(l.from):A.mark({attributes:{class:"cm-lintRange cm-lintRange-"+l.severity+(l.markClass?" "+l.markClass:"")},diagnostic:l}).range(l.from,l.to)),!0);return new Nt(o,t,Ai(o))}}function Ai(n,e=null,t=0){let i=null;return n.between(t,1e9,(s,r,{spec:o})=>{if(!(e&&o.diagnostic!=e))return i=new ky(s,r,o.diagnostic),!1}),i}function xy(n,e){let t=e.pos,i=e.end||t,s=n.state.facet(Zn).hideOn(n,t,i);if(s!=null)return s;let r=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(o=>o.is(pO))||n.changes.touchesRange(r.from,Math.max(r.to,i)))}function wy(n,e){return n.field(Ve,!1)?e:e.concat(M.appendConfig.of(Xy))}const pO=M.define(),Jl=M.define(),mO=M.define(),Ve=ce.define({create(){return new Nt(A.none,null,null)},update(n,e){if(e.docChanged&&n.diagnostics.size){let t=n.diagnostics.map(e.changes),i=null,s=n.panel;if(n.selected){let r=e.changes.mapPos(n.selected.from,1);i=Ai(t,n.selected.diagnostic,r)||Ai(t,null,r)}!t.size&&s&&e.state.facet(Zn).autoPanel&&(s=null),n=new Nt(t,s,i)}for(let t of e.effects)if(t.is(pO)){let i=e.state.facet(Zn).autoPanel?t.value.length?Tn.open:null:n.panel;n=Nt.init(t.value,i,e.state)}else t.is(Jl)?n=new Nt(n.diagnostics,t.value?Tn.open:null,n.selected):t.is(mO)&&(n=new Nt(n.diagnostics,n.panel,t.value));return n},provide:n=>[yn.from(n,e=>e.panel),$.decorations.from(n,e=>e.diagnostics)]}),Qy=A.mark({class:"cm-lintRange cm-lintRange-active"});function Py(n,e,t){let{diagnostics:i}=n.state.field(Ve),s=[],r=2e8,o=0;i.between(e-(t<0?1:0),e+(t>0?1:0),(a,h,{spec:c})=>{e>=a&&e<=h&&(a==h||(e>a||t>0)&&(ebO(n,t,!1)))}const vy=n=>{let e=n.state.field(Ve,!1);(!e||!e.panel)&&n.dispatch({effects:wy(n.state,[Jl.of(!0)])});let t=Sn(n,Tn.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},ec=n=>{let e=n.state.field(Ve,!1);return!e||!e.panel?!1:(n.dispatch({effects:Jl.of(!1)}),!0)},Cy=n=>{let e=n.state.field(Ve,!1);if(!e)return!1;let t=n.state.selection.main,i=e.diagnostics.iter(t.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==t.from&&i.to==t.to)?!1:(n.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},Zy=[{key:"Mod-Shift-m",run:vy,preventDefault:!0},{key:"F8",run:Cy}],Zn=Z.define({combine(n){return Object.assign({sources:n.map(e=>e.source).filter(e=>e!=null)},dt(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?i=>e(i)||t(i):e:t}))}});function gO(n){let e=[];if(n)e:for(let{name:t}of n){for(let i=0;ir.toLowerCase()==s.toLowerCase())){e.push(s);continue e}}e.push("")}return e}function bO(n,e,t){var i;let s=t?gO(e.actions):[];return H("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},H("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(n):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((r,o)=>{let l=!1,a=u=>{if(u.preventDefault(),l)return;l=!0;let d=Ai(n.state.field(Ve).diagnostics,e);d&&r.apply(n,d.from,d.to)},{name:h}=r,c=s[o]?h.indexOf(s[o]):-1,f=c<0?h:[h.slice(0,c),H("u",h.slice(c,c+1)),h.slice(c+1)];return H("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${h}${c<0?"":` (access key "${s[o]})"`}.`},f)}),e.source&&H("div",{class:"cm-diagnosticSource"},e.source))}class Ty extends wt{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return H("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class tc{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=bO(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Tn{constructor(e){this.view=e,this.items=[];let t=s=>{if(s.keyCode==27)ec(this.view),this.view.focus();else if(s.keyCode==38||s.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(s.keyCode==40||s.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(s.keyCode==36)this.moveSelection(0);else if(s.keyCode==35)this.moveSelection(this.items.length-1);else if(s.keyCode==13)this.view.focus();else if(s.keyCode>=65&&s.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:r}=this.items[this.selectedIndex],o=gO(r.actions);for(let l=0;l{for(let r=0;rec(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Ve).selected;if(!e)return-1;for(let t=0;t{let h=-1,c;for(let f=i;fi&&(this.items.splice(i,h-i),s=!0)),t&&c.diagnostic==t.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),r=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),i++});i({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:o,panel:l})=>{let a=l.height/this.list.offsetHeight;o.topl.bottom&&(this.list.scrollTop+=(o.bottom-l.bottom)/a)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}sync(){let e=this.list.firstChild;function t(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)t();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Ve),i=Ai(t.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:mO.of(i)})}static open(e){return new Tn(e)}}function Ry(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function ds(n){return Ry(``,'width="6" height="3"')}const Ay=$.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:ds("#d11")},".cm-lintRange-warning":{backgroundImage:ds("orange")},".cm-lintRange-info":{backgroundImage:ds("#999")},".cm-lintRange-hint":{backgroundImage:ds("#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}}}),Xy=[Ve,$.decorations.compute([Ve],n=>{let{selected:e,panel:t}=n.field(Ve);return!e||!t||e.from==e.to?A.none:A.set([Qy.range(e.from,e.to)])}),A0(Py,{hideOn:xy}),Ay];var ic={};class Hs{constructor(e,t,i,s,r,o,l,a,h,c=0,f){this.p=e,this.stack=t,this.state=i,this.reducePos=s,this.pos=r,this.score=o,this.buffer=l,this.bufferBase=a,this.curContext=h,this.lookAhead=c,this.parent=f}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let s=e.parser.context;return new Hs(e,[],t,i,i,0,[],0,s?new nc(s,s.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 i=e>>19,s=e&65535,{parser:r}=this.p;this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[s])===null||t===void 0)&&t.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=h):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(s,a)}storeNode(e,t,i,s=4,r=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&o.buffer[l-4]==0&&o.buffer[l-1]>-1){if(t==i)return;if(o.buffer[l-2]>=t){o.buffer[l-2]=i;return}}}if(!r||this.pos==i)this.buffer.push(e,t,i,s);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0)for(;o>0&&this.buffer[o-2]>i;)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,s>4&&(s-=4);this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=i,this.buffer[o+3]=s}}shift(e,t,i,s){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=s,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,s,4);else{let r=e,{parser:o}=this.p;(s>this.pos||t<=o.maxNode)&&(this.pos=s,o.stateFlag(r,1)||(this.reducePos=s)),this.pushState(r,i),this.shiftContext(t,i),t<=o.maxNode&&this.buffer.push(t,i,s,4)}}apply(e,t,i,s){e&65536?this.reduce(e):this.shift(e,t,i,s)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let s=this.pos;this.reducePos=this.pos=s+e.length,this.pushState(t,s),this.buffer.push(i,s,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 i=e.buffer.slice(t),s=e.bufferBase+t;for(;e&&s==e.bufferBase;)e=e.parent;return new Hs(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,s,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new My(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(i==0)return!1;if(!(i&65536))return!0;t.reduce(i)}}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 s=[];for(let r=0,o;ra&1&&l==o)||s.push(t[r],o)}t=s}let i=[];for(let s=0;s>19,s=t&65535,r=this.stack.length-i*3;if(r<0||e.getGoto(this.stack[r],s,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}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=[],i=(s,r)=>{if(!t.includes(s))return t.push(s),e.allActions(s,o=>{if(!(o&393216))if(o&65536){let l=(o>>19)-r;if(l>1){let a=o&65535,h=this.stack.length-l*3;if(h>=0&&e.getGoto(this.stack[h],a,!1)>=0)return l<<19|65536|a}}else{let l=i(o,r+1);if(l!=null)return l}})};return i(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(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!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;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class nc{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class My{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=s}}class Ks{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Ks(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(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,this.index==0&&this.maybeNext()}fork(){return new Ks(this.stack,this.pos,this.index)}}function sn(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let i=0,s=0;i=92&&o--,o>=34&&o--;let a=o-32;if(a>=46&&(a-=46,l=!0),r+=a,l)break;r*=46}t?t[s++]=r:t=new e(r)}return t}class $s{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const sc=new $s;class Wy{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=sc,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 i=this.range,s=this.rangeIndex,r=this.pos+e;for(;ri.to:r>=i.to;){if(s==this.ranges.length-1)return null;let o=this.ranges[++s];r+=o.from-i.to,i=o}return r}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,i,s;if(t>=0&&t=this.chunk2Pos&&il.to&&(this.chunk2=this.chunk2.slice(0,l.to-i)),s=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),s}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.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=sc,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&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 i="";for(let s of this.ranges){if(s.from>=t)break;s.to>e&&(i+=this.input.read(Math.max(s.from,e),Math.min(s.to,t)))}return i}}class wi{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;SO(this.data,e,t,this.id,i.data,i.tokenPrecTable)}}wi.prototype.contextual=wi.prototype.fallback=wi.prototype.extend=!1;class Js{constructor(e,t,i){this.precTable=t,this.elseToken=i,this.data=typeof e=="string"?sn(e):e}token(e,t){let i=e.pos,s=0;for(;;){let r=e.next<0,o=e.resolveOffset(1,1);if(SO(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(r||s++,o==null)break;e.reset(o,e.token)}s&&(e.reset(i,e.token),e.acceptToken(this.elseToken,s))}}Js.prototype.contextual=wi.prototype.fallback=wi.prototype.extend=!1;class Je{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function SO(n,e,t,i,s,r){let o=0,l=1<0){let O=n[d];if(a.allows(O)&&(e.token.value==-1||e.token.value==O||Ey(O,e.token.value,s,r))){e.acceptToken(O);break}}let c=e.next,f=0,u=n[o+2];if(e.next<0&&u>f&&n[h+u*3-3]==65535){o=n[h+u*3-1];continue e}for(;f>1,O=h+d+(d<<1),m=n[O],g=n[O+1]||65536;if(c=g)f=d+1;else{o=n[O+2],e.advance();continue e}}break}}function rc(n,e,t){for(let i=e,s;(s=n[i])!=65535;i++)if(s==t)return i-e;return-1}function Ey(n,e,t,i){let s=rc(t,i,e);return s<0||rc(t,i,n)e)&&!i.type.isError)return t<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(n.length,Math.max(i.from+1,e+25));if(t<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return t<0?0:n.length}}let Vy=class{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?oc(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?oc(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(ee)return this.nextStart=o,null;if(r instanceof D){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+r.length}}};class Yy{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new $s)}getActions(e){let t=0,i=null,{parser:s}=e.p,{tokenizers:r}=s,o=s.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,a=0;for(let h=0;hf.end+25&&(a=Math.max(f.lookAhead,a)),f.value!=0)){let u=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!c.extend&&(i=f,t>u))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),!i&&e.pos==this.stream.end&&(i=new $s,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new $s,{pos:i,p:s}=e;return t.start=i,t.end=Math.min(i+1,s.stream.end),t.value=i==s.stream.end?s.parser.eofTerm:0,t}updateCachedToken(e,t,i){let s=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(s,e),i),e.value>-1){let{parser:r}=i.p;for(let o=0;o=0&&i.p.parser.dialect.allows(l>>1)){l&1?e.extended=l>>1:e.value=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(s+1)}putAction(e,t,i,s){for(let r=0;re.bufferLength*4?new Vy(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,i=this.stacks=[],s,r;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;ot)i.push(l);else{if(this.advanceStack(l,i,e))continue;{s||(s=[],r=[]),s.push(l);let a=this.tokens.getMainToken(l);r.push(a.value,a.end)}}break}}if(!i.length){let o=s&&zy(s);if(o)return Xe&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Xe&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&s){let o=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,r,i);if(o)return Xe&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(i.length>o)for(i.sort((l,a)=>a.score-l.score);i.length>o;)i.pop();i.some(l=>l.reducePos>t)&&this.recovering--}else if(i.length>1){e:for(let o=0;o500&&h.buffer.length>500)if((l.score-h.score||l.buffer.length-h.buffer.length)>0)i.splice(a--,1);else{i.splice(o--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let o=1;o ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,c=h?e.curContext.hash:0;for(let f=this.fragments.nodeAt(s);f;){let u=this.parser.nodeSet.types[f.type.id]==f.type?r.getGoto(e.state,f.type.id):-1;if(u>-1&&f.length&&(!h||(f.prop(X.contextHash)||0)==c))return e.useNode(f,u),Xe&&console.log(o+this.stackID(e)+` (via reuse of ${r.getName(f.type.id)})`),!0;if(!(f instanceof D)||f.children.length==0||f.positions[0]>0)break;let d=f.children[0];if(d instanceof D&&f.positions[0]==0)f=d;else break}}let l=r.stateSlot(e.state,4);if(l>0)return e.reduce(l),Xe&&console.log(o+this.stackID(e)+` (via always-reduce ${r.getName(l&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let h=0;hs?t.push(O):i.push(O)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return lc(e,t),!0}}runRecovery(e,t,i){let s=null,r=!1;for(let o=0;o ":"";if(l.deadEnd&&(r||(r=!0,l.restart(),Xe&&console.log(c+this.stackID(l)+" (restarted)"),this.advanceFully(l,i))))continue;let f=l.split(),u=c;for(let d=0;f.forceReduce()&&d<10&&(Xe&&console.log(u+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,i));d++)Xe&&(u=this.stackID(f)+" -> ");for(let d of l.recoverByInsert(a))Xe&&console.log(c+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,i);this.stream.end>l.pos?(h==l.pos&&(h++,a=0),l.recoverByDelete(a,h),Xe&&console.log(c+this.stackID(l)+` (via recover-delete ${this.parser.getName(a)})`),lc(l,i)):(!s||s.scoren;class yO{constructor(e){this.start=e.start,this.shift=e.shift||Lr,this.reduce=e.reduce||Lr,this.reuse=e.reuse||Lr,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class ri extends lr{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let l=0;le.topRules[l][1]),s=[];for(let l=0;l=0)r(c,a,l[h++]);else{let f=l[h+-c];for(let u=-c;u>0;u--)r(l[h++],a,f);h++}}}this.nodeSet=new Vi(t.map((l,a)=>oe.define({name:a>=this.minRepeatTerm?void 0:l,id:a,props:s[a],top:i.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Cu;let o=sn(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new wi(o,l):l),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,i){let s=new Dy(this,e,t,i);for(let r of this.wrappers)s=r(s,e,t,i);return s}getGoto(e,t,i=!1){let s=this.goto;if(t>=s[0])return-1;for(let r=s[t+1];;){let o=s[r++],l=o&1,a=s[r++];if(l&&i)return a;for(let h=r+(o>>1);r0}validAction(e,t){return!!this.allActions(e,i=>i==t?!0:null)}allActions(e,t){let i=this.stateSlot(e,4),s=i?t(i):void 0;for(let r=this.stateSlot(e,1);s==null;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=pt(this.data,r+2);else break;s=t(pt(this.data,r+1))}return s}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=pt(this.data,i+2);else break;if(!(this.data[i+2]&1)){let s=this.data[i+1];t.some((r,o)=>o&1&&r==s)||t.push(this.data[i],s)}}return t}configure(e){let t=Object.assign(Object.create(ri.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(i=>{let s=e.tokenizers.find(r=>r.from==i);return s?s.to:i})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((i,s)=>{let r=e.specializers.find(l=>l.from==i.external);if(!r)return i;let o=Object.assign(Object.assign({},i),{external:r.to});return t.specializers[s]=ac(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(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 t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map(()=>!1);if(e)for(let r of e.split(" ")){let o=t.indexOf(r);o>=0&&(i[o]=!0)}let s=null;for(let r=0;ri)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scoren.external(t,i)<<1|e}return n.get}const Ly=312,hc=1,_y=2,By=3,Uy=4,Iy=313,jy=315,Ny=316,Gy=5,Fy=6,Hy=0,Ho=[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],kO=125,Ky=59,Ko=47,Jy=42,ek=43,tk=45,ik=60,nk=44,sk=63,rk=46,ok=new yO({start:!1,shift(n,e){return e==Gy||e==Fy||e==jy?n:e==Ny},strict:!1}),lk=new Je((n,e)=>{let{next:t}=n;(t==kO||t==-1||e.context)&&n.acceptToken(Iy)},{contextual:!0,fallback:!0}),ak=new Je((n,e)=>{let{next:t}=n,i;Ho.indexOf(t)>-1||t==Ko&&((i=n.peek(1))==Ko||i==Jy)||t!=kO&&t!=Ky&&t!=-1&&!e.context&&n.acceptToken(Ly)},{contextual:!0}),hk=new Je((n,e)=>{let{next:t}=n;if(t==ek||t==tk){if(n.advance(),t==n.next){n.advance();let i=!e.context&&e.canShift(hc);n.acceptToken(i?hc:_y)}}else t==sk&&n.peek(1)==rk&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(By))},{contextual:!0});function _r(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const ck=new Je((n,e)=>{if(n.next!=ik||!e.dialectEnabled(Hy)||(n.advance(),n.next==Ko))return;let t=0;for(;Ho.indexOf(n.next)>-1;)n.advance(),t++;if(_r(n.next,!0)){for(n.advance(),t++;_r(n.next,!1);)n.advance(),t++;for(;Ho.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==nk)return;for(let i=0;;i++){if(i==7){if(!_r(n.next,!0))return;break}if(n.next!="extends".charCodeAt(i))break;n.advance(),t++}}n.acceptToken(Uy,-t)}),fk=oi({"get set async static":p.modifier,"for while do if else switch try catch finally return throw break continue default case":p.controlKeyword,"in of await yield void typeof delete instanceof":p.operatorKeyword,"let var const using function class extends":p.definitionKeyword,"import export from":p.moduleKeyword,"with debugger as new":p.keyword,TemplateString:p.special(p.string),super:p.atom,BooleanLiteral:p.bool,this:p.self,null:p.null,Star:p.modifier,VariableName:p.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":p.function(p.variableName),VariableDefinition:p.definition(p.variableName),Label:p.labelName,PropertyName:p.propertyName,PrivatePropertyName:p.special(p.propertyName),"CallExpression/MemberExpression/PropertyName":p.function(p.propertyName),"FunctionDeclaration/VariableDefinition":p.function(p.definition(p.variableName)),"ClassDeclaration/VariableDefinition":p.definition(p.className),PropertyDefinition:p.definition(p.propertyName),PrivatePropertyDefinition:p.definition(p.special(p.propertyName)),UpdateOp:p.updateOperator,"LineComment Hashbang":p.lineComment,BlockComment:p.blockComment,Number:p.number,String:p.string,Escape:p.escape,ArithOp:p.arithmeticOperator,LogicOp:p.logicOperator,BitOp:p.bitwiseOperator,CompareOp:p.compareOperator,RegExp:p.regexp,Equals:p.definitionOperator,Arrow:p.function(p.punctuation),": Spread":p.punctuation,"( )":p.paren,"[ ]":p.squareBracket,"{ }":p.brace,"InterpolationStart InterpolationEnd":p.special(p.brace),".":p.derefOperator,", ;":p.separator,"@":p.meta,TypeName:p.typeName,TypeDefinition:p.definition(p.typeName),"type enum interface implements namespace module declare":p.definitionKeyword,"abstract global Privacy readonly override":p.modifier,"is keyof unique infer":p.operatorKeyword,JSXAttributeValue:p.attributeValue,JSXText:p.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":p.angleBracket,"JSXIdentifier JSXNameSpacedName":p.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":p.attributeName,"JSXBuiltin/JSXIdentifier":p.standard(p.tagName)}),uk={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},dk={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},Ok={__proto__:null,"<":187},pk=ri.deserialize({version:14,states:"$@QO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ?NdO'#CiO+RO!bO'#CjO+aO#tO'#CjO+oO!0LbO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DwO0fQ^O'#EPOOQ?Mr'#EX'#EXO1PQWO'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQWO'#GpO1dQWO'#ElO1iQWO'#ElO3hQ?NdO'#JmO6[Q?NdO'#JnO6uQWO'#F[O6zQ&jO'#FsOOQ?Mr'#Fe'#FeO7VO,YO'#FeO7eQ7[O'#FzO9RQWO'#FyOOQ?Mr'#Jn'#JnOOQ?Mp'#Jm'#JmO9WQWO'#GtOOQU'#KZ'#KZO9cQWO'#IUO9hQ?MxO'#IVOOQU'#JZ'#JZOOQU'#IZ'#IZQ`Q^OOO`Q^OOO9pQMnO'#DsO9wQ^O'#D{O:OQ^O'#D}O9^QWO'#GpO:VQ7[O'#CoO:eQWO'#EkO:pQWO'#EvO:uQ7[O'#FdO;dQWO'#GpOOQO'#K['#K[O;iQWO'#K[O;wQWO'#GxO;wQWO'#GyO;wQWO'#G{O9^QWO'#HOOVQWO'#CeO>gQWO'#H_O>oQWO'#HeO>oQWO'#HgO`Q^O'#HiO>oQWO'#HkO>oQWO'#HnO>tQWO'#HtO>yQ?MyO'#HzO%[Q^O'#H|O?UQ?MyO'#IOO?aQ?MyO'#IQO9hQ?MxO'#ISO?lQ?NdO'#CiO@nQ`O'#DiQOQWOOO%[Q^O'#D}OAUQWO'#EQO:VQ7[O'#EkOAaQWO'#EkOAlQpO'#FdOOQU'#Cg'#CgOOQ?Mp'#Dn'#DnOOQ?Mp'#Jq'#JqO%[Q^O'#JqOOQO'#Jt'#JtOOQO'#Id'#IdOBlQ`O'#EdOOQ?Mp'#Ec'#EcOOQ?Mp'#Jx'#JxOChQ?NQO'#EdOCrQ`O'#ETOOQO'#Js'#JsODWQ`O'#JtOEeQ`O'#ETOCrQ`O'#EdPErO#@ItO'#CbPOOO)CDx)CDxOOOO'#I['#I[OE}O!bO,59UOOQ?Mr,59U,59UOOOO'#I]'#I]OF]O#tO,59UO%[Q^O'#D`OOOO'#I_'#I_OFkO!0LbO,59xOOQ?Mr,59x,59xOFyQ^O'#I`OG^QWO'#JoOI]QrO'#JoO+}Q^O'#JoOIdQWO,5:OOIzQWO'#EmOJXQWO'#KOOJdQWO'#J}OJdQWO'#J}OJlQWO,5;ZOJqQWO'#J|OOQ?Mv,5:Z,5:ZOJxQ^O,5:ZOLvQ?NdO,5:cOMgQWO,5:kONQQ?MxO'#J{ONXQWO'#JzO9WQWO'#JzONmQWO'#JzONuQWO,5;YONzQWO'#JzO!#PQrO'#JnOOQ?Mr'#Ci'#CiO%[Q^O'#EPO!#oQrO,5:pOOQQ'#Ju'#JuOOQO-EpOOQU'#Jc'#JcOOQU,5>q,5>qOOQU-EtQWO'#HTO9^QWO'#HVO!DgQWO'#HVO:VQ7[O'#HXO!DlQWO'#HXOOQU,5=m,5=mO!DqQWO'#HYO!ESQWO'#CoO!EXQWO,59PO!EcQWO,59PO!GhQ^O,59POOQU,59P,59PO!GxQ?MxO,59PO%[Q^O,59PO!JTQ^O'#HaOOQU'#Hb'#HbOOQU'#Hc'#HcO`Q^O,5=yO!JkQWO,5=yO`Q^O,5>PO`Q^O,5>RO!JpQWO,5>TO`Q^O,5>VO!JuQWO,5>YO!JzQ^O,5>`OOQU,5>f,5>fO%[Q^O,5>fO9hQ?MxO,5>hOOQU,5>j,5>jO# UQWO,5>jOOQU,5>l,5>lO# UQWO,5>lOOQU,5>n,5>nO# rQ`O'#D[O%[Q^O'#JqO# |Q`O'#JqO#!kQ`O'#DjO#!|Q`O'#DjO#%_Q^O'#DjO#%fQWO'#JpO#%nQWO,5:TO#%sQWO'#EqO#&RQWO'#KPO#&ZQWO,5;[O#&`Q`O'#DjO#&mQ`O'#ESOOQ?Mr,5:l,5:lO%[Q^O,5:lO#&tQWO,5:lO>tQWO,5;VO!A}Q`O,5;VO!BVQ7[O,5;VO:VQ7[O,5;VO#&|QWO,5@]O#'RQ(CYO,5:pOOQO-EzO+}Q^O,5>zOOQO,5?Q,5?QO#*ZQ^O'#I`OOQO-E<^-E<^O#*hQWO,5@ZO#*pQrO,5@ZO#*wQWO,5@iOOQ?Mr1G/j1G/jO%[Q^O,5@jO#+PQWO'#IfOOQO-EuQ?NdO1G0|O#>|Q?NdO1G0|O#AZQ07bO'#CiO#CUQ07bO1G1_O#C]Q07bO'#JnO#CpQ?NdO,5?WOOQ?Mp-EoQWO1G3oO$3VQ^O1G3qO$7ZQ^O'#HpOOQU1G3t1G3tO$7hQWO'#HvO>tQWO'#HxOOQU1G3z1G3zO$7pQ^O1G3zO9hQ?MxO1G4QOOQU1G4S1G4SOOQ?Mp'#G]'#G]O9hQ?MxO1G4UO9hQ?MxO1G4WO$;wQWO,5@]O!(oQ^O,5;]O9WQWO,5;]O>tQWO,5:UO!(oQ^O,5:UO!A}Q`O,5:UO$;|Q07bO,5:UOOQO,5;],5;]O$tQWO1G0qO!A}Q`O1G0qO!BVQ7[O1G0qOOQ?Mp1G5w1G5wO!ArQ?MxO1G0ZOOQO1G0j1G0jO%[Q^O1G0jO$=aQ?MxO1G0jO$=lQ?MxO1G0jO!A}Q`O1G0ZOCrQ`O1G0ZO$=zQ?MxO1G0jOOQO1G0Z1G0ZO$>`Q?NdO1G0jPOOO-EjQpO,5rQrO1G4fOOQO1G4l1G4lO%[Q^O,5>zO$>|QWO1G5uO$?UQWO1G6TO$?^QrO1G6UO9WQWO,5?QO$?hQ?NdO1G6RO%[Q^O1G6RO$?xQ?MxO1G6RO$@ZQWO1G6QO$@ZQWO1G6QO9WQWO1G6QO$@cQWO,5?TO9WQWO,5?TOOQO,5?T,5?TO$@wQWO,5?TO$(PQWO,5?TOOQO-E[OOQU,5>[,5>[O%[Q^O'#HqO%8mQWO'#HsOOQU,5>b,5>bO9WQWO,5>bOOQU,5>d,5>dOOQU7+)f7+)fOOQU7+)l7+)lOOQU7+)p7+)pOOQU7+)r7+)rO%8rQ`O1G5wO%9WQ07bO1G0wO%9bQWO1G0wOOQO1G/p1G/pO%9mQ07bO1G/pO>tQWO1G/pO!(oQ^O'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQWO7+&]O!A}Q`O7+&]OOQO7+%u7+%uO$>`Q?NdO7+&UOOQO7+&U7+&UO%[Q^O7+&UO%9wQ?MxO7+&UO!ArQ?MxO7+%uO!A}Q`O7+%uO%:SQ?MxO7+&UO%:bQ?NdO7++mO%[Q^O7++mO%:rQWO7++lO%:rQWO7++lOOQO1G4o1G4oO9WQWO1G4oO%:zQWO1G4oOOQQ7+%z7+%zO#&wQWO<|O%[Q^O,5>|OOQO-E<`-E<`O%FwQWO1G5xOOQ?Mr<]OOQU,5>_,5>_O&8uQWO1G3|O9WQWO7+&cO!(oQ^O7+&cOOQO7+%[7+%[O&8zQ07bO1G6UO>tQWO7+%[OOQ?Mr<tQWO<`Q?NdO<pQ?NdO,5?_O&@xQ?NdO7+'zO&CWQrO1G4hO&CbQ07bO7+&^O&EcQ07bO,5=UO&GgQ07bO,5=WO&GwQ07bO,5=UO&HXQ07bO,5=WO&HiQ07bO,59rO&JlQ07bO,5tQWO7+)hO'(OQWO<`Q?NdOAN?[OOQOAN>{AN>{O%[Q^OAN?[OOQO<`Q?NdOG24vO#&wQWOLD,nOOQULD,nLD,nO!&_Q7[OLD,nO'5TQrOLD,nO'5[Q07bO7+'xO'6}Q07bO,5?]O'8}Q07bO,5?_O':}Q07bO7+'zO'kOh%VOk+aO![']O%f+`O~O!d+cOa(WX![(WX'u(WX!Y(WX~Oa%lO![XO'u%lO~Oh%VO!i%cO~Oh%VO!i%cO(O%eO~O!d#vO#h(tO~Ob+nO%g+oO(O+kO(QTO(TUO!Z)TP~O!Y+pO`)SX~O[+tO~O`+uO~O![%}O(O%eO(P!lO`)SP~Oh%VO#]+zO~Oh%VOk+}O![$|O~O![,PO~O},RO![XO~O%k%tO~O!u,WO~Oe,]O~Ob,^O(O#nO(QTO(TUO!Z)RP~Oe%{O~O%g!QO(O&WO~P=RO[,cO`,bO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(QTO(TUO([VO(j[O(yiO~O![!eO!r!gO$V!kO(O!dO~P!EkO`,bOa%lO'u%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oa,hO!rwO#t!OO%i!OO%j!OO%k!OO~P!HTO!i&lO~O&Y,nO~O![,pO~O&k,rO&m,sOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(O&ha(Q&ha(T&ha([&ha(j&ha(y&ha!Z&ha&a&hab&ha&f&ha~O(O,xO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# ZO!d,}O#],|Oh(eX!Y#eX!Y(eX!Z#eX!Z(eX!d(eX!i(eX~Oh%VO!d-PO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(QTO(TUO(`!mO~OP;POQ;POSfOdkOg'XX!Y'XX~P!+hO!Y.wOg(ka~OSfO![3uO$c3vO~O!Z3zO~Os3{O~P#.aOa$lq!Y$lq'u$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9mO!V3|O~P#.aO})zO!P){O(u%POk'ea(t'ea!Y'ea#]'ea~Og'ea#}'ea~P%)nO})zO!P){Ok'ga(t'ga(u'ga!Y'ga#]'ga~Og'ga#}'ga~P%*aO(m$YO~P#.aO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/gO(OQ#>g#@V#@e#@l#BR#Ba#C|#D[#Db#Dh#Dn#Dx#EO#EU#E`#Er#ExPPPPPPPPPP#FOPPPPPPP#Fs#Iz#KZ#Kb#KjPPP$!sP$!|$%t$,^$,a$,d$-P$-S$-Z$-cP$-i$-lP$.Y$.^$/U$0d$0i$1PPP$1U$1[$1`P$1c$1g$1k$2a$2x$3a$3e$3h$3k$3q$3t$3x$3|R!|RoqOXst!Z#d%k&o&q&r&t,k,p1|2PY!vQ']-]1a5eQ%rvQ%zyQ&R|Q&g!VS'T!e-TQ'c!iS'i!r!yU*e$|*V*jQ+i%{Q+v&TQ,[&aQ-Z'[Q-e'dQ-m'jQ0R*lQ1k,]R;v;T%QdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V,h,k,p-a-i-w-}.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3^5b5m5}6O6R6f8R8X8h8rS#q];Q!r)Z$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{ < 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 : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < 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 InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression 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:376,context:ok,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[fk],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!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#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Rp(U!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$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(RpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(RpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Rp(U!b'w0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(S#S$h&j'x0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Rp(U!b'x0/lOY%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)3p/x`$h&j!m),Q(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Rp(U!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'At3l_(Q':f$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(U!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Rp(U!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(U!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(RpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(RpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Rp(U!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(U!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(U!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(U!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(U!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(U!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Rp(U!bp'9tOY%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'Ad#?rd$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Rp(U!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)[#Jv_al$h&j(Rp(U!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%Z04f#LS^h#)`#O-uk[n]||-1},{term:338,get:n=>dk[n]||-1},{term:92,get:n=>Ok[n]||-1}],tokenPrec:14749}),xO=[$e("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),$e("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),$e("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),$e("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),$e("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),$e(`try { \${} } catch (\${error}) { \${} -}`,{label:"try",detail:"/ catch block",type:"keyword"}),Pe("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Pe(`if (\${}) { +}`,{label:"try",detail:"/ catch block",type:"keyword"}),$e("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),$e(`if (\${}) { \${} } else { \${} -}`,{label:"if",detail:"/ else block",type:"keyword"}),Pe(`class \${name} { +}`,{label:"if",detail:"/ else block",type:"keyword"}),$e(`class \${name} { constructor(\${params}) { \${} } -}`,{label:"class",detail:"definition",type:"keyword"}),Pe('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Pe('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],mk=xO.concat([Pe("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Pe("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Pe("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),hc=new Ru,wO=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Gi(n){return(e,t)=>{let i=e.node.getChild("VariableDefinition");return i&&t(i,n),!0}}const gk=["FunctionDeclaration"],bk={FunctionDeclaration:Gi("function"),ClassDeclaration:Gi("class"),ClassExpression:()=>!0,EnumDeclaration:Gi("constant"),TypeAliasDeclaration:Gi("type"),NamespaceDeclaration:Gi("namespace"),VariableDefinition(n,e){n.matchContext(gk)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function QO(n,e){let t=hc.get(e);if(t)return t;let i=[],s=!0;function r(o,l){let a=n.sliceString(o.from,o.to);i.push({label:a,type:l})}return e.cursor(K.IncludeAnonymous).iterate(o=>{if(s)s=!1;else if(o.name){let l=bk[o.name];if(l&&l(o,r)||wO.has(o.name))return!1}else if(o.to-o.from>8192){for(let l of QO(n,o.node))i.push(l);return!1}}),hc.set(e,i),i}const cc=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,PO=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function Sk(n){let e=F(n.state).resolveInner(n.pos,-1);if(PO.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&cc.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let i=[];for(let s=e;s;s=s.parent)wO.has(s.name)&&(i=i.concat(QO(n.state.doc,s)));return{options:i,from:t?e.from:n.pos,validFor:cc}}const ut=ti.define({name:"javascript",parser:pk.configure({props:[Di.add({IfStatement:yi({except:/^\s*({|else\b)/}),TryStatement:yi({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:xb,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:i?1:2)*n.unit},Block:kb({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":yi({except:/^{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),li.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Cl,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),$O={test:n=>/^JSX/.test(n.name),facet:hr({commentTokens:{block:{open:"{/*",close:"*/}"}}})},vO=ut.configure({dialect:"ts"},"typescript"),CO=ut.configure({dialect:"jsx",props:[$l.add(n=>n.isTop?[$O]:void 0)]}),ZO=ut.configure({dialect:"jsx ts",props:[$l.add(n=>n.isTop?[$O]:void 0)]},"typescript");let TO=n=>({label:n,type:"keyword"});const RO="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(TO),yk=RO.concat(["declare","implements","private","protected","public"].map(TO));function Jo(n={}){let e=n.jsx?n.typescript?ZO:CO:n.typescript?vO:ut,t=n.typescript?mk.concat(yk):xO.concat(RO);return new Ci(e,[ut.data.of({autocomplete:s1(PO,sd(t))}),ut.data.of({autocomplete:Sk}),n.jsx?wk:[]])}function kk(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function fc(n,e,t=n.length){for(let i=e==null?void 0:e.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return n.sliceString(i.from,Math.min(i.to,t));return""}const xk=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),wk=$.inputHandler.of((n,e,t,i,s)=>{if((xk?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||i!=">"&&i!="/"||!ut.isActiveAt(n.state,e,-1))return!1;let r=s(),{state:o}=r,l=o.changeByRange(a=>{var h;let{head:c}=a,f=F(o).resolveInner(c-1,-1),u;if(f.name=="JSXStartTag"&&(f=f.parent),!(o.doc.sliceString(c-1,c)!=i||f.name=="JSXAttributeValue"&&f.to>c)){if(i==">"&&f.name=="JSXFragmentTag")return{range:a,changes:{from:c,insert:""}};if(i=="/"&&f.name=="JSXStartCloseTag"){let d=f.parent,O=d.parent;if(O&&d.from==c-2&&((u=fc(o.doc,O.firstChild,c))||((h=O.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let m=`${u}>`;return{range:y.cursor(c+m.length,-1),changes:{from:c,insert:m}}}}else if(i==">"){let d=kk(f);if(d&&d.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(c,c+2))&&(u=fc(o.doc,d,c)))return{range:a,changes:{from:c,insert:``}}}}return{range:a}});return l.changes.empty?!1:(n.dispatch([r,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Qk=54,Pk=1,$k=55,vk=2,Ck=56,Zk=3,uc=4,Tk=5,tr=6,AO=7,XO=8,MO=9,WO=10,Rk=11,Ak=12,Xk=13,Ur=57,Mk=14,dc=58,EO=20,Wk=22,VO=23,Ek=24,el=26,YO=27,Vk=28,Yk=31,Dk=34,qk=36,zk=37,Lk=0,_k=1,Bk={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},Uk={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Oc={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 Ik(n){return n==45||n==46||n==58||n>=65&&n<=90||n==95||n>=97&&n<=122||n>=161}function DO(n){return n==9||n==10||n==13||n==32}let pc=null,mc=null,gc=0;function tl(n,e){let t=n.pos+e;if(gc==t&&mc==n)return pc;let i=n.peek(e);for(;DO(i);)i=n.peek(++e);let s="";for(;Ik(i);)s+=String.fromCharCode(i),i=n.peek(++e);return mc=n,gc=t,pc=s?s.toLowerCase():i==jk||i==Nk?void 0:null}const qO=60,ir=62,Jl=47,jk=63,Nk=33,Gk=45;function bc(n,e){this.name=n,this.parent=e}const Fk=[tr,WO,AO,XO,MO],Hk=new yO({start:null,shift(n,e,t,i){return Fk.indexOf(e)>-1?new bc(tl(i,1)||"",n):n},reduce(n,e){return e==EO&&n?n.parent:n},reuse(n,e,t,i){let s=e.type.id;return s==tr||s==qk?new bc(tl(i,1)||"",n):n},strict:!1}),Kk=new Je((n,e)=>{if(n.next!=qO){n.next<0&&e.context&&n.acceptToken(Ur);return}n.advance();let t=n.next==Jl;t&&n.advance();let i=tl(n,0);if(i===void 0)return;if(!i)return n.acceptToken(t?Mk:tr);let s=e.context?e.context.name:null;if(t){if(i==s)return n.acceptToken(Rk);if(s&&Uk[s])return n.acceptToken(Ur,-2);if(e.dialectEnabled(Lk))return n.acceptToken(Ak);for(let r=e.context;r;r=r.parent)if(r.name==i)return;n.acceptToken(Xk)}else{if(i=="script")return n.acceptToken(AO);if(i=="style")return n.acceptToken(XO);if(i=="textarea")return n.acceptToken(MO);if(Bk.hasOwnProperty(i))return n.acceptToken(WO);s&&Oc[s]&&Oc[s][i]?n.acceptToken(Ur,-1):n.acceptToken(tr)}},{contextual:!0}),Jk=new Je(n=>{for(let e=0,t=0;;t++){if(n.next<0){t&&n.acceptToken(dc);break}if(n.next==Gk)e++;else if(n.next==ir&&e>=2){t>=3&&n.acceptToken(dc,-2);break}else e=0;n.advance()}});function ex(n){for(;n;n=n.parent)if(n.name=="svg"||n.name=="math")return!0;return!1}const tx=new Je((n,e)=>{if(n.next==Jl&&n.peek(1)==ir){let t=e.dialectEnabled(_k)||ex(e.context);n.acceptToken(t?Tk:uc,2)}else n.next==ir&&n.acceptToken(uc,1)});function ea(n,e,t){let i=2+n.length;return new Je(s=>{for(let r=0,o=0,l=0;;l++){if(s.next<0){l&&s.acceptToken(e);break}if(r==0&&s.next==qO||r==1&&s.next==Jl||r>=2&&ro?s.acceptToken(e,-o):s.acceptToken(t,-(o-2));break}else if((s.next==10||s.next==13)&&l){s.acceptToken(e,1);break}else r=o=0;s.advance()}})}const ix=ea("script",Qk,Pk),nx=ea("style",$k,vk),sx=ea("textarea",Ck,Zk),rx=oi({"Text RawText":p.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":p.angleBracket,TagName:p.tagName,"MismatchedCloseTag/TagName":[p.tagName,p.invalid],AttributeName:p.attributeName,"AttributeValue UnquotedAttributeValue":p.attributeValue,Is:p.definitionOperator,"EntityReference CharacterReference":p.character,Comment:p.blockComment,ProcessingInst:p.processingInstruction,DoctypeDecl:p.documentMeta}),ox=ri.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%ZQ&rO,59fO%fQ&rO,59iO%qQ&rO,59lO%|Q&rO,59nOOOa'#D^'#D^O&XOaO'#CxO&dOaO,59[OOOb'#D_'#D_O&lObO'#C{O&wObO,59[OOOd'#D`'#D`O'POdO'#DOO'[OdO,59[OOO`'#Da'#DaO'dO!rO,59[O'kQ#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'pO$fO,59oOOO`,59o,59oO'xQ#|O,59qO'}Q#|O,59rOOO`-E7W-E7WO(SQ&rO'#CsOOQW'#DZ'#DZO(bQ&rO1G.wOOOa1G.w1G.wOOO`1G/Y1G/YO(mQ&rO1G/QOOOb1G/Q1G/QO(xQ&rO1G/TOOOd1G/T1G/TO)TQ&rO1G/WOOO`1G/W1G/WO)`Q&rO1G/YOOOa-E7[-E7[O)kQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)pQ#tO'#C|OOOd-E7^-E7^O)uQ#tO'#DPOOO`-E7_-E7_O)zQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O*PQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOO`7+$t7+$tOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rO*[Q#|O,59eO*aQ#|O,59hO*fQ#|O,59kOOO`1G/X1G/XO*kO7[O'#CvO*|OMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O+_O7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+pOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:",]~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~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|OT}OhyO~OS!POT}OhyO~OS!ROT}OhyO~OS!TOT}OhyO~OS}OT}OhyO~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!dOSgXTgXhgX~OS!fOT!gOhyO~OS!hOT!gOhyO~OS!iOT!gOhyO~OS!jOT!gOhyO~OS!gOT!gOhyO~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{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!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:Hk,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"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[rx],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP;=`<%l7S!Z8OYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{ihSkWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbhSkWa!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXhSa!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TakWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOb!R!RAwP;=`<%lAY!ZBRYkWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbhSkWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbhSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXhSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!bx`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYlhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_khS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_X`P!a`!cp!eQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZhSfQ`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$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!a!$PP;=`<%lMz!R!$ZY!a`!cpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!a`!cp!dPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!a`!cpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!a`!cpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!a`!cpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!a`!cpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!a`!cpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!a`!cpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!a`!cpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!cpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO{PP!-nP;=`<%l!-Sq!-xS!cp{POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!a`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!a`{POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!a`!cp{POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!a`!cpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!a`!cpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!a`!cpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!a`!cpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!a`!cpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!a`!cpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!cpOv!5kvx!6Vx!a!5k!a!b!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!{let h=l.type.id;if(h==Vk)return Ir(l,a,t);if(h==Yk)return Ir(l,a,i);if(h==Dk)return Ir(l,a,s);if(h==EO&&r.length){let c=l.node,f=c.firstChild,u=f&&Sc(f,a),d;if(u){for(let O of r)if(O.tag==u&&(!O.attrs||O.attrs(d||(d=zO(f,a))))){let m=c.lastChild,g=m.type.id==zk?m.from:c.to;if(g>f.to)return{parser:O.parser,overlay:[{from:f.to,to:g}]}}}}if(o&&h==VO){let c=l.node,f;if(f=c.firstChild){let u=o[a.read(f.from,f.to)];if(u)for(let d of u){if(d.tagName&&d.tagName!=Sc(c.parent,a))continue;let O=c.lastChild;if(O.type.id==el){let m=O.from+1,g=O.lastChild,b=O.to-(g&&g.isError?0:1);if(b>m)return{parser:d.parser,overlay:[{from:m,to:b}]}}else if(O.type.id==YO)return{parser:d.parser,overlay:[{from:O.from,to:O.to}]}}}}return null})}const lx=99,yc=1,ax=100,hx=101,kc=2,_O=[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],cx=58,fx=40,BO=95,ux=91,vs=45,dx=46,Ox=35,px=37,mx=38,gx=92,bx=10;function Rn(n){return n>=65&&n<=90||n>=97&&n<=122||n>=161}function UO(n){return n>=48&&n<=57}const Sx=new Je((n,e)=>{for(let t=!1,i=0,s=0;;s++){let{next:r}=n;if(Rn(r)||r==vs||r==BO||t&&UO(r))!t&&(r!=vs||s>0)&&(t=!0),i===s&&r==vs&&i++,n.advance();else if(r==gx&&n.peek(1)!=bx)n.advance(),n.next>-1&&n.advance(),t=!0;else{t&&n.acceptToken(r==fx?ax:i==2&&e.canShift(kc)?kc:hx);break}}}),yx=new Je(n=>{if(_O.includes(n.peek(-1))){let{next:e}=n;(Rn(e)||e==BO||e==Ox||e==dx||e==ux||e==cx&&Rn(n.peek(1))||e==vs||e==mx)&&n.acceptToken(lx)}}),kx=new Je(n=>{if(!_O.includes(n.peek(-1))){let{next:e}=n;if(e==px&&(n.advance(),n.acceptToken(yc)),Rn(e)){do n.advance();while(Rn(n.next)||UO(n.next));n.acceptToken(yc)}}}),xx=oi({"AtKeyword import charset namespace keyframes media supports":p.definitionKeyword,"from to selector":p.keyword,NamespaceName:p.namespace,KeyframeName:p.labelName,KeyframeRangeName:p.operatorKeyword,TagName:p.tagName,ClassName:p.className,PseudoClassName:p.constant(p.className),IdName:p.labelName,"FeatureName PropertyName":p.propertyName,AttributeName:p.attributeName,NumberLiteral:p.number,KeywordQuery:p.keyword,UnaryQueryOp:p.operatorKeyword,"CallTag ValueName":p.atom,VariableName:p.variableName,Callee:p.operatorKeyword,Unit:p.unit,"UniversalSelector NestingSelector":p.definitionOperator,MatchOp:p.compareOperator,"ChildOp SiblingOp, LogicOp":p.logicOperator,BinOp:p.arithmeticOperator,Important:p.modifier,Comment:p.blockComment,ColorLiteral:p.color,"ParenthesizedContent StringLiteral":p.string,":":p.punctuation,"PseudoOp #":p.derefOperator,"; ,":p.separator,"( )":p.paren,"[ ]":p.squareBracket,"{ }":p.brace}),wx={__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:138},Qx={__proto__:null,"@import":118,"@media":142,"@charset":146,"@namespace":150,"@keyframes":156,"@supports":168},Px={__proto__:null,not:132,only:132},$x=ri.deserialize({version:14,states:":^QYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DTO$vQ[O'#DWOOQP'#Em'#EmO${QdO'#DgO%jQ[O'#DtO${QdO'#DvO%{Q[O'#DxO&WQ[O'#D{O&`Q[O'#ERO&nQ[O'#ETOOQS'#El'#ElOOQS'#EW'#EWQYQ[OOO&uQXO'#CdO'jQWO'#DcO'oQWO'#EsO'zQ[O'#EsQOQWOOP(UO#tO'#C_POOO)C@[)C@[OOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(aQ[O'#E[O({QWO,58{O)TQ[O,59SO$qQ[O,59oO$vQ[O,59rO(aQ[O,59uO(aQ[O,59wO(aQ[O,59xO)`Q[O'#DbOOQS,58{,58{OOQP'#Ck'#CkOOQO'#DR'#DROOQP,59S,59SO)gQWO,59SO)lQWO,59SOOQP'#DV'#DVOOQP,59o,59oOOQO'#DX'#DXO)qQ`O,59rOOQS'#Cp'#CpO${QdO'#CqO)yQvO'#CsO+ZQtO,5:ROOQO'#Cx'#CxO)lQWO'#CwO+oQWO'#CyO+tQ[O'#DOOOQS'#Ep'#EpOOQO'#Dj'#DjO+|Q[O'#DqO,[QWO'#EtO&`Q[O'#DoO,jQWO'#DrOOQO'#Eu'#EuO)OQWO,5:`O,oQpO,5:bOOQS'#Dz'#DzO,wQWO,5:dO,|Q[O,5:dOOQO'#D}'#D}O-UQWO,5:gO-ZQWO,5:mO-cQWO,5:oOOQS-E8U-E8UO${QdO,59}O-kQ[O'#E^O-xQWO,5;_O-xQWO,5;_POOO'#EV'#EVP.TO#tO,58yPOOO,58y,58yOOQP1G.l1G.lO.zQXO,5:vOOQO-E8Y-E8YOOQS1G.g1G.gOOQP1G.n1G.nO)gQWO1G.nO)lQWO1G.nOOQP1G/Z1G/ZO/XQ`O1G/^O/rQXO1G/aO0YQXO1G/cO0pQXO1G/dO1WQWO,59|O1]Q[O'#DSO1dQdO'#CoOOQP1G/^1G/^O${QdO1G/^O1kQpO,59]OOQS,59_,59_O${QdO,59aO1sQWO1G/mOOQS,59c,59cO1xQ!bO,59eOOQS'#DP'#DPOOQS'#EY'#EYO2QQ[O,59jOOQS,59j,59jO2YQWO'#DjO2eQWO,5:VO2jQWO,5:]O&`Q[O,5:XO&`Q[O'#E_O2rQWO,5;`O2}QWO,5:ZO(aQ[O,5:^OOQS1G/z1G/zOOQS1G/|1G/|OOQS1G0O1G0OO3`QWO1G0OO3eQdO'#EOOOQS1G0R1G0ROOQS1G0X1G0XOOQS1G0Z1G0ZO3pQtO1G/iOOQO,5:x,5:xO4WQ[O,5:xOOQO-E8[-E8[O4eQWO1G0yPOOO-E8T-E8TPOOO1G.e1G.eOOQP7+$Y7+$YOOQP7+$x7+$xO${QdO7+$xOOQS1G/h1G/hO4pQXO'#ErO4wQWO,59nO4|QtO'#EXO5tQdO'#EoO6OQWO,59ZO6TQpO7+$xOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%X7+%XO6]QWO1G/POOQS-E8W-E8WOOQS1G/U1G/UO${QdO1G/qOOQO1G/w1G/wOOQO1G/s1G/sO6bQWO,5:yOOQO-E8]-E8]O6pQXO1G/xOOQS7+%j7+%jO6wQYO'#CsOOQO'#EQ'#EQO7SQ`O'#EPOOQO'#EP'#EPO7_QWO'#E`O7gQdO,5:jOOQS,5:j,5:jO7rQtO'#E]O${QdO'#E]O8sQdO7+%TOOQO7+%T7+%TOOQO1G0d1G0dO9WQpO<OAN>OO:xQdO,5:uOOQO-E8X-E8XOOQO<T![;'S%^;'S;=`%o<%lO%^l;TUo`Oy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^l;nYo`#e[Oy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^l[[o`#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^n?VSt^Oy%^z;'S%^;'S;=`%o<%lO%^l?hWjWOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^n@VU#bQOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjWOy%^z{@}{;'S%^;'S;=`%o<%lO%^~AUSo`#[~Oy%^z;'S%^;'S;=`%o<%lO%^lAg[#e[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!Y^Oy%^z;'S%^;'S;=`%o<%lO%^dCoS|SOy%^z;'S%^;'S;=`%o<%lO%^bDQU!OQOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS!OQo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[![Qo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^nFfSq^Oy%^z;'S%^;'S;=`%o<%lO%^nFwSp^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!bQo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!TUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!S^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!RQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[yx,kx,Sx,1,2,3,4,new er("m~RRYZ[z{a~~g~aO#^~~dP!P!Qg~lO#_~~",28,105)],topRules:{StyleSheet:[0,4],Styles:[1,86]},specialized:[{term:100,get:n=>wx[n]||-1},{term:58,get:n=>Qx[n]||-1},{term:101,get:n=>Px[n]||-1}],tokenPrec:1200});let jr=null;function Nr(){if(!jr&&typeof document=="object"&&document.body){let{style:n}=document.body,e=[],t=new Set;for(let i in n)i!="cssText"&&i!="cssFloat"&&typeof n[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,s=>"-"+s.toLowerCase())),t.has(i)||(e.push(i),t.add(i)));jr=e.sort().map(i=>({type:"property",label:i}))}return jr||[]}const xc=["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(n=>({type:"class",label:n})),wc=["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(n=>({type:"keyword",label:n})).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(n=>({type:"constant",label:n}))),vx=["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(n=>({type:"type",label:n})),Qt=/^(\w[\w-]*|-\w[\w-]*|)$/,Cx=/^-(-[\w-]*)?$/;function Zx(n,e){var t;if((n.name=="("||n.type.isError)&&(n=n.parent||n),n.name!="ArgList")return!1;let i=(t=n.parent)===null||t===void 0?void 0:t.firstChild;return(i==null?void 0:i.name)!="Callee"?!1:e.sliceString(i.from,i.to)=="var"}const Qc=new Ru,Tx=["Declaration"];function Rx(n){for(let e=n;;){if(e.type.isTop)return e;if(!(e=e.parent))return n}}function IO(n,e,t){if(e.to-e.from>4096){let i=Qc.get(e);if(i)return i;let s=[],r=new Set,o=e.cursor(K.IncludeAnonymous);if(o.firstChild())do for(let l of IO(n,o.node,t))r.has(l.label)||(r.add(l.label),s.push(l));while(o.nextSibling());return Qc.set(e,s),s}else{let i=[],s=new Set;return e.cursor().iterate(r=>{var o;if(t(r)&&r.matchContext(Tx)&&((o=r.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let l=n.sliceString(r.from,r.to);s.has(l)||(s.add(l),i.push({label:l,type:"variable"}))}}),i}}const Ax=n=>e=>{let{state:t,pos:i}=e,s=F(t).resolveInner(i,-1),r=s.type.isError&&s.from==s.to-1&&t.doc.sliceString(s.from,s.to)=="-";if(s.name=="PropertyName"||(r||s.name=="TagName")&&/^(Block|Styles)$/.test(s.resolve(s.to).name))return{from:s.from,options:Nr(),validFor:Qt};if(s.name=="ValueName")return{from:s.from,options:wc,validFor:Qt};if(s.name=="PseudoClassName")return{from:s.from,options:xc,validFor:Qt};if(n(s)||(e.explicit||r)&&Zx(s,t.doc))return{from:n(s)||r?s.from:i,options:IO(t.doc,Rx(s),n),validFor:Cx};if(s.name=="TagName"){for(let{parent:a}=s;a;a=a.parent)if(a.name=="Block")return{from:s.from,options:Nr(),validFor:Qt};return{from:s.from,options:vx,validFor:Qt}}if(!e.explicit)return null;let o=s.resolve(i),l=o.childBefore(i);return l&&l.name==":"&&o.name=="PseudoClassSelector"?{from:i,options:xc,validFor:Qt}:l&&l.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:i,options:wc,validFor:Qt}:o.name=="Block"||o.name=="Styles"?{from:i,options:Nr(),validFor:Qt}:null},Xx=Ax(n=>n.name=="VariableName"),nr=ti.define({name:"css",parser:$x.configure({props:[Di.add({Declaration:yi()}),li.add({"Block KeyframeList":Cl})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function jO(){return new Ci(nr,nr.data.of({autocomplete:Xx}))}const Fi=["_blank","_self","_top","_parent"],Gr=["ascii","utf-8","utf-16","latin1","latin1"],Fr=["get","post","put","delete"],Hr=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Xe=["true","false"],R={},Mx={a:{attrs:{href:null,ping:null,type:null,media:null,target:Fi,hreflang:null}},abbr:R,address:R,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:R,aside:R,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:R,base:{attrs:{href:null,target:Fi}},bdi:R,bdo:R,blockquote:{attrs:{cite:null}},body:R,br:R,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Hr,formmethod:Fr,formnovalidate:["novalidate"],formtarget:Fi,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:R,center:R,cite:R,code:R,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:R,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:R,div:R,dl:R,dt:R,em:R,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:R,figure:R,footer:R,form:{attrs:{action:null,name:null,"accept-charset":Gr,autocomplete:["on","off"],enctype:Hr,method:Fr,novalidate:["novalidate"],target:Fi}},h1:R,h2:R,h3:R,h4:R,h5:R,h6:R,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:R,hgroup:R,hr:R,html:{attrs:{manifest:null}},i:R,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:Hr,formmethod:Fr,formnovalidate:["novalidate"],formtarget:Fi,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:R,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:R,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:R,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Gr,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:R,noscript:R,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:R,param:{attrs:{name:null,value:null}},pre:R,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:R,rt:R,ruby:R,samp:R,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Gr}},section:R,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:R,source:{attrs:{src:null,type:null,media:null}},span:R,strong:R,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:R,summary:R,sup:R,table:R,tbody:R,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:R,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:R,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:R,time:{attrs:{datetime:null}},title:R,tr:R,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:R,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:R},NO={accesskey:null,class:null,contenteditable:Xe,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:Xe,autocorrect:Xe,autocapitalize:Xe,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":Xe,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Xe,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Xe,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Xe,"aria-hidden":Xe,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Xe,"aria-multiselectable":Xe,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Xe,"aria-relevant":null,"aria-required":Xe,"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},GO="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(n=>"on"+n);for(let n of GO)NO[n]=null;class An{constructor(e,t){this.tags=Object.assign(Object.assign({},Mx),e),this.globalAttrs=Object.assign(Object.assign({},NO),t),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}An.default=new An;function Xi(n,e,t=n.length){if(!e)return"";let i=e.firstChild,s=i&&i.getChild("TagName");return s?n.sliceString(s.from,Math.min(s.to,t)):""}function Mi(n,e=!1){for(;n;n=n.parent)if(n.name=="Element")if(e)e=!1;else return n;return null}function FO(n,e,t){let i=t.tags[Xi(n,Mi(e))];return(i==null?void 0:i.children)||t.allTags}function ta(n,e){let t=[];for(let i=Mi(e);i&&!i.type.isTop;i=Mi(i.parent)){let s=Xi(n,i);if(s&&i.lastChild.name=="CloseTag")break;s&&t.indexOf(s)<0&&(e.name=="EndTag"||e.from>=i.firstChild.to)&&t.push(s)}return t}const HO=/^[:\-\.\w\u00b7-\uffff]*$/;function Pc(n,e,t,i,s){let r=/\s*>/.test(n.sliceDoc(s,s+5))?"":">",o=Mi(t,!0);return{from:i,to:s,options:FO(n.doc,o,e).map(l=>({label:l,type:"type"})).concat(ta(n.doc,t).map((l,a)=>({label:"/"+l,apply:"/"+l+r,type:"type",boost:99-a}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function $c(n,e,t,i){let s=/\s*>/.test(n.sliceDoc(i,i+5))?"":">";return{from:t,to:i,options:ta(n.doc,e).map((r,o)=>({label:r,apply:r+s,type:"type",boost:99-o})),validFor:HO}}function Wx(n,e,t,i){let s=[],r=0;for(let o of FO(n.doc,t,e))s.push({label:"<"+o,type:"type"});for(let o of ta(n.doc,t))s.push({label:"",type:"type",boost:99-r++});return{from:i,to:i,options:s,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Ex(n,e,t,i,s){let r=Mi(t),o=r?e.tags[Xi(n.doc,r)]:null,l=o&&o.attrs?Object.keys(o.attrs):[],a=o&&o.globalAttrs===!1?l:l.length?l.concat(e.globalAttrNames):e.globalAttrNames;return{from:i,to:s,options:a.map(h=>({label:h,type:"property"})),validFor:HO}}function Vx(n,e,t,i,s){var r;let o=(r=t.parent)===null||r===void 0?void 0:r.getChild("AttributeName"),l=[],a;if(o){let h=n.sliceDoc(o.from,o.to),c=e.globalAttrs[h];if(!c){let f=Mi(t),u=f?e.tags[Xi(n.doc,f)]:null;c=(u==null?void 0:u.attrs)&&u.attrs[h]}if(c){let f=n.sliceDoc(i,s).toLowerCase(),u='"',d='"';/^['"]/.test(f)?(a=f[0]=='"'?/^[^"]*$/:/^[^']*$/,u="",d=n.sliceDoc(s,s+1)==f[0]?"":f[0],f=f.slice(1),i++):a=/^[^\s<>='"]*$/;for(let O of c)l.push({label:O,apply:u+O+d,type:"constant"})}}return{from:i,to:s,options:l,validFor:a}}function KO(n,e){let{state:t,pos:i}=e,s=F(t).resolveInner(i,-1),r=s.resolve(i);for(let o=i,l;r==s&&(l=s.childBefore(o));){let a=l.lastChild;if(!a||!a.type.isError||a.fromKO(i,s)}const qx=ut.parser.configure({top:"SingleExpression"}),JO=[{tag:"script",attrs:n=>n.type=="text/typescript"||n.lang=="ts",parser:vO.parser},{tag:"script",attrs:n=>n.type=="text/babel"||n.type=="text/jsx",parser:CO.parser},{tag:"script",attrs:n=>n.type=="text/typescript-jsx",parser:ZO.parser},{tag:"script",attrs(n){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(n.type)},parser:qx},{tag:"script",attrs(n){return!n.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(n.type)},parser:ut.parser},{tag:"style",attrs(n){return(!n.lang||n.lang=="css")&&(!n.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(n.type))},parser:nr.parser}],ep=[{name:"style",parser:nr.parser.configure({top:"Styles"})}].concat(GO.map(n=>({name:n,parser:ut.parser}))),tp=ti.define({name:"html",parser:ox.configure({props:[Di.add({Element(n){let e=/^(\s*)(<\/)?/.exec(n.textAfter);return n.node.to<=n.pos+e[0].length?n.continue():n.lineIndent(n.node.from)+(e[2]?0:n.unit)},"OpenTag CloseTag SelfClosingTag"(n){return n.column(n.node.from)+n.unit},Document(n){if(n.pos+/\s*/.exec(n.textAfter)[0].lengthn.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),Cs=tp.configure({wrap:LO(JO,ep)});function ip(n={}){let e="",t;n.matchClosingTags===!1&&(e="noMatch"),n.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(n.nestedLanguages&&n.nestedLanguages.length||n.nestedAttributes&&n.nestedAttributes.length)&&(t=LO((n.nestedLanguages||[]).concat(JO),(n.nestedAttributes||[]).concat(ep)));let i=t?tp.configure({wrap:t,dialect:e}):e?Cs.configure({dialect:e}):Cs;return new Ci(i,[Cs.data.of({autocomplete:Dx(n)}),n.autoCloseTags!==!1?zx:[],Jo().support,jO().support])}const vc=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),zx=$.inputHandler.of((n,e,t,i,s)=>{if(n.composing||n.state.readOnly||e!=t||i!=">"&&i!="/"||!Cs.isActiveAt(n.state,e,-1))return!1;let r=s(),{state:o}=r,l=o.changeByRange(a=>{var h,c,f;let u=o.doc.sliceString(a.from-1,a.to)==i,{head:d}=a,O=F(o).resolveInner(d,-1),m;if(u&&i==">"&&O.name=="EndTag"){let g=O.parent;if(((c=(h=g.parent)===null||h===void 0?void 0:h.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(m=Xi(o.doc,g.parent,d))&&!vc.has(m)){let b=d+(o.doc.sliceString(d,d+1)===">"?1:0),S=``;return{range:a,changes:{from:d,to:b,insert:S}}}}else if(u&&i=="/"&&O.name=="IncompleteCloseTag"){let g=O.parent;if(O.from==d-2&&((f=g.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(m=Xi(o.doc,g,d))&&!vc.has(m)){let b=d+(o.doc.sliceString(d,d+1)===">"?1:0),S=`${m}>`;return{range:y.cursor(d+S.length,-1),changes:{from:d,to:b,insert:S}}}}return{range:a}});return l.changes.empty?!1:(n.dispatch([r,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});class sr{static create(e,t,i,s,r){let o=s+(s<<8)+e+(t<<4)|0;return new sr(e,t,i,o,r,[],[])}constructor(e,t,i,s,r,o,l){this.type=e,this.value=t,this.from=i,this.hash=s,this.end=r,this.children=o,this.positions=l,this.hashProp=[[X.contextHash,s]]}addChild(e,t){e.prop(X.contextHash)!=this.hash&&(e=new D(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let i=this.children.length-1;return i>=0&&(t=Math.max(t,this.positions[i]+this.children[i].length+this.from)),new D(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(s,r,o)=>new D(le.none,s,r,o,this.hashProp)})}}var Q;(function(n){n[n.Document=1]="Document",n[n.CodeBlock=2]="CodeBlock",n[n.FencedCode=3]="FencedCode",n[n.Blockquote=4]="Blockquote",n[n.HorizontalRule=5]="HorizontalRule",n[n.BulletList=6]="BulletList",n[n.OrderedList=7]="OrderedList",n[n.ListItem=8]="ListItem",n[n.ATXHeading1=9]="ATXHeading1",n[n.ATXHeading2=10]="ATXHeading2",n[n.ATXHeading3=11]="ATXHeading3",n[n.ATXHeading4=12]="ATXHeading4",n[n.ATXHeading5=13]="ATXHeading5",n[n.ATXHeading6=14]="ATXHeading6",n[n.SetextHeading1=15]="SetextHeading1",n[n.SetextHeading2=16]="SetextHeading2",n[n.HTMLBlock=17]="HTMLBlock",n[n.LinkReference=18]="LinkReference",n[n.Paragraph=19]="Paragraph",n[n.CommentBlock=20]="CommentBlock",n[n.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",n[n.Escape=22]="Escape",n[n.Entity=23]="Entity",n[n.HardBreak=24]="HardBreak",n[n.Emphasis=25]="Emphasis",n[n.StrongEmphasis=26]="StrongEmphasis",n[n.Link=27]="Link",n[n.Image=28]="Image",n[n.InlineCode=29]="InlineCode",n[n.HTMLTag=30]="HTMLTag",n[n.Comment=31]="Comment",n[n.ProcessingInstruction=32]="ProcessingInstruction",n[n.Autolink=33]="Autolink",n[n.HeaderMark=34]="HeaderMark",n[n.QuoteMark=35]="QuoteMark",n[n.ListMark=36]="ListMark",n[n.LinkMark=37]="LinkMark",n[n.EmphasisMark=38]="EmphasisMark",n[n.CodeMark=39]="CodeMark",n[n.CodeText=40]="CodeText",n[n.CodeInfo=41]="CodeInfo",n[n.LinkTitle=42]="LinkTitle",n[n.LinkLabel=43]="LinkLabel",n[n.URL=44]="URL"})(Q||(Q={}));class Lx{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}}class _x{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 cn(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,i=0){for(let s=t;s=e.stack[t.depth+1].value+t.baseIndent)return!0;if(t.indent>=t.baseIndent+4)return!1;let i=(n.type==Q.OrderedList?sa:na)(t,e,!1);return i>0&&(n.type!=Q.BulletList||ia(t,e,!1)<0)&&t.text.charCodeAt(t.pos+i-1)==n.value}const np={[Q.Blockquote](n,e,t){return t.next!=62?!1:(t.markers.push(L(Q.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1)),t.moveBase(t.pos+(je(t.text.charCodeAt(t.pos+1))?2:1)),n.end=e.lineStart+t.text.length,!0)},[Q.ListItem](n,e,t){return t.indent-1?!1:(t.moveBaseColumn(t.baseIndent+n.value),!0)},[Q.OrderedList]:Cc,[Q.BulletList]:Cc,[Q.Document](){return!0}};function je(n){return n==32||n==9||n==10||n==13}function cn(n,e=0){for(;et&&je(n.charCodeAt(e-1));)e--;return e}function sp(n){if(n.next!=96&&n.next!=126)return-1;let e=n.pos+1;for(;e-1&&n.depth==e.stack.length||i<3?-1:1}function op(n,e){for(let t=n.stack.length-1;t>=0;t--)if(n.stack[t].type==e)return!0;return!1}function na(n,e,t){return(n.next==45||n.next==43||n.next==42)&&(n.pos==n.text.length-1||je(n.text.charCodeAt(n.pos+1)))&&(!t||op(e,Q.BulletList)||n.skipSpace(n.pos+2)=48&&s<=57;){i++;if(i==n.text.length)return-1;s=n.text.charCodeAt(i)}return i==n.pos||i>n.pos+9||s!=46&&s!=41||in.pos+1||n.next!=49)?-1:i+1-n.pos}function lp(n){if(n.next!=35)return-1;let e=n.pos+1;for(;e6?-1:t}function ap(n){if(n.next!=45&&n.next!=61||n.indent>=n.baseIndent+4)return-1;let e=n.pos+1;for(;e/,cp=/\?>/,nl=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),Cs=tp.configure({wrap:LO(JO,ep)});function ip(n={}){let e="",t;n.matchClosingTags===!1&&(e="noMatch"),n.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(n.nestedLanguages&&n.nestedLanguages.length||n.nestedAttributes&&n.nestedAttributes.length)&&(t=LO((n.nestedLanguages||[]).concat(JO),(n.nestedAttributes||[]).concat(ep)));let i=t?tp.configure({wrap:t,dialect:e}):e?Cs.configure({dialect:e}):Cs;return new Ci(i,[Cs.data.of({autocomplete:Dx(n)}),n.autoCloseTags!==!1?zx:[],Jo().support,jO().support])}const Cc=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),zx=$.inputHandler.of((n,e,t,i,s)=>{if(n.composing||n.state.readOnly||e!=t||i!=">"&&i!="/"||!Cs.isActiveAt(n.state,e,-1))return!1;let r=s(),{state:o}=r,l=o.changeByRange(a=>{var h,c,f;let u=o.doc.sliceString(a.from-1,a.to)==i,{head:d}=a,O=F(o).resolveInner(d,-1),m;if(u&&i==">"&&O.name=="EndTag"){let g=O.parent;if(((c=(h=g.parent)===null||h===void 0?void 0:h.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(m=Xi(o.doc,g.parent,d))&&!Cc.has(m)){let b=d+(o.doc.sliceString(d,d+1)===">"?1:0),S=``;return{range:a,changes:{from:d,to:b,insert:S}}}}else if(u&&i=="/"&&O.name=="IncompleteCloseTag"){let g=O.parent;if(O.from==d-2&&((f=g.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(m=Xi(o.doc,g,d))&&!Cc.has(m)){let b=d+(o.doc.sliceString(d,d+1)===">"?1:0),S=`${m}>`;return{range:y.cursor(d+S.length,-1),changes:{from:d,to:b,insert:S}}}}return{range:a}});return l.changes.empty?!1:(n.dispatch([r,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});class nr{static create(e,t,i,s,r){let o=s+(s<<8)+e+(t<<4)|0;return new nr(e,t,i,o,r,[],[])}constructor(e,t,i,s,r,o,l){this.type=e,this.value=t,this.from=i,this.hash=s,this.end=r,this.children=o,this.positions=l,this.hashProp=[[X.contextHash,s]]}addChild(e,t){e.prop(X.contextHash)!=this.hash&&(e=new D(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let i=this.children.length-1;return i>=0&&(t=Math.max(t,this.positions[i]+this.children[i].length+this.from)),new D(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(s,r,o)=>new D(oe.none,s,r,o,this.hashProp)})}}var Q;(function(n){n[n.Document=1]="Document",n[n.CodeBlock=2]="CodeBlock",n[n.FencedCode=3]="FencedCode",n[n.Blockquote=4]="Blockquote",n[n.HorizontalRule=5]="HorizontalRule",n[n.BulletList=6]="BulletList",n[n.OrderedList=7]="OrderedList",n[n.ListItem=8]="ListItem",n[n.ATXHeading1=9]="ATXHeading1",n[n.ATXHeading2=10]="ATXHeading2",n[n.ATXHeading3=11]="ATXHeading3",n[n.ATXHeading4=12]="ATXHeading4",n[n.ATXHeading5=13]="ATXHeading5",n[n.ATXHeading6=14]="ATXHeading6",n[n.SetextHeading1=15]="SetextHeading1",n[n.SetextHeading2=16]="SetextHeading2",n[n.HTMLBlock=17]="HTMLBlock",n[n.LinkReference=18]="LinkReference",n[n.Paragraph=19]="Paragraph",n[n.CommentBlock=20]="CommentBlock",n[n.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",n[n.Escape=22]="Escape",n[n.Entity=23]="Entity",n[n.HardBreak=24]="HardBreak",n[n.Emphasis=25]="Emphasis",n[n.StrongEmphasis=26]="StrongEmphasis",n[n.Link=27]="Link",n[n.Image=28]="Image",n[n.InlineCode=29]="InlineCode",n[n.HTMLTag=30]="HTMLTag",n[n.Comment=31]="Comment",n[n.ProcessingInstruction=32]="ProcessingInstruction",n[n.Autolink=33]="Autolink",n[n.HeaderMark=34]="HeaderMark",n[n.QuoteMark=35]="QuoteMark",n[n.ListMark=36]="ListMark",n[n.LinkMark=37]="LinkMark",n[n.EmphasisMark=38]="EmphasisMark",n[n.CodeMark=39]="CodeMark",n[n.CodeText=40]="CodeText",n[n.CodeInfo=41]="CodeInfo",n[n.LinkTitle=42]="LinkTitle",n[n.LinkLabel=43]="LinkLabel",n[n.URL=44]="URL"})(Q||(Q={}));class Lx{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}}class _x{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 cn(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,i=0){for(let s=t;s=e.stack[t.depth+1].value+t.baseIndent)return!0;if(t.indent>=t.baseIndent+4)return!1;let i=(n.type==Q.OrderedList?ra:sa)(t,e,!1);return i>0&&(n.type!=Q.BulletList||na(t,e,!1)<0)&&t.text.charCodeAt(t.pos+i-1)==n.value}const np={[Q.Blockquote](n,e,t){return t.next!=62?!1:(t.markers.push(L(Q.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1)),t.moveBase(t.pos+(je(t.text.charCodeAt(t.pos+1))?2:1)),n.end=e.lineStart+t.text.length,!0)},[Q.ListItem](n,e,t){return t.indent-1?!1:(t.moveBaseColumn(t.baseIndent+n.value),!0)},[Q.OrderedList]:Zc,[Q.BulletList]:Zc,[Q.Document](){return!0}};function je(n){return n==32||n==9||n==10||n==13}function cn(n,e=0){for(;et&&je(n.charCodeAt(e-1));)e--;return e}function sp(n){if(n.next!=96&&n.next!=126)return-1;let e=n.pos+1;for(;e-1&&n.depth==e.stack.length||i<3?-1:1}function op(n,e){for(let t=n.stack.length-1;t>=0;t--)if(n.stack[t].type==e)return!0;return!1}function sa(n,e,t){return(n.next==45||n.next==43||n.next==42)&&(n.pos==n.text.length-1||je(n.text.charCodeAt(n.pos+1)))&&(!t||op(e,Q.BulletList)||n.skipSpace(n.pos+2)=48&&s<=57;){i++;if(i==n.text.length)return-1;s=n.text.charCodeAt(i)}return i==n.pos||i>n.pos+9||s!=46&&s!=41||in.pos+1||n.next!=49)?-1:i+1-n.pos}function lp(n){if(n.next!=35)return-1;let e=n.pos+1;for(;e6?-1:t}function ap(n){if(n.next!=45&&n.next!=61||n.indent>=n.baseIndent+4)return-1;let e=n.pos+1;for(;e/,cp=/\?>/,nl=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*/i.exec(i);if(r)return n.append(L(Q.Comment,t,t+1+r[0].length));let o=/^\?[^]*?\?>/.exec(i);if(o)return n.append(L(Q.ProcessingInstruction,t,t+1+o[0].length));let l=/^(?:![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(i);return l?n.append(L(Q.HTMLTag,t,t+1+l[0].length)):-1},Emphasis(n,e,t){if(e!=95&&e!=42)return-1;let i=t+1;for(;n.char(i)==e;)i++;let s=n.slice(t-1,t),r=n.slice(i,i+1),o=Mn.test(s),l=Mn.test(r),a=/\s|^$/.test(s),h=/\s|^$/.test(r),c=!h&&(!l||a||o),f=!a&&(!o||h||l),u=c&&(e==42||!f||o),d=f&&(e==42||!c||l);return n.append(new qe(e==95?mp:gp,t,i,(u?1:0)|(d?2:0)))},HardBreak(n,e,t){if(e==92&&n.char(t+1)==10)return n.append(L(Q.HardBreak,t,t+2));if(e==32){let i=t+1;for(;n.char(i)==32;)i++;if(n.char(i)==10&&i>=t+2)return n.append(L(Q.HardBreak,t,i+1))}return-1},Link(n,e,t){return e==91?n.append(new qe(di,t,t+1,1)):-1},Image(n,e,t){return e==33&&n.char(t+1)==91?n.append(new qe(rl,t,t+2,1)):-1},LinkEnd(n,e,t){if(e!=93)return-1;for(let i=n.parts.length-1;i>=0;i--){let s=n.parts[i];if(s instanceof qe&&(s.type==di||s.type==rl)){if(!s.side||n.skipSpace(s.to)==t&&!/[(\[]/.test(n.slice(t+1,t+2)))return n.parts[i]=null,-1;let r=n.takeContent(i),o=n.parts[i]=Fx(n,r,s.type==di?Q.Link:Q.Image,s.from,t+1);if(s.type==di)for(let l=0;le?L(Q.URL,e+t,r+t):r==n.length?null:!1}}function Sp(n,e,t){let i=n.charCodeAt(e);if(i!=39&&i!=34&&i!=40)return!1;let s=i==40?41:i;for(let r=e+1,o=!1;r=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,i,s,r){return this.append(new qe(e,t,i,(s?1:0)|(r?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof qe&&(t.type==di||t.type==rl))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let i=e;i=e;a--){let m=this.parts[a];if(m instanceof qe&&m.side&1&&m.type==s.type&&!(r&&(s.side&1||m.side&2)&&(m.to-m.from+o)%3==0&&((m.to-m.from)%3||o%3))){l=m;break}}if(!l)continue;let h=s.type.resolve,c=[],f=l.from,u=s.to;if(r){let m=Math.min(2,l.to-l.from,o);f=l.to-m,u=s.from+m,h=m==1?"Emphasis":"StrongEmphasis"}l.type.mark&&c.push(this.elt(l.type.mark,f,l.to));for(let m=a+1;m=0;t--){let i=this.parts[t];if(i instanceof qe&&i.type==e)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}skipSpace(e){return cn(this.text,e-this.offset)+this.offset}elt(e,t,i,s){return typeof e=="string"?L(this.parser.getNodeType(e),t,i,s):new pp(e,t)}}function ol(n,e){if(!e.length)return n;if(!n.length)return e;let t=n.slice(),i=0;for(let s of e){for(;i(e?e-1:0))return!1;if(this.fragmentEnd<0){let r=this.fragment.to;for(;r>0&&this.input.read(r-1,r)!=` -`;)r--;this.fragmentEnd=r?r-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let s=e+this.fragment.offset;for(;i.to<=s;)if(!i.parent())return!1;for(;;){if(i.from>=s)return this.fragment.from<=t;if(!i.childAfter(s))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(X.contextHash)==e}takeNodes(e){let t=this.cursor,i=this.fragment.offset,s=this.fragmentEnd-(this.fragment.openEnd?1:0),r=e.absoluteLineStart,o=r,l=e.block.children.length,a=o,h=l;for(;;){if(t.to-i>s){if(t.type.isAnonymous&&t.firstChild())continue;break}let c=kp(t.from-i,e.ranges);if(t.to-i<=e.ranges[e.rangeI].to)e.addNode(t.tree,c);else{let f=new D(e.parser.nodeSet.types[Q.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(f,t.tree),e.addNode(f,c)}if(t.type.is("Block")&&(Kx.indexOf(t.type.id)<0?(o=t.to-i,l=e.block.children.length):(o=a,l=h,a=t.to-i,h=e.block.children.length)),!t.nextSibling())break}for(;e.block.children.length>l;)e.block.children.pop(),e.block.positions.pop();return o-r}}function kp(n,e){let t=n;for(let i=1;iOs[n]),Object.keys(Os).map(n=>Ix[n]),Object.keys(Os),jx,np,Object.keys(Jr).map(n=>Jr[n]),Object.keys(Jr),[]);function iw(n,e,t){let i=[];for(let s=n.firstChild,r=e;;s=s.nextSibling){let o=s?s.from:t;if(o>r&&i.push({from:r,to:o}),!s)break;r=s.to}return i}function nw(n){let{codeParser:e,htmlParser:t}=n;return{wrap:Au((s,r)=>{let o=s.type.id;if(e&&(o==Q.CodeBlock||o==Q.FencedCode)){let l="";if(o==Q.FencedCode){let h=s.node.getChild(Q.CodeInfo);h&&(l=r.read(h.from,h.to))}let a=e(l);if(a)return{parser:a,overlay:h=>h.type.id==Q.CodeText}}else if(t&&(o==Q.HTMLBlock||o==Q.HTMLTag))return{parser:t,overlay:iw(s.node,s.from,s.to)};return null})}}const sw={resolve:"Strikethrough",mark:"StrikethroughMark"},rw={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":p.strikethrough}},{name:"StrikethroughMark",style:p.processingInstruction}],parseInline:[{name:"Strikethrough",parse(n,e,t){if(e!=126||n.char(t+1)!=126||n.char(t+2)==126)return-1;let i=n.slice(t-1,t),s=n.slice(t+2,t+3),r=/\s|^$/.test(i),o=/\s|^$/.test(s),l=Mn.test(i),a=Mn.test(s);return n.addDelimiter(sw,t,t+2,!o&&(!a||r||l),!r&&(!l||o||a))},after:"Emphasis"}]};function fn(n,e,t=0,i,s=0){let r=0,o=!0,l=-1,a=-1,h=!1,c=()=>{i.push(n.elt("TableCell",s+l,s+a,n.parser.parseInline(e.slice(l,a),s+l)))};for(let f=t;f-1)&&r++,o=!1,i&&(l>-1&&c(),i.push(n.elt("TableDelimiter",f+s,f+s+1))),l=a=-1):(h||u!=32&&u!=9)&&(l<0&&(l=f),a=f+1),h=!h&&u==92}return l>-1&&(r++,i&&c()),r}function Ac(n,e){for(let t=e;ts instanceof Xc)||!Ac(e.text,e.basePos))return!1;let i=n.scanLine(n.absoluteLineEnd+1).text;return xp.test(i)&&fn(n,e.text,e.basePos)==fn(n,i,e.basePos)},before:"SetextHeading"}]};class lw{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 aw={defineNodes:[{name:"Task",block:!0,style:p.list},{name:"TaskMarker",style:p.atom}],parseBlock:[{name:"TaskList",leaf(n,e){return/^\[[ xX]\][ \t]/.test(e.content)&&n.parentType().name=="ListItem"?new lw:null},after:"SetextHeading"}]},Mc=/(www\.)|(https?:\/\/)|([\w.+-]+@)|(mailto:|xmpp:)/gy,Wc=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,hw=/[\w-]+\.[\w-]+($|\/)/,Ec=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Vc=/\/[a-zA-Z\d@.]+/gy;function Yc(n,e,t,i){let s=0;for(let r=e;r-1)return-1;let i=e+t[0].length;for(;;){let s=n[i-1],r;if(/[?!.,:*_~]/.test(s)||s==")"&&Yc(n,e,i,")")>Yc(n,e,i,"("))i--;else if(s==";"&&(r=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(n.slice(e,i))))i=e+r.index;else break}return i}function Dc(n,e){Ec.lastIndex=e;let t=Ec.exec(n);if(!t)return-1;let i=t[0][t[0].length-1];return i=="_"||i=="-"?-1:e+t[0].length-(i=="."?1:0)}const fw={parseInline:[{name:"Autolink",parse(n,e,t){let i=t-n.offset;Mc.lastIndex=i;let s=Mc.exec(n.text),r=-1;if(!s)return-1;if(s[1]||s[2]){if(r=cw(n.text,i+s[0].length),r>-1&&n.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(n.text.slice(i,r));r=i+o[0].length}}else s[3]?r=Dc(n.text,i):(r=Dc(n.text,i+s[0].length),r>-1&&s[0]=="xmpp:"&&(Vc.lastIndex=r,s=Vc.exec(n.text),s&&(r=s.index+s[0].length)));return r<0?-1:(n.addElement(n.elt("URL",t,r+n.offset)),r+n.offset)}}]},uw=[ow,aw,rw,fw];function wp(n,e,t){return(i,s,r)=>{if(s!=n||i.char(r+1)==n)return-1;let o=[i.elt(t,r,r+1)];for(let l=r+1;l"}}}),Pp=new X,$p=tw.configure({props:[li.add(n=>!n.is("Block")||n.is("Document")||ll(n)!=null||mw(n)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),Pp.add(ll),Di.add({Document:()=>null}),Xt.add({Document:Qp})]});function ll(n){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(n.name);return e?+e[1]:void 0}function mw(n){return n.name=="OrderedList"||n.name=="BulletList"}function gw(n,e){let t=n;for(;;){let i=t.nextSibling,s;if(!i||(s=ll(i.type))!=null&&s<=e)break;t=i}return t.to}const bw=Du.of((n,e,t)=>{for(let i=F(n).resolveInner(t,-1);i&&!(i.fromt)return{from:t,to:r}}return null});function ra(n){return new Ee(Qp,n,[bw],"markdown")}const Sw=ra($p),yw=$p.configure([uw,Ow,dw,pw,{props:[li.add({Table:(n,e)=>({from:e.doc.lineAt(n.from).to,to:n.to})})]}]),vp=ra(yw);function kw(n,e){return t=>{if(t&&n){let i=null;if(t=/\S*/.exec(t)[0],typeof n=="function"?i=n(t):i=Ds.matchLanguageName(n,t,!0),i instanceof Ds)return i.support?i.support.language.parser:ii.getSkippingParser(i.load());if(i)return i.parser}return e?e.parser:null}}class ms{constructor(e,t,i,s,r,o,l){this.node=e,this.from=t,this.to=i,this.spaceBefore=s,this.spaceAfter=r,this.type=o,this.item=l}blank(e,t=!0){let i=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;i.length0;s--)i+=" ";return i+(t?this.spaceAfter:"")}}marker(e,t){let i=this.node.name=="OrderedList"?String(+Zp(this.item,e)[2]+t):"";return this.spaceBefore+i+this.type+this.spaceAfter}}function Cp(n,e){let t=[];for(let s=n;s&&s.name!="Document";s=s.parent)(s.name=="ListItem"||s.name=="Blockquote"||s.name=="FencedCode")&&t.push(s);let i=[];for(let s=t.length-1;s>=0;s--){let r=t[s],o,l=e.lineAt(r.from),a=r.from-l.from;if(r.name=="FencedCode")i.push(new ms(r,a,a,"","","",null));else if(r.name=="Blockquote"&&(o=/^ *>( ?)/.exec(l.text.slice(a))))i.push(new ms(r,a,a+o[0].length,"",o[1],">",null));else if(r.name=="ListItem"&&r.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(l.text.slice(a)))){let h=o[3],c=o[0].length;h.length>=4&&(h=h.slice(0,h.length-4),c-=4),i.push(new ms(r.parent,a,a+c,o[1],h,o[2],r))}else if(r.name=="ListItem"&&r.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(l.text.slice(a)))){let h=o[4],c=o[0].length;h.length>4&&(h=h.slice(0,h.length-4),c-=4);let f=o[2];o[3]&&(f+=o[3].replace(/[xX]/," ")),i.push(new ms(r.parent,a,a+c,o[1],h,f,r))}}return i}function Zp(n,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(n.from,n.from+10))}function eo(n,e,t,i=0){for(let s=-1,r=n;;){if(r.name=="ListItem"){let l=Zp(r,e),a=+l[2];if(s>=0){if(a!=s+1)return;t.push({from:r.from+l[1].length,to:r.from+l[0].length,insert:String(s+2+i)})}s=a}let o=r.nextSibling;if(!o)break;r=o}}function oa(n,e){let t=/^[ \t]*/.exec(n)[0].length;if(!t||e.facet(Yi)!=" ")return n;let i=Ge(n,4,t),s="";for(let r=i;r>0;)r>=4?(s+=" ",r-=4):(s+=" ",r--);return s+n.slice(t)}const xw=({state:n,dispatch:e})=>{let t=F(n),{doc:i}=n,s=null,r=n.changeByRange(o=>{if(!o.empty||!vp.isActiveAt(n,o.from))return s={range:o};let l=o.from,a=i.lineAt(l),h=Cp(t.resolveInner(l,-1),i);for(;h.length&&h[h.length-1].from>l-a.from;)h.pop();if(!h.length)return s={range:o};let c=h[h.length-1];if(c.to-c.spaceAfter.length>l-a.from)return s={range:o};let f=l>=c.to-c.spaceAfter.length&&!/\S/.test(a.text.slice(c.to));if(c.item&&f){let g=c.node.firstChild,b=c.node.getChild("ListItem","ListItem");if(g.to>=l||b&&b.to0&&!/[^\s>]/.test(i.lineAt(a.from-1).text)){let S=h.length>1?h[h.length-2]:null,x,w="";S&&S.item?(x=a.from+S.from,w=S.marker(i,1)):x=a.from+(S?S.to:0);let k=[{from:x,to:l,insert:w}];return c.node.name=="OrderedList"&&eo(c.item,i,k,-2),S&&S.node.name=="OrderedList"&&eo(S.item,i,k),{range:y.cursor(x+w.length),changes:k}}else{let S=zc(h,n,a);return{range:y.cursor(l+S.length+1),changes:{from:a.from,insert:S+n.lineBreak}}}}if(c.node.name=="Blockquote"&&f&&a.from){let g=i.lineAt(a.from-1),b=/>\s*$/.exec(g.text);if(b&&b.index==c.from){let S=n.changes([{from:g.from+b.index,to:g.to},{from:a.from+c.from,to:a.to}]);return{range:o.map(S),changes:S}}}let u=[];c.node.name=="OrderedList"&&eo(c.item,i,u);let d=c.item&&c.item.from]*/.exec(a.text)[0].length>=c.to)for(let g=0,b=h.length-1;g<=b;g++)O+=g==b&&!d?h[g].marker(i,1):h[g].blank(ga.from&&/\s/.test(a.text.charAt(m-a.from-1));)m--;return O=oa(O,n),ww(c.node,n.doc)&&(O=zc(h,n,a)+n.lineBreak+O),u.push({from:m,to:l,insert:n.lineBreak+O}),{range:y.cursor(m+O.length+1),changes:u}});return s?!1:(e(n.update(r,{scrollIntoView:!0,userEvent:"input"})),!0)};function qc(n){return n.name=="QuoteMark"||n.name=="ListMark"}function ww(n,e){if(n.name!="OrderedList"&&n.name!="BulletList")return!1;let t=n.firstChild,i=n.getChild("ListItem","ListItem");if(!i)return!1;let s=e.lineAt(t.to),r=e.lineAt(i.from),o=/^[\s>]*$/.test(s.text);return s.number+(o?0:1){let t=F(n),i=null,s=n.changeByRange(r=>{let o=r.from,{doc:l}=n;if(r.empty&&vp.isActiveAt(n,r.from)){let a=l.lineAt(o),h=Cp(Qw(t,o),l);if(h.length){let c=h[h.length-1],f=c.to-c.spaceAfter.length+(c.spaceAfter?1:0);if(o-a.from>f&&!/\S/.test(a.text.slice(f,o-a.from)))return{range:y.cursor(a.from+f),changes:{from:a.from+f,to:o}};if(o-a.from==f&&(!c.item||a.from<=c.item.from||!/\S/.test(a.text.slice(0,c.to)))){let u=a.from+c.from;if(c.item&&c.node.from1&&n.eat("$");var t=n.next();return/['"({]/.test(t)?(e.tokens[0]=br(t,t=="("?"quote":t=="{"?"def":"string"),Ei(n,e)):(/\d/.test(t)||n.eatWhile(/\w/),e.tokens.shift(),"def")};function Ew(n){return function(e,t){return e.sol()&&e.string==n&&t.tokens.shift(),e.skipToEnd(),"string.special"}}function Ei(n,e){return(e.tokens[0]||Mw)(n,e)}const Vw={name:"shell",startState:function(){return{tokens:[]}},token:function(n,e){return Ei(n,e)},languageData:{autocomplete:Tp.concat(Rp,Ap),closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}};var Yw=["true","false","on","off","yes","no"],Dw=new RegExp("\\b(("+Yw.join(")|(")+"))$","i");const qw={name:"yaml",token:function(n,e){var t=n.peek(),i=e.escaped;if(e.escaped=!1,t=="#"&&(n.pos==0||/\s/.test(n.string.charAt(n.pos-1))))return n.skipToEnd(),"comment";if(n.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(e.literal&&n.indentation()>e.keyCol)return n.skipToEnd(),"string";if(e.literal&&(e.literal=!1),n.sol()){if(e.keyCol=0,e.pair=!1,e.pairStart=!1,n.match("---")||n.match("..."))return"def";if(n.match(/^\s*-\s+/))return"meta"}if(n.match(/^(\{|\}|\[|\])/))return t=="{"?e.inlinePairs++:t=="}"?e.inlinePairs--:t=="["?e.inlineList++:e.inlineList--,"meta";if(e.inlineList>0&&!i&&t==",")return n.next(),"meta";if(e.inlinePairs>0&&!i&&t==",")return e.keyCol=0,e.pair=!1,e.pairStart=!1,n.next(),"meta";if(e.pairStart){if(n.match(/^\s*(\||\>)\s*/))return e.literal=!0,"meta";if(n.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable";if(e.inlinePairs==0&&n.match(/^\s*-?[0-9\.\,]+\s?$/)||e.inlinePairs>0&&n.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(n.match(Dw))return"keyword"}return!e.pair&&n.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(e.pair=!0,e.keyCol=n.indentation(),"atom"):e.pair&&n.match(/^:\s*/)?(e.pairStart=!0,"meta"):(e.pairStart=!1,e.escaped=t=="\\",n.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},languageData:{commentTokens:{line:"#"}}};var Lc,_c,Bc;function Uc({view:n,searchConfig:e}){const t=Hc.useState(""),i=Vp(t,2),s=i[0],r=i[1],o=(u,d)=>{r(d),l(d)},l=u=>{n.dispatch({effects:Ri.of(new Dl({search:u}))})},a=u=>{u.key==="Enter"&&(u.shiftKey?f():c())},h=u=>{u.key==="Escape"&&Ll(n)},c=()=>{l(s),vn(n)},f=()=>{l(s),Cn(n)};return rt.createElement(Ip,{renderLabel:"",inputRef:u=>{setTimeout(()=>u==null?void 0:u.focus(),0)},size:"small",display:"inline-block",width:"20rem",placeholder:e.placeholder,onChange:o,onKeyDown:a,onKeyUp:h,renderBeforeInput:Lc||(Lc=rt.createElement(Gp,{size:"x-small"})),renderAfterInput:rt.createElement("span",null,rt.createElement(ha,{size:"small",withBorder:!1,withBackground:!1,onClick:c,screenReaderLabel:e.nextResultLabel},_c||(_c=rt.createElement(jp,null))),rt.createElement(ha,{size:"small",withBorder:!1,withBackground:!1,onClick:f,screenReaderLabel:e.prevResultLabel},Bc||(Bc=rt.createElement(Np,null))))})}function zw(n){return n?OS({createPanel:e=>{var t;const i=document.createElement("div");return i.style.padding="8px",Number(rt.version.split(".")[0])>=18?Wp(()=>import("./index-DCzcanBz.js").then(r=>r.c),__vite__mapDeps([0,1])).then(r=>{r.createRoot(i).render(t||(t=rt.createElement(Uc,{view:e,searchConfig:n})))}).catch(r=>{}):Ep.render(rt.createElement(Uc,{view:e,searchConfig:n}),i),{dom:i}}}):[]}const Lw=(n,e)=>{const t=e.attachment,i=e.height,s=e.width,r={top:{borderBottomLeftRadius:0,borderBottomRightRadius:0},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0}},o={top:{marginBottom:0,marginTop:"0.25rem"},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0,marginBottom:"0.25rem"}},l=1.4375;return{codeEditor:{label:"codeEditor",position:"relative",boxSizing:"border-box",height:i||"auto",width:s},label:{label:"label",height:"100%",width:"100%"},codeEditorContainer:{label:"codeEditorContainer",height:"100%",width:"100%",borderColor:n==null?void 0:n.borderColor,borderStyle:"solid",borderWidth:n==null?void 0:n.borderWidth,borderRadius:n.borderRadius,marginBottom:"1rem",...t&&{...o[t],...r[t]}},theme:{"&":{overflow:"hidden",background:n.background,fontFamily:n.fontFamily,fontSize:n.fontSize,color:n.color,border:0,height:"100%",width:"100%",minHeight:`${l}rem`,lineHeight:l,borderRadius:n.borderRadius,...t&&{...r[t]}},"&.cm-editor.cm-focused":{outline:`${n==null?void 0:n.borderWidth} solid ${n==null?void 0:n.focusBorderColor}`},".cm-content":{padding:`${n.verticalPadding} 0`},".cm-scroller":{fontFamily:n.fontFamily,lineHeight:1.4375},".cm-gutters":{background:n.gutterBackground,borderColor:n.borderColor},".cm-line":{padding:`0 ${n.horizontalPadding}`},".cm-selectionBackground":{background:"transparent"},".cm-focused .cm-selectionBackground":{background:"#d7d4f0"},".cm-placeholder":{color:"#707070"}},highlightStyle:[{tag:p.link,textDecoration:"underline"},{tag:p.heading,textDecoration:"underline",fontWeight:"bold"},{tag:p.emphasis,fontStyle:"italic"},{tag:p.strong,fontWeight:"bold"},{tag:p.strikethrough,textDecoration:"line-through"},{tag:p.keyword,color:"#708"},{tag:[p.atom,p.bool,p.url,p.contentSeparator,p.labelName],color:"#219"},{tag:[p.literal,p.inserted],color:"#164"},{tag:[p.string,p.deleted],color:"#a11"},{tag:p.definition(p.variableName),color:"#00f"},{tag:p.local(p.variableName),color:"#30a"},{tag:p.className,color:"#167"},{tag:[p.special(p.variableName),p.macroName],color:"#256"},{tag:p.definition(p.propertyName),color:"#00c"},{tag:p.comment,color:"#940"},{tag:p.meta,color:"#757075"},{tag:[p.regexp,p.escape,p.special(p.string)],color:"#d13b00"},{tag:[p.typeName,p.namespace],color:"#008051"},{tag:p.invalid,color:"#e60000"}]}},_w=n=>{const e=n.colors,t=n.borders,i=n.typography,s=n.spacing;return{...{fontFamily:i==null?void 0:i.fontFamilyMonospace,fontSize:i==null?void 0:i.fontSizeSmall,background:e==null?void 0:e.backgroundLightest,color:e==null?void 0:e.textDarkest,gutterBackground:e==null?void 0:e.backgroundLight,borderWidth:t==null?void 0:t.widthSmall,borderColor:e==null?void 0:e.borderMedium,borderRadius:t==null?void 0:t.radiusMedium,focusBorderColor:e==null?void 0:e.borderBrand,horizontalPadding:s==null?void 0:s.xSmall,verticalPadding:s==null?void 0:s.xxSmall}}},Ic=[{key:"ArrowLeft",run:jl,shift:Gl,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Xd,shift:Nd},{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:Wd,shift:Fd},{mac:"Cmd-ArrowLeft",run:Bd,shift:sO},{key:"Home",run:zd,shift:tO},{key:"ArrowRight",run:Il,shift:Nl,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Ad,shift:jd},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Md,shift:Gd},{mac:"Cmd-ArrowRight",run:_d,shift:nO},{key:"End",run:Ld,shift:iO},{key:"Delete",run:Fs},{key:"Mod-Delete",mac:"Alt-Delete",run:Fl},{key:"Backspace",run:Hs,shift:Hs},{key:"Mod-Backspace",mac:"Alt-Backspace",run:lO},{mac:"Mod-Delete",run:sy},{mac:"Mod-Backspace",run:aO}],Bw={label:j.string.isRequired,language:j.oneOf(["sh","js","json","javascript","jsx","shell","css","html","markdown","yaml","yml","bash"]),readOnly:j.bool,editable:j.bool,lineNumbers:j.bool,foldGutter:j.bool,highlightActiveLineGutter:j.bool,highlightActiveLine:j.bool,lineWrapping:j.bool,autofocus:j.bool,spellcheck:j.bool,direction:j.oneOf(["ltr","rtl"]),rtlMoveVisually:j.bool,indentOnLoad:j.bool,indentWithTab:j.bool,indentUnit:j.string,defaultValue:j.string,value:Fp(j.string,"onChange","defaultValue"),onChange:j.func,onFocus:j.func,onBlur:j.func,attachment:j.oneOf(["bottom","top"]),height:j.string,width:j.string,elementRef:j.func,containerRef:j.func,searchConfig:j.object},Uw=["label","language","readOnly","editable","lineNumbers","foldGutter","highlightActiveLineGutter","highlightActiveLine","lineWrapping","autofocus","spellcheck","direction","rtlMoveVisually","indentOnLoad","indentWithTab","indentUnit","defaultValue","value","onChange","onFocus","onBlur","attachment","height","width","elementRef","containerRef","searchConfig"],Iw=["label","styles"];var jc,Nc,Gc,Fc,Pt,It;let sQ=(jc=Yp(),Nc=Dp(Lw,_w),Gc=qp(),Fc=zp(),jc(Pt=Nc(Pt=Gc(Pt=Fc(Pt=(It=class Mp extends Hc.Component{addAnimationFrame(e){typeof e=="function"&&this._raf.push(Hp(e))}cancelAnimationFrames(){this._raf.forEach(e=>e.cancel()),this._raf=[]}focus(){this.addAnimationFrame(()=>{var e;(e=this._editorView)===null||e===void 0||e.focus()})}get hasFocus(){var e;return(e=this._editorView)===null||e===void 0?void 0:e.hasFocus}selectAll(){this._editorView&&this.addAnimationFrame(()=>{var e;this.dispatchViewSelection({anchor:0,head:(e=this.currentDocValue)===null||e===void 0?void 0:e.length})})}deselectAll(){this._editorView&&this.addAnimationFrame(()=>{this.dispatchViewSelection({anchor:0,head:0})})}indentCurrentSelection(){this.addAnimationFrame(()=>{this._editorView&&uO({state:this._editorView.state,dispatch:e=>{var t;(t=this._editorView)===null||t===void 0||t.update([e])}})})}indentAll(){this.addAnimationFrame(()=>{this._editorView&&this.currentDocValue&&this.indentCodeRange(0,this.currentDocValue.length)})}indentCodeRange(e,t){this.addAnimationFrame(()=>{this._editorView&&this.currentDocValue&&this.dispatchViewChanges({changes:Ob(this._editorView.state,e,t)})})}dispatchViewEffects(e){!this._editorView||!e||this._editorView.dispatch({effects:e})}dispatchViewChanges({changes:e,selection:t,userEvent:i}){!this._editorView||!e||this._editorView.dispatch({changes:e,...t?{selection:t}:void 0,...i?{userEvent:i}:void 0})}dispatchViewSelection(e){!this._editorView||!e||this._editorView.dispatch({selection:e})}get currentDocValue(){var e;return(e=this._editorView)===null||e===void 0?void 0:e.state.doc}get isControlled(){return typeof this.props.value=="string"}constructor(e){super(e),this._id=void 0,this.ref=null,this._containerRef=void 0,this._editorView=void 0,this._raf=[],this._newSelectionAfterValueChange=void 0,this.handleRef=t=>{const i=this.props.elementRef;this.ref=t,typeof i=="function"&&i(t)},this.handleContainerRef=t=>{const i=this.props.containerRef;this._containerRef=t||void 0,typeof i=="function"&&i(t)},this._id=e.deterministicId()}componentDidMount(){var e,t;const i=this.props,s=i.value,r=i.defaultValue,o=i.autofocus,l=i.indentOnLoad;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t);const a=Y.create({doc:s||r,extensions:this.extensions});this._editorView=new $({state:a,parent:this._containerRef}),o&&this.focus(),l&&this.indentAll()}componentWillUnmount(){var e;(e=this._editorView)===null||e===void 0||e.destroy(),this.cancelAnimationFrames()}componentDidUpdate(e){var t,i;(t=(i=this.props).makeStyles)===null||t===void 0||t.call(i),this._editorView&&(this.props.value!==e.value&&this.refreshEditorValue(),this.shouldUpdateExtensions(e)&&this.refreshExtensions())}shouldUpdateExtensions(e){const t=["styles","themeOverride","language","readOnly","editable","lineNumbers","highlightActiveLineGutter","foldGutter","lineWrapping","autofocus","spellcheck","direction","dir","rtlMoveVisually","indentOnLoad","indentWithTab","indentUnit","highlightActiveLine","attachment"];for(const i of t)if(!Lp(this.props[i],e[i]))return!0;return!1}get direction(){return this.props.direction||this.props.dir}get extensions(){const e=[...this.baseExtensions,this.languageExtension,this.onChangeExtension,this.focusListenerExtension,this.announceLineNumberExtension];return this.themeExtension&&e.push(this.themeExtension),this.props.lineNumbers&&e.push(z0()),this.props.highlightActiveLine&&e.push(p0()),this.props.highlightActiveLineGutter&&e.push(B0()),this.props.foldGutter&&e.push(Eb()),this.props.lineWrapping&&e.push($.lineWrapping),this.props.editable===!1&&e.push($.editable.of(!1)),this.props.readOnly&&e.push(Y.readOnly.of(!0)),this.props.spellcheck&&e.push($.contentAttributes.of({spellcheck:"true"})),this.direction&&e.push($.contentAttributes.of({dir:this.direction})),this.props.indentUnit&&e.push(Yi.of(this.props.indentUnit)),e}get baseExtensions(){return[h0(),VS(),Kg(),n0(),Y.allowMultipleSelections.of(!0),vh(qb,{fallback:!0}),jb(),z1(),K1(),k0(),Q0(),rS(),Qb(),zw(this.props.searchConfig),Vn.of(this.keymaps)]}get keymaps(){const e=[...U1,...this.commandKeybinding,...IS,...Ab,...pd,...Zy,...this.props.searchConfig?PS:[]];return this.props.indentWithTab&&e.push(yy),e}get commandKeybinding(){const e=this.props.rtlMoveVisually;if(this.direction==="rtl"&&!e){const t=Ic.map(s=>s.key?s.key:s.mac?s.mac:s);return[...Kh.filter(s=>s.key?t.indexOf(s.key)<0:s.mac?t.indexOf(s.mac)<0:!1),...Ic]}return Kh}get themeExtension(){const e=this.props.styles;if(!(e!=null&&e.theme)||!e.highlightStyle)return;const t=$.theme(e==null?void 0:e.theme),i=vh(zn.define(e==null?void 0:e.highlightStyle));return[t,i]}get languageExtension(){switch(this.props.language){case"json":return Xw();case"js":case"jsx":case"javascript":return Jo({jsx:!0,typescript:!0});case"html":return ip({matchClosingTags:!0,autoCloseTags:!0});case"css":return jO();case"markdown":return vw();case"sh":case"shell":case"bash":return Ls.define(Vw);case"yml":case"yaml":return Ls.define(qw);default:return Jo({jsx:!0,typescript:!0})}}callOnChangeHandler(e){const t=this.props,i=t.onChange,s=t.value;this.addAnimationFrame(()=>{typeof i=="function"&&e!==s&&i(e)})}get onChangeExtension(){return Y.changeFilter.of(e=>{if(!this._editorView)return!1;if(e.docChanged){const t=e.newDoc.toString();if(this.isControlled)return t!==this.props.value?(this._newSelectionAfterValueChange=e.selection,this.cancelAnimationFrames(),this.callOnChangeHandler(t),!1):!0;this.callOnChangeHandler(t)}return!0})}get focusListenerExtension(){const e=this.props,t=e.onFocus,i=e.onBlur;return $.updateListener.of(s=>{s.focusChanged&&this._editorView&&(this.hasFocus?typeof t=="function"&&t():typeof i=="function"&&i())})}get announceLineNumberExtension(){return Y.transactionExtender.of(e=>{const t=e.selection,i=e.startState.selection.main;if(t&&t.main.empty&&i.empty){const s=e.startState.doc.lineAt(i.head),r=e.newDoc.lineAt(t.main.head);if(s.number!=r.number)return{effects:$.announce.of(e.startState.phrase("line ")+r.number+".")}}return null})}refreshExtensions(){this.dispatchViewEffects(M.reconfigure.of(this.extensions))}refreshEditorValue(){if(!this._editorView)return;const e=this.props.value,t=this._editorView.state.doc.toString();if(typeof e<"u"&&t!==e){let i;const s=e.length-t.length;s===1?i="input.type":s===-1&&(i="delete.backward"),this.dispatchViewChanges({changes:{from:0,to:t.length,insert:e||""},selection:this._newSelectionAfterValueChange,userEvent:i}),this._newSelectionAfterValueChange=void 0}this.props.indentOnLoad&&this.indentAll()}render(){const e=this.props,t=e.label,i=e.styles,s=_p(e,Iw);return Un("div",Object.assign({ref:this.handleRef,css:i==null?void 0:i.codeEditor},Bp(Up(s,Mp.allowedProps))),Un("label",{css:i==null?void 0:i.label,htmlFor:this._id},Un(Kp,null,t),Un("div",{ref:this.handleContainerRef,css:i==null?void 0:i.codeEditorContainer})))}},It.displayName="SourceCodeEditor",It.componentId="SourceCodeEditor",It.propTypes=Bw,It.allowedProps=Uw,It.defaultProps={language:"jsx",readOnly:!1,editable:!0,lineNumbers:!1,foldGutter:!1,highlightActiveLine:!1,highlightActiveLineGutter:!1,lineWrapping:!1,autofocus:!1,spellcheck:!1,rtlMoveVisually:!0,indentOnLoad:!1,indentWithTab:!1,defaultValue:"",height:"auto"},It))||Pt)||Pt)||Pt)||Pt);export{sQ as S}; +`);i=s<0?t:t.slice(0,s)}return e+i.length>this.to?i.slice(0,this.to-e):i}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,i=0){this.block=nr.create(e,i,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,i=0){this.startContext(this.parser.getNodeType(e),t,i)}addNode(e,t,i){typeof e=="number"&&(e=new D(this.parser.nodeSet.types[e],Wi,Wi,(i??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(ol(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?up(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let i of e.parsers)if(i.finish(this,e))return;let t=ol(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(Q.Paragraph,e.content.length),e.start)}elt(e,t,i,s){return typeof e=="string"?L(this.parser.getNodeType(e),t,i,s):new pp(e,t)}get buffer(){return new Op(this.parser.nodeSet)}}function up(n,e,t,i,s){let r=n[e].to,o=[],l=[],a=t.from+i;function h(c,f){for(;f?c>=r:c>r;){let u=n[e+1].from-r;i+=u,c+=u,e++,r=n[e].to}}for(let c=t.firstChild;c;c=c.nextSibling){h(c.from+i,!0);let f=c.from+i,u,d=s.get(c.tree);d?u=d:c.to+i>r?(u=up(n,e,c,i,s),h(c.to+i,!1)):u=c.toTree(),o.push(u),l.push(f-a)}return h(t.to+i,!1),new D(t.type,o,l,t.to+i-a,t.tree?t.tree.propValues:void 0)}class mr extends lr{constructor(e,t,i,s,r,o,l,a,h){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=i,this.blockNames=s,this.endLeafBlock=r,this.skipContextMarkup=o,this.inlineParsers=l,this.inlineNames=a,this.wrappers=h,this.nodeTypes=Object.create(null);for(let c of e.types)this.nodeTypes[c.name]=c.id}createParse(e,t,i){let s=new Gx(this,e,t,i);for(let r of this.wrappers)s=r(s,e,t,i);return s}configure(e){let t=sl(e);if(!t)return this;let{nodeSet:i,skipContextMarkup:s}=this,r=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),l=this.blockNames.slice(),a=this.inlineParsers.slice(),h=this.inlineNames.slice(),c=this.endLeafBlock.slice(),f=this.wrappers;if(Hi(t.defineNodes)){s=Object.assign({},s);let u=i.types.slice(),d;for(let O of t.defineNodes){let{name:m,block:g,composite:b,style:S}=typeof O=="string"?{name:O}:O;if(u.some(k=>k.name==m))continue;b&&(s[u.length]=(k,C,v)=>b(C,v,k.value));let x=u.length,w=b?["Block","BlockContext"]:g?x>=Q.ATXHeading1&&x<=Q.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;u.push(oe.define({id:x,name:m,props:w&&[[X.group,w]]})),S&&(d||(d={}),Array.isArray(S)||S instanceof Ne?d[m]=S:Object.assign(d,S))}i=new Vi(u),d&&(i=i.extend(oi(d)))}if(Hi(t.props)&&(i=i.extend(...t.props)),Hi(t.remove))for(let u of t.remove){let d=this.blockNames.indexOf(u),O=this.inlineNames.indexOf(u);d>-1&&(r[d]=o[d]=void 0),O>-1&&(a[O]=void 0)}if(Hi(t.parseBlock))for(let u of t.parseBlock){let d=l.indexOf(u.name);if(d>-1)r[d]=u.parse,o[d]=u.leaf;else{let O=u.before?ps(l,u.before):u.after?ps(l,u.after)+1:l.length-1;r.splice(O,0,u.parse),o.splice(O,0,u.leaf),l.splice(O,0,u.name)}u.endLeaf&&c.push(u.endLeaf)}if(Hi(t.parseInline))for(let u of t.parseInline){let d=h.indexOf(u.name);if(d>-1)a[d]=u.parse;else{let O=u.before?ps(h,u.before):u.after?ps(h,u.after)+1:h.length-1;a.splice(O,0,u.parse),h.splice(O,0,u.name)}}return t.wrap&&(f=f.concat(t.wrap)),new mr(i,r,o,l,c,s,a,h,f)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let i=new Hx(this,e,t);e:for(let s=t;s=0){s=l;continue e}}s++}return i.resolveMarkers(0)}}function Hi(n){return n!=null&&n.length>0}function sl(n){if(!Array.isArray(n))return n;if(n.length==0)return null;let e=sl(n[0]);if(n.length==1)return e;let t=sl(n.slice(1));if(!t||!e)return e||t;let i=(o,l)=>(o||Wi).concat(l||Wi),s=e.wrap,r=t.wrap;return{props:i(e.props,t.props),defineNodes:i(e.defineNodes,t.defineNodes),parseBlock:i(e.parseBlock,t.parseBlock),parseInline:i(e.parseInline,t.parseInline),remove:i(e.remove,t.remove),wrap:s?r?(o,l,a,h)=>s(r(o,l,a,h),l,a,h):s:r}}function ps(n,e){let t=n.indexOf(e);if(t<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return t}let dp=[oe.none];for(let n=1,e;e=Q[n];n++)dp[n]=oe.define({id:n,name:e,props:n>=Q.Escape?[]:[[X.group,n in np?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const Wi=[];class Op{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,i,s=0){return this.content.push(e,t,i,4+s*4),this}writeElements(e,t=0){for(let i of e)i.writeTo(this,t);return this}finish(e,t){return D.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}}class Xn{constructor(e,t,i,s=Wi){this.type=e,this.from=t,this.to=i,this.children=s}writeTo(e,t){let i=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-i)}toTree(e){return new Op(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}}class pp{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 Wi}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 L(n,e,t,i){return new Xn(n,e,t,i)}const mp={resolve:"Emphasis",mark:"EmphasisMark"},gp={resolve:"Emphasis",mark:"EmphasisMark"},di={},rl={};class qe{constructor(e,t,i,s){this.type=e,this.from=t,this.to=i,this.side=s}}const Ac="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let Mn=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{Mn=new RegExp("[\\p{Pc}|\\p{Pd}|\\p{Pe}|\\p{Pf}|\\p{Pi}|\\p{Po}|\\p{Ps}]","u")}catch{}const Kr={Escape(n,e,t){if(e!=92||t==n.end-1)return-1;let i=n.char(t+1);for(let s=0;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(i);if(s)return n.append(L(Q.Autolink,t,t+1+s[0].length,[L(Q.LinkMark,t,t+1),L(Q.URL,t+1,t+s[0].length),L(Q.LinkMark,t+s[0].length,t+1+s[0].length)]));let r=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(i);if(r)return n.append(L(Q.Comment,t,t+1+r[0].length));let o=/^\?[^]*?\?>/.exec(i);if(o)return n.append(L(Q.ProcessingInstruction,t,t+1+o[0].length));let l=/^(?:![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(i);return l?n.append(L(Q.HTMLTag,t,t+1+l[0].length)):-1},Emphasis(n,e,t){if(e!=95&&e!=42)return-1;let i=t+1;for(;n.char(i)==e;)i++;let s=n.slice(t-1,t),r=n.slice(i,i+1),o=Mn.test(s),l=Mn.test(r),a=/\s|^$/.test(s),h=/\s|^$/.test(r),c=!h&&(!l||a||o),f=!a&&(!o||h||l),u=c&&(e==42||!f||o),d=f&&(e==42||!c||l);return n.append(new qe(e==95?mp:gp,t,i,(u?1:0)|(d?2:0)))},HardBreak(n,e,t){if(e==92&&n.char(t+1)==10)return n.append(L(Q.HardBreak,t,t+2));if(e==32){let i=t+1;for(;n.char(i)==32;)i++;if(n.char(i)==10&&i>=t+2)return n.append(L(Q.HardBreak,t,i+1))}return-1},Link(n,e,t){return e==91?n.append(new qe(di,t,t+1,1)):-1},Image(n,e,t){return e==33&&n.char(t+1)==91?n.append(new qe(rl,t,t+2,1)):-1},LinkEnd(n,e,t){if(e!=93)return-1;for(let i=n.parts.length-1;i>=0;i--){let s=n.parts[i];if(s instanceof qe&&(s.type==di||s.type==rl)){if(!s.side||n.skipSpace(s.to)==t&&!/[(\[]/.test(n.slice(t+1,t+2)))return n.parts[i]=null,-1;let r=n.takeContent(i),o=n.parts[i]=Fx(n,r,s.type==di?Q.Link:Q.Image,s.from,t+1);if(s.type==di)for(let l=0;le?L(Q.URL,e+t,r+t):r==n.length?null:!1}}function Sp(n,e,t){let i=n.charCodeAt(e);if(i!=39&&i!=34&&i!=40)return!1;let s=i==40?41:i;for(let r=e+1,o=!1;r=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,i,s,r){return this.append(new qe(e,t,i,(s?1:0)|(r?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof qe&&(t.type==di||t.type==rl))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let i=e;i=e;a--){let m=this.parts[a];if(m instanceof qe&&m.side&1&&m.type==s.type&&!(r&&(s.side&1||m.side&2)&&(m.to-m.from+o)%3==0&&((m.to-m.from)%3||o%3))){l=m;break}}if(!l)continue;let h=s.type.resolve,c=[],f=l.from,u=s.to;if(r){let m=Math.min(2,l.to-l.from,o);f=l.to-m,u=s.from+m,h=m==1?"Emphasis":"StrongEmphasis"}l.type.mark&&c.push(this.elt(l.type.mark,f,l.to));for(let m=a+1;m=0;t--){let i=this.parts[t];if(i instanceof qe&&i.type==e)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}skipSpace(e){return cn(this.text,e-this.offset)+this.offset}elt(e,t,i,s){return typeof e=="string"?L(this.parser.getNodeType(e),t,i,s):new pp(e,t)}}function ol(n,e){if(!e.length)return n;if(!n.length)return e;let t=n.slice(),i=0;for(let s of e){for(;i(e?e-1:0))return!1;if(this.fragmentEnd<0){let r=this.fragment.to;for(;r>0&&this.input.read(r-1,r)!=` +`;)r--;this.fragmentEnd=r?r-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let s=e+this.fragment.offset;for(;i.to<=s;)if(!i.parent())return!1;for(;;){if(i.from>=s)return this.fragment.from<=t;if(!i.childAfter(s))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(X.contextHash)==e}takeNodes(e){let t=this.cursor,i=this.fragment.offset,s=this.fragmentEnd-(this.fragment.openEnd?1:0),r=e.absoluteLineStart,o=r,l=e.block.children.length,a=o,h=l;for(;;){if(t.to-i>s){if(t.type.isAnonymous&&t.firstChild())continue;break}let c=kp(t.from-i,e.ranges);if(t.to-i<=e.ranges[e.rangeI].to)e.addNode(t.tree,c);else{let f=new D(e.parser.nodeSet.types[Q.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(f,t.tree),e.addNode(f,c)}if(t.type.is("Block")&&(Kx.indexOf(t.type.id)<0?(o=t.to-i,l=e.block.children.length):(o=a,l=h,a=t.to-i,h=e.block.children.length)),!t.nextSibling())break}for(;e.block.children.length>l;)e.block.children.pop(),e.block.positions.pop();return o-r}}function kp(n,e){let t=n;for(let i=1;iOs[n]),Object.keys(Os).map(n=>Ix[n]),Object.keys(Os),jx,np,Object.keys(Kr).map(n=>Kr[n]),Object.keys(Kr),[]);function iw(n,e,t){let i=[];for(let s=n.firstChild,r=e;;s=s.nextSibling){let o=s?s.from:t;if(o>r&&i.push({from:r,to:o}),!s)break;r=s.to}return i}function nw(n){let{codeParser:e,htmlParser:t}=n;return{wrap:Xu((s,r)=>{let o=s.type.id;if(e&&(o==Q.CodeBlock||o==Q.FencedCode)){let l="";if(o==Q.FencedCode){let h=s.node.getChild(Q.CodeInfo);h&&(l=r.read(h.from,h.to))}let a=e(l);if(a)return{parser:a,overlay:h=>h.type.id==Q.CodeText}}else if(t&&(o==Q.HTMLBlock||o==Q.HTMLTag))return{parser:t,overlay:iw(s.node,s.from,s.to)};return null})}}const sw={resolve:"Strikethrough",mark:"StrikethroughMark"},rw={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":p.strikethrough}},{name:"StrikethroughMark",style:p.processingInstruction}],parseInline:[{name:"Strikethrough",parse(n,e,t){if(e!=126||n.char(t+1)!=126||n.char(t+2)==126)return-1;let i=n.slice(t-1,t),s=n.slice(t+2,t+3),r=/\s|^$/.test(i),o=/\s|^$/.test(s),l=Mn.test(i),a=Mn.test(s);return n.addDelimiter(sw,t,t+2,!o&&(!a||r||l),!r&&(!l||o||a))},after:"Emphasis"}]};function fn(n,e,t=0,i,s=0){let r=0,o=!0,l=-1,a=-1,h=!1,c=()=>{i.push(n.elt("TableCell",s+l,s+a,n.parser.parseInline(e.slice(l,a),s+l)))};for(let f=t;f-1)&&r++,o=!1,i&&(l>-1&&c(),i.push(n.elt("TableDelimiter",f+s,f+s+1))),l=a=-1):(h||u!=32&&u!=9)&&(l<0&&(l=f),a=f+1),h=!h&&u==92}return l>-1&&(r++,i&&c()),r}function Xc(n,e){for(let t=e;ts instanceof Mc)||!Xc(e.text,e.basePos))return!1;let i=n.scanLine(n.absoluteLineEnd+1).text;return xp.test(i)&&fn(n,e.text,e.basePos)==fn(n,i,e.basePos)},before:"SetextHeading"}]};class lw{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 aw={defineNodes:[{name:"Task",block:!0,style:p.list},{name:"TaskMarker",style:p.atom}],parseBlock:[{name:"TaskList",leaf(n,e){return/^\[[ xX]\][ \t]/.test(e.content)&&n.parentType().name=="ListItem"?new lw:null},after:"SetextHeading"}]},Wc=/(www\.)|(https?:\/\/)|([\w.+-]+@)|(mailto:|xmpp:)/gy,Ec=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,hw=/[\w-]+\.[\w-]+($|\/)/,Vc=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Yc=/\/[a-zA-Z\d@.]+/gy;function Dc(n,e,t,i){let s=0;for(let r=e;r-1)return-1;let i=e+t[0].length;for(;;){let s=n[i-1],r;if(/[?!.,:*_~]/.test(s)||s==")"&&Dc(n,e,i,")")>Dc(n,e,i,"("))i--;else if(s==";"&&(r=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(n.slice(e,i))))i=e+r.index;else break}return i}function qc(n,e){Vc.lastIndex=e;let t=Vc.exec(n);if(!t)return-1;let i=t[0][t[0].length-1];return i=="_"||i=="-"?-1:e+t[0].length-(i=="."?1:0)}const fw={parseInline:[{name:"Autolink",parse(n,e,t){let i=t-n.offset;Wc.lastIndex=i;let s=Wc.exec(n.text),r=-1;if(!s)return-1;if(s[1]||s[2]){if(r=cw(n.text,i+s[0].length),r>-1&&n.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(n.text.slice(i,r));r=i+o[0].length}}else s[3]?r=qc(n.text,i):(r=qc(n.text,i+s[0].length),r>-1&&s[0]=="xmpp:"&&(Yc.lastIndex=r,s=Yc.exec(n.text),s&&(r=s.index+s[0].length)));return r<0?-1:(n.addElement(n.elt("URL",t,r+n.offset)),r+n.offset)}}]},uw=[ow,aw,rw,fw];function wp(n,e,t){return(i,s,r)=>{if(s!=n||i.char(r+1)==n)return-1;let o=[i.elt(t,r,r+1)];for(let l=r+1;l"}}}),Pp=new X,$p=tw.configure({props:[li.add(n=>!n.is("Block")||n.is("Document")||ll(n)!=null||mw(n)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),Pp.add(ll),Di.add({Document:()=>null}),Xt.add({Document:Qp})]});function ll(n){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(n.name);return e?+e[1]:void 0}function mw(n){return n.name=="OrderedList"||n.name=="BulletList"}function gw(n,e){let t=n;for(;;){let i=t.nextSibling,s;if(!i||(s=ll(i.type))!=null&&s<=e)break;t=i}return t.to}const bw=qu.of((n,e,t)=>{for(let i=F(n).resolveInner(t,-1);i&&!(i.fromt)return{from:t,to:r}}return null});function oa(n){return new Ee(Qp,n,[bw],"markdown")}const Sw=oa($p),yw=$p.configure([uw,Ow,dw,pw,{props:[li.add({Table:(n,e)=>({from:e.doc.lineAt(n.from).to,to:n.to})})]}]),vp=oa(yw);function kw(n,e){return t=>{if(t&&n){let i=null;if(t=/\S*/.exec(t)[0],typeof n=="function"?i=n(t):i=Ys.matchLanguageName(n,t,!0),i instanceof Ys)return i.support?i.support.language.parser:ii.getSkippingParser(i.load());if(i)return i.parser}return e?e.parser:null}}class ms{constructor(e,t,i,s,r,o,l){this.node=e,this.from=t,this.to=i,this.spaceBefore=s,this.spaceAfter=r,this.type=o,this.item=l}blank(e,t=!0){let i=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;i.length0;s--)i+=" ";return i+(t?this.spaceAfter:"")}}marker(e,t){let i=this.node.name=="OrderedList"?String(+Zp(this.item,e)[2]+t):"";return this.spaceBefore+i+this.type+this.spaceAfter}}function Cp(n,e){let t=[];for(let s=n;s&&s.name!="Document";s=s.parent)(s.name=="ListItem"||s.name=="Blockquote"||s.name=="FencedCode")&&t.push(s);let i=[];for(let s=t.length-1;s>=0;s--){let r=t[s],o,l=e.lineAt(r.from),a=r.from-l.from;if(r.name=="FencedCode")i.push(new ms(r,a,a,"","","",null));else if(r.name=="Blockquote"&&(o=/^ *>( ?)/.exec(l.text.slice(a))))i.push(new ms(r,a,a+o[0].length,"",o[1],">",null));else if(r.name=="ListItem"&&r.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(l.text.slice(a)))){let h=o[3],c=o[0].length;h.length>=4&&(h=h.slice(0,h.length-4),c-=4),i.push(new ms(r.parent,a,a+c,o[1],h,o[2],r))}else if(r.name=="ListItem"&&r.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(l.text.slice(a)))){let h=o[4],c=o[0].length;h.length>4&&(h=h.slice(0,h.length-4),c-=4);let f=o[2];o[3]&&(f+=o[3].replace(/[xX]/," ")),i.push(new ms(r.parent,a,a+c,o[1],h,f,r))}}return i}function Zp(n,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(n.from,n.from+10))}function Jr(n,e,t,i=0){for(let s=-1,r=n;;){if(r.name=="ListItem"){let l=Zp(r,e),a=+l[2];if(s>=0){if(a!=s+1)return;t.push({from:r.from+l[1].length,to:r.from+l[0].length,insert:String(s+2+i)})}s=a}let o=r.nextSibling;if(!o)break;r=o}}function la(n,e){let t=/^[ \t]*/.exec(n)[0].length;if(!t||e.facet(Yi)!=" ")return n;let i=Ge(n,4,t),s="";for(let r=i;r>0;)r>=4?(s+=" ",r-=4):(s+=" ",r--);return s+n.slice(t)}const xw=({state:n,dispatch:e})=>{let t=F(n),{doc:i}=n,s=null,r=n.changeByRange(o=>{if(!o.empty||!vp.isActiveAt(n,o.from))return s={range:o};let l=o.from,a=i.lineAt(l),h=Cp(t.resolveInner(l,-1),i);for(;h.length&&h[h.length-1].from>l-a.from;)h.pop();if(!h.length)return s={range:o};let c=h[h.length-1];if(c.to-c.spaceAfter.length>l-a.from)return s={range:o};let f=l>=c.to-c.spaceAfter.length&&!/\S/.test(a.text.slice(c.to));if(c.item&&f){let g=c.node.firstChild,b=c.node.getChild("ListItem","ListItem");if(g.to>=l||b&&b.to0&&!/[^\s>]/.test(i.lineAt(a.from-1).text)){let S=h.length>1?h[h.length-2]:null,x,w="";S&&S.item?(x=a.from+S.from,w=S.marker(i,1)):x=a.from+(S?S.to:0);let k=[{from:x,to:l,insert:w}];return c.node.name=="OrderedList"&&Jr(c.item,i,k,-2),S&&S.node.name=="OrderedList"&&Jr(S.item,i,k),{range:y.cursor(x+w.length),changes:k}}else{let S=Lc(h,n,a);return{range:y.cursor(l+S.length+1),changes:{from:a.from,insert:S+n.lineBreak}}}}if(c.node.name=="Blockquote"&&f&&a.from){let g=i.lineAt(a.from-1),b=/>\s*$/.exec(g.text);if(b&&b.index==c.from){let S=n.changes([{from:g.from+b.index,to:g.to},{from:a.from+c.from,to:a.to}]);return{range:o.map(S),changes:S}}}let u=[];c.node.name=="OrderedList"&&Jr(c.item,i,u);let d=c.item&&c.item.from]*/.exec(a.text)[0].length>=c.to)for(let g=0,b=h.length-1;g<=b;g++)O+=g==b&&!d?h[g].marker(i,1):h[g].blank(ga.from&&/\s/.test(a.text.charAt(m-a.from-1));)m--;return O=la(O,n),ww(c.node,n.doc)&&(O=Lc(h,n,a)+n.lineBreak+O),u.push({from:m,to:l,insert:n.lineBreak+O}),{range:y.cursor(m+O.length+1),changes:u}});return s?!1:(e(n.update(r,{scrollIntoView:!0,userEvent:"input"})),!0)};function zc(n){return n.name=="QuoteMark"||n.name=="ListMark"}function ww(n,e){if(n.name!="OrderedList"&&n.name!="BulletList")return!1;let t=n.firstChild,i=n.getChild("ListItem","ListItem");if(!i)return!1;let s=e.lineAt(t.to),r=e.lineAt(i.from),o=/^[\s>]*$/.test(s.text);return s.number+(o?0:1){let t=F(n),i=null,s=n.changeByRange(r=>{let o=r.from,{doc:l}=n;if(r.empty&&vp.isActiveAt(n,r.from)){let a=l.lineAt(o),h=Cp(Qw(t,o),l);if(h.length){let c=h[h.length-1],f=c.to-c.spaceAfter.length+(c.spaceAfter?1:0);if(o-a.from>f&&!/\S/.test(a.text.slice(f,o-a.from)))return{range:y.cursor(a.from+f),changes:{from:a.from+f,to:o}};if(o-a.from==f&&(!c.item||a.from<=c.item.from||!/\S/.test(a.text.slice(0,c.to)))){let u=a.from+c.from;if(c.item&&c.node.from1&&n.eat("$");var t=n.next();return/['"({]/.test(t)?(e.tokens[0]=gr(t,t=="("?"quote":t=="{"?"def":"string"),Ei(n,e)):(/\d/.test(t)||n.eatWhile(/\w/),e.tokens.shift(),"def")};function Ew(n){return function(e,t){return e.sol()&&e.string==n&&t.tokens.shift(),e.skipToEnd(),"string.special"}}function Ei(n,e){return(e.tokens[0]||Mw)(n,e)}const Vw={name:"shell",startState:function(){return{tokens:[]}},token:function(n,e){return Ei(n,e)},languageData:{autocomplete:Tp.concat(Rp,Ap),closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}};var Yw=["true","false","on","off","yes","no"],Dw=new RegExp("\\b(("+Yw.join(")|(")+"))$","i");const qw={name:"yaml",token:function(n,e){var t=n.peek(),i=e.escaped;if(e.escaped=!1,t=="#"&&(n.pos==0||/\s/.test(n.string.charAt(n.pos-1))))return n.skipToEnd(),"comment";if(n.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(e.literal&&n.indentation()>e.keyCol)return n.skipToEnd(),"string";if(e.literal&&(e.literal=!1),n.sol()){if(e.keyCol=0,e.pair=!1,e.pairStart=!1,n.match("---")||n.match("..."))return"def";if(n.match(/^\s*-\s+/))return"meta"}if(n.match(/^(\{|\}|\[|\])/))return t=="{"?e.inlinePairs++:t=="}"?e.inlinePairs--:t=="["?e.inlineList++:e.inlineList--,"meta";if(e.inlineList>0&&!i&&t==",")return n.next(),"meta";if(e.inlinePairs>0&&!i&&t==",")return e.keyCol=0,e.pair=!1,e.pairStart=!1,n.next(),"meta";if(e.pairStart){if(n.match(/^\s*(\||\>)\s*/))return e.literal=!0,"meta";if(n.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable";if(e.inlinePairs==0&&n.match(/^\s*-?[0-9\.\,]+\s?$/)||e.inlinePairs>0&&n.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(n.match(Dw))return"keyword"}return!e.pair&&n.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(e.pair=!0,e.keyCol=n.indentation(),"atom"):e.pair&&n.match(/^:\s*/)?(e.pairStart=!0,"meta"):(e.pairStart=!1,e.escaped=t=="\\",n.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},languageData:{commentTokens:{line:"#"}}};var _c,Bc,Uc;function Ic({view:n,searchConfig:e}){const t=Kc.useState(""),i=Vp(t,2),s=i[0],r=i[1],o=(u,d)=>{r(d),l(d)},l=u=>{n.dispatch({effects:Ri.of(new ql({search:u}))})},a=u=>{u.key==="Enter"&&(u.shiftKey?f():c())},h=u=>{u.key==="Escape"&&_l(n)},c=()=>{l(s),vn(n)},f=()=>{l(s),Cn(n)};return rt.createElement(Ip,{renderLabel:"",inputRef:u=>{setTimeout(()=>u==null?void 0:u.focus(),0)},size:"small",display:"inline-block",width:"20rem",placeholder:e.placeholder,onChange:o,onKeyDown:a,onKeyUp:h,renderBeforeInput:_c||(_c=rt.createElement(Gp,{size:"x-small"})),renderAfterInput:rt.createElement("span",null,rt.createElement(ca,{size:"small",withBorder:!1,withBackground:!1,onClick:c,screenReaderLabel:e.nextResultLabel},Bc||(Bc=rt.createElement(jp,null))),rt.createElement(ca,{size:"small",withBorder:!1,withBackground:!1,onClick:f,screenReaderLabel:e.prevResultLabel},Uc||(Uc=rt.createElement(Np,null))))})}function zw(n){return n?OS({createPanel:e=>{var t;const i=document.createElement("div");return i.style.padding="8px",Number(rt.version.split(".")[0])>=18?Wp(()=>import("./index-C3XQCywa.js").then(r=>r.c),__vite__mapDeps([0,1])).then(r=>{r.createRoot(i).render(t||(t=rt.createElement(Ic,{view:e,searchConfig:n})))}).catch(r=>{}):Ep.render(rt.createElement(Ic,{view:e,searchConfig:n}),i),{dom:i}}}):[]}const Lw=(n,e)=>{const t=e.attachment,i=e.height,s=e.width,r={top:{borderBottomLeftRadius:0,borderBottomRightRadius:0},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0}},o={top:{marginBottom:0,marginTop:"0.25rem"},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0,marginBottom:"0.25rem"}},l=1.4375;return{codeEditor:{label:"codeEditor",position:"relative",boxSizing:"border-box",height:i||"auto",width:s},label:{label:"label",height:"100%",width:"100%"},codeEditorContainer:{label:"codeEditorContainer",height:"100%",width:"100%",borderColor:n==null?void 0:n.borderColor,borderStyle:"solid",borderWidth:n==null?void 0:n.borderWidth,borderRadius:n.borderRadius,marginBottom:"1rem",...t&&{...o[t],...r[t]}},theme:{"&":{overflow:"hidden",background:n.background,fontFamily:n.fontFamily,fontSize:n.fontSize,color:n.color,border:0,height:"100%",width:"100%",minHeight:`${l}rem`,lineHeight:l,borderRadius:n.borderRadius,...t&&{...r[t]}},"&.cm-editor.cm-focused":{outline:`${n==null?void 0:n.borderWidth} solid ${n==null?void 0:n.focusBorderColor}`},".cm-content":{padding:`${n.verticalPadding} 0`},".cm-scroller":{fontFamily:n.fontFamily,lineHeight:1.4375},".cm-gutters":{background:n.gutterBackground,borderColor:n.borderColor},".cm-line":{padding:`0 ${n.horizontalPadding}`},".cm-selectionBackground":{background:"transparent"},".cm-focused .cm-selectionBackground":{background:"#d7d4f0"},".cm-placeholder":{color:"#707070"}},highlightStyle:[{tag:p.link,textDecoration:"underline"},{tag:p.heading,textDecoration:"underline",fontWeight:"bold"},{tag:p.emphasis,fontStyle:"italic"},{tag:p.strong,fontWeight:"bold"},{tag:p.strikethrough,textDecoration:"line-through"},{tag:p.keyword,color:"#708"},{tag:[p.atom,p.bool,p.url,p.contentSeparator,p.labelName],color:"#219"},{tag:[p.literal,p.inserted],color:"#164"},{tag:[p.string,p.deleted],color:"#a11"},{tag:p.definition(p.variableName),color:"#00f"},{tag:p.local(p.variableName),color:"#30a"},{tag:p.className,color:"#167"},{tag:[p.special(p.variableName),p.macroName],color:"#256"},{tag:p.definition(p.propertyName),color:"#00c"},{tag:p.comment,color:"#940"},{tag:p.meta,color:"#757075"},{tag:[p.regexp,p.escape,p.special(p.string)],color:"#d13b00"},{tag:[p.typeName,p.namespace],color:"#008051"},{tag:p.invalid,color:"#e60000"}]}},_w=n=>{const e=n.colors,t=n.borders,i=n.typography,s=n.spacing;return{...{fontFamily:i==null?void 0:i.fontFamilyMonospace,fontSize:i==null?void 0:i.fontSizeSmall,background:e==null?void 0:e.backgroundLightest,color:e==null?void 0:e.textDarkest,gutterBackground:e==null?void 0:e.backgroundLight,borderWidth:t==null?void 0:t.widthSmall,borderColor:e==null?void 0:e.borderMedium,borderRadius:t==null?void 0:t.radiusMedium,focusBorderColor:e==null?void 0:e.borderBrand,horizontalPadding:s==null?void 0:s.xSmall,verticalPadding:s==null?void 0:s.xxSmall}}},jc=[{key:"ArrowLeft",run:Nl,shift:Fl,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Xd,shift:Nd},{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:Wd,shift:Fd},{mac:"Cmd-ArrowLeft",run:Bd,shift:sO},{key:"Home",run:zd,shift:tO},{key:"ArrowRight",run:jl,shift:Gl,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Ad,shift:jd},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Md,shift:Gd},{mac:"Cmd-ArrowRight",run:_d,shift:nO},{key:"End",run:Ld,shift:iO},{key:"Delete",run:Gs},{key:"Mod-Delete",mac:"Alt-Delete",run:Hl},{key:"Backspace",run:Fs,shift:Fs},{key:"Mod-Backspace",mac:"Alt-Backspace",run:lO},{mac:"Mod-Delete",run:sy},{mac:"Mod-Backspace",run:aO}],Bw={label:j.string.isRequired,language:j.oneOf(["sh","js","json","javascript","jsx","shell","css","html","markdown","yaml","yml","bash"]),readOnly:j.bool,editable:j.bool,lineNumbers:j.bool,foldGutter:j.bool,highlightActiveLineGutter:j.bool,highlightActiveLine:j.bool,lineWrapping:j.bool,autofocus:j.bool,spellcheck:j.bool,direction:j.oneOf(["ltr","rtl"]),rtlMoveVisually:j.bool,indentOnLoad:j.bool,indentWithTab:j.bool,indentUnit:j.string,defaultValue:j.string,value:Fp(j.string,"onChange","defaultValue"),onChange:j.func,onFocus:j.func,onBlur:j.func,attachment:j.oneOf(["bottom","top"]),height:j.string,width:j.string,elementRef:j.func,containerRef:j.func,searchConfig:j.object},Uw=["label","language","readOnly","editable","lineNumbers","foldGutter","highlightActiveLineGutter","highlightActiveLine","lineWrapping","autofocus","spellcheck","direction","rtlMoveVisually","indentOnLoad","indentWithTab","indentUnit","defaultValue","value","onChange","onFocus","onBlur","attachment","height","width","elementRef","containerRef","searchConfig"],Iw=["label","styles"];var Nc,Gc,Fc,Hc,Pt,It;let sQ=(Nc=Yp(),Gc=Dp(Lw,_w),Fc=qp(),Hc=zp(),Nc(Pt=Gc(Pt=Fc(Pt=Hc(Pt=(It=class Mp extends Kc.Component{addAnimationFrame(e){typeof e=="function"&&this._raf.push(Hp(e))}cancelAnimationFrames(){this._raf.forEach(e=>e.cancel()),this._raf=[]}focus(){this.addAnimationFrame(()=>{var e;(e=this._editorView)===null||e===void 0||e.focus()})}get hasFocus(){var e;return(e=this._editorView)===null||e===void 0?void 0:e.hasFocus}selectAll(){this._editorView&&this.addAnimationFrame(()=>{var e;this.dispatchViewSelection({anchor:0,head:(e=this.currentDocValue)===null||e===void 0?void 0:e.length})})}deselectAll(){this._editorView&&this.addAnimationFrame(()=>{this.dispatchViewSelection({anchor:0,head:0})})}indentCurrentSelection(){this.addAnimationFrame(()=>{this._editorView&&uO({state:this._editorView.state,dispatch:e=>{var t;(t=this._editorView)===null||t===void 0||t.update([e])}})})}indentAll(){this.addAnimationFrame(()=>{this._editorView&&this.currentDocValue&&this.indentCodeRange(0,this.currentDocValue.length)})}indentCodeRange(e,t){this.addAnimationFrame(()=>{this._editorView&&this.currentDocValue&&this.dispatchViewChanges({changes:Ob(this._editorView.state,e,t)})})}dispatchViewEffects(e){!this._editorView||!e||this._editorView.dispatch({effects:e})}dispatchViewChanges({changes:e,selection:t,userEvent:i}){!this._editorView||!e||this._editorView.dispatch({changes:e,...t?{selection:t}:void 0,...i?{userEvent:i}:void 0})}dispatchViewSelection(e){!this._editorView||!e||this._editorView.dispatch({selection:e})}get currentDocValue(){var e;return(e=this._editorView)===null||e===void 0?void 0:e.state.doc}get isControlled(){return typeof this.props.value=="string"}constructor(e){super(e),this._id=void 0,this.ref=null,this._containerRef=void 0,this._editorView=void 0,this._raf=[],this._newSelectionAfterValueChange=void 0,this.handleRef=t=>{const i=this.props.elementRef;this.ref=t,typeof i=="function"&&i(t)},this.handleContainerRef=t=>{const i=this.props.containerRef;this._containerRef=t||void 0,typeof i=="function"&&i(t)},this._id=e.deterministicId()}componentDidMount(){var e,t;const i=this.props,s=i.value,r=i.defaultValue,o=i.autofocus,l=i.indentOnLoad;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t);const a=Y.create({doc:s||r,extensions:this.extensions});this._editorView=new $({state:a,parent:this._containerRef}),o&&this.focus(),l&&this.indentAll()}componentWillUnmount(){var e;(e=this._editorView)===null||e===void 0||e.destroy(),this.cancelAnimationFrames()}componentDidUpdate(e){var t,i;(t=(i=this.props).makeStyles)===null||t===void 0||t.call(i),this._editorView&&(this.props.value!==e.value&&this.refreshEditorValue(),this.shouldUpdateExtensions(e)&&this.refreshExtensions())}shouldUpdateExtensions(e){const t=["styles","themeOverride","language","readOnly","editable","lineNumbers","highlightActiveLineGutter","foldGutter","lineWrapping","autofocus","spellcheck","direction","dir","rtlMoveVisually","indentOnLoad","indentWithTab","indentUnit","highlightActiveLine","attachment"];for(const i of t)if(!Lp(this.props[i],e[i]))return!0;return!1}get direction(){return this.props.direction||this.props.dir}get extensions(){const e=[...this.baseExtensions,this.languageExtension,this.onChangeExtension,this.focusListenerExtension,this.announceLineNumberExtension];return this.themeExtension&&e.push(this.themeExtension),this.props.lineNumbers&&e.push(z0()),this.props.highlightActiveLine&&e.push(p0()),this.props.highlightActiveLineGutter&&e.push(B0()),this.props.foldGutter&&e.push(Eb()),this.props.lineWrapping&&e.push($.lineWrapping),this.props.editable===!1&&e.push($.editable.of(!1)),this.props.readOnly&&e.push(Y.readOnly.of(!0)),this.props.spellcheck&&e.push($.contentAttributes.of({spellcheck:"true"})),this.direction&&e.push($.contentAttributes.of({dir:this.direction})),this.props.indentUnit&&e.push(Yi.of(this.props.indentUnit)),e}get baseExtensions(){return[h0(),VS(),Kg(),n0(),Y.allowMultipleSelections.of(!0),Ch(qb,{fallback:!0}),jb(),z1(),K1(),k0(),Q0(),rS(),Qb(),zw(this.props.searchConfig),Vn.of(this.keymaps)]}get keymaps(){const e=[...U1,...this.commandKeybinding,...IS,...Ab,...pd,...Zy,...this.props.searchConfig?PS:[]];return this.props.indentWithTab&&e.push(yy),e}get commandKeybinding(){const e=this.props.rtlMoveVisually;if(this.direction==="rtl"&&!e){const t=jc.map(s=>s.key?s.key:s.mac?s.mac:s);return[...Jh.filter(s=>s.key?t.indexOf(s.key)<0:s.mac?t.indexOf(s.mac)<0:!1),...jc]}return Jh}get themeExtension(){const e=this.props.styles;if(!(e!=null&&e.theme)||!e.highlightStyle)return;const t=$.theme(e==null?void 0:e.theme),i=Ch(zn.define(e==null?void 0:e.highlightStyle));return[t,i]}get languageExtension(){switch(this.props.language){case"json":return Xw();case"js":case"jsx":case"javascript":return Jo({jsx:!0,typescript:!0});case"html":return ip({matchClosingTags:!0,autoCloseTags:!0});case"css":return jO();case"markdown":return vw();case"sh":case"shell":case"bash":return zs.define(Vw);case"yml":case"yaml":return zs.define(qw);default:return Jo({jsx:!0,typescript:!0})}}callOnChangeHandler(e){const t=this.props,i=t.onChange,s=t.value;this.addAnimationFrame(()=>{typeof i=="function"&&e!==s&&i(e)})}get onChangeExtension(){return Y.changeFilter.of(e=>{if(!this._editorView)return!1;if(e.docChanged){const t=e.newDoc.toString();if(this.isControlled)return t!==this.props.value?(this._newSelectionAfterValueChange=e.selection,this.cancelAnimationFrames(),this.callOnChangeHandler(t),!1):!0;this.callOnChangeHandler(t)}return!0})}get focusListenerExtension(){const e=this.props,t=e.onFocus,i=e.onBlur;return $.updateListener.of(s=>{s.focusChanged&&this._editorView&&(this.hasFocus?typeof t=="function"&&t():typeof i=="function"&&i())})}get announceLineNumberExtension(){return Y.transactionExtender.of(e=>{const t=e.selection,i=e.startState.selection.main;if(t&&t.main.empty&&i.empty){const s=e.startState.doc.lineAt(i.head),r=e.newDoc.lineAt(t.main.head);if(s.number!=r.number)return{effects:$.announce.of(e.startState.phrase("line ")+r.number+".")}}return null})}refreshExtensions(){this.dispatchViewEffects(M.reconfigure.of(this.extensions))}refreshEditorValue(){if(!this._editorView)return;const e=this.props.value,t=this._editorView.state.doc.toString();if(typeof e<"u"&&t!==e){let i;const s=e.length-t.length;s===1?i="input.type":s===-1&&(i="delete.backward"),this.dispatchViewChanges({changes:{from:0,to:t.length,insert:e||""},selection:this._newSelectionAfterValueChange,userEvent:i}),this._newSelectionAfterValueChange=void 0}this.props.indentOnLoad&&this.indentAll()}render(){const e=this.props,t=e.label,i=e.styles,s=_p(e,Iw);return Un("div",Object.assign({ref:this.handleRef,css:i==null?void 0:i.codeEditor},Bp(Up(s,Mp.allowedProps))),Un("label",{css:i==null?void 0:i.label,htmlFor:this._id},Un(Kp,null,t),Un("div",{ref:this.handleContainerRef,css:i==null?void 0:i.codeEditorContainer})))}},It.displayName="SourceCodeEditor",It.componentId="SourceCodeEditor",It.propTypes=Bw,It.allowedProps=Uw,It.defaultProps={language:"jsx",readOnly:!1,editable:!0,lineNumbers:!1,foldGutter:!1,highlightActiveLine:!1,highlightActiveLineGutter:!1,lineWrapping:!1,autofocus:!1,spellcheck:!1,rtlMoveVisually:!0,indentOnLoad:!1,indentWithTab:!1,defaultValue:"",height:"auto"},It))||Pt)||Pt)||Pt)||Pt);export{sQ as S}; diff --git a/assets/index-De3kK20J.js b/assets/index-BfwAAv1n.js similarity index 97% rename from assets/index-De3kK20J.js rename to assets/index-BfwAAv1n.js index d953e9c..28faa8b 100644 --- a/assets/index-De3kK20J.js +++ b/assets/index-BfwAAv1n.js @@ -1 +1 @@ -import{P as s,T as f,w as y,r as k,i as d,q as S,V as b,o as C}from"./index-DCzcanBz.js";import{H as z,n as _}from"./RenderTopNavBar-CILoEAmM.js";const x=(o,i)=>{const e=i.size,l=i.href,r=i.onClick,a=i.disabled,n=i.hero,g=i.heading,p=l||r,c={small:{billboard:{padding:o.paddingSmall},hero:{fontSize:"3rem"},message:{fontSize:o.messageFontSizeSmall},heading:{...n&&{margin:`${o.mediumMargin} 0 0`}}},medium:{billboard:{padding:o.paddingMedium},hero:{fontSize:"5rem"},message:{fontSize:o.messageFontSizeMedium},heading:{}},large:{billboard:{padding:o.paddingLarge},hero:{fontSize:"10rem"},message:{fontSize:o.messageFontSizeLarge},heading:{}}},m=p?{appearance:"none",boxSizing:"border-box",cursor:"pointer",userSelect:"none",touchAction:"manipulation",width:"100%",margin:"0",border:`${o.buttonBorderWidth} ${o.buttonBorderStyle} transparent`,borderRadius:o.buttonBorderRadius,background:o.backgroundColor,textDecoration:"none","&:hover":{borderStyle:o.buttonHoverBorderStyle},"&:hover, &:focus":{textDecoration:"none",outline:"none",borderColor:o.iconHoverColor,"& [class$=-billboard__hero]":{color:o.iconHoverColor}},"&:active":{background:o.clickableActiveBg,borderColor:o.iconHoverColor,"& [class$=-billboard__hero], & [class$=-billboard__message]":{color:o.clickableActiveText}}}:{backgroundColor:o.backgroundColor};return{billboard:{label:"billboard",boxSizing:"border-box",position:"relative",fontFamily:o.fontFamily,marginLeft:"auto",marginRight:"auto",textAlign:"center",display:"block",...c[e].billboard,...m,...a&&{cursor:"not-allowed",pointerEvents:"none",opacity:.5}},content:{label:"billboard__content",display:"block"},hero:{label:"billboard__hero",display:"block",color:o.iconColor,...c[e].hero,"& > img, & > svg":{maxWidth:"100%",display:"block",margin:"0 auto"},"& > img":{height:"auto"}},heading:{label:"billboard__heading",display:"block",...n&&{margin:`${o.largeMargin} 0 0`},...c[e].heading},message:{label:"billboard__message",display:"block",color:p?o.messageColorClickable:o.messageColor,...(n||g)&&{margin:`${o.mediumMargin} 0 0`},...c[e].message}}},B=o=>{const i=o.borders,e=o.colors,l=o.spacing,r=o.typography,a=o.key,n={canvas:{iconHoverColor:o["ic-link-color"],messageColorClickable:o["ic-link-color"],clickableActiveBg:o["ic-brand-primary"]}};return{...{fontFamily:r==null?void 0:r.fontFamily,paddingSmall:l==null?void 0:l.small,paddingMedium:l==null?void 0:l.medium,paddingLarge:l==null?void 0:l.medium,iconColor:e==null?void 0:e.textDark,mediumMargin:l==null?void 0:l.small,largeMargin:l==null?void 0:l.medium,iconHoverColor:e==null?void 0:e.textLink,backgroundColor:e==null?void 0:e.backgroundLightest,iconHoverColorInverse:e==null?void 0:e.textLightest,buttonBorderWidth:i==null?void 0:i.widthMedium,buttonBorderRadius:i==null?void 0:i.radiusLarge,messageColor:e==null?void 0:e.textDark,messageColorClickable:e==null?void 0:e.textLink,messageColorInverse:e==null?void 0:e.textLight,messageFontSizeSmall:r==null?void 0:r.fontSizeSmall,messageFontSizeMedium:r==null?void 0:r.fontSizeMedium,messageFontSizeLarge:r==null?void 0:r.fontSizeLarge,clickableActiveBg:e==null?void 0:e.backgroundBrand,clickableActiveText:e==null?void 0:e.textLightest,buttonBorderStyle:i==null?void 0:i.style,buttonHoverBorderStyle:"dashed"},...n[a]}},L={hero:s.oneOfType([s.element,s.func]),size:s.oneOf(["small","medium","large"]),as:s.elementType,elementRef:s.func,heading:s.string,headingAs:s.oneOf(["h1","h2","h3","span"]),headingLevel:s.oneOf(["h1","h2","h3","h4"]),message:s.oneOfType([s.node,s.func]),onClick:s.func,href:s.string,disabled:s.bool,readOnly:s.bool,margin:f.spacing},$=["hero","size","as","elementRef","heading","headingAs","headingLevel","message","onClick","href","disabled","readOnly","margin"];var v,h,t;let R=(v=y(x,B),v(h=(t=class u extends k.Component{constructor(...i){super(...i),this.ref=null,this.handleRef=e=>{const l=this.props.elementRef;this.ref=e,typeof l=="function"&&l(e)},this.handleClick=e=>{const l=this.props,r=l.readOnly,a=l.onClick;r?(e.preventDefault(),e.stopPropagation()):typeof a=="function"&&a(e)}}componentDidMount(){var i,e;(i=(e=this.props).makeStyles)===null||i===void 0||i.call(e)}componentDidUpdate(){var i,e;(i=(e=this.props).makeStyles)===null||i===void 0||i.call(e)}renderHeading(){const i=this.props,e=i.headingLevel,l=i.headingAs,r=i.heading,a=i.styles;return d("span",{css:a==null?void 0:a.heading},d(z,{level:e,as:l,color:"primary"},r))}get SVGIconSize(){const i=this.props.size;return i==="small"?"medium":i==="large"?"x-large":"large"}renderHero(){return typeof this.props.hero=="function"?this.props.hero(this.SVGIconSize):this.props.hero}renderContent(){const i=this.props,e=i.heading,l=i.message,r=i.hero,a=i.styles;return d("span",{css:a==null?void 0:a.content},r&&d("span",{css:a==null?void 0:a.hero},this.renderHero()),e&&this.renderHeading(),l&&d("span",{css:a==null?void 0:a.message},_(l)))}render(){const i=this.props,e=i.href,l=i.disabled,r=i.readOnly,a=i.margin,n=i.styles,g=S(u,this.props);return d(b,{as:"div",margin:a},d(b,Object.assign({},C(this.props,[...u.allowedProps,...b.allowedProps]),{type:g==="button"?"button":void 0,as:g,elementRef:this.handleRef,css:n==null?void 0:n.billboard,href:e,onClick:this.handleClick,disabled:l,"aria-disabled":l||r?"true":void 0}),this.renderContent()))}},t.displayName="Billboard",t.componentId="Billboard",t.propTypes=L,t.allowedProps=$,t.defaultProps={disabled:!1,readOnly:!1,size:"medium",headingAs:"span",headingLevel:"h1",as:"span",elementRef:()=>{}},t))||h);export{R as B}; +import{P as s,T as f,w as y,r as k,i as d,q as S,V as b,o as C}from"./index-C3XQCywa.js";import{H as z,n as _}from"./RenderTopNavBar-D2dLV4g_.js";const x=(o,i)=>{const e=i.size,l=i.href,r=i.onClick,a=i.disabled,n=i.hero,g=i.heading,p=l||r,c={small:{billboard:{padding:o.paddingSmall},hero:{fontSize:"3rem"},message:{fontSize:o.messageFontSizeSmall},heading:{...n&&{margin:`${o.mediumMargin} 0 0`}}},medium:{billboard:{padding:o.paddingMedium},hero:{fontSize:"5rem"},message:{fontSize:o.messageFontSizeMedium},heading:{}},large:{billboard:{padding:o.paddingLarge},hero:{fontSize:"10rem"},message:{fontSize:o.messageFontSizeLarge},heading:{}}},m=p?{appearance:"none",boxSizing:"border-box",cursor:"pointer",userSelect:"none",touchAction:"manipulation",width:"100%",margin:"0",border:`${o.buttonBorderWidth} ${o.buttonBorderStyle} transparent`,borderRadius:o.buttonBorderRadius,background:o.backgroundColor,textDecoration:"none","&:hover":{borderStyle:o.buttonHoverBorderStyle},"&:hover, &:focus":{textDecoration:"none",outline:"none",borderColor:o.iconHoverColor,"& [class$=-billboard__hero]":{color:o.iconHoverColor}},"&:active":{background:o.clickableActiveBg,borderColor:o.iconHoverColor,"& [class$=-billboard__hero], & [class$=-billboard__message]":{color:o.clickableActiveText}}}:{backgroundColor:o.backgroundColor};return{billboard:{label:"billboard",boxSizing:"border-box",position:"relative",fontFamily:o.fontFamily,marginLeft:"auto",marginRight:"auto",textAlign:"center",display:"block",...c[e].billboard,...m,...a&&{cursor:"not-allowed",pointerEvents:"none",opacity:.5}},content:{label:"billboard__content",display:"block"},hero:{label:"billboard__hero",display:"block",color:o.iconColor,...c[e].hero,"& > img, & > svg":{maxWidth:"100%",display:"block",margin:"0 auto"},"& > img":{height:"auto"}},heading:{label:"billboard__heading",display:"block",...n&&{margin:`${o.largeMargin} 0 0`},...c[e].heading},message:{label:"billboard__message",display:"block",color:p?o.messageColorClickable:o.messageColor,...(n||g)&&{margin:`${o.mediumMargin} 0 0`},...c[e].message}}},B=o=>{const i=o.borders,e=o.colors,l=o.spacing,r=o.typography,a=o.key,n={canvas:{iconHoverColor:o["ic-link-color"],messageColorClickable:o["ic-link-color"],clickableActiveBg:o["ic-brand-primary"]}};return{...{fontFamily:r==null?void 0:r.fontFamily,paddingSmall:l==null?void 0:l.small,paddingMedium:l==null?void 0:l.medium,paddingLarge:l==null?void 0:l.medium,iconColor:e==null?void 0:e.textDark,mediumMargin:l==null?void 0:l.small,largeMargin:l==null?void 0:l.medium,iconHoverColor:e==null?void 0:e.textLink,backgroundColor:e==null?void 0:e.backgroundLightest,iconHoverColorInverse:e==null?void 0:e.textLightest,buttonBorderWidth:i==null?void 0:i.widthMedium,buttonBorderRadius:i==null?void 0:i.radiusLarge,messageColor:e==null?void 0:e.textDark,messageColorClickable:e==null?void 0:e.textLink,messageColorInverse:e==null?void 0:e.textLight,messageFontSizeSmall:r==null?void 0:r.fontSizeSmall,messageFontSizeMedium:r==null?void 0:r.fontSizeMedium,messageFontSizeLarge:r==null?void 0:r.fontSizeLarge,clickableActiveBg:e==null?void 0:e.backgroundBrand,clickableActiveText:e==null?void 0:e.textLightest,buttonBorderStyle:i==null?void 0:i.style,buttonHoverBorderStyle:"dashed"},...n[a]}},L={hero:s.oneOfType([s.element,s.func]),size:s.oneOf(["small","medium","large"]),as:s.elementType,elementRef:s.func,heading:s.string,headingAs:s.oneOf(["h1","h2","h3","span"]),headingLevel:s.oneOf(["h1","h2","h3","h4"]),message:s.oneOfType([s.node,s.func]),onClick:s.func,href:s.string,disabled:s.bool,readOnly:s.bool,margin:f.spacing},$=["hero","size","as","elementRef","heading","headingAs","headingLevel","message","onClick","href","disabled","readOnly","margin"];var v,h,t;let R=(v=y(x,B),v(h=(t=class u extends k.Component{constructor(...i){super(...i),this.ref=null,this.handleRef=e=>{const l=this.props.elementRef;this.ref=e,typeof l=="function"&&l(e)},this.handleClick=e=>{const l=this.props,r=l.readOnly,a=l.onClick;r?(e.preventDefault(),e.stopPropagation()):typeof a=="function"&&a(e)}}componentDidMount(){var i,e;(i=(e=this.props).makeStyles)===null||i===void 0||i.call(e)}componentDidUpdate(){var i,e;(i=(e=this.props).makeStyles)===null||i===void 0||i.call(e)}renderHeading(){const i=this.props,e=i.headingLevel,l=i.headingAs,r=i.heading,a=i.styles;return d("span",{css:a==null?void 0:a.heading},d(z,{level:e,as:l,color:"primary"},r))}get SVGIconSize(){const i=this.props.size;return i==="small"?"medium":i==="large"?"x-large":"large"}renderHero(){return typeof this.props.hero=="function"?this.props.hero(this.SVGIconSize):this.props.hero}renderContent(){const i=this.props,e=i.heading,l=i.message,r=i.hero,a=i.styles;return d("span",{css:a==null?void 0:a.content},r&&d("span",{css:a==null?void 0:a.hero},this.renderHero()),e&&this.renderHeading(),l&&d("span",{css:a==null?void 0:a.message},_(l)))}render(){const i=this.props,e=i.href,l=i.disabled,r=i.readOnly,a=i.margin,n=i.styles,g=S(u,this.props);return d(b,{as:"div",margin:a},d(b,Object.assign({},C(this.props,[...u.allowedProps,...b.allowedProps]),{type:g==="button"?"button":void 0,as:g,elementRef:this.handleRef,css:n==null?void 0:n.billboard,href:e,onClick:this.handleClick,disabled:l,"aria-disabled":l||r?"true":void 0}),this.renderContent()))}},t.displayName="Billboard",t.componentId="Billboard",t.propTypes=L,t.allowedProps=$,t.defaultProps={disabled:!1,readOnly:!1,size:"medium",headingAs:"span",headingLevel:"h1",as:"span",elementRef:()=>{}},t))||h);export{R as B}; diff --git a/assets/index-DCzcanBz.js b/assets/index-C3XQCywa.js similarity index 61% rename from assets/index-DCzcanBz.js rename to assets/index-C3XQCywa.js index 48f3129..727f1a9 100644 --- a/assets/index-DCzcanBz.js +++ b/assets/index-C3XQCywa.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdownBrand-DRRkJwz6.js","assets/RenderTopNavBar-CILoEAmM.js","assets/Mdtoui-B81NOHR9.js","assets/index-C5yFM9ST.js","assets/redirectTo-De8G5wZL.js","assets/index-De3kK20J.js","assets/links-pxnmE0x3.js","assets/index-CTDsjRCP.js","assets/index-C1tjm6wA.js","assets/mdui-DUzyFQJ0.js","assets/index-2_RebUFS.js","assets/releases-wyg0zbfr.js","assets/IconRssLine-BqBzMn_a.js","assets/error-BC2Hv5fG.js"])))=>i.map(i=>d[i]); -function Hs(e,t){for(var a=0;an[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))n(l);new MutationObserver(l=>{for(const r of l)if(r.type==="childList")for(const i of r.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function a(l){const r={};return l.integrity&&(r.integrity=l.integrity),l.referrerPolicy&&(r.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?r.credentials="include":l.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(l){if(l.ep)return;l.ep=!0;const r=a(l);fetch(l.href,r)}})();const fy="modulepreload",dy=function(e){return"/"+e},bd={},Ut=function(t,a,n){let l=Promise.resolve();if(a&&a.length>0){document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),i=(r==null?void 0:r.nonce)||(r==null?void 0:r.getAttribute("nonce"));l=Promise.all(a.map(u=>{if(u=dy(u),u in bd)return;bd[u]=!0;const c=u.endsWith(".css"),o=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${o}`))return;const s=document.createElement("link");if(s.rel=c?"stylesheet":fy,c||(s.as="script",s.crossOrigin=""),s.href=u,i&&s.setAttribute("nonce",i),document.head.appendChild(s),c)return new Promise((d,f)=>{s.addEventListener("load",d),s.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${u}`)))})}))}return l.then(()=>t()).catch(r=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=r,window.dispatchEvent(i),!i.defaultPrevented)throw r})};var m9=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ll(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function v9(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var a=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};a.prototype=t.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(a,n,l.get?l:{enumerable:!0,get:function(){return e[n]}})}),a}var Lh={exports:{}},Ku={};/** +const __vite__fileDeps=["assets/markdownBrand-GGRWnoGz.js","assets/RenderTopNavBar-D2dLV4g_.js","assets/Mdtoui-yQNCxW-t.js","assets/index-CuKaSjpf.js","assets/redirectTo-Dw5dzXUk.js","assets/index-BfwAAv1n.js","assets/links-D-T-qd9l.js","assets/index-ykr1wfg1.js","assets/index-D14ZWBB_.js","assets/mdui-DEQHbAAt.js","assets/index-B7tEZKBe.js","assets/releases-BXrmG0c_.js","assets/IconRssLine-Cd1K2zy4.js","assets/error-Cp8tnuu0.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +function Us(e,t){for(var a=0;an[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))n(l);new MutationObserver(l=>{for(const r of l)if(r.type==="childList")for(const i of r.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function a(l){const r={};return l.integrity&&(r.integrity=l.integrity),l.referrerPolicy&&(r.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?r.credentials="include":l.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(l){if(l.ep)return;l.ep=!0;const r=a(l);fetch(l.href,r)}})();const sy="modulepreload",fy=function(e){return"/"+e},bd={},Ut=function(t,a,n){let l=Promise.resolve();if(a&&a.length>0){document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),i=(r==null?void 0:r.nonce)||(r==null?void 0:r.getAttribute("nonce"));l=Promise.all(a.map(u=>{if(u=fy(u),u in bd)return;bd[u]=!0;const c=u.endsWith(".css"),o=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${o}`))return;const s=document.createElement("link");if(s.rel=c?"stylesheet":sy,c||(s.as="script",s.crossOrigin=""),s.href=u,i&&s.setAttribute("nonce",i),document.head.appendChild(s),c)return new Promise((d,f)=>{s.addEventListener("load",d),s.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${u}`)))})}))}return l.then(()=>t()).catch(r=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=r,window.dispatchEvent(i),!i.defaultPrevented)throw r})};var h9=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ll(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function m9(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var a=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};a.prototype=t.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(a,n,l.get?l:{enumerable:!0,get:function(){return e[n]}})}),a}var Lh={exports:{}},Ku={};/** * @license React * react-jsx-runtime.production.js * @@ -7,7 +7,7 @@ function Hs(e,t){for(var a=0;a>>1,fe=$[re];if(0>>1;rel(jt,Y))qel(wt,jt)?($[re]=wt,$[qe]=Y,re=qe):($[re]=jt,$[pt]=Y,re=pt);else if(qel(wt,Y))$[re]=wt,$[qe]=Y,re=qe;else break e}}return H}function l($,H){var Y=$.sortIndex-H.sortIndex;return Y!==0?Y:$.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var r=performance;e.unstable_now=function(){return r.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var c=[],o=[],s=1,d=null,f=3,p=!1,C=!1,S=!1,O=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;function v($){for(var H=a(o);H!==null;){if(H.callback===null)n(o);else if(H.startTime<=$)n(o),H.sortIndex=H.expirationTime,t(c,H);else break;H=a(o)}}function R($){if(S=!1,v($),!C)if(a(c)!==null)C=!0,Ee();else{var H=a(o);H!==null&&Tt(R,H.startTime-$)}}var x=!1,g=-1,A=5,z=-1;function U(){return!(e.unstable_now()-z$&&U());){var re=d.callback;if(typeof re=="function"){d.callback=null,f=d.priorityLevel;var fe=re(d.expirationTime<=$);if($=e.unstable_now(),typeof fe=="function"){d.callback=fe,v($),H=!0;break t}d===a(c)&&n(c),v($)}else n(c);d=a(c)}if(d!==null)H=!0;else{var Ie=a(o);Ie!==null&&Tt(R,Ie.startTime-$),H=!1}}break e}finally{d=null,f=Y,p=!1}H=void 0}}finally{H?q():x=!1}}}var q;if(typeof h=="function")q=function(){h(j)};else if(typeof MessageChannel<"u"){var Me=new MessageChannel,we=Me.port2;Me.port1.onmessage=j,q=function(){we.postMessage(null)}}else q=function(){O(j,0)};function Ee(){x||(x=!0,q())}function Tt($,H){g=O(function(){$(e.unstable_now())},H)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function($){$.callback=null},e.unstable_continueExecution=function(){C||p||(C=!0,Ee())},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return a(c)},e.unstable_next=function($){switch(f){case 1:case 2:case 3:var H=3;break;default:H=f}var Y=f;f=H;try{return $()}finally{f=Y}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,H){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var Y=f;f=$;try{return H()}finally{f=Y}},e.unstable_scheduleCallback=function($,H,Y){var re=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0re?($.sortIndex=Y,t(o,$),a(c)===null&&$===a(o)&&(S?(m(g),g=-1):S=!0,Tt(R,Y-re))):($.sortIndex=fe,t(c,$),C||p||(C=!0,Ee())),$},e.unstable_shouldYield=U,e.unstable_wrapCallback=function($){var H=f;return function(){var Y=f;f=H;try{return $.apply(this,arguments)}finally{f=Y}}}})(Zh);Xh.exports=Zh;var xy=Xh.exports,Qh={exports:{}},st={};/** + */(function(e){function t($,H){var G=$.length;$.push(H);e:for(;0>>1,fe=$[re];if(0>>1;rel(jt,G))qel(_t,jt)?($[re]=_t,$[qe]=G,re=qe):($[re]=jt,$[pt]=G,re=pt);else if(qel(_t,G))$[re]=_t,$[qe]=G,re=qe;else break e}}return H}function l($,H){var G=$.sortIndex-H.sortIndex;return G!==0?G:$.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var r=performance;e.unstable_now=function(){return r.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var c=[],o=[],s=1,d=null,f=3,p=!1,C=!1,S=!1,O=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;function v($){for(var H=a(o);H!==null;){if(H.callback===null)n(o);else if(H.startTime<=$)n(o),H.sortIndex=H.expirationTime,t(c,H);else break;H=a(o)}}function R($){if(S=!1,v($),!C)if(a(c)!==null)C=!0,Ee();else{var H=a(o);H!==null&&Tt(R,H.startTime-$)}}var x=!1,g=-1,A=5,z=-1;function U(){return!(e.unstable_now()-z$&&U());){var re=d.callback;if(typeof re=="function"){d.callback=null,f=d.priorityLevel;var fe=re(d.expirationTime<=$);if($=e.unstable_now(),typeof fe=="function"){d.callback=fe,v($),H=!0;break t}d===a(c)&&n(c),v($)}else n(c);d=a(c)}if(d!==null)H=!0;else{var Ie=a(o);Ie!==null&&Tt(R,Ie.startTime-$),H=!1}}break e}finally{d=null,f=G,p=!1}H=void 0}}finally{H?Y():x=!1}}}var Y;if(typeof h=="function")Y=function(){h(V)};else if(typeof MessageChannel<"u"){var Me=new MessageChannel,_e=Me.port2;Me.port1.onmessage=V,Y=function(){_e.postMessage(null)}}else Y=function(){O(V,0)};function Ee(){x||(x=!0,Y())}function Tt($,H){g=O(function(){$(e.unstable_now())},H)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function($){$.callback=null},e.unstable_continueExecution=function(){C||p||(C=!0,Ee())},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return a(c)},e.unstable_next=function($){switch(f){case 1:case 2:case 3:var H=3;break;default:H=f}var G=f;f=H;try{return $()}finally{f=G}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,H){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var G=f;f=$;try{return H()}finally{f=G}},e.unstable_scheduleCallback=function($,H,G){var re=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0re?($.sortIndex=G,t(o,$),a(c)===null&&$===a(o)&&(S?(m(g),g=-1):S=!0,Tt(R,G-re))):($.sortIndex=fe,t(c,$),C||p||(C=!0,Ee())),$},e.unstable_shouldYield=U,e.unstable_wrapCallback=function($){var H=f;return function(){var G=f;f=H;try{return $.apply(this,arguments)}finally{f=G}}}})(Zh);Xh.exports=Zh;var My=Xh.exports,Qh={exports:{}},ot={};/** * @license React * react-dom.production.js * @@ -31,7 +31,7 @@ function Hs(e,t){for(var a=0;a"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ph)}catch(e){console.error(e)}}Ph(),Qh.exports=st;var Ys=Qh.exports;const Jh=Ll(Ys),$y=Hs({__proto__:null,default:Jh},[Ys]);/** + */function Kh(e){var t="https://react.dev/errors/"+e;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ph)}catch(e){console.error(e)}}Ph(),Qh.exports=ot;var Gs=Qh.exports;const Jh=Ll(Gs),zy=Us({__proto__:null,default:Jh},[Gs]);/** * @license React * react-dom-client.production.js * @@ -39,15 +39,15 @@ function Hs(e,t){for(var a=0;al||c[n]!==o[l]){var s=` -`+c[n].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=n&&0<=l);break}}}finally{Vc=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?pr(a):""}function Vy(e){switch(e.tag){case 26:case 27:case 5:return pr(e.type);case 16:return pr("Lazy");case 13:return pr("Suspense");case 19:return pr("SuspenseList");case 0:case 15:return e=kc(e.type,!1),e;case 11:return e=kc(e.type.render,!1),e;case 1:return e=kc(e.type,!0),e;default:return""}}function Md(e){try{var t="";do t+=Vy(e),e=e.return;while(e);return t}catch(a){return` +`+c[n].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=n&&0<=l);break}}}finally{jc=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?pr(a):""}function jy(e){switch(e.tag){case 26:case 27:case 5:return pr(e.type);case 16:return pr("Lazy");case 13:return pr("Suspense");case 19:return pr("SuspenseList");case 0:case 15:return e=Vc(e.type,!1),e;case 11:return e=Vc(e.type.render,!1),e;case 1:return e=Vc(e.type,!0),e;default:return""}}function Md(e){try{var t="";do t+=jy(e),e=e.return;while(e);return t}catch(a){return` Error generating stack: `+a.message+` -`+a.stack}}function Hl(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function am(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function xd(e){if(Hl(e)!==e)throw Error(_(188))}function ky(e){var t=e.alternate;if(!t){if(t=Hl(e),t===null)throw Error(_(188));return t!==e?null:e}for(var a=e,n=t;;){var l=a.return;if(l===null)break;var r=l.alternate;if(r===null){if(n=l.return,n!==null){a=n;continue}break}if(l.child===r.child){for(r=l.child;r;){if(r===a)return xd(l),e;if(r===n)return xd(l),t;r=r.sibling}throw Error(_(188))}if(a.return!==n.return)a=l,n=r;else{for(var i=!1,u=l.child;u;){if(u===a){i=!0,a=l,n=r;break}if(u===n){i=!0,n=l,a=r;break}u=u.sibling}if(!i){for(u=r.child;u;){if(u===a){i=!0,a=r,n=l;break}if(u===n){i=!0,n=r,a=l;break}u=u.sibling}if(!i)throw Error(_(189))}}if(a.alternate!==n)throw Error(_(190))}if(a.tag!==3)throw Error(_(188));return a.stateNode.current===a?e:t}function nm(e){return e=ky(e),e!==null?lm(e):null}function lm(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=lm(e),t!==null)return t;e=e.sibling}return null}var yr=Array.isArray,ye=Ny.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ar={pending:!1,data:null,method:null,action:null},Ho=[],ll=-1;function ua(e){return{current:e}}function Ge(e){0>ll||(e.current=Ho[ll],Ho[ll]=null,ll--)}function Se(e,t){ll++,Ho[ll]=e.current,e.current=t}var ea=ua(null),Vr=ua(null),Za=ua(null),Bo=ua(null),mu={$$typeof:Ya,Provider:null,Consumer:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vu(e,t){switch(Se(Za,t),Se(Vr,e),Se(ea,null),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?M1(t):0;break;default:if(e=e===8?t.parentNode:t,t=e.tagName,e=e.namespaceURI)e=M1(e),t=yv(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Ge(ea),Se(ea,t)}function Al(){Ge(ea),Ge(Vr),Ge(Za)}function jo(e){e.memoizedState!==null&&Se(Bo,e);var t=ea.current,a=yv(t,e.type);t!==a&&(Se(Vr,e),Se(ea,a))}function pu(e){Vr.current===e&&(Ge(ea),Ge(Vr)),Bo.current===e&&(Ge(Bo),mu._currentValue=null)}var Vo=Object.prototype.hasOwnProperty,qs=je.unstable_scheduleCallback,Gc=je.unstable_cancelCallback,Gy=je.unstable_shouldYield,Yy=je.unstable_requestPaint,ta=je.unstable_now,qy=je.unstable_getCurrentPriorityLevel,Xs=je.unstable_ImmediatePriority,rm=je.unstable_UserBlockingPriority,yu=je.unstable_NormalPriority,Xy=je.unstable_LowPriority,im=je.unstable_IdlePriority,Zy=je.log,Qy=je.unstable_setDisableYieldValue,ci=null,Rt=null;function Ky(e){if(Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(ci,e,void 0,(e.current.flags&128)===128)}catch{}}function qa(e){if(typeof Zy=="function"&&Qy(e),Rt&&typeof Rt.setStrictMode=="function")try{Rt.setStrictMode(ci,e)}catch{}}var Lt=Math.clz32?Math.clz32:Wy,Py=Math.log,Jy=Math.LN2;function Wy(e){return e>>>=0,e===0?32:31-(Py(e)/Jy|0)|0}var xi=128,Di=4194304;function gr(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function gu(e,t){var a=e.pendingLanes;if(a===0)return 0;var n=0,l=e.suspendedLanes;e=e.pingedLanes;var r=a&134217727;return r!==0?(a=r&~l,a!==0?n=gr(a):(e&=r,e!==0&&(n=gr(e)))):(a&=~l,a!==0?n=gr(a):e!==0&&(n=gr(e))),n===0?0:t!==0&&t!==n&&!(t&l)&&(l=n&-n,e=t&-t,l>=e||l===32&&(e&4194176)!==0)?t:n}function Fy(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function um(e,t){return e.errorRecoveryDisabledLanes&t?0:(e=e.pendingLanes&-536870913,e!==0?e:e&536870912?536870912:0)}function cm(){var e=xi;return xi<<=1,!(xi&4194176)&&(xi=128),e}function om(){var e=Di;return Di<<=1,!(Di&62914560)&&(Di=4194304),e}function Yc(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Iy(e,t,a){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0,t=e.entanglements;for(var l=e.expirationTimes,r=e.hiddenUpdates;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ng=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),zd={},$d={};function lg(e){return Vo.call($d,e)?!0:Vo.call(zd,e)?!1:ng.test(e)?$d[e]=!0:(zd[e]=!0,!1)}function Wi(e,t,a){if(lg(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function qc(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function sa(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}function Mt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rg(e){var t=pm(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,r=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){n=""+i,r.call(this,i)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function bu(e){e._valueTracker||(e._valueTracker=rg(e))}function ym(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=pm(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Su(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var ig=/[\n"\\]/g;function zt(e){return e.replace(ig,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Go(e,t,a,n,l,r,i,u){e.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.type=i:e.removeAttribute("type"),t!=null?i==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Mt(t)):e.value!==""+Mt(t)&&(e.value=""+Mt(t)):i!=="submit"&&i!=="reset"||e.removeAttribute("value"),t!=null?Yo(e,i,Mt(t)):a!=null?Yo(e,i,Mt(a)):n!=null&&e.removeAttribute("value"),l==null&&r!=null&&(e.defaultChecked=!!r),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?e.name=""+Mt(u):e.removeAttribute("name")}function gm(e,t,a,n,l,r,i,u){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||a!=null){if(!(r!=="submit"&&r!=="reset"||t!=null))return;a=a!=null?""+Mt(a):"",t=t!=null?""+Mt(t):a,u||t===e.value||(e.value=t),e.defaultValue=t}n=n??l,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=u?e.checked:!!n,e.defaultChecked=!!n,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.name=i)}function Yo(e,t,a){t==="number"&&Su(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function vl(e,t,a,n){if(e=e.options,t){t={};for(var l=0;l=Tr),Vd=" ",kd=!1;function Tm(e,t){switch(e){case"keyup":return Ng.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var il=!1;function Ug(e,t){switch(e){case"compositionend":return wm(t);case"keypress":return t.which!==32?null:(kd=!0,Vd);case"textInput":return e=t.data,e===Vd&&kd?null:e;default:return null}}function Hg(e,t){if(il)return e==="compositionend"||!Ws&&Tm(e,t)?(e=Cm(),Ii=Ps=Xa=null,il=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Zd(a)}}function xm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dm(){for(var e=window,t=Su();t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Su(e.document)}return t}function Fs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Xg(e){var t=Dm(),a=e.focusedElem,n=e.selectionRange;if(t!==a&&a&&a.ownerDocument&&xm(a.ownerDocument.documentElement,a)){if(n!==null&&Fs(a)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in a)a.selectionStart=t,a.selectionEnd=Math.min(e,a.value.length);else if(e=(t=a.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=a.textContent.length,r=Math.min(n.start,l);n=n.end===void 0?r:Math.min(n.end,l),!e.extend&&r>n&&(l=n,n=r,r=l),l=Qd(a,r);var i=Qd(a,n);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),r>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=a;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a=document.documentMode,ul=null,Zo=null,_r=null,Qo=!1;function Kd(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Qo||ul==null||ul!==Su(n)||(n=ul,"selectionStart"in n&&Fs(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),_r&&qr(_r,n)||(_r=n,n=Uu(Zo,"onSelect"),0>=i,l-=i,ya=1<<32-Lt(t)+l|a<z?(U=A,A=null):U=A.sibling;var j=f(m,A,v[z],R);if(j===null){A===null&&(A=U);break}e&&A&&j.alternate===null&&t(m,A),h=r(j,h,z),g===null?x=j:g.sibling=j,g=j,A=U}if(z===v.length)return a(m,A),ae&&sn(m,z),x;if(A===null){for(;zz?(U=A,A=null):U=A.sibling;var q=f(m,A,j.value,R);if(q===null){A===null&&(A=U);break}e&&A&&q.alternate===null&&t(m,A),h=r(q,h,z),g===null?x=q:g.sibling=q,g=q,A=U}if(j.done)return a(m,A),ae&&sn(m,z),x;if(A===null){for(;!j.done;z++,j=v.next())j=d(m,j.value,R),j!==null&&(h=r(j,h,z),g===null?x=j:g.sibling=j,g=j);return ae&&sn(m,z),x}for(A=n(A);!j.done;z++,j=v.next())j=p(A,m,z,j.value,R),j!==null&&(e&&j.alternate!==null&&A.delete(j.key===null?z:j.key),h=r(j,h,z),g===null?x=j:g.sibling=j,g=j);return e&&A.forEach(function(Me){return t(m,Me)}),ae&&sn(m,z),x}function O(m,h,v,R){if(typeof v=="object"&&v!==null&&v.type===vr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Oi:e:{for(var x=v.key,g=h;g!==null;){if(g.key===x){if(x=v.type,x===vr){if(g.tag===7){a(m,g.sibling),h=l(g,v.props.children),h.return=m,m=h;break e}}else if(g.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===on&&t1(x)===g.type){a(m,g.sibling),h=l(g,v.props),ar(m,g,h,v),h.return=m,m=h;break e}a(m,g);break}else t(m,g);g=g.sibling}v.type===vr?(h=Sn(v.props.children,m.mode,R,v.key),h.return=m,m=h):(R=ru(v.type,v.key,v.props,null,m.mode,R),ar(m,h,R,v),R.return=m,m=R)}return i(m);case Mi:e:{for(g=v.key;h!==null;){if(h.key===g)if(h.tag===4&&h.stateNode.containerInfo===v.containerInfo&&h.stateNode.implementation===v.implementation){a(m,h.sibling),h=l(h,v.children||[]),h.return=m,m=h;break e}else{a(m,h);break}else t(m,h);h=h.sibling}h=fo(v,m.mode,R),h.return=m,m=h}return i(m);case on:return g=v._init,v=g(v._payload),O(m,h,v,R)}if(yr(v))return C(m,h,v,R);if(Fl(v)){if(g=Fl(v),typeof g!="function")throw Error(_(150));return v=g.call(v),S(m,h,v,R)}if(typeof v.then=="function")return O(m,h,Ni(v),R);if(v.$$typeof===Ya)return O(m,h,Hi(m,v,R),R);Li(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,h!==null&&h.tag===6?(a(m,h.sibling),h=l(h,v),h.return=m,m=h):(a(m,h),h=so(v,m.mode,R),h.return=m,m=h),i(m)):a(m,h)}return function(m,h,v,R){try{Zr=0;var x=O(m,h,v,R);return yl=null,x}catch(A){if(A===Or)throw A;var g=Nt(29,A,null,m.mode);return g.lanes=R,g.return=m,g}finally{}}}var Cn=Gm(!0),Ym=Gm(!1),_l=ua(null),Au=ua(0);function a1(e,t){e=wa,Se(Au,e),Se(_l,t),wa=e|t.baseLanes}function Jo(){Se(Au,wa),Se(_l,_l.current)}function nf(){wa=Au.current,Ge(_l),Ge(Au)}var la=ua(null),aa=null;function ja(e){var t=e.alternate;Se(Be,Be.current&1),Se(la,e),aa===null&&(t===null||_l.current!==null||t.memoizedState!==null)&&(aa=e)}function qm(e){if(e.tag===22){if(Se(Be,Be.current),Se(la,e),aa===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(aa=e)}}else Va()}function Va(){Se(Be,Be.current),Se(la,la.current)}function ba(e){Ge(la),aa===e&&(aa=null),Ge(Be)}var Be=ua(0);function Tu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Jg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Wg=je.unstable_scheduleCallback,Fg=je.unstable_NormalPriority,He={$$typeof:Ya,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function lf(){return{controller:new Jg,data:new Map,refCount:0}}function fi(e){e.refCount--,e.refCount===0&&Wg(Fg,function(){e.controller.abort()})}var xr=null,Wo=0,Ol=0,gl=null;function Ig(e,t){if(xr===null){var a=xr=[];Wo=0,Ol=xf(),gl={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Wo++,t.then(n1,n1),t}function n1(){if(xr!==null&&--Wo===0){gl!==null&&(gl.status="fulfilled");var e=xr;xr=null,Ol=0,gl=null;for(var t=0;tr?r:8;var i=X.T,u={};X.T=u,gf(e,!1,t,a);try{var c=l(),o=X.S;if(o!==null&&o(u,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var s=e2(c,n);El(e,t,s)}else El(e,t,n)}catch(d){El(e,t,{then:function(){},status:"rejected",reason:d})}finally{ye.p=r,X.T=i}}function r2(){}function es(e,t,a,n){if(e.tag!==5)throw Error(_(476));var l=y0(e).queue;p0(e,l,t,Ar,a===null?r2:function(){return g0(e),a(n)})}function y0(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ar,baseState:Ar,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:Ar},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function g0(e){var t=y0(e).next.queue;El(e,t,{})}function yf(){var e=nt(mu);return e!==null?e:Ar}function b0(){return Ue().memoizedState}function S0(){return Ue().memoizedState}function i2(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ra();e=Ea(a);var n=Qa(t,e,a);n!==null&&(ot(n,t,a),zr(n,t,a)),t={cache:lf()},e.payload=t;return}t=t.return}}function u2(e,t,a){var n=Ra();a={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},rc(e)?E0(t,a):(a=ef(e,t,a,n),a!==null&&(ot(a,e,n),R0(a,t,n)))}function El(e,t,a){var n=Ra(),l={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(rc(e))E0(t,l);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var i=t.lastRenderedState,u=r(i,a);if(l.hasEagerState=!0,l.eagerState=u,Ht(u,i)){tc(e,t,l,0),se===null&&ec();return}}catch{}finally{}a=ef(e,t,l,n),a!==null&&(ot(a,e,n),R0(a,t,n))}}function gf(e,t,a,n){if(n={lane:2,revertLane:xf(),action:n,hasEagerState:!1,eagerState:null,next:null},rc(e)){if(t)throw Error(_(479))}else t=ef(e,a,n,2),t!==null&&ot(t,e,2)}function rc(e){var t=e.alternate;return e===P||t!==null&&t===P}function E0(e,t){bl=wu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function R0(e,t,a){if(a&4194176){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,fm(e,a)}}var ra={readContext:nt,use:nc,useCallback:xe,useContext:xe,useEffect:xe,useImperativeHandle:xe,useLayoutEffect:xe,useInsertionEffect:xe,useMemo:xe,useReducer:xe,useRef:xe,useState:xe,useDebugValue:xe,useDeferredValue:xe,useTransition:xe,useSyncExternalStore:xe,useId:xe};ra.useCacheRefresh=xe;ra.useMemoCache=xe;ra.useHostTransitionStatus=xe;ra.useFormState=xe;ra.useActionState=xe;ra.useOptimistic=xe;var Ln={readContext:nt,use:nc,useCallback:function(e,t){return ft().memoizedState=[e,t===void 0?null:t],e},useContext:nt,useEffect:u1,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,nu(4194308,4,f0.bind(null,t,e),a)},useLayoutEffect:function(e,t){return nu(4194308,4,e,t)},useInsertionEffect:function(e,t){nu(4,2,e,t)},useMemo:function(e,t){var a=ft();t=t===void 0?null:t;var n=e();return An&&(qa(!0),e(),qa(!1)),a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=ft();if(a!==void 0){var l=a(t);An&&(qa(!0),a(t),qa(!1))}else l=t;return n.memoizedState=n.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},n.queue=e,e=e.dispatch=u2.bind(null,P,e),[n.memoizedState,e]},useRef:function(e){var t=ft();return e={current:e},t.memoizedState=e},useState:function(e){e=Fo(e);var t=e.queue,a=El.bind(null,P,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:vf,useDeferredValue:function(e,t){var a=ft();return pf(a,e,t)},useTransition:function(){var e=Fo(!1);return e=p0.bind(null,P,e.queue,!0,!1),ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=P,l=ft();if(ae){if(a===void 0)throw Error(_(407));a=a()}else{if(a=t(),se===null)throw Error(_(349));ne&60||Pm(n,t,a)}l.memoizedState=a;var r={value:a,getSnapshot:t};return l.queue=r,u1(Wm.bind(null,n,r,e),[e]),n.flags|=2048,Ml(9,Jm.bind(null,n,r,a,t),{destroy:void 0},null),a},useId:function(){var e=ft(),t=se.identifierPrefix;if(ae){var a=ga,n=ya;a=(n&~(1<<32-Lt(n)-1)).toString(32)+a,t=":"+t+"R"+a,a=_u++,0 title"))),We(l,n,a),l[at]=e,ke(l),n=l;break e;case"link":var r=L1("link","href",t).get(n+(a.href||""));if(r){for(var i=0;i<\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof n.is=="string"?l.createElement("select",{is:n.is}):l.createElement("select"),n.multiple?e.multiple=!0:n.size&&(e.size=n.size);break;default:e=typeof n.is=="string"?l.createElement(a,{is:n.is}):l.createElement(a)}}e[at]=t,e[ct]=n;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)e.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=e;e:switch(We(e,a,n),a){case"button":case"input":case"select":case"textarea":e=!!n.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&ha(t)}}return Re(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&ha(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(_(166));if(e=Za.current,tr(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,l=it,l!==null)switch(l.tag){case 27:case 5:n=l.memoizedProps}e[at]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||pv(e.nodeValue,a)),e||Rn(t)}else e=Hu(e).createTextNode(n),e[at]=t,t.stateNode=e}return Re(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=tr(t),n!==null&&n.dehydrated!==null){if(e===null){if(!l)throw Error(_(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(_(317));l[at]=t}else si(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Re(t),l=!1}else qt!==null&&(vs(qt),qt=null),l=!0;if(!l)return t.flags&256?(ba(t),t):(ba(t),null)}if(ba(t),t.flags&128)return t.lanes=a,t;if(a=n!==null,e=e!==null&&e.memoizedState!==null,a){n=t.child,l=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(l=n.alternate.memoizedState.cachePool.pool);var r=null;n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==l&&(n.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),Bi(t,t.updateQueue),Re(t),null;case 4:return Al(),e===null&&Df(t.stateNode.containerInfo),Re(t),null;case 10:return Sa(t.type),Re(t),null;case 19:if(Ge(Be),l=t.memoizedState,l===null)return Re(t),null;if(n=(t.flags&128)!==0,r=l.rendering,r===null)if(n)nr(l,!1);else{if(Oe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(r=Tu(e),r!==null){for(t.flags|=128,nr(l,!1),e=r.updateQueue,t.updateQueue=e,Bi(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)ev(a,e),a=a.sibling;return Se(Be,Be.current&1|2),t.child}e=e.sibling}l.tail!==null&&ta()>zu&&(t.flags|=128,n=!0,nr(l,!1),t.lanes=4194304)}else{if(!n)if(e=Tu(r),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Bi(t,e),nr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!r.alternate&&!ae)return Re(t),null}else 2*ta()-l.renderingStartTime>zu&&a!==536870912&&(t.flags|=128,n=!0,nr(l,!1),t.lanes=4194304);l.isBackwards?(r.sibling=t.child,t.child=r):(e=l.last,e!==null?e.sibling=r:t.child=r,l.last=r)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=ta(),t.sibling=null,e=Be.current,Se(Be,n?e&1|2:e&1),t):(Re(t),null);case 22:case 23:return ba(t),nf(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?a&536870912&&!(t.flags&128)&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),a=t.updateQueue,a!==null&&Bi(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&Ge(bn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Sa(He),Re(t),null;case 25:return null}throw Error(_(156,t.tag))}function m2(e,t){switch(af(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sa(He),Al(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pu(t),null;case 13:if(ba(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));si()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ge(Be),null;case 4:return Al(),null;case 10:return Sa(t.type),null;case 22:case 23:return ba(t),nf(),e!==null&&Ge(bn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Sa(He),null;case 25:return null;default:return null}}function av(e,t){switch(af(t),t.tag){case 3:Sa(He),Al();break;case 26:case 27:case 5:pu(t);break;case 4:Al();break;case 13:ba(t);break;case 19:Ge(Be);break;case 10:Sa(t.type);break;case 22:case 23:ba(t),nf(),e!==null&&Ge(bn);break;case 24:Sa(He)}}var v2={getCacheForType:function(e){var t=nt(He),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},p2=typeof WeakMap=="function"?WeakMap:Map,ie=0,se=null,W=null,ne=0,Ce=0,Ot=null,Tf=!1,wa=0,Oe=0,_a=0,Vl=0,wf=0,dt=0,Ur=null,Xt=null,Dl=!1,Du=!1,_f=0,zu=1/0,Kr=null,Pa=null,ji=!1,fn=null,Hr=0,ds=0,hs=null,Br=0,ms=null;function Ra(){if(ie&2&&ne!==0)return ne&-ne;if(X.T!==null){var e=Ol;return e!==0?e:xf()}return hm()}function nv(){dt===0&&(dt=!(ne&536870912)||ae?cm():536870912);var e=la.current;return e!==null&&(e.flags|=32),dt}function ot(e,t,a){(e===se&&Ce===2||e.cancelPendingCommit!==null)&&(Hn(e,0),It(e,ne,dt)),hi(e,a),(!(ie&2)||e!==se)&&(e===se&&(!(ie&2)&&(Vl|=a),Oe===4&&It(e,ne,dt)),ht(e))}function lv(e,t){if(ie&6)throw Error(_(327));var a=e.callbackNode;if(Rl()&&e.callbackNode!==a)return null;var n=gu(e,e===se?ne:0);if(n===0)return null;var l=(n&60)===0&&(n&e.expiredLanes)===0&&!t;if(t=l?S2(e,n):$u(e,n),t!==0){var r=l;do{if(t===6)It(e,n,0);else{if(l=e.current.alternate,r&&!y2(l)){t=$u(e,n),r=!1;continue}if(t===2){r=n;var i=um(e,r);if(i!==0&&(n=i,t=rv(e,r,i),r=!1,t!==2))continue}if(t===1){Hn(e,0),It(e,n,0);break}e.finishedWork=l,e.finishedLanes=n;e:{switch(r=e,t){case 0:case 1:throw Error(_(345));case 4:if((n&4194176)===n){It(r,n,dt);break e}break;case 2:Xt=null;break;case 3:case 5:break;default:throw Error(_(329))}if((n&62914560)===n&&(t=_f+300-ta(),10a?32:a,X.T=null,fn===null)var r=!1;else{a=hs,hs=null;var i=fn,u=Hr;if(fn=null,Hr=0,ie&6)throw Error(_(331));var c=ie;if(ie|=4,F0(i.current),P0(i,i.current,u,a),ie=c,mi(),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(ci,i)}catch{}r=!0}return r}finally{ye.p=l,X.T=n,fv(e,t)}}return!1}function C1(e,t,a){t=$t(a,t),t=ts(e.stateNode,t,2),e=Qa(e,t,2),e!==null&&(hi(e,2),ht(e))}function he(e,t,a){if(e.tag===3)C1(e,e,a);else for(;t!==null;){if(t.tag===3){C1(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Pa===null||!Pa.has(n))){e=$t(a,e),a=w0(2),n=Qa(t,a,2),n!==null&&(_0(a,n,t,e),hi(n,2),ht(n));break}}t=t.return}}function ho(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new p2;var l=new Set;n.set(t,l)}else l=n.get(t),l===void 0&&(l=new Set,n.set(t,l));l.has(a)||(Tf=!0,l.add(a),e=C2.bind(null,e,t,a),t.then(e,e))}function C2(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,ie&2?Dl=!0:ie&4&&(Du=!0),Mf(),se===e&&(ne&a)===a&&(Oe===4||Oe===3&&(ne&62914560)===ne&&300>ta()-_f?!(ie&2)&&Hn(e,0):wf|=a),ht(e)}function dv(e,t){t===0&&(t=om()),e=Ia(e,t),e!==null&&(hi(e,t),ht(e))}function A2(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),dv(e,a)}function T2(e,t){var a=0;switch(e.tag){case 13:var n=e.stateNode,l=e.memoizedState;l!==null&&(a=l.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(_(314))}n!==null&&n.delete(t),dv(e,a)}function Mf(){if(50"u"?null:document;function Sv(e,t,a){var n=kl;if(n&&typeof t=="string"&&t){var l=zt(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof a=="string"&&(l+='[crossorigin="'+a+'"]'),z1.has(l)||(z1.add(l),e={rel:e,crossOrigin:a,href:t},n.querySelector(l)===null&&(t=n.createElement("link"),We(t,"link",e),ke(t),n.head.appendChild(t)))}}function Y2(e){Oa.D(e),Sv("dns-prefetch",e,null)}function q2(e,t){Oa.C(e,t),Sv("preconnect",e,t)}function X2(e,t,a){Oa.L(e,t,a);var n=kl;if(n&&e&&t){var l='link[rel="preload"][as="'+zt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(l+='[imagesrcset="'+zt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(l+='[imagesizes="'+zt(a.imageSizes)+'"]')):l+='[href="'+zt(e)+'"]';var r=l;switch(t){case"style":r=zl(e);break;case"script":r=Gl(e)}Bt.has(r)||(e=ge({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Bt.set(r,e),n.querySelector(l)!==null||t==="style"&&n.querySelector(vi(r))||t==="script"&&n.querySelector(pi(r))||(t=n.createElement("link"),We(t,"link",e),ke(t),n.head.appendChild(t)))}}function Z2(e,t){Oa.m(e,t);var a=kl;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+zt(n)+'"][href="'+zt(e)+'"]',r=l;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=Gl(e)}if(!Bt.has(r)&&(e=ge({rel:"modulepreload",href:e},t),Bt.set(r,e),a.querySelector(l)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(pi(r)))return}n=a.createElement("link"),We(n,"link",e),ke(n),a.head.appendChild(n)}}}function Q2(e,t,a){Oa.S(e,t,a);var n=kl;if(n&&e){var l=ml(n).hoistableStyles,r=zl(e);t=t||"default";var i=l.get(r);if(!i){var u={loading:0,preload:null};if(i=n.querySelector(vi(r)))u.loading=5;else{e=ge({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Bt.get(r))&&zf(e,a);var c=i=n.createElement("link");ke(c),We(c,"link",e),c._p=new Promise(function(o,s){c.onload=o,c.onerror=s}),c.addEventListener("load",function(){u.loading|=1}),c.addEventListener("error",function(){u.loading|=2}),u.loading|=4,iu(i,t,n)}i={type:"stylesheet",instance:i,count:1,state:u},l.set(r,i)}}}function K2(e,t){Oa.X(e,t);var a=kl;if(a&&e){var n=ml(a).hoistableScripts,l=Gl(e),r=n.get(l);r||(r=a.querySelector(pi(l)),r||(e=ge({src:e,async:!0},t),(t=Bt.get(l))&&$f(e,t),r=a.createElement("script"),ke(r),We(r,"link",e),a.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},n.set(l,r))}}function P2(e,t){Oa.M(e,t);var a=kl;if(a&&e){var n=ml(a).hoistableScripts,l=Gl(e),r=n.get(l);r||(r=a.querySelector(pi(l)),r||(e=ge({src:e,async:!0,type:"module"},t),(t=Bt.get(l))&&$f(e,t),r=a.createElement("script"),ke(r),We(r,"link",e),a.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},n.set(l,r))}}function $1(e,t,a,n){var l=(l=Za.current)?Bu(l):null;if(!l)throw Error(_(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=zl(a.href),a=ml(l).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=zl(a.href);var r=ml(l).hoistableStyles,i=r.get(e);if(i||(l=l.ownerDocument||l,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,i),(r=l.querySelector(vi(e)))&&!r._p&&(i.instance=r,i.state.loading=5),Bt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Bt.set(e,a),r||J2(l,e,a,i.state))),t&&n===null)throw Error(_(528,""));return i}if(t&&n!==null)throw Error(_(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Gl(a),a=ml(l).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(_(444,e))}}function zl(e){return'href="'+zt(e)+'"'}function vi(e){return'link[rel="stylesheet"]['+e+"]"}function Ev(e){return ge({},e,{"data-precedence":e.precedence,precedence:null})}function J2(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),We(t,"link",a),ke(t),e.head.appendChild(t))}function Gl(e){return'[src="'+zt(e)+'"]'}function pi(e){return"script[async]"+e}function N1(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+zt(a.href)+'"]');if(n)return t.instance=n,ke(n),n;var l=ge({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),ke(n),We(n,"style",l),iu(n,a.precedence,e),t.instance=n;case"stylesheet":l=zl(a.href);var r=e.querySelector(vi(l));if(r)return t.state.loading|=4,t.instance=r,ke(r),r;n=Ev(a),(l=Bt.get(l))&&zf(n,l),r=(e.ownerDocument||e).createElement("link"),ke(r);var i=r;return i._p=new Promise(function(u,c){i.onload=u,i.onerror=c}),We(r,"link",n),t.state.loading|=4,iu(r,a.precedence,e),t.instance=r;case"script":return r=Gl(a.src),(l=e.querySelector(pi(r)))?(t.instance=l,ke(l),l):(n=a,(l=Bt.get(r))&&(n=ge({},a),$f(n,l)),e=e.ownerDocument||e,l=e.createElement("script"),ke(l),We(l,"link",n),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(_(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(n=t.instance,t.state.loading|=4,iu(n,a.precedence,e));return t.instance}function iu(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=n.length?n[n.length-1]:null,r=l,i=0;i title"):null)}function W2(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Rv(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var Wr=null;function F2(){}function I2(e,t,a){if(Wr===null)throw Error(_(475));var n=Wr;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var l=zl(a.href),r=e.querySelector(vi(l));if(r){e=r._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(n.count++,n=ju.bind(n),e.then(n,n)),t.state.loading|=4,t.instance=r,ke(r);return}r=e.ownerDocument||e,a=Ev(a),(l=Bt.get(l))&&zf(a,l),r=r.createElement("link"),ke(r);var i=r;i._p=new Promise(function(u,c){i.onload=u,i.onerror=c}),We(r,"link",a),t.instance=r}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(t,e),(e=t.state.preload)&&!(t.state.loading&3)&&(n.count++,t=ju.bind(n),e.addEventListener("load",t),e.addEventListener("error",t))}}function eb(){if(Wr===null)throw Error(_(475));var e=Wr;return e.stylesheets&&e.count===0&&As(e,e.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Mv)}catch(e){console.error(e)}}Mv(),qh.exports=Pu;var xv=qh.exports;const Dv=Ll(xv),p9=Hs({__proto__:null,default:Dv},[xv]);/** - * @remix-run/router v1.17.1 +`+a.stack}}function Hl(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function am(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function xd(e){if(Hl(e)!==e)throw Error(w(188))}function Vy(e){var t=e.alternate;if(!t){if(t=Hl(e),t===null)throw Error(w(188));return t!==e?null:e}for(var a=e,n=t;;){var l=a.return;if(l===null)break;var r=l.alternate;if(r===null){if(n=l.return,n!==null){a=n;continue}break}if(l.child===r.child){for(r=l.child;r;){if(r===a)return xd(l),e;if(r===n)return xd(l),t;r=r.sibling}throw Error(w(188))}if(a.return!==n.return)a=l,n=r;else{for(var i=!1,u=l.child;u;){if(u===a){i=!0,a=l,n=r;break}if(u===n){i=!0,n=l,a=r;break}u=u.sibling}if(!i){for(u=r.child;u;){if(u===a){i=!0,a=r,n=l;break}if(u===n){i=!0,n=r,a=l;break}u=u.sibling}if(!i)throw Error(w(189))}}if(a.alternate!==n)throw Error(w(190))}if(a.tag!==3)throw Error(w(188));return a.stateNode.current===a?e:t}function nm(e){return e=Vy(e),e!==null?lm(e):null}function lm(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=lm(e),t!==null)return t;e=e.sibling}return null}var yr=Array.isArray,ye=$y.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ar={pending:!1,data:null,method:null,action:null},Uo=[],ll=-1;function ua(e){return{current:e}}function Ge(e){0>ll||(e.current=Uo[ll],Uo[ll]=null,ll--)}function Se(e,t){ll++,Uo[ll]=e.current,e.current=t}var ea=ua(null),Vr=ua(null),Za=ua(null),Ho=ua(null),mu={$$typeof:Ya,Provider:null,Consumer:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vu(e,t){switch(Se(Za,t),Se(Vr,e),Se(ea,null),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?M1(t):0;break;default:if(e=e===8?t.parentNode:t,t=e.tagName,e=e.namespaceURI)e=M1(e),t=yv(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Ge(ea),Se(ea,t)}function Al(){Ge(ea),Ge(Vr),Ge(Za)}function Bo(e){e.memoizedState!==null&&Se(Ho,e);var t=ea.current,a=yv(t,e.type);t!==a&&(Se(Vr,e),Se(ea,a))}function pu(e){Vr.current===e&&(Ge(ea),Ge(Vr)),Ho.current===e&&(Ge(Ho),mu._currentValue=null)}var jo=Object.prototype.hasOwnProperty,Ys=je.unstable_scheduleCallback,kc=je.unstable_cancelCallback,ky=je.unstable_shouldYield,Gy=je.unstable_requestPaint,ta=je.unstable_now,Yy=je.unstable_getCurrentPriorityLevel,qs=je.unstable_ImmediatePriority,rm=je.unstable_UserBlockingPriority,yu=je.unstable_NormalPriority,qy=je.unstable_LowPriority,im=je.unstable_IdlePriority,Xy=je.log,Zy=je.unstable_setDisableYieldValue,ci=null,Rt=null;function Qy(e){if(Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(ci,e,void 0,(e.current.flags&128)===128)}catch{}}function qa(e){if(typeof Xy=="function"&&Zy(e),Rt&&typeof Rt.setStrictMode=="function")try{Rt.setStrictMode(ci,e)}catch{}}var Lt=Math.clz32?Math.clz32:Jy,Ky=Math.log,Py=Math.LN2;function Jy(e){return e>>>=0,e===0?32:31-(Ky(e)/Py|0)|0}var xi=128,Di=4194304;function gr(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function gu(e,t){var a=e.pendingLanes;if(a===0)return 0;var n=0,l=e.suspendedLanes;e=e.pingedLanes;var r=a&134217727;return r!==0?(a=r&~l,a!==0?n=gr(a):(e&=r,e!==0&&(n=gr(e)))):(a&=~l,a!==0?n=gr(a):e!==0&&(n=gr(e))),n===0?0:t!==0&&t!==n&&!(t&l)&&(l=n&-n,e=t&-t,l>=e||l===32&&(e&4194176)!==0)?t:n}function Wy(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function um(e,t){return e.errorRecoveryDisabledLanes&t?0:(e=e.pendingLanes&-536870913,e!==0?e:e&536870912?536870912:0)}function cm(){var e=xi;return xi<<=1,!(xi&4194176)&&(xi=128),e}function om(){var e=Di;return Di<<=1,!(Di&62914560)&&(Di=4194304),e}function Gc(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Fy(e,t,a){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0,t=e.entanglements;for(var l=e.expirationTimes,r=e.hiddenUpdates;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ag=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),zd={},$d={};function ng(e){return jo.call($d,e)?!0:jo.call(zd,e)?!1:ag.test(e)?$d[e]=!0:(zd[e]=!0,!1)}function Wi(e,t,a){if(ng(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Yc(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function sa(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}function Mt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lg(e){var t=pm(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,r=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){n=""+i,r.call(this,i)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function bu(e){e._valueTracker||(e._valueTracker=lg(e))}function ym(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=pm(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Su(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var rg=/[\n"\\]/g;function zt(e){return e.replace(rg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ko(e,t,a,n,l,r,i,u){e.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.type=i:e.removeAttribute("type"),t!=null?i==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Mt(t)):e.value!==""+Mt(t)&&(e.value=""+Mt(t)):i!=="submit"&&i!=="reset"||e.removeAttribute("value"),t!=null?Go(e,i,Mt(t)):a!=null?Go(e,i,Mt(a)):n!=null&&e.removeAttribute("value"),l==null&&r!=null&&(e.defaultChecked=!!r),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?e.name=""+Mt(u):e.removeAttribute("name")}function gm(e,t,a,n,l,r,i,u){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||a!=null){if(!(r!=="submit"&&r!=="reset"||t!=null))return;a=a!=null?""+Mt(a):"",t=t!=null?""+Mt(t):a,u||t===e.value||(e.value=t),e.defaultValue=t}n=n??l,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=u?e.checked:!!n,e.defaultChecked=!!n,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.name=i)}function Go(e,t,a){t==="number"&&Su(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function vl(e,t,a,n){if(e=e.options,t){t={};for(var l=0;l=Tr),Vd=" ",kd=!1;function Tm(e,t){switch(e){case"keyup":return $g.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _m(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var il=!1;function Lg(e,t){switch(e){case"compositionend":return _m(t);case"keypress":return t.which!==32?null:(kd=!0,Vd);case"textInput":return e=t.data,e===Vd&&kd?null:e;default:return null}}function Ug(e,t){if(il)return e==="compositionend"||!Js&&Tm(e,t)?(e=Cm(),Ii=Ks=Xa=null,il=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Zd(a)}}function xm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dm(){for(var e=window,t=Su();t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Su(e.document)}return t}function Ws(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function qg(e){var t=Dm(),a=e.focusedElem,n=e.selectionRange;if(t!==a&&a&&a.ownerDocument&&xm(a.ownerDocument.documentElement,a)){if(n!==null&&Ws(a)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in a)a.selectionStart=t,a.selectionEnd=Math.min(e,a.value.length);else if(e=(t=a.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=a.textContent.length,r=Math.min(n.start,l);n=n.end===void 0?r:Math.min(n.end,l),!e.extend&&r>n&&(l=n,n=r,r=l),l=Qd(a,r);var i=Qd(a,n);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),r>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=a;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a=document.documentMode,ul=null,Xo=null,wr=null,Zo=!1;function Kd(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Zo||ul==null||ul!==Su(n)||(n=ul,"selectionStart"in n&&Ws(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),wr&&qr(wr,n)||(wr=n,n=Uu(Xo,"onSelect"),0>=i,l-=i,ya=1<<32-Lt(t)+l|a<z?(U=A,A=null):U=A.sibling;var V=f(m,A,v[z],R);if(V===null){A===null&&(A=U);break}e&&A&&V.alternate===null&&t(m,A),h=r(V,h,z),g===null?x=V:g.sibling=V,g=V,A=U}if(z===v.length)return a(m,A),ae&&sn(m,z),x;if(A===null){for(;zz?(U=A,A=null):U=A.sibling;var Y=f(m,A,V.value,R);if(Y===null){A===null&&(A=U);break}e&&A&&Y.alternate===null&&t(m,A),h=r(Y,h,z),g===null?x=Y:g.sibling=Y,g=Y,A=U}if(V.done)return a(m,A),ae&&sn(m,z),x;if(A===null){for(;!V.done;z++,V=v.next())V=d(m,V.value,R),V!==null&&(h=r(V,h,z),g===null?x=V:g.sibling=V,g=V);return ae&&sn(m,z),x}for(A=n(A);!V.done;z++,V=v.next())V=p(A,m,z,V.value,R),V!==null&&(e&&V.alternate!==null&&A.delete(V.key===null?z:V.key),h=r(V,h,z),g===null?x=V:g.sibling=V,g=V);return e&&A.forEach(function(Me){return t(m,Me)}),ae&&sn(m,z),x}function O(m,h,v,R){if(typeof v=="object"&&v!==null&&v.type===vr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Oi:e:{for(var x=v.key,g=h;g!==null;){if(g.key===x){if(x=v.type,x===vr){if(g.tag===7){a(m,g.sibling),h=l(g,v.props.children),h.return=m,m=h;break e}}else if(g.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===on&&t1(x)===g.type){a(m,g.sibling),h=l(g,v.props),ar(m,g,h,v),h.return=m,m=h;break e}a(m,g);break}else t(m,g);g=g.sibling}v.type===vr?(h=Sn(v.props.children,m.mode,R,v.key),h.return=m,m=h):(R=ru(v.type,v.key,v.props,null,m.mode,R),ar(m,h,R,v),R.return=m,m=R)}return i(m);case Mi:e:{for(g=v.key;h!==null;){if(h.key===g)if(h.tag===4&&h.stateNode.containerInfo===v.containerInfo&&h.stateNode.implementation===v.implementation){a(m,h.sibling),h=l(h,v.children||[]),h.return=m,m=h;break e}else{a(m,h);break}else t(m,h);h=h.sibling}h=so(v,m.mode,R),h.return=m,m=h}return i(m);case on:return g=v._init,v=g(v._payload),O(m,h,v,R)}if(yr(v))return C(m,h,v,R);if(Fl(v)){if(g=Fl(v),typeof g!="function")throw Error(w(150));return v=g.call(v),S(m,h,v,R)}if(typeof v.then=="function")return O(m,h,Ni(v),R);if(v.$$typeof===Ya)return O(m,h,Hi(m,v,R),R);Li(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,h!==null&&h.tag===6?(a(m,h.sibling),h=l(h,v),h.return=m,m=h):(a(m,h),h=oo(v,m.mode,R),h.return=m,m=h),i(m)):a(m,h)}return function(m,h,v,R){try{Zr=0;var x=O(m,h,v,R);return yl=null,x}catch(A){if(A===Or)throw A;var g=Nt(29,A,null,m.mode);return g.lanes=R,g.return=m,g}finally{}}}var Cn=Gm(!0),Ym=Gm(!1),wl=ua(null),Au=ua(0);function a1(e,t){e=_a,Se(Au,e),Se(wl,t),_a=e|t.baseLanes}function Po(){Se(Au,_a),Se(wl,wl.current)}function af(){_a=Au.current,Ge(wl),Ge(Au)}var la=ua(null),aa=null;function ja(e){var t=e.alternate;Se(Be,Be.current&1),Se(la,e),aa===null&&(t===null||wl.current!==null||t.memoizedState!==null)&&(aa=e)}function qm(e){if(e.tag===22){if(Se(Be,Be.current),Se(la,e),aa===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(aa=e)}}else Va()}function Va(){Se(Be,Be.current),Se(la,la.current)}function ba(e){Ge(la),aa===e&&(aa=null),Ge(Be)}var Be=ua(0);function Tu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Pg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Jg=je.unstable_scheduleCallback,Wg=je.unstable_NormalPriority,He={$$typeof:Ya,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function nf(){return{controller:new Pg,data:new Map,refCount:0}}function fi(e){e.refCount--,e.refCount===0&&Jg(Wg,function(){e.controller.abort()})}var xr=null,Jo=0,Ol=0,gl=null;function Fg(e,t){if(xr===null){var a=xr=[];Jo=0,Ol=Mf(),gl={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Jo++,t.then(n1,n1),t}function n1(){if(xr!==null&&--Jo===0){gl!==null&&(gl.status="fulfilled");var e=xr;xr=null,Ol=0,gl=null;for(var t=0;tr?r:8;var i=X.T,u={};X.T=u,yf(e,!1,t,a);try{var c=l(),o=X.S;if(o!==null&&o(u,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var s=Ig(c,n);El(e,t,s)}else El(e,t,n)}catch(d){El(e,t,{then:function(){},status:"rejected",reason:d})}finally{ye.p=r,X.T=i}}function l2(){}function Io(e,t,a,n){if(e.tag!==5)throw Error(w(476));var l=y0(e).queue;p0(e,l,t,Ar,a===null?l2:function(){return g0(e),a(n)})}function y0(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ar,baseState:Ar,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:Ar},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function g0(e){var t=y0(e).next.queue;El(e,t,{})}function pf(){var e=nt(mu);return e!==null?e:Ar}function b0(){return Ue().memoizedState}function S0(){return Ue().memoizedState}function r2(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ra();e=Ea(a);var n=Qa(t,e,a);n!==null&&(ct(n,t,a),zr(n,t,a)),t={cache:nf()},e.payload=t;return}t=t.return}}function i2(e,t,a){var n=Ra();a={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},rc(e)?E0(t,a):(a=Is(e,t,a,n),a!==null&&(ct(a,e,n),R0(a,t,n)))}function El(e,t,a){var n=Ra(),l={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(rc(e))E0(t,l);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var i=t.lastRenderedState,u=r(i,a);if(l.hasEagerState=!0,l.eagerState=u,Ht(u,i)){tc(e,t,l,0),se===null&&ec();return}}catch{}finally{}a=Is(e,t,l,n),a!==null&&(ct(a,e,n),R0(a,t,n))}}function yf(e,t,a,n){if(n={lane:2,revertLane:Mf(),action:n,hasEagerState:!1,eagerState:null,next:null},rc(e)){if(t)throw Error(w(479))}else t=Is(e,a,n,2),t!==null&&ct(t,e,2)}function rc(e){var t=e.alternate;return e===P||t!==null&&t===P}function E0(e,t){bl=_u=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function R0(e,t,a){if(a&4194176){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,fm(e,a)}}var ra={readContext:nt,use:nc,useCallback:xe,useContext:xe,useEffect:xe,useImperativeHandle:xe,useLayoutEffect:xe,useInsertionEffect:xe,useMemo:xe,useReducer:xe,useRef:xe,useState:xe,useDebugValue:xe,useDeferredValue:xe,useTransition:xe,useSyncExternalStore:xe,useId:xe};ra.useCacheRefresh=xe;ra.useMemoCache=xe;ra.useHostTransitionStatus=xe;ra.useFormState=xe;ra.useActionState=xe;ra.useOptimistic=xe;var Ln={readContext:nt,use:nc,useCallback:function(e,t){return ft().memoizedState=[e,t===void 0?null:t],e},useContext:nt,useEffect:u1,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,nu(4194308,4,f0.bind(null,t,e),a)},useLayoutEffect:function(e,t){return nu(4194308,4,e,t)},useInsertionEffect:function(e,t){nu(4,2,e,t)},useMemo:function(e,t){var a=ft();t=t===void 0?null:t;var n=e();return An&&(qa(!0),e(),qa(!1)),a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=ft();if(a!==void 0){var l=a(t);An&&(qa(!0),a(t),qa(!1))}else l=t;return n.memoizedState=n.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},n.queue=e,e=e.dispatch=i2.bind(null,P,e),[n.memoizedState,e]},useRef:function(e){var t=ft();return e={current:e},t.memoizedState=e},useState:function(e){e=Wo(e);var t=e.queue,a=El.bind(null,P,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:mf,useDeferredValue:function(e,t){var a=ft();return vf(a,e,t)},useTransition:function(){var e=Wo(!1);return e=p0.bind(null,P,e.queue,!0,!1),ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=P,l=ft();if(ae){if(a===void 0)throw Error(w(407));a=a()}else{if(a=t(),se===null)throw Error(w(349));ne&60||Pm(n,t,a)}l.memoizedState=a;var r={value:a,getSnapshot:t};return l.queue=r,u1(Wm.bind(null,n,r,e),[e]),n.flags|=2048,Ml(9,Jm.bind(null,n,r,a,t),{destroy:void 0},null),a},useId:function(){var e=ft(),t=se.identifierPrefix;if(ae){var a=ga,n=ya;a=(n&~(1<<32-Lt(n)-1)).toString(32)+a,t=":"+t+"R"+a,a=wu++,0 title"))),We(l,n,a),l[at]=e,ke(l),n=l;break e;case"link":var r=L1("link","href",t).get(n+(a.href||""));if(r){for(var i=0;i<\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof n.is=="string"?l.createElement("select",{is:n.is}):l.createElement("select"),n.multiple?e.multiple=!0:n.size&&(e.size=n.size);break;default:e=typeof n.is=="string"?l.createElement(a,{is:n.is}):l.createElement(a)}}e[at]=t,e[ut]=n;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)e.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=e;e:switch(We(e,a,n),a){case"button":case"input":case"select":case"textarea":e=!!n.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&ha(t)}}return Re(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&ha(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(w(166));if(e=Za.current,tr(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,l=rt,l!==null)switch(l.tag){case 27:case 5:n=l.memoizedProps}e[at]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||pv(e.nodeValue,a)),e||Rn(t)}else e=Hu(e).createTextNode(n),e[at]=t,t.stateNode=e}return Re(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=tr(t),n!==null&&n.dehydrated!==null){if(e===null){if(!l)throw Error(w(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(w(317));l[at]=t}else si(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Re(t),l=!1}else qt!==null&&(ms(qt),qt=null),l=!0;if(!l)return t.flags&256?(ba(t),t):(ba(t),null)}if(ba(t),t.flags&128)return t.lanes=a,t;if(a=n!==null,e=e!==null&&e.memoizedState!==null,a){n=t.child,l=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(l=n.alternate.memoizedState.cachePool.pool);var r=null;n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==l&&(n.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),Bi(t,t.updateQueue),Re(t),null;case 4:return Al(),e===null&&xf(t.stateNode.containerInfo),Re(t),null;case 10:return Sa(t.type),Re(t),null;case 19:if(Ge(Be),l=t.memoizedState,l===null)return Re(t),null;if(n=(t.flags&128)!==0,r=l.rendering,r===null)if(n)nr(l,!1);else{if(Oe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(r=Tu(e),r!==null){for(t.flags|=128,nr(l,!1),e=r.updateQueue,t.updateQueue=e,Bi(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)ev(a,e),a=a.sibling;return Se(Be,Be.current&1|2),t.child}e=e.sibling}l.tail!==null&&ta()>zu&&(t.flags|=128,n=!0,nr(l,!1),t.lanes=4194304)}else{if(!n)if(e=Tu(r),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Bi(t,e),nr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!r.alternate&&!ae)return Re(t),null}else 2*ta()-l.renderingStartTime>zu&&a!==536870912&&(t.flags|=128,n=!0,nr(l,!1),t.lanes=4194304);l.isBackwards?(r.sibling=t.child,t.child=r):(e=l.last,e!==null?e.sibling=r:t.child=r,l.last=r)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=ta(),t.sibling=null,e=Be.current,Se(Be,n?e&1|2:e&1),t):(Re(t),null);case 22:case 23:return ba(t),af(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?a&536870912&&!(t.flags&128)&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),a=t.updateQueue,a!==null&&Bi(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&Ge(bn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Sa(He),Re(t),null;case 25:return null}throw Error(w(156,t.tag))}function h2(e,t){switch(tf(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sa(He),Al(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pu(t),null;case 13:if(ba(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(w(340));si()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ge(Be),null;case 4:return Al(),null;case 10:return Sa(t.type),null;case 22:case 23:return ba(t),af(),e!==null&&Ge(bn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Sa(He),null;case 25:return null;default:return null}}function av(e,t){switch(tf(t),t.tag){case 3:Sa(He),Al();break;case 26:case 27:case 5:pu(t);break;case 4:Al();break;case 13:ba(t);break;case 19:Ge(Be);break;case 10:Sa(t.type);break;case 22:case 23:ba(t),af(),e!==null&&Ge(bn);break;case 24:Sa(He)}}var m2={getCacheForType:function(e){var t=nt(He),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},v2=typeof WeakMap=="function"?WeakMap:Map,ie=0,se=null,W=null,ne=0,Ce=0,Ot=null,Af=!1,_a=0,Oe=0,wa=0,Vl=0,Tf=0,dt=0,Ur=null,Xt=null,Dl=!1,Du=!1,_f=0,zu=1/0,Kr=null,Pa=null,ji=!1,fn=null,Hr=0,fs=0,ds=null,Br=0,hs=null;function Ra(){if(ie&2&&ne!==0)return ne&-ne;if(X.T!==null){var e=Ol;return e!==0?e:Mf()}return hm()}function nv(){dt===0&&(dt=!(ne&536870912)||ae?cm():536870912);var e=la.current;return e!==null&&(e.flags|=32),dt}function ct(e,t,a){(e===se&&Ce===2||e.cancelPendingCommit!==null)&&(Hn(e,0),It(e,ne,dt)),hi(e,a),(!(ie&2)||e!==se)&&(e===se&&(!(ie&2)&&(Vl|=a),Oe===4&&It(e,ne,dt)),ht(e))}function lv(e,t){if(ie&6)throw Error(w(327));var a=e.callbackNode;if(Rl()&&e.callbackNode!==a)return null;var n=gu(e,e===se?ne:0);if(n===0)return null;var l=(n&60)===0&&(n&e.expiredLanes)===0&&!t;if(t=l?b2(e,n):$u(e,n),t!==0){var r=l;do{if(t===6)It(e,n,0);else{if(l=e.current.alternate,r&&!p2(l)){t=$u(e,n),r=!1;continue}if(t===2){r=n;var i=um(e,r);if(i!==0&&(n=i,t=rv(e,r,i),r=!1,t!==2))continue}if(t===1){Hn(e,0),It(e,n,0);break}e.finishedWork=l,e.finishedLanes=n;e:{switch(r=e,t){case 0:case 1:throw Error(w(345));case 4:if((n&4194176)===n){It(r,n,dt);break e}break;case 2:Xt=null;break;case 3:case 5:break;default:throw Error(w(329))}if((n&62914560)===n&&(t=_f+300-ta(),10a?32:a,X.T=null,fn===null)var r=!1;else{a=ds,ds=null;var i=fn,u=Hr;if(fn=null,Hr=0,ie&6)throw Error(w(331));var c=ie;if(ie|=4,F0(i.current),P0(i,i.current,u,a),ie=c,mi(),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(ci,i)}catch{}r=!0}return r}finally{ye.p=l,X.T=n,fv(e,t)}}return!1}function C1(e,t,a){t=$t(a,t),t=es(e.stateNode,t,2),e=Qa(e,t,2),e!==null&&(hi(e,2),ht(e))}function he(e,t,a){if(e.tag===3)C1(e,e,a);else for(;t!==null;){if(t.tag===3){C1(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Pa===null||!Pa.has(n))){e=$t(a,e),a=_0(2),n=Qa(t,a,2),n!==null&&(w0(a,n,t,e),hi(n,2),ht(n));break}}t=t.return}}function fo(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new v2;var l=new Set;n.set(t,l)}else l=n.get(t),l===void 0&&(l=new Set,n.set(t,l));l.has(a)||(Af=!0,l.add(a),e=R2.bind(null,e,t,a),t.then(e,e))}function R2(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,ie&2?Dl=!0:ie&4&&(Du=!0),Of(),se===e&&(ne&a)===a&&(Oe===4||Oe===3&&(ne&62914560)===ne&&300>ta()-_f?!(ie&2)&&Hn(e,0):Tf|=a),ht(e)}function dv(e,t){t===0&&(t=om()),e=Ia(e,t),e!==null&&(hi(e,t),ht(e))}function C2(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),dv(e,a)}function A2(e,t){var a=0;switch(e.tag){case 13:var n=e.stateNode,l=e.memoizedState;l!==null&&(a=l.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(w(314))}n!==null&&n.delete(t),dv(e,a)}function Of(){if(50"u"?null:document;function Sv(e,t,a){var n=kl;if(n&&typeof t=="string"&&t){var l=zt(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof a=="string"&&(l+='[crossorigin="'+a+'"]'),z1.has(l)||(z1.add(l),e={rel:e,crossOrigin:a,href:t},n.querySelector(l)===null&&(t=n.createElement("link"),We(t,"link",e),ke(t),n.head.appendChild(t)))}}function G2(e){Oa.D(e),Sv("dns-prefetch",e,null)}function Y2(e,t){Oa.C(e,t),Sv("preconnect",e,t)}function q2(e,t,a){Oa.L(e,t,a);var n=kl;if(n&&e&&t){var l='link[rel="preload"][as="'+zt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(l+='[imagesrcset="'+zt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(l+='[imagesizes="'+zt(a.imageSizes)+'"]')):l+='[href="'+zt(e)+'"]';var r=l;switch(t){case"style":r=zl(e);break;case"script":r=Gl(e)}Bt.has(r)||(e=ge({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Bt.set(r,e),n.querySelector(l)!==null||t==="style"&&n.querySelector(vi(r))||t==="script"&&n.querySelector(pi(r))||(t=n.createElement("link"),We(t,"link",e),ke(t),n.head.appendChild(t)))}}function X2(e,t){Oa.m(e,t);var a=kl;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+zt(n)+'"][href="'+zt(e)+'"]',r=l;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=Gl(e)}if(!Bt.has(r)&&(e=ge({rel:"modulepreload",href:e},t),Bt.set(r,e),a.querySelector(l)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(pi(r)))return}n=a.createElement("link"),We(n,"link",e),ke(n),a.head.appendChild(n)}}}function Z2(e,t,a){Oa.S(e,t,a);var n=kl;if(n&&e){var l=ml(n).hoistableStyles,r=zl(e);t=t||"default";var i=l.get(r);if(!i){var u={loading:0,preload:null};if(i=n.querySelector(vi(r)))u.loading=5;else{e=ge({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Bt.get(r))&&Df(e,a);var c=i=n.createElement("link");ke(c),We(c,"link",e),c._p=new Promise(function(o,s){c.onload=o,c.onerror=s}),c.addEventListener("load",function(){u.loading|=1}),c.addEventListener("error",function(){u.loading|=2}),u.loading|=4,iu(i,t,n)}i={type:"stylesheet",instance:i,count:1,state:u},l.set(r,i)}}}function Q2(e,t){Oa.X(e,t);var a=kl;if(a&&e){var n=ml(a).hoistableScripts,l=Gl(e),r=n.get(l);r||(r=a.querySelector(pi(l)),r||(e=ge({src:e,async:!0},t),(t=Bt.get(l))&&zf(e,t),r=a.createElement("script"),ke(r),We(r,"link",e),a.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},n.set(l,r))}}function K2(e,t){Oa.M(e,t);var a=kl;if(a&&e){var n=ml(a).hoistableScripts,l=Gl(e),r=n.get(l);r||(r=a.querySelector(pi(l)),r||(e=ge({src:e,async:!0,type:"module"},t),(t=Bt.get(l))&&zf(e,t),r=a.createElement("script"),ke(r),We(r,"link",e),a.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},n.set(l,r))}}function $1(e,t,a,n){var l=(l=Za.current)?Bu(l):null;if(!l)throw Error(w(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=zl(a.href),a=ml(l).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=zl(a.href);var r=ml(l).hoistableStyles,i=r.get(e);if(i||(l=l.ownerDocument||l,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,i),(r=l.querySelector(vi(e)))&&!r._p&&(i.instance=r,i.state.loading=5),Bt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Bt.set(e,a),r||P2(l,e,a,i.state))),t&&n===null)throw Error(w(528,""));return i}if(t&&n!==null)throw Error(w(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Gl(a),a=ml(l).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(w(444,e))}}function zl(e){return'href="'+zt(e)+'"'}function vi(e){return'link[rel="stylesheet"]['+e+"]"}function Ev(e){return ge({},e,{"data-precedence":e.precedence,precedence:null})}function P2(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),We(t,"link",a),ke(t),e.head.appendChild(t))}function Gl(e){return'[src="'+zt(e)+'"]'}function pi(e){return"script[async]"+e}function N1(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+zt(a.href)+'"]');if(n)return t.instance=n,ke(n),n;var l=ge({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),ke(n),We(n,"style",l),iu(n,a.precedence,e),t.instance=n;case"stylesheet":l=zl(a.href);var r=e.querySelector(vi(l));if(r)return t.state.loading|=4,t.instance=r,ke(r),r;n=Ev(a),(l=Bt.get(l))&&Df(n,l),r=(e.ownerDocument||e).createElement("link"),ke(r);var i=r;return i._p=new Promise(function(u,c){i.onload=u,i.onerror=c}),We(r,"link",n),t.state.loading|=4,iu(r,a.precedence,e),t.instance=r;case"script":return r=Gl(a.src),(l=e.querySelector(pi(r)))?(t.instance=l,ke(l),l):(n=a,(l=Bt.get(r))&&(n=ge({},a),zf(n,l)),e=e.ownerDocument||e,l=e.createElement("script"),ke(l),We(l,"link",n),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(w(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(n=t.instance,t.state.loading|=4,iu(n,a.precedence,e));return t.instance}function iu(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=n.length?n[n.length-1]:null,r=l,i=0;i title"):null)}function J2(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Rv(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var Wr=null;function W2(){}function F2(e,t,a){if(Wr===null)throw Error(w(475));var n=Wr;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var l=zl(a.href),r=e.querySelector(vi(l));if(r){e=r._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(n.count++,n=ju.bind(n),e.then(n,n)),t.state.loading|=4,t.instance=r,ke(r);return}r=e.ownerDocument||e,a=Ev(a),(l=Bt.get(l))&&Df(a,l),r=r.createElement("link"),ke(r);var i=r;i._p=new Promise(function(u,c){i.onload=u,i.onerror=c}),We(r,"link",a),t.instance=r}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(t,e),(e=t.state.preload)&&!(t.state.loading&3)&&(n.count++,t=ju.bind(n),e.addEventListener("load",t),e.addEventListener("error",t))}}function I2(){if(Wr===null)throw Error(w(475));var e=Wr;return e.stylesheets&&e.count===0&&Cs(e,e.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Mv)}catch(e){console.error(e)}}Mv(),qh.exports=Pu;var xv=qh.exports;const Dv=Ll(xv),v9=Us({__proto__:null,default:Dv},[xv]);/** + * @remix-run/router v1.17.0 * * Copyright (c) Remix Software Inc. * @@ -55,9 +55,9 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ae(){return Ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function _n(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function fb(){return Math.random().toString(36).substr(2,8)}function Y1(e,t){return{usr:e.state,key:e.key,idx:t}}function ti(e,t,a,n){return a===void 0&&(a=null),Ae({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ma(t):t,{state:a,key:t&&t.key||n||fb()})}function On(e){let{pathname:t="/",search:a="",hash:n=""}=e;return a&&a!=="?"&&(t+=a.charAt(0)==="?"?a:"?"+a),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Ma(e){let t={};if(e){let a=e.indexOf("#");a>=0&&(t.hash=e.substr(a),e=e.substr(0,a));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function db(e,t,a,n){n===void 0&&(n={});let{window:l=document.defaultView,v5Compat:r=!1}=n,i=l.history,u=$e.Pop,c=null,o=s();o==null&&(o=0,i.replaceState(Ae({},i.state,{idx:o}),""));function s(){return(i.state||{idx:null}).idx}function d(){u=$e.Pop;let O=s(),m=O==null?null:O-o;o=O,c&&c({action:u,location:S.location,delta:m})}function f(O,m){u=$e.Push;let h=ti(S.location,O,m);a&&a(h,O),o=s()+1;let v=Y1(h,o),R=S.createHref(h);try{i.pushState(v,"",R)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;l.location.assign(R)}r&&c&&c({action:u,location:S.location,delta:1})}function p(O,m){u=$e.Replace;let h=ti(S.location,O,m);a&&a(h,O),o=s();let v=Y1(h,o),R=S.createHref(h);i.replaceState(v,"",R),r&&c&&c({action:u,location:S.location,delta:0})}function C(O){let m=l.location.origin!=="null"?l.location.origin:l.location.href,h=typeof O=="string"?O:On(O);return h=h.replace(/ $/,"%20"),J(m,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,m)}let S={get action(){return u},get location(){return e(l,i)},listen(O){if(c)throw new Error("A history only accepts one active listener");return l.addEventListener(G1,d),c=O,()=>{l.removeEventListener(G1,d),c=null}},createHref(O){return t(l,O)},createURL:C,encodeLocation(O){let m=C(O);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:p,go(O){return i.go(O)}};return S}var ve;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ve||(ve={}));const hb=new Set(["lazy","caseSensitive","path","id","index","children"]);function mb(e){return e.index===!0}function ai(e,t,a,n){return a===void 0&&(a=[]),n===void 0&&(n={}),e.map((l,r)=>{let i=[...a,String(r)],u=typeof l.id=="string"?l.id:i.join("-");if(J(l.index!==!0||!l.children,"Cannot specify children on an index route"),J(!n[u],'Found a route id collision on id "'+u+`". Route id's must be globally unique within Data Router usages`),mb(l)){let c=Ae({},l,t(l),{id:u});return n[u]=c,c}else{let c=Ae({},l,t(l),{id:u,children:void 0});return n[u]=c,l.children&&(c.children=ai(l.children,t,i,n)),c}})}function dn(e,t,a){return a===void 0&&(a="/"),ou(e,t,a,!1)}function ou(e,t,a,n){let l=typeof t=="string"?Ma(t):t,r=Yl(l.pathname||"/",a);if(r==null)return null;let i=zv(e);pb(i);let u=null;for(let c=0;u==null&&c{let c={relativePath:u===void 0?r.path||"":u,caseSensitive:r.caseSensitive===!0,childrenIndex:i,route:r};c.relativePath.startsWith("/")&&(J(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let o=Ca([n,c.relativePath]),s=a.concat(c);r.children&&r.children.length>0&&(J(r.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+o+'".')),zv(r.children,t,s,o)),!(r.path==null&&!r.index)&&t.push({path:o,score:Cb(o,r.index),routesMeta:s})};return e.forEach((r,i)=>{var u;if(r.path===""||!((u=r.path)!=null&&u.includes("?")))l(r,i);else for(let c of $v(r.path))l(r,i,c)}),t}function $v(e){let t=e.split("/");if(t.length===0)return[];let[a,...n]=t,l=a.endsWith("?"),r=a.replace(/\?$/,"");if(n.length===0)return l?[r,""]:[r];let i=$v(n.join("/")),u=[];return u.push(...i.map(c=>c===""?r:[r,c].join("/"))),l&&u.push(...i),u.map(c=>e.startsWith("/")&&c===""?"/":c)}function pb(e){e.sort((t,a)=>t.score!==a.score?a.score-t.score:Ab(t.routesMeta.map(n=>n.childrenIndex),a.routesMeta.map(n=>n.childrenIndex)))}const yb=/^:[\w-]+$/,gb=3,bb=2,Sb=1,Eb=10,Rb=-2,q1=e=>e==="*";function Cb(e,t){let a=e.split("/"),n=a.length;return a.some(q1)&&(n+=Rb),t&&(n+=bb),a.filter(l=>!q1(l)).reduce((l,r)=>l+(yb.test(r)?gb:r===""?Sb:Eb),n)}function Ab(e,t){return e.length===t.length&&e.slice(0,-1).every((n,l)=>n===t[l])?e[e.length-1]-t[t.length-1]:0}function Tb(e,t,a){a===void 0&&(a=!1);let{routesMeta:n}=e,l={},r="/",i=[];for(let u=0;u{let{paramName:f,isOptional:p}=s;if(f==="*"){let S=u[d]||"";i=r.slice(0,r.length-S.length).replace(/(.)\/+$/,"$1")}const C=u[d];return p&&!C?o[f]=void 0:o[f]=(C||"").replace(/%2F/g,"/"),o},{}),pathname:r,pathnameBase:i,pattern:e}}function wb(e,t,a){t===void 0&&(t=!1),a===void 0&&(a=!0),_n(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,u,c)=>(n.push({paramName:u,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),n]}function _b(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return _n(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Yl(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let a=t.endsWith("/")?t.length-1:t.length,n=e.charAt(a);return n&&n!=="/"?null:e.slice(a)||"/"}function Ob(e,t){t===void 0&&(t="/");let{pathname:a,search:n="",hash:l=""}=typeof e=="string"?Ma(e):e;return{pathname:a?a.startsWith("/")?a:Mb(a,t):t,search:Db(n),hash:zb(l)}}function Mb(e,t){let a=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?a.length>1&&a.pop():l!=="."&&a.push(l)}),a.length>1?a.join("/"):"/"}function Eo(e,t,a,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+a+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Nv(e){return e.filter((t,a)=>a===0||t.route.path&&t.route.path.length>0)}function Bf(e,t){let a=Nv(e);return t?a.map((n,l)=>l===a.length-1?n.pathname:n.pathnameBase):a.map(n=>n.pathnameBase)}function jf(e,t,a,n){n===void 0&&(n=!1);let l;typeof e=="string"?l=Ma(e):(l=Ae({},e),J(!l.pathname||!l.pathname.includes("?"),Eo("?","pathname","search",l)),J(!l.pathname||!l.pathname.includes("#"),Eo("#","pathname","hash",l)),J(!l.search||!l.search.includes("#"),Eo("#","search","hash",l)));let r=e===""||l.pathname==="",i=r?"/":l.pathname,u;if(i==null)u=a;else{let d=t.length-1;if(!n&&i.startsWith("..")){let f=i.split("/");for(;f[0]==="..";)f.shift(),d-=1;l.pathname=f.join("/")}u=d>=0?t[d]:"/"}let c=Ob(l,u),o=i&&i!=="/"&&i.endsWith("/"),s=(r||i===".")&&a.endsWith("/");return!c.pathname.endsWith("/")&&(o||s)&&(c.pathname+="/"),c}const Ca=e=>e.join("/").replace(/\/\/+/g,"/"),xb=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Db=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,zb=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Vf{constructor(t,a,n,l){l===void 0&&(l=!1),this.status=t,this.statusText=a||"",this.internal=l,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function dc(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Lv=["post","put","patch","delete"],$b=new Set(Lv),Nb=["get",...Lv],Lb=new Set(Nb),Ub=new Set([301,302,303,307,308]),Hb=new Set([307,308]),Ro={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Bb={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ir={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},kf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jb=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Uv="remix-router-transitions";function Vb(e){const t=e.window?e.window:typeof window<"u"?window:void 0,a=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!a;J(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let l;if(e.mapRouteProperties)l=e.mapRouteProperties;else if(e.detectErrorBoundary){let y=e.detectErrorBoundary;l=b=>({hasErrorBoundary:y(b)})}else l=jb;let r={},i=ai(e.routes,l,void 0,r),u,c=e.basename||"/",o=e.unstable_dataStrategy||Xb,s=e.unstable_patchRoutesOnMiss,d=Ae({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),f=null,p=new Set,C=null,S=null,O=null,m=e.hydrationData!=null,h=dn(i,e.history.location,c),v=null;if(h==null&&!s){let y=rt(404,{pathname:e.history.location.pathname}),{matches:b,route:E}=th(i);h=b,v={[E.id]:y}}h&&s&&Hc(h,i,e.history.location.pathname).active&&(h=null);let R;if(!h)R=!1,h=[];else if(h.some(y=>y.route.lazy))R=!1;else if(!h.some(y=>y.route.loader))R=!0;else if(d.v7_partialHydration){let y=e.hydrationData?e.hydrationData.loaderData:null,b=e.hydrationData?e.hydrationData.errors:null,E=T=>T.route.loader?typeof T.route.loader=="function"&&T.route.loader.hydrate===!0?!1:y&&y[T.route.id]!==void 0||b&&b[T.route.id]!==void 0:!0;if(b){let T=h.findIndex(N=>b[N.route.id]!==void 0);R=h.slice(0,T+1).every(E)}else R=h.every(E)}else R=e.hydrationData!=null;let x,g={historyAction:e.history.action,location:e.history.location,matches:h,initialized:R,navigation:Ro,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||v,fetchers:new Map,blockers:new Map},A=$e.Pop,z=!1,U,j=!1,q=new Map,Me=null,we=!1,Ee=!1,Tt=[],$=[],H=new Map,Y=0,re=-1,fe=new Map,Ie=new Set,pt=new Map,jt=new Map,qe=new Set,wt=new Map,ln=new Map,Qp=new Map,$c=!1;function Kp(){if(f=e.history.listen(y=>{let{action:b,location:E,delta:T}=y;if($c){$c=!1;return}_n(ln.size===0||T!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let N=vd({currentLocation:g.location,nextLocation:E,historyAction:b});if(N&&T!=null){$c=!0,e.history.go(T*-1),Ei(N,{state:"blocked",location:E,proceed(){Ei(N,{state:"proceeding",proceed:void 0,reset:void 0,location:E}),e.history.go(T)},reset(){let B=new Map(g.blockers);B.set(N,ir),lt({blockers:B})}});return}return rn(b,E)}),a){l4(t,q);let y=()=>r4(t,q);t.addEventListener("pagehide",y),Me=()=>t.removeEventListener("pagehide",y)}return g.initialized||rn($e.Pop,g.location,{initialHydration:!0}),x}function Pp(){f&&f(),Me&&Me(),p.clear(),U&&U.abort(),g.fetchers.forEach((y,b)=>Si(b)),g.blockers.forEach((y,b)=>md(b))}function Jp(y){return p.add(y),()=>p.delete(y)}function lt(y,b){b===void 0&&(b={}),g=Ae({},g,y);let E=[],T=[];d.v7_fetcherPersist&&g.fetchers.forEach((N,B)=>{N.state==="idle"&&(qe.has(B)?T.push(B):E.push(B))}),[...p].forEach(N=>N(g,{deletedFetchers:T,unstable_viewTransitionOpts:b.viewTransitionOpts,unstable_flushSync:b.flushSync===!0})),d.v7_fetcherPersist&&(E.forEach(N=>g.fetchers.delete(N)),T.forEach(N=>Si(N)))}function kn(y,b,E){var T,N;let{flushSync:B}=E===void 0?{}:E,G=g.actionData!=null&&g.navigation.formMethod!=null&&Yt(g.navigation.formMethod)&&g.navigation.state==="loading"&&((T=y.state)==null?void 0:T._isRedirect)!==!0,D;b.actionData?Object.keys(b.actionData).length>0?D=b.actionData:D=null:G?D=g.actionData:D=null;let Z=b.loaderData?I1(g.loaderData,b.loaderData,b.matches||[],b.errors):g.loaderData,V=g.blockers;V.size>0&&(V=new Map(V),V.forEach((I,de)=>V.set(de,ir)));let k=z===!0||g.navigation.formMethod!=null&&Yt(g.navigation.formMethod)&&((N=y.state)==null?void 0:N._isRedirect)!==!0;u&&(i=u,u=void 0),we||A===$e.Pop||(A===$e.Push?e.history.push(y,y.state):A===$e.Replace&&e.history.replace(y,y.state));let ce;if(A===$e.Pop){let I=q.get(g.location.pathname);I&&I.has(y.pathname)?ce={currentLocation:g.location,nextLocation:y}:q.has(y.pathname)&&(ce={currentLocation:y,nextLocation:g.location})}else if(j){let I=q.get(g.location.pathname);I?I.add(y.pathname):(I=new Set([y.pathname]),q.set(g.location.pathname,I)),ce={currentLocation:g.location,nextLocation:y}}lt(Ae({},b,{actionData:D,loaderData:Z,historyAction:A,location:y,initialized:!0,navigation:Ro,revalidation:"idle",restoreScrollPosition:yd(y,b.matches||g.matches),preventScrollReset:k,blockers:V}),{viewTransitionOpts:ce,flushSync:B===!0}),A=$e.Pop,z=!1,j=!1,we=!1,Ee=!1,Tt=[],$=[]}async function ud(y,b){if(typeof y=="number"){e.history.go(y);return}let E=_s(g.location,g.matches,c,d.v7_prependBasename,y,d.v7_relativeSplatPath,b==null?void 0:b.fromRouteId,b==null?void 0:b.relative),{path:T,submission:N,error:B}=Z1(d.v7_normalizeFormMethod,!1,E,b),G=g.location,D=ti(g.location,T,b&&b.state);D=Ae({},D,e.history.encodeLocation(D));let Z=b&&b.replace!=null?b.replace:void 0,V=$e.Push;Z===!0?V=$e.Replace:Z===!1||N!=null&&Yt(N.formMethod)&&N.formAction===g.location.pathname+g.location.search&&(V=$e.Replace);let k=b&&"preventScrollReset"in b?b.preventScrollReset===!0:void 0,ce=(b&&b.unstable_flushSync)===!0,I=vd({currentLocation:G,nextLocation:D,historyAction:V});if(I){Ei(I,{state:"blocked",location:D,proceed(){Ei(I,{state:"proceeding",proceed:void 0,reset:void 0,location:D}),ud(y,b)},reset(){let de=new Map(g.blockers);de.set(I,ir),lt({blockers:de})}});return}return await rn(V,D,{submission:N,pendingError:B,preventScrollReset:k,replace:b&&b.replace,enableViewTransition:b&&b.unstable_viewTransition,flushSync:ce})}function Wp(){if(Nc(),lt({revalidation:"loading"}),g.navigation.state!=="submitting"){if(g.navigation.state==="idle"){rn(g.historyAction,g.location,{startUninterruptedRevalidation:!0});return}rn(A||g.historyAction,g.navigation.location,{overrideNavigation:g.navigation})}}async function rn(y,b,E){U&&U.abort(),U=null,A=y,we=(E&&E.startUninterruptedRevalidation)===!0,uy(g.location,g.matches),z=(E&&E.preventScrollReset)===!0,j=(E&&E.enableViewTransition)===!0;let T=u||i,N=E&&E.overrideNavigation,B=dn(T,b,c),G=(E&&E.flushSync)===!0,D=Hc(B,T,b.pathname);if(D.active&&D.matches&&(B=D.matches),!B){let{error:le,notFoundMatches:Xe,route:De}=Lc(b.pathname);kn(b,{matches:Xe,loaderData:{},errors:{[De.id]:le}},{flushSync:G});return}if(g.initialized&&!Ee&&Wb(g.location,b)&&!(E&&E.submission&&Yt(E.submission.formMethod))){kn(b,{matches:B},{flushSync:G});return}U=new AbortController;let Z=Kn(e.history,b,U.signal,E&&E.submission),V;if(E&&E.pendingError)V=[jr(B).route.id,{type:ve.error,error:E.pendingError}];else if(E&&E.submission&&Yt(E.submission.formMethod)){let le=await Fp(Z,b,E.submission,B,D.active,{replace:E.replace,flushSync:G});if(le.shortCircuited)return;if(le.pendingActionResult){let[Xe,De]=le.pendingActionResult;if(St(De)&&dc(De.error)&&De.error.status===404){U=null,kn(b,{matches:le.matches,loaderData:{},errors:{[Xe]:De.error}});return}}B=le.matches||B,V=le.pendingActionResult,N=Co(b,E.submission),G=!1,D.active=!1,Z=Kn(e.history,Z.url,Z.signal)}let{shortCircuited:k,matches:ce,loaderData:I,errors:de}=await Ip(Z,b,B,D.active,N,E&&E.submission,E&&E.fetcherSubmission,E&&E.replace,E&&E.initialHydration===!0,G,V);k||(U=null,kn(b,Ae({matches:ce||B},eh(V),{loaderData:I,errors:de})))}async function Fp(y,b,E,T,N,B){B===void 0&&(B={}),Nc();let G=a4(b,E);if(lt({navigation:G},{flushSync:B.flushSync===!0}),N){let V=await Ci(T,b.pathname,y.signal);if(V.type==="aborted")return{shortCircuited:!0};if(V.type==="error"){let{error:k,notFoundMatches:ce,route:I}=Ri(b.pathname,V);return{matches:ce,pendingActionResult:[I.id,{type:ve.error,error:k}]}}else if(V.matches)T=V.matches;else{let{notFoundMatches:k,error:ce,route:I}=Lc(b.pathname);return{matches:k,pendingActionResult:[I.id,{type:ve.error,error:ce}]}}}let D,Z=Rr(T,b);if(!Z.route.action&&!Z.route.lazy)D={type:ve.error,error:rt(405,{method:y.method,pathname:b.pathname,routeId:Z.route.id})};else if(D=(await Jl("action",y,[Z],T))[0],y.signal.aborted)return{shortCircuited:!0};if(yn(D)){let V;return B&&B.replace!=null?V=B.replace:V=J1(D.response.headers.get("Location"),new URL(y.url),c)===g.location.pathname+g.location.search,await Pl(y,D,{submission:E,replace:V}),{shortCircuited:!0}}if(pn(D))throw rt(400,{type:"defer-action"});if(St(D)){let V=jr(T,Z.route.id);return(B&&B.replace)!==!0&&(A=$e.Push),{matches:T,pendingActionResult:[V.route.id,D]}}return{matches:T,pendingActionResult:[Z.route.id,D]}}async function Ip(y,b,E,T,N,B,G,D,Z,V,k){let ce=N||Co(b,B),I=B||G||lh(ce),de=!we&&(!d.v7_partialHydration||!Z);if(T){if(de){let _e=cd(k);lt(Ae({navigation:ce},_e!==void 0?{actionData:_e}:{}),{flushSync:V})}let K=await Ci(E,b.pathname,y.signal);if(K.type==="aborted")return{shortCircuited:!0};if(K.type==="error"){let{error:_e,notFoundMatches:yt,route:me}=Ri(b.pathname,K);return{matches:yt,loaderData:{},errors:{[me.id]:_e}}}else if(K.matches)E=K.matches;else{let{error:_e,notFoundMatches:yt,route:me}=Lc(b.pathname);return{matches:yt,loaderData:{},errors:{[me.id]:_e}}}}let le=u||i,[Xe,De]=Q1(e.history,g,E,I,b,d.v7_partialHydration&&Z===!0,d.unstable_skipActionErrorRevalidation,Ee,Tt,$,qe,pt,Ie,le,c,k);if(Uc(K=>!(E&&E.some(_e=>_e.route.id===K))||Xe&&Xe.some(_e=>_e.route.id===K)),re=++Y,Xe.length===0&&De.length===0){let K=dd();return kn(b,Ae({matches:E,loaderData:{},errors:k&&St(k[1])?{[k[0]]:k[1].error}:null},eh(k),K?{fetchers:new Map(g.fetchers)}:{}),{flushSync:V}),{shortCircuited:!0}}if(de){let K={};if(!T){K.navigation=ce;let _e=cd(k);_e!==void 0&&(K.actionData=_e)}De.length>0&&(K.fetchers=ey(De)),lt(K,{flushSync:V})}De.forEach(K=>{H.has(K.key)&&Da(K.key),K.controller&&H.set(K.key,K.controller)});let Wl=()=>De.forEach(K=>Da(K.key));U&&U.signal.addEventListener("abort",Wl);let{loaderResults:za,fetcherResults:Gn}=await od(g.matches,E,Xe,De,y);if(y.signal.aborted)return{shortCircuited:!0};U&&U.signal.removeEventListener("abort",Wl),De.forEach(K=>H.delete(K.key));let Yn=ah([...za,...Gn]);if(Yn){if(Yn.idx>=Xe.length){let K=De[Yn.idx-Xe.length].key;Ie.add(K)}return await Pl(y,Yn.result,{replace:D}),{shortCircuited:!0}}let{loaderData:qn,errors:Kt}=F1(g,E,Xe,za,k,De,Gn,wt);wt.forEach((K,_e)=>{K.subscribe(yt=>{(yt||K.done)&&wt.delete(_e)})}),d.v7_partialHydration&&Z&&g.errors&&Object.entries(g.errors).filter(K=>{let[_e]=K;return!Xe.some(yt=>yt.route.id===_e)}).forEach(K=>{let[_e,yt]=K;Kt=Object.assign(Kt||{},{[_e]:yt})});let Ai=dd(),Ti=hd(re),wi=Ai||Ti||De.length>0;return Ae({matches:E,loaderData:qn,errors:Kt},wi?{fetchers:new Map(g.fetchers)}:{})}function cd(y){if(y&&!St(y[1]))return{[y[0]]:y[1].data};if(g.actionData)return Object.keys(g.actionData).length===0?null:g.actionData}function ey(y){return y.forEach(b=>{let E=g.fetchers.get(b.key),T=ur(void 0,E?E.data:void 0);g.fetchers.set(b.key,T)}),new Map(g.fetchers)}function ty(y,b,E,T){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");H.has(y)&&Da(y);let N=(T&&T.unstable_flushSync)===!0,B=u||i,G=_s(g.location,g.matches,c,d.v7_prependBasename,E,d.v7_relativeSplatPath,b,T==null?void 0:T.relative),D=dn(B,G,c),Z=Hc(D,B,G);if(Z.active&&Z.matches&&(D=Z.matches),!D){ca(y,b,rt(404,{pathname:G}),{flushSync:N});return}let{path:V,submission:k,error:ce}=Z1(d.v7_normalizeFormMethod,!0,G,T);if(ce){ca(y,b,ce,{flushSync:N});return}let I=Rr(D,V);if(z=(T&&T.preventScrollReset)===!0,k&&Yt(k.formMethod)){ay(y,b,V,I,D,Z.active,N,k);return}pt.set(y,{routeId:b,path:V}),ny(y,b,V,I,D,Z.active,N,k)}async function ay(y,b,E,T,N,B,G,D){Nc(),pt.delete(y);function Z(me){if(!me.route.action&&!me.route.lazy){let oa=rt(405,{method:D.formMethod,pathname:E,routeId:b});return ca(y,b,oa,{flushSync:G}),!0}return!1}if(!B&&Z(T))return;let V=g.fetchers.get(y);xa(y,n4(D,V),{flushSync:G});let k=new AbortController,ce=Kn(e.history,E,k.signal,D);if(B){let me=await Ci(N,E,ce.signal);if(me.type==="aborted")return;if(me.type==="error"){let{error:oa}=Ri(E,me);ca(y,b,oa,{flushSync:G});return}else if(me.matches){if(N=me.matches,T=Rr(N,E),Z(T))return}else{ca(y,b,rt(404,{pathname:E}),{flushSync:G});return}}H.set(y,k);let I=Y,le=(await Jl("action",ce,[T],N))[0];if(ce.signal.aborted){H.get(y)===k&&H.delete(y);return}if(d.v7_fetcherPersist&&qe.has(y)){if(yn(le)||St(le)){xa(y,Ha(void 0));return}}else{if(yn(le))if(H.delete(y),re>I){xa(y,Ha(void 0));return}else return Ie.add(y),xa(y,ur(D)),Pl(ce,le,{fetcherSubmission:D});if(St(le)){ca(y,b,le.error);return}}if(pn(le))throw rt(400,{type:"defer-action"});let Xe=g.navigation.location||g.location,De=Kn(e.history,Xe,k.signal),Wl=u||i,za=g.navigation.state!=="idle"?dn(Wl,g.navigation.location,c):g.matches;J(za,"Didn't find any matches after fetcher action");let Gn=++Y;fe.set(y,Gn);let Yn=ur(D,le.data);g.fetchers.set(y,Yn);let[qn,Kt]=Q1(e.history,g,za,D,Xe,!1,d.unstable_skipActionErrorRevalidation,Ee,Tt,$,qe,pt,Ie,Wl,c,[T.route.id,le]);Kt.filter(me=>me.key!==y).forEach(me=>{let oa=me.key,gd=g.fetchers.get(oa),sy=ur(void 0,gd?gd.data:void 0);g.fetchers.set(oa,sy),H.has(oa)&&Da(oa),me.controller&&H.set(oa,me.controller)}),lt({fetchers:new Map(g.fetchers)});let Ai=()=>Kt.forEach(me=>Da(me.key));k.signal.addEventListener("abort",Ai);let{loaderResults:Ti,fetcherResults:wi}=await od(g.matches,za,qn,Kt,De);if(k.signal.aborted)return;k.signal.removeEventListener("abort",Ai),fe.delete(y),H.delete(y),Kt.forEach(me=>H.delete(me.key));let K=ah([...Ti,...wi]);if(K){if(K.idx>=qn.length){let me=Kt[K.idx-qn.length].key;Ie.add(me)}return Pl(De,K.result)}let{loaderData:_e,errors:yt}=F1(g,g.matches,qn,Ti,void 0,Kt,wi,wt);if(g.fetchers.has(y)){let me=Ha(le.data);g.fetchers.set(y,me)}hd(Gn),g.navigation.state==="loading"&&Gn>re?(J(A,"Expected pending action"),U&&U.abort(),kn(g.navigation.location,{matches:za,loaderData:_e,errors:yt,fetchers:new Map(g.fetchers)})):(lt({errors:yt,loaderData:I1(g.loaderData,_e,za,yt),fetchers:new Map(g.fetchers)}),Ee=!1)}async function ny(y,b,E,T,N,B,G,D){let Z=g.fetchers.get(y);xa(y,ur(D,Z?Z.data:void 0),{flushSync:G});let V=new AbortController,k=Kn(e.history,E,V.signal);if(B){let le=await Ci(N,E,k.signal);if(le.type==="aborted")return;if(le.type==="error"){let{error:Xe}=Ri(E,le);ca(y,b,Xe,{flushSync:G});return}else if(le.matches)N=le.matches,T=Rr(N,E);else{ca(y,b,rt(404,{pathname:E}),{flushSync:G});return}}H.set(y,V);let ce=Y,de=(await Jl("loader",k,[T],N))[0];if(pn(de)&&(de=await kv(de,k.signal,!0)||de),H.get(y)===V&&H.delete(y),!k.signal.aborted){if(qe.has(y)){xa(y,Ha(void 0));return}if(yn(de))if(re>ce){xa(y,Ha(void 0));return}else{Ie.add(y),await Pl(k,de);return}if(St(de)){ca(y,b,de.error);return}J(!pn(de),"Unhandled fetcher deferred data"),xa(y,Ha(de.data))}}async function Pl(y,b,E){let{submission:T,fetcherSubmission:N,replace:B}=E===void 0?{}:E;b.response.headers.has("X-Remix-Revalidate")&&(Ee=!0);let G=b.response.headers.get("Location");J(G,"Expected a Location header on the redirect Response"),G=J1(G,new URL(y.url),c);let D=ti(g.location,G,{_isRedirect:!0});if(a){let de=!1;if(b.response.headers.has("X-Remix-Reload-Document"))de=!0;else if(kf.test(G)){const le=e.history.createURL(G);de=le.origin!==t.location.origin||Yl(le.pathname,c)==null}if(de){B?t.location.replace(G):t.location.assign(G);return}}U=null;let Z=B===!0?$e.Replace:$e.Push,{formMethod:V,formAction:k,formEncType:ce}=g.navigation;!T&&!N&&V&&k&&ce&&(T=lh(g.navigation));let I=T||N;if(Hb.has(b.response.status)&&I&&Yt(I.formMethod))await rn(Z,D,{submission:Ae({},I,{formAction:G}),preventScrollReset:z});else{let de=Co(D,T);await rn(Z,D,{overrideNavigation:de,fetcherSubmission:N,preventScrollReset:z})}}async function Jl(y,b,E,T){try{let N=await Zb(o,y,b,E,T,r,l);return await Promise.all(N.map((B,G)=>{if(Ib(B)){let D=B.result;return{type:ve.redirect,response:Pb(D,b,E[G].route.id,T,c,d.v7_relativeSplatPath)}}return Kb(B)}))}catch(N){return E.map(()=>({type:ve.error,error:N}))}}async function od(y,b,E,T,N){let[B,...G]=await Promise.all([E.length?Jl("loader",N,E,b):[],...T.map(D=>{if(D.matches&&D.match&&D.controller){let Z=Kn(e.history,D.path,D.controller.signal);return Jl("loader",Z,[D.match],D.matches).then(V=>V[0])}else return Promise.resolve({type:ve.error,error:rt(404,{pathname:D.path})})})]);return await Promise.all([nh(y,E,B,B.map(()=>N.signal),!1,g.loaderData),nh(y,T.map(D=>D.match),G,T.map(D=>D.controller?D.controller.signal:null),!0)]),{loaderResults:B,fetcherResults:G}}function Nc(){Ee=!0,Tt.push(...Uc()),pt.forEach((y,b)=>{H.has(b)&&($.push(b),Da(b))})}function xa(y,b,E){E===void 0&&(E={}),g.fetchers.set(y,b),lt({fetchers:new Map(g.fetchers)},{flushSync:(E&&E.flushSync)===!0})}function ca(y,b,E,T){T===void 0&&(T={});let N=jr(g.matches,b);Si(y),lt({errors:{[N.route.id]:E},fetchers:new Map(g.fetchers)},{flushSync:(T&&T.flushSync)===!0})}function sd(y){return d.v7_fetcherPersist&&(jt.set(y,(jt.get(y)||0)+1),qe.has(y)&&qe.delete(y)),g.fetchers.get(y)||Bb}function Si(y){let b=g.fetchers.get(y);H.has(y)&&!(b&&b.state==="loading"&&fe.has(y))&&Da(y),pt.delete(y),fe.delete(y),Ie.delete(y),qe.delete(y),g.fetchers.delete(y)}function ly(y){if(d.v7_fetcherPersist){let b=(jt.get(y)||0)-1;b<=0?(jt.delete(y),qe.add(y)):jt.set(y,b)}else Si(y);lt({fetchers:new Map(g.fetchers)})}function Da(y){let b=H.get(y);J(b,"Expected fetch controller: "+y),b.abort(),H.delete(y)}function fd(y){for(let b of y){let E=sd(b),T=Ha(E.data);g.fetchers.set(b,T)}}function dd(){let y=[],b=!1;for(let E of Ie){let T=g.fetchers.get(E);J(T,"Expected fetcher: "+E),T.state==="loading"&&(Ie.delete(E),y.push(E),b=!0)}return fd(y),b}function hd(y){let b=[];for(let[E,T]of fe)if(T0}function ry(y,b){let E=g.blockers.get(y)||ir;return ln.get(y)!==b&&ln.set(y,b),E}function md(y){g.blockers.delete(y),ln.delete(y)}function Ei(y,b){let E=g.blockers.get(y)||ir;J(E.state==="unblocked"&&b.state==="blocked"||E.state==="blocked"&&b.state==="blocked"||E.state==="blocked"&&b.state==="proceeding"||E.state==="blocked"&&b.state==="unblocked"||E.state==="proceeding"&&b.state==="unblocked","Invalid blocker state transition: "+E.state+" -> "+b.state);let T=new Map(g.blockers);T.set(y,b),lt({blockers:T})}function vd(y){let{currentLocation:b,nextLocation:E,historyAction:T}=y;if(ln.size===0)return;ln.size>1&&_n(!1,"A router only supports one blocker at a time");let N=Array.from(ln.entries()),[B,G]=N[N.length-1],D=g.blockers.get(B);if(!(D&&D.state==="proceeding")&&G({currentLocation:b,nextLocation:E,historyAction:T}))return B}function Lc(y){let b=rt(404,{pathname:y}),E=u||i,{matches:T,route:N}=th(E);return Uc(),{notFoundMatches:T,route:N,error:b}}function Ri(y,b){let E=b.partialMatches,T=E[E.length-1].route,N=rt(400,{type:"route-discovery",routeId:T.id,pathname:y,message:b.error!=null&&"message"in b.error?b.error:String(b.error)});return{notFoundMatches:E,route:T,error:N}}function Uc(y){let b=[];return wt.forEach((E,T)=>{(!y||y(T))&&(E.cancel(),b.push(T),wt.delete(T))}),b}function iy(y,b,E){if(C=y,O=b,S=E||null,!m&&g.navigation===Ro){m=!0;let T=yd(g.location,g.matches);T!=null&<({restoreScrollPosition:T})}return()=>{C=null,O=null,S=null}}function pd(y,b){return S&&S(y,b.map(T=>vb(T,g.loaderData)))||y.key}function uy(y,b){if(C&&O){let E=pd(y,b);C[E]=O()}}function yd(y,b){if(C){let E=pd(y,b),T=C[E];if(typeof T=="number")return T}return null}function Hc(y,b,E){if(s)if(y){let T=y[y.length-1].route;if(T.path&&(T.path==="*"||T.path.endsWith("/*")))return{active:!0,matches:ou(b,E,c,!0)}}else return{active:!0,matches:ou(b,E,c,!0)||[]};return{active:!1,matches:null}}async function Ci(y,b,E){let T=y,N=T.length>0?T[T.length-1].route:null;for(;;){let B=u==null,G=u||i;try{await qb(s,b,T,G,r,l,Qp,E)}catch(k){return{type:"error",error:k,partialMatches:T}}finally{B&&(i=[...i])}if(E.aborted)return{type:"aborted"};let D=dn(G,b,c),Z=!1;if(D){let k=D[D.length-1].route;if(k.index)return{type:"success",matches:D};if(k.path&&k.path.length>0)if(k.path==="*")Z=!0;else return{type:"success",matches:D}}let V=ou(G,b,c,!0);if(!V||T.map(k=>k.route.id).join("-")===V.map(k=>k.route.id).join("-"))return{type:"success",matches:Z?D:null};if(T=V,N=T[T.length-1].route,N.path==="*")return{type:"success",matches:T}}}function cy(y){r={},u=ai(y,l,void 0,r)}function oy(y,b){let E=u==null;Bv(y,b,u||i,r,l),E&&(i=[...i],lt({}))}return x={get basename(){return c},get future(){return d},get state(){return g},get routes(){return i},get window(){return t},initialize:Kp,subscribe:Jp,enableScrollRestoration:iy,navigate:ud,fetch:ty,revalidate:Wp,createHref:y=>e.history.createHref(y),encodeLocation:y=>e.history.encodeLocation(y),getFetcher:sd,deleteFetcher:ly,dispose:Pp,getBlocker:ry,deleteBlocker:md,patchRoutes:oy,_internalFetchControllers:H,_internalActiveDeferreds:wt,_internalSetRoutes:cy},x}function kb(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function _s(e,t,a,n,l,r,i,u){let c,o;if(i){c=[];for(let d of t)if(c.push(d),d.route.id===i){o=d;break}}else c=t,o=t[t.length-1];let s=jf(l||".",Bf(c,r),Yl(e.pathname,a)||e.pathname,u==="path");return l==null&&(s.search=e.search,s.hash=e.hash),(l==null||l===""||l===".")&&o&&o.route.index&&!Gf(s.search)&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n&&a!=="/"&&(s.pathname=s.pathname==="/"?a:Ca([a,s.pathname])),On(s)}function Z1(e,t,a,n){if(!n||!kb(n))return{path:a};if(n.formMethod&&!t4(n.formMethod))return{path:a,error:rt(405,{method:n.formMethod})};let l=()=>({path:a,error:rt(400,{type:"invalid-body"})}),r=n.formMethod||"get",i=e?r.toUpperCase():r.toLowerCase(),u=jv(a);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Yt(i))return l();let f=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((p,C)=>{let[S,O]=C;return""+p+S+"="+O+` -`},""):String(n.body);return{path:a,submission:{formMethod:i,formAction:u,formEncType:n.formEncType,formData:void 0,json:void 0,text:f}}}else if(n.formEncType==="application/json"){if(!Yt(i))return l();try{let f=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:a,submission:{formMethod:i,formAction:u,formEncType:n.formEncType,formData:void 0,json:f,text:void 0}}}catch{return l()}}}J(typeof FormData=="function","FormData is not available in this environment");let c,o;if(n.formData)c=Os(n.formData),o=n.formData;else if(n.body instanceof FormData)c=Os(n.body),o=n.body;else if(n.body instanceof URLSearchParams)c=n.body,o=W1(c);else if(n.body==null)c=new URLSearchParams,o=new FormData;else try{c=new URLSearchParams(n.body),o=W1(c)}catch{return l()}let s={formMethod:i,formAction:u,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(Yt(s.formMethod))return{path:a,submission:s};let d=Ma(a);return t&&d.search&&Gf(d.search)&&c.append("index",""),d.search="?"+c,{path:On(d),submission:s}}function Gb(e,t){let a=e;if(t){let n=e.findIndex(l=>l.route.id===t);n>=0&&(a=e.slice(0,n))}return a}function Q1(e,t,a,n,l,r,i,u,c,o,s,d,f,p,C,S){let O=S?St(S[1])?S[1].error:S[1].data:void 0,m=e.createURL(t.location),h=e.createURL(l),v=S&&St(S[1])?S[0]:void 0,R=v?Gb(a,v):a,x=S?S[1].statusCode:void 0,g=i&&x&&x>=400,A=R.filter((U,j)=>{let{route:q}=U;if(q.lazy)return!0;if(q.loader==null)return!1;if(r)return typeof q.loader!="function"||q.loader.hydrate?!0:t.loaderData[q.id]===void 0&&(!t.errors||t.errors[q.id]===void 0);if(Yb(t.loaderData,t.matches[j],U)||c.some(Ee=>Ee===U.route.id))return!0;let Me=t.matches[j],we=U;return K1(U,Ae({currentUrl:m,currentParams:Me.params,nextUrl:h,nextParams:we.params},n,{actionResult:O,unstable_actionStatus:x,defaultShouldRevalidate:g?!1:u||m.pathname+m.search===h.pathname+h.search||m.search!==h.search||Hv(Me,we)}))}),z=[];return d.forEach((U,j)=>{if(r||!a.some(Tt=>Tt.route.id===U.routeId)||s.has(j))return;let q=dn(p,U.path,C);if(!q){z.push({key:j,routeId:U.routeId,path:U.path,matches:null,match:null,controller:null});return}let Me=t.fetchers.get(j),we=Rr(q,U.path),Ee=!1;f.has(j)?Ee=!1:o.includes(j)?Ee=!0:Me&&Me.state!=="idle"&&Me.data===void 0?Ee=u:Ee=K1(we,Ae({currentUrl:m,currentParams:t.matches[t.matches.length-1].params,nextUrl:h,nextParams:a[a.length-1].params},n,{actionResult:O,unstable_actionStatus:x,defaultShouldRevalidate:g?!1:u})),Ee&&z.push({key:j,routeId:U.routeId,path:U.path,matches:q,match:we,controller:new AbortController})}),[A,z]}function Yb(e,t,a){let n=!t||a.route.id!==t.route.id,l=e[a.route.id]===void 0;return n||l}function Hv(e,t){let a=e.route.path;return e.pathname!==t.pathname||a!=null&&a.endsWith("*")&&e.params["*"]!==t.params["*"]}function K1(e,t){if(e.route.shouldRevalidate){let a=e.route.shouldRevalidate(t);if(typeof a=="boolean")return a}return t.defaultShouldRevalidate}async function qb(e,t,a,n,l,r,i,u){let c=[t,...a.map(o=>o.route.id)].join("-");try{let o=i.get(c);o||(o=e({path:t,matches:a,patch:(s,d)=>{u.aborted||Bv(s,d,n,l,r)}}),i.set(c,o)),o&&Fb(o)&&await o}finally{i.delete(c)}}function Bv(e,t,a,n,l){if(e){var r;let i=n[e];J(i,"No route found to patch children into: routeId = "+e);let u=ai(t,l,[e,"patch",String(((r=i.children)==null?void 0:r.length)||"0")],n);i.children?i.children.push(...u):i.children=u}else{let i=ai(t,l,["patch",String(a.length||"0")],n);a.push(...i)}}async function P1(e,t,a){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let l=a[e.id];J(l,"No route found in manifest");let r={};for(let i in n){let c=l[i]!==void 0&&i!=="hasErrorBoundary";_n(!c,'Route "'+l.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!c&&!hb.has(i)&&(r[i]=n[i])}Object.assign(l,r),Object.assign(l,Ae({},t(l),{lazy:void 0}))}function Xb(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function Zb(e,t,a,n,l,r,i,u){let c=n.reduce((d,f)=>d.add(f.route.id),new Set),o=new Set,s=await e({matches:l.map(d=>{let f=c.has(d.route.id);return Ae({},d,{shouldLoad:f,resolve:C=>(o.add(d.route.id),f?Qb(t,a,d,r,i,C,u):Promise.resolve({type:ve.data,result:void 0}))})}),request:a,params:l[0].params,context:u});return l.forEach(d=>J(o.has(d.route.id),'`match.resolve()` was not called for route id "'+d.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),s.filter((d,f)=>c.has(l[f].route.id))}async function Qb(e,t,a,n,l,r,i){let u,c,o=s=>{let d,f=new Promise((S,O)=>d=O);c=()=>d(),t.signal.addEventListener("abort",c);let p=S=>typeof s!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+a.route.id+"]"))):s({request:t,params:a.params,context:i},...S!==void 0?[S]:[]),C;return r?C=r(S=>p(S)):C=(async()=>{try{return{type:"data",result:await p()}}catch(S){return{type:"error",result:S}}})(),Promise.race([C,f])};try{let s=a.route[e];if(a.route.lazy)if(s){let d,[f]=await Promise.all([o(s).catch(p=>{d=p}),P1(a.route,l,n)]);if(d!==void 0)throw d;u=f}else if(await P1(a.route,l,n),s=a.route[e],s)u=await o(s);else if(e==="action"){let d=new URL(t.url),f=d.pathname+d.search;throw rt(405,{method:t.method,pathname:f,routeId:a.route.id})}else return{type:ve.data,result:void 0};else if(s)u=await o(s);else{let d=new URL(t.url),f=d.pathname+d.search;throw rt(404,{pathname:f})}J(u.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+a.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(s){return{type:ve.error,result:s}}finally{c&&t.signal.removeEventListener("abort",c)}return u}async function Kb(e){let{result:t,type:a,status:n}=e;if(Vv(t)){let i;try{let u=t.headers.get("Content-Type");u&&/\bapplication\/json\b/.test(u)?t.body==null?i=null:i=await t.json():i=await t.text()}catch(u){return{type:ve.error,error:u}}return a===ve.error?{type:ve.error,error:new Vf(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:ve.data,data:i,statusCode:t.status,headers:t.headers}}if(a===ve.error)return{type:ve.error,error:t,statusCode:dc(t)?t.status:n};if(e4(t)){var l,r;return{type:ve.deferred,deferredData:t,statusCode:(l=t.init)==null?void 0:l.status,headers:((r=t.init)==null?void 0:r.headers)&&new Headers(t.init.headers)}}return{type:ve.data,data:t,statusCode:n}}function Pb(e,t,a,n,l,r){let i=e.headers.get("Location");if(J(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!kf.test(i)){let u=n.slice(0,n.findIndex(c=>c.route.id===a)+1);i=_s(new URL(t.url),u,l,!0,i,r),e.headers.set("Location",i)}return e}function J1(e,t,a){if(kf.test(e)){let n=e,l=n.startsWith("//")?new URL(t.protocol+n):new URL(n),r=Yl(l.pathname,a)!=null;if(l.origin===t.origin&&r)return l.pathname+l.search+l.hash}return e}function Kn(e,t,a,n){let l=e.createURL(jv(t)).toString(),r={signal:a};if(n&&Yt(n.formMethod)){let{formMethod:i,formEncType:u}=n;r.method=i.toUpperCase(),u==="application/json"?(r.headers=new Headers({"Content-Type":u}),r.body=JSON.stringify(n.json)):u==="text/plain"?r.body=n.text:u==="application/x-www-form-urlencoded"&&n.formData?r.body=Os(n.formData):r.body=n.formData}return new Request(l,r)}function Os(e){let t=new URLSearchParams;for(let[a,n]of e.entries())t.append(a,typeof n=="string"?n:n.name);return t}function W1(e){let t=new FormData;for(let[a,n]of e.entries())t.append(a,n);return t}function Jb(e,t,a,n,l,r){let i={},u=null,c,o=!1,s={},d=n&&St(n[1])?n[1].error:void 0;return a.forEach((f,p)=>{let C=t[p].route.id;if(J(!yn(f),"Cannot handle redirect results in processLoaderData"),St(f)){let S=f.error;d!==void 0&&(S=d,d=void 0),u=u||{};{let O=jr(e,C);u[O.route.id]==null&&(u[O.route.id]=S)}i[C]=void 0,o||(o=!0,c=dc(f.error)?f.error.status:500),f.headers&&(s[C]=f.headers)}else pn(f)?(l.set(C,f.deferredData),i[C]=f.deferredData.data,f.statusCode!=null&&f.statusCode!==200&&!o&&(c=f.statusCode),f.headers&&(s[C]=f.headers)):(i[C]=f.data,f.statusCode&&f.statusCode!==200&&!o&&(c=f.statusCode),f.headers&&(s[C]=f.headers))}),d!==void 0&&n&&(u={[n[0]]:d},i[n[0]]=void 0),{loaderData:i,errors:u,statusCode:c||200,loaderHeaders:s}}function F1(e,t,a,n,l,r,i,u){let{loaderData:c,errors:o}=Jb(t,a,n,l,u);for(let s=0;sn.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function th(e){let t=e.length===1?e[0]:e.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function rt(e,t){let{pathname:a,routeId:n,method:l,type:r,message:i}=t===void 0?{}:t,u="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(u="Bad Request",r==="route-discovery"?c='Unable to match URL "'+a+'" - the `children()` function for '+("route `"+n+"` threw the following error:\n"+i):l&&a&&n?c="You made a "+l+' request to "'+a+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":r==="defer-action"?c="defer() is not supported in actions":r==="invalid-body"&&(c="Unable to encode submission body")):e===403?(u="Forbidden",c='Route "'+n+'" does not match URL "'+a+'"'):e===404?(u="Not Found",c='No route matches URL "'+a+'"'):e===405&&(u="Method Not Allowed",l&&a&&n?c="You made a "+l.toUpperCase()+' request to "'+a+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":l&&(c='Invalid request method "'+l.toUpperCase()+'"')),new Vf(e||500,u,new Error(c),!0)}function ah(e){for(let t=e.length-1;t>=0;t--){let a=e[t];if(yn(a))return{result:a,idx:t}}}function jv(e){let t=typeof e=="string"?Ma(e):e;return On(Ae({},t,{hash:""}))}function Wb(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Fb(e){return typeof e=="object"&&e!=null&&"then"in e}function Ib(e){return Vv(e.result)&&Ub.has(e.result.status)}function pn(e){return e.type===ve.deferred}function St(e){return e.type===ve.error}function yn(e){return(e&&e.type)===ve.redirect}function e4(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Vv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function t4(e){return Lb.has(e.toLowerCase())}function Yt(e){return $b.has(e.toLowerCase())}async function nh(e,t,a,n,l,r){for(let i=0;id.route.id===c.route.id),s=o!=null&&!Hv(o,c)&&(r&&r[c.route.id])!==void 0;if(pn(u)&&(l||s)){let d=n[i];J(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await kv(u,d,l).then(f=>{f&&(a[i]=f||a[i])})}}}async function kv(e,t,a){if(a===void 0&&(a=!1),!await e.deferredData.resolveData(t)){if(a)try{return{type:ve.data,data:e.deferredData.unwrappedData}}catch(l){return{type:ve.error,error:l}}return{type:ve.data,data:e.deferredData.data}}}function Gf(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Rr(e,t){let a=typeof t=="string"?Ma(t).search:t.search;if(e[e.length-1].route.index&&Gf(a||""))return e[e.length-1];let n=Nv(e);return n[n.length-1]}function lh(e){let{formMethod:t,formAction:a,formEncType:n,text:l,formData:r,json:i}=e;if(!(!t||!a||!n)){if(l!=null)return{formMethod:t,formAction:a,formEncType:n,formData:void 0,json:void 0,text:l};if(r!=null)return{formMethod:t,formAction:a,formEncType:n,formData:r,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:a,formEncType:n,formData:void 0,json:i,text:void 0}}}function Co(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function a4(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function ur(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function n4(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ha(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function l4(e,t){try{let a=e.sessionStorage.getItem(Uv);if(a){let n=JSON.parse(a);for(let[l,r]of Object.entries(n||{}))r&&Array.isArray(r)&&t.set(l,new Set(r||[]))}}catch{}}function r4(e,t){if(t.size>0){let a={};for(let[n,l]of t)a[n]=[...l];try{e.sessionStorage.setItem(Uv,JSON.stringify(a))}catch(n){_n(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** - * React Router v6.24.1 + */function Ae(){return Ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function wn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function sb(){return Math.random().toString(36).substr(2,8)}function Y1(e,t){return{usr:e.state,key:e.key,idx:t}}function ti(e,t,a,n){return a===void 0&&(a=null),Ae({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ma(t):t,{state:a,key:t&&t.key||n||sb()})}function On(e){let{pathname:t="/",search:a="",hash:n=""}=e;return a&&a!=="?"&&(t+=a.charAt(0)==="?"?a:"?"+a),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Ma(e){let t={};if(e){let a=e.indexOf("#");a>=0&&(t.hash=e.substr(a),e=e.substr(0,a));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function fb(e,t,a,n){n===void 0&&(n={});let{window:l=document.defaultView,v5Compat:r=!1}=n,i=l.history,u=$e.Pop,c=null,o=s();o==null&&(o=0,i.replaceState(Ae({},i.state,{idx:o}),""));function s(){return(i.state||{idx:null}).idx}function d(){u=$e.Pop;let O=s(),m=O==null?null:O-o;o=O,c&&c({action:u,location:S.location,delta:m})}function f(O,m){u=$e.Push;let h=ti(S.location,O,m);a&&a(h,O),o=s()+1;let v=Y1(h,o),R=S.createHref(h);try{i.pushState(v,"",R)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;l.location.assign(R)}r&&c&&c({action:u,location:S.location,delta:1})}function p(O,m){u=$e.Replace;let h=ti(S.location,O,m);a&&a(h,O),o=s();let v=Y1(h,o),R=S.createHref(h);i.replaceState(v,"",R),r&&c&&c({action:u,location:S.location,delta:0})}function C(O){let m=l.location.origin!=="null"?l.location.origin:l.location.href,h=typeof O=="string"?O:On(O);return h=h.replace(/ $/,"%20"),J(m,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,m)}let S={get action(){return u},get location(){return e(l,i)},listen(O){if(c)throw new Error("A history only accepts one active listener");return l.addEventListener(G1,d),c=O,()=>{l.removeEventListener(G1,d),c=null}},createHref(O){return t(l,O)},createURL:C,encodeLocation(O){let m=C(O);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:p,go(O){return i.go(O)}};return S}var ve;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ve||(ve={}));const db=new Set(["lazy","caseSensitive","path","id","index","children"]);function hb(e){return e.index===!0}function ai(e,t,a,n){return a===void 0&&(a=[]),n===void 0&&(n={}),e.map((l,r)=>{let i=[...a,String(r)],u=typeof l.id=="string"?l.id:i.join("-");if(J(l.index!==!0||!l.children,"Cannot specify children on an index route"),J(!n[u],'Found a route id collision on id "'+u+`". Route id's must be globally unique within Data Router usages`),hb(l)){let c=Ae({},l,t(l),{id:u});return n[u]=c,c}else{let c=Ae({},l,t(l),{id:u,children:void 0});return n[u]=c,l.children&&(c.children=ai(l.children,t,i,n)),c}})}function dn(e,t,a){return a===void 0&&(a="/"),ou(e,t,a,!1)}function ou(e,t,a,n){let l=typeof t=="string"?Ma(t):t,r=Yl(l.pathname||"/",a);if(r==null)return null;let i=zv(e);vb(i);let u=null;for(let c=0;u==null&&c{let c={relativePath:u===void 0?r.path||"":u,caseSensitive:r.caseSensitive===!0,childrenIndex:i,route:r};c.relativePath.startsWith("/")&&(J(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let o=Ca([n,c.relativePath]),s=a.concat(c);r.children&&r.children.length>0&&(J(r.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+o+'".')),zv(r.children,t,s,o)),!(r.path==null&&!r.index)&&t.push({path:o,score:Rb(o,r.index),routesMeta:s})};return e.forEach((r,i)=>{var u;if(r.path===""||!((u=r.path)!=null&&u.includes("?")))l(r,i);else for(let c of $v(r.path))l(r,i,c)}),t}function $v(e){let t=e.split("/");if(t.length===0)return[];let[a,...n]=t,l=a.endsWith("?"),r=a.replace(/\?$/,"");if(n.length===0)return l?[r,""]:[r];let i=$v(n.join("/")),u=[];return u.push(...i.map(c=>c===""?r:[r,c].join("/"))),l&&u.push(...i),u.map(c=>e.startsWith("/")&&c===""?"/":c)}function vb(e){e.sort((t,a)=>t.score!==a.score?a.score-t.score:Cb(t.routesMeta.map(n=>n.childrenIndex),a.routesMeta.map(n=>n.childrenIndex)))}const pb=/^:[\w-]+$/,yb=3,gb=2,bb=1,Sb=10,Eb=-2,q1=e=>e==="*";function Rb(e,t){let a=e.split("/"),n=a.length;return a.some(q1)&&(n+=Eb),t&&(n+=gb),a.filter(l=>!q1(l)).reduce((l,r)=>l+(pb.test(r)?yb:r===""?bb:Sb),n)}function Cb(e,t){return e.length===t.length&&e.slice(0,-1).every((n,l)=>n===t[l])?e[e.length-1]-t[t.length-1]:0}function Ab(e,t,a){a===void 0&&(a=!1);let{routesMeta:n}=e,l={},r="/",i=[];for(let u=0;u{let{paramName:f,isOptional:p}=s;if(f==="*"){let S=u[d]||"";i=r.slice(0,r.length-S.length).replace(/(.)\/+$/,"$1")}const C=u[d];return p&&!C?o[f]=void 0:o[f]=(C||"").replace(/%2F/g,"/"),o},{}),pathname:r,pathnameBase:i,pattern:e}}function Tb(e,t,a){t===void 0&&(t=!1),a===void 0&&(a=!0),wn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,u,c)=>(n.push({paramName:u,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),n]}function _b(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return wn(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Yl(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let a=t.endsWith("/")?t.length-1:t.length,n=e.charAt(a);return n&&n!=="/"?null:e.slice(a)||"/"}function wb(e,t){t===void 0&&(t="/");let{pathname:a,search:n="",hash:l=""}=typeof e=="string"?Ma(e):e;return{pathname:a?a.startsWith("/")?a:Ob(a,t):t,search:xb(n),hash:Db(l)}}function Ob(e,t){let a=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?a.length>1&&a.pop():l!=="."&&a.push(l)}),a.length>1?a.join("/"):"/"}function So(e,t,a,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+a+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Nv(e){return e.filter((t,a)=>a===0||t.route.path&&t.route.path.length>0)}function Hf(e,t){let a=Nv(e);return t?a.map((n,l)=>l===e.length-1?n.pathname:n.pathnameBase):a.map(n=>n.pathnameBase)}function Bf(e,t,a,n){n===void 0&&(n=!1);let l;typeof e=="string"?l=Ma(e):(l=Ae({},e),J(!l.pathname||!l.pathname.includes("?"),So("?","pathname","search",l)),J(!l.pathname||!l.pathname.includes("#"),So("#","pathname","hash",l)),J(!l.search||!l.search.includes("#"),So("#","search","hash",l)));let r=e===""||l.pathname==="",i=r?"/":l.pathname,u;if(i==null)u=a;else{let d=t.length-1;if(!n&&i.startsWith("..")){let f=i.split("/");for(;f[0]==="..";)f.shift(),d-=1;l.pathname=f.join("/")}u=d>=0?t[d]:"/"}let c=wb(l,u),o=i&&i!=="/"&&i.endsWith("/"),s=(r||i===".")&&a.endsWith("/");return!c.pathname.endsWith("/")&&(o||s)&&(c.pathname+="/"),c}const Ca=e=>e.join("/").replace(/\/\/+/g,"/"),Mb=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),xb=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Db=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class jf{constructor(t,a,n,l){l===void 0&&(l=!1),this.status=t,this.statusText=a||"",this.internal=l,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function dc(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Lv=["post","put","patch","delete"],zb=new Set(Lv),$b=["get",...Lv],Nb=new Set($b),Lb=new Set([301,302,303,307,308]),Ub=new Set([307,308]),Eo={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Hb={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ir={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Vf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Bb=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Uv="remix-router-transitions";function jb(e){const t=e.window?e.window:typeof window<"u"?window:void 0,a=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!a;J(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let l;if(e.mapRouteProperties)l=e.mapRouteProperties;else if(e.detectErrorBoundary){let y=e.detectErrorBoundary;l=b=>({hasErrorBoundary:y(b)})}else l=Bb;let r={},i=ai(e.routes,l,void 0,r),u,c=e.basename||"/",o=e.unstable_dataStrategy||qb,s=e.unstable_patchRoutesOnMiss,d=Ae({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),f=null,p=new Set,C=null,S=null,O=null,m=e.hydrationData!=null,h=dn(i,e.history.location,c),v=null;if(h==null&&!s){let y=lt(404,{pathname:e.history.location.pathname}),{matches:b,route:E}=th(i);h=b,v={[E.id]:y}}let R;if(!h)R=!1,h=[];else if(h.some(y=>y.route.lazy))R=!1;else if(!h.some(y=>y.route.loader))R=!0;else if(d.v7_partialHydration){let y=e.hydrationData?e.hydrationData.loaderData:null,b=e.hydrationData?e.hydrationData.errors:null,E=_=>_.route.loader?typeof _.route.loader=="function"&&_.route.loader.hydrate===!0?!1:y&&y[_.route.id]!==void 0||b&&b[_.route.id]!==void 0:!0;if(b){let _=h.findIndex(N=>b[N.route.id]!==void 0);R=h.slice(0,_+1).every(E)}else R=h.every(E)}else R=e.hydrationData!=null;let x,g={historyAction:e.history.action,location:e.history.location,matches:h,initialized:R,navigation:Eo,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||v,fetchers:new Map,blockers:new Map},A=$e.Pop,z=!1,U,V=!1,Y=new Map,Me=null,_e=!1,Ee=!1,Tt=[],$=[],H=new Map,G=0,re=-1,fe=new Map,Ie=new Set,pt=new Map,jt=new Map,qe=new Set,_t=new Map,ln=new Map,Qp=new Map,$c=!1;function Kp(){if(f=e.history.listen(y=>{let{action:b,location:E,delta:_}=y;if($c){$c=!1;return}wn(ln.size===0||_!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let N=md({currentLocation:g.location,nextLocation:E,historyAction:b});if(N&&_!=null){$c=!0,e.history.go(_*-1),Ei(N,{state:"blocked",location:E,proceed(){Ei(N,{state:"proceeding",proceed:void 0,reset:void 0,location:E}),e.history.go(_)},reset(){let j=new Map(g.blockers);j.set(N,ir),st({blockers:j})}});return}return rn(b,E)}),a){n4(t,Y);let y=()=>l4(t,Y);t.addEventListener("pagehide",y),Me=()=>t.removeEventListener("pagehide",y)}return g.initialized||rn($e.Pop,g.location,{initialHydration:!0}),x}function Pp(){f&&f(),Me&&Me(),p.clear(),U&&U.abort(),g.fetchers.forEach((y,b)=>Si(b)),g.blockers.forEach((y,b)=>hd(b))}function Jp(y){return p.add(y),()=>p.delete(y)}function st(y,b){b===void 0&&(b={}),g=Ae({},g,y);let E=[],_=[];d.v7_fetcherPersist&&g.fetchers.forEach((N,j)=>{N.state==="idle"&&(qe.has(j)?_.push(j):E.push(j))}),[...p].forEach(N=>N(g,{deletedFetchers:_,unstable_viewTransitionOpts:b.viewTransitionOpts,unstable_flushSync:b.flushSync===!0})),d.v7_fetcherPersist&&(E.forEach(N=>g.fetchers.delete(N)),_.forEach(N=>Si(N)))}function kn(y,b,E){var _,N;let{flushSync:j}=E===void 0?{}:E,k=g.actionData!=null&&g.navigation.formMethod!=null&&Yt(g.navigation.formMethod)&&g.navigation.state==="loading"&&((_=y.state)==null?void 0:_._isRedirect)!==!0,D;b.actionData?Object.keys(b.actionData).length>0?D=b.actionData:D=null:k?D=g.actionData:D=null;let q=b.loaderData?I1(g.loaderData,b.loaderData,b.matches||[],b.errors):g.loaderData,B=g.blockers;B.size>0&&(B=new Map(B),B.forEach((I,de)=>B.set(de,ir)));let Z=z===!0||g.navigation.formMethod!=null&&Yt(g.navigation.formMethod)&&((N=y.state)==null?void 0:N._isRedirect)!==!0;u&&(i=u,u=void 0),_e||A===$e.Pop||(A===$e.Push?e.history.push(y,y.state):A===$e.Replace&&e.history.replace(y,y.state));let ce;if(A===$e.Pop){let I=Y.get(g.location.pathname);I&&I.has(y.pathname)?ce={currentLocation:g.location,nextLocation:y}:Y.has(y.pathname)&&(ce={currentLocation:y,nextLocation:g.location})}else if(V){let I=Y.get(g.location.pathname);I?I.add(y.pathname):(I=new Set([y.pathname]),Y.set(g.location.pathname,I)),ce={currentLocation:g.location,nextLocation:y}}st(Ae({},b,{actionData:D,loaderData:q,historyAction:A,location:y,initialized:!0,navigation:Eo,revalidation:"idle",restoreScrollPosition:pd(y,b.matches||g.matches),preventScrollReset:Z,blockers:B}),{viewTransitionOpts:ce,flushSync:j===!0}),A=$e.Pop,z=!1,V=!1,_e=!1,Ee=!1,Tt=[],$=[]}async function id(y,b){if(typeof y=="number"){e.history.go(y);return}let E=_s(g.location,g.matches,c,d.v7_prependBasename,y,d.v7_relativeSplatPath,b==null?void 0:b.fromRouteId,b==null?void 0:b.relative),{path:_,submission:N,error:j}=Z1(d.v7_normalizeFormMethod,!1,E,b),k=g.location,D=ti(g.location,_,b&&b.state);D=Ae({},D,e.history.encodeLocation(D));let q=b&&b.replace!=null?b.replace:void 0,B=$e.Push;q===!0?B=$e.Replace:q===!1||N!=null&&Yt(N.formMethod)&&N.formAction===g.location.pathname+g.location.search&&(B=$e.Replace);let Z=b&&"preventScrollReset"in b?b.preventScrollReset===!0:void 0,ce=(b&&b.unstable_flushSync)===!0,I=md({currentLocation:k,nextLocation:D,historyAction:B});if(I){Ei(I,{state:"blocked",location:D,proceed(){Ei(I,{state:"proceeding",proceed:void 0,reset:void 0,location:D}),id(y,b)},reset(){let de=new Map(g.blockers);de.set(I,ir),st({blockers:de})}});return}return await rn(B,D,{submission:N,pendingError:j,preventScrollReset:Z,replace:b&&b.replace,enableViewTransition:b&&b.unstable_viewTransition,flushSync:ce})}function Wp(){if(Nc(),st({revalidation:"loading"}),g.navigation.state!=="submitting"){if(g.navigation.state==="idle"){rn(g.historyAction,g.location,{startUninterruptedRevalidation:!0});return}rn(A||g.historyAction,g.navigation.location,{overrideNavigation:g.navigation})}}async function rn(y,b,E){U&&U.abort(),U=null,A=y,_e=(E&&E.startUninterruptedRevalidation)===!0,uy(g.location,g.matches),z=(E&&E.preventScrollReset)===!0,V=(E&&E.enableViewTransition)===!0;let _=u||i,N=E&&E.overrideNavigation,j=dn(_,b,c),k=(E&&E.flushSync)===!0,D=yd(j,_,b.pathname);if(D.active&&D.matches&&(j=D.matches),!j){let{error:le,notFoundMatches:Xe,route:De}=Lc(b.pathname);kn(b,{matches:Xe,loaderData:{},errors:{[De.id]:le}},{flushSync:k});return}if(g.initialized&&!Ee&&Jb(g.location,b)&&!(E&&E.submission&&Yt(E.submission.formMethod))){kn(b,{matches:j},{flushSync:k});return}U=new AbortController;let q=Kn(e.history,b,U.signal,E&&E.submission),B;if(E&&E.pendingError)B=[jr(j).route.id,{type:ve.error,error:E.pendingError}];else if(E&&E.submission&&Yt(E.submission.formMethod)){let le=await Fp(q,b,E.submission,j,D.active,{replace:E.replace,flushSync:k});if(le.shortCircuited)return;if(le.pendingActionResult){let[Xe,De]=le.pendingActionResult;if(St(De)&&dc(De.error)&&De.error.status===404){U=null,kn(b,{matches:le.matches,loaderData:{},errors:{[Xe]:De.error}});return}}j=le.matches||j,B=le.pendingActionResult,N=Ro(b,E.submission),k=!1,D.active=!1,q=Kn(e.history,q.url,q.signal)}let{shortCircuited:Z,matches:ce,loaderData:I,errors:de}=await Ip(q,b,j,D.active,N,E&&E.submission,E&&E.fetcherSubmission,E&&E.replace,E&&E.initialHydration===!0,k,B);Z||(U=null,kn(b,Ae({matches:ce||j},eh(B),{loaderData:I,errors:de})))}async function Fp(y,b,E,_,N,j){j===void 0&&(j={}),Nc();let k=t4(b,E);if(st({navigation:k},{flushSync:j.flushSync===!0}),N){let B=await Ci(_,b.pathname,y.signal);if(B.type==="aborted")return{shortCircuited:!0};if(B.type==="error"){let{error:Z,notFoundMatches:ce,route:I}=Ri(b.pathname,B);return{matches:ce,pendingActionResult:[I.id,{type:ve.error,error:Z}]}}else if(B.matches)_=B.matches;else{let{notFoundMatches:Z,error:ce,route:I}=Lc(b.pathname);return{matches:Z,pendingActionResult:[I.id,{type:ve.error,error:ce}]}}}let D,q=Rr(_,b);if(!q.route.action&&!q.route.lazy)D={type:ve.error,error:lt(405,{method:y.method,pathname:b.pathname,routeId:q.route.id})};else if(D=(await Jl("action",y,[q],_))[0],y.signal.aborted)return{shortCircuited:!0};if(yn(D)){let B;return j&&j.replace!=null?B=j.replace:B=J1(D.response.headers.get("Location"),new URL(y.url),c)===g.location.pathname+g.location.search,await Pl(y,D,{submission:E,replace:B}),{shortCircuited:!0}}if(pn(D))throw lt(400,{type:"defer-action"});if(St(D)){let B=jr(_,q.route.id);return(j&&j.replace)!==!0&&(A=$e.Push),{matches:_,pendingActionResult:[B.route.id,D]}}return{matches:_,pendingActionResult:[q.route.id,D]}}async function Ip(y,b,E,_,N,j,k,D,q,B,Z){let ce=N||Ro(b,j),I=j||k||lh(ce),de=!_e&&(!d.v7_partialHydration||!q);if(_){if(de){let we=ud(Z);st(Ae({navigation:ce},we!==void 0?{actionData:we}:{}),{flushSync:B})}let K=await Ci(E,b.pathname,y.signal);if(K.type==="aborted")return{shortCircuited:!0};if(K.type==="error"){let{error:we,notFoundMatches:yt,route:me}=Ri(b.pathname,K);return{matches:yt,loaderData:{},errors:{[me.id]:we}}}else if(K.matches)E=K.matches;else{let{error:we,notFoundMatches:yt,route:me}=Lc(b.pathname);return{matches:yt,loaderData:{},errors:{[me.id]:we}}}}let le=u||i,[Xe,De]=Q1(e.history,g,E,I,b,d.v7_partialHydration&&q===!0,d.unstable_skipActionErrorRevalidation,Ee,Tt,$,qe,pt,Ie,le,c,Z);if(Uc(K=>!(E&&E.some(we=>we.route.id===K))||Xe&&Xe.some(we=>we.route.id===K)),re=++G,Xe.length===0&&De.length===0){let K=fd();return kn(b,Ae({matches:E,loaderData:{},errors:Z&&St(Z[1])?{[Z[0]]:Z[1].error}:null},eh(Z),K?{fetchers:new Map(g.fetchers)}:{}),{flushSync:B}),{shortCircuited:!0}}if(de){let K={};if(!_){K.navigation=ce;let we=ud(Z);we!==void 0&&(K.actionData=we)}De.length>0&&(K.fetchers=ey(De)),st(K,{flushSync:B})}De.forEach(K=>{H.has(K.key)&&Da(K.key),K.controller&&H.set(K.key,K.controller)});let Wl=()=>De.forEach(K=>Da(K.key));U&&U.signal.addEventListener("abort",Wl);let{loaderResults:za,fetcherResults:Gn}=await cd(g.matches,E,Xe,De,y);if(y.signal.aborted)return{shortCircuited:!0};U&&U.signal.removeEventListener("abort",Wl),De.forEach(K=>H.delete(K.key));let Yn=ah([...za,...Gn]);if(Yn){if(Yn.idx>=Xe.length){let K=De[Yn.idx-Xe.length].key;Ie.add(K)}return await Pl(y,Yn.result,{replace:D}),{shortCircuited:!0}}let{loaderData:qn,errors:Kt}=F1(g,E,Xe,za,Z,De,Gn,_t);_t.forEach((K,we)=>{K.subscribe(yt=>{(yt||K.done)&&_t.delete(we)})}),d.v7_partialHydration&&q&&g.errors&&Object.entries(g.errors).filter(K=>{let[we]=K;return!Xe.some(yt=>yt.route.id===we)}).forEach(K=>{let[we,yt]=K;Kt=Object.assign(Kt||{},{[we]:yt})});let Ai=fd(),Ti=dd(re),_i=Ai||Ti||De.length>0;return Ae({matches:E,loaderData:qn,errors:Kt},_i?{fetchers:new Map(g.fetchers)}:{})}function ud(y){if(y&&!St(y[1]))return{[y[0]]:y[1].data};if(g.actionData)return Object.keys(g.actionData).length===0?null:g.actionData}function ey(y){return y.forEach(b=>{let E=g.fetchers.get(b.key),_=ur(void 0,E?E.data:void 0);g.fetchers.set(b.key,_)}),new Map(g.fetchers)}function ty(y,b,E,_){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");H.has(y)&&Da(y);let N=(_&&_.unstable_flushSync)===!0,j=u||i,k=_s(g.location,g.matches,c,d.v7_prependBasename,E,d.v7_relativeSplatPath,b,_==null?void 0:_.relative),D=dn(j,k,c),q=yd(D,j,k);if(q.active&&q.matches&&(D=q.matches),!D){ca(y,b,lt(404,{pathname:k}),{flushSync:N});return}let{path:B,submission:Z,error:ce}=Z1(d.v7_normalizeFormMethod,!0,k,_);if(ce){ca(y,b,ce,{flushSync:N});return}let I=Rr(D,B);if(z=(_&&_.preventScrollReset)===!0,Z&&Yt(Z.formMethod)){ay(y,b,B,I,D,q.active,N,Z);return}pt.set(y,{routeId:b,path:B}),ny(y,b,B,I,D,q.active,N,Z)}async function ay(y,b,E,_,N,j,k,D){Nc(),pt.delete(y);function q(me){if(!me.route.action&&!me.route.lazy){let oa=lt(405,{method:D.formMethod,pathname:E,routeId:b});return ca(y,b,oa,{flushSync:k}),!0}return!1}if(!j&&q(_))return;let B=g.fetchers.get(y);xa(y,a4(D,B),{flushSync:k});let Z=new AbortController,ce=Kn(e.history,E,Z.signal,D);if(j){let me=await Ci(N,E,ce.signal);if(me.type==="aborted")return;if(me.type==="error"){let{error:oa}=Ri(E,me);ca(y,b,oa,{flushSync:k});return}else if(me.matches){if(N=me.matches,_=Rr(N,E),q(_))return}else{ca(y,b,lt(404,{pathname:E}),{flushSync:k});return}}H.set(y,Z);let I=G,le=(await Jl("action",ce,[_],N))[0];if(ce.signal.aborted){H.get(y)===Z&&H.delete(y);return}if(d.v7_fetcherPersist&&qe.has(y)){if(yn(le)||St(le)){xa(y,Ha(void 0));return}}else{if(yn(le))if(H.delete(y),re>I){xa(y,Ha(void 0));return}else return Ie.add(y),xa(y,ur(D)),Pl(ce,le,{fetcherSubmission:D});if(St(le)){ca(y,b,le.error);return}}if(pn(le))throw lt(400,{type:"defer-action"});let Xe=g.navigation.location||g.location,De=Kn(e.history,Xe,Z.signal),Wl=u||i,za=g.navigation.state!=="idle"?dn(Wl,g.navigation.location,c):g.matches;J(za,"Didn't find any matches after fetcher action");let Gn=++G;fe.set(y,Gn);let Yn=ur(D,le.data);g.fetchers.set(y,Yn);let[qn,Kt]=Q1(e.history,g,za,D,Xe,!1,d.unstable_skipActionErrorRevalidation,Ee,Tt,$,qe,pt,Ie,Wl,c,[_.route.id,le]);Kt.filter(me=>me.key!==y).forEach(me=>{let oa=me.key,gd=g.fetchers.get(oa),oy=ur(void 0,gd?gd.data:void 0);g.fetchers.set(oa,oy),H.has(oa)&&Da(oa),me.controller&&H.set(oa,me.controller)}),st({fetchers:new Map(g.fetchers)});let Ai=()=>Kt.forEach(me=>Da(me.key));Z.signal.addEventListener("abort",Ai);let{loaderResults:Ti,fetcherResults:_i}=await cd(g.matches,za,qn,Kt,De);if(Z.signal.aborted)return;Z.signal.removeEventListener("abort",Ai),fe.delete(y),H.delete(y),Kt.forEach(me=>H.delete(me.key));let K=ah([...Ti,..._i]);if(K){if(K.idx>=qn.length){let me=Kt[K.idx-qn.length].key;Ie.add(me)}return Pl(De,K.result)}let{loaderData:we,errors:yt}=F1(g,g.matches,qn,Ti,void 0,Kt,_i,_t);if(g.fetchers.has(y)){let me=Ha(le.data);g.fetchers.set(y,me)}dd(Gn),g.navigation.state==="loading"&&Gn>re?(J(A,"Expected pending action"),U&&U.abort(),kn(g.navigation.location,{matches:za,loaderData:we,errors:yt,fetchers:new Map(g.fetchers)})):(st({errors:yt,loaderData:I1(g.loaderData,we,za,yt),fetchers:new Map(g.fetchers)}),Ee=!1)}async function ny(y,b,E,_,N,j,k,D){let q=g.fetchers.get(y);xa(y,ur(D,q?q.data:void 0),{flushSync:k});let B=new AbortController,Z=Kn(e.history,E,B.signal);if(j){let le=await Ci(N,E,Z.signal);if(le.type==="aborted")return;if(le.type==="error"){let{error:Xe}=Ri(E,le);ca(y,b,Xe,{flushSync:k});return}else if(le.matches)N=le.matches,_=Rr(N,E);else{ca(y,b,lt(404,{pathname:E}),{flushSync:k});return}}H.set(y,B);let ce=G,de=(await Jl("loader",Z,[_],N))[0];if(pn(de)&&(de=await kv(de,Z.signal,!0)||de),H.get(y)===B&&H.delete(y),!Z.signal.aborted){if(qe.has(y)){xa(y,Ha(void 0));return}if(yn(de))if(re>ce){xa(y,Ha(void 0));return}else{Ie.add(y),await Pl(Z,de);return}if(St(de)){ca(y,b,de.error);return}J(!pn(de),"Unhandled fetcher deferred data"),xa(y,Ha(de.data))}}async function Pl(y,b,E){let{submission:_,fetcherSubmission:N,replace:j}=E===void 0?{}:E;b.response.headers.has("X-Remix-Revalidate")&&(Ee=!0);let k=b.response.headers.get("Location");J(k,"Expected a Location header on the redirect Response"),k=J1(k,new URL(y.url),c);let D=ti(g.location,k,{_isRedirect:!0});if(a){let de=!1;if(b.response.headers.has("X-Remix-Reload-Document"))de=!0;else if(Vf.test(k)){const le=e.history.createURL(k);de=le.origin!==t.location.origin||Yl(le.pathname,c)==null}if(de){j?t.location.replace(k):t.location.assign(k);return}}U=null;let q=j===!0?$e.Replace:$e.Push,{formMethod:B,formAction:Z,formEncType:ce}=g.navigation;!_&&!N&&B&&Z&&ce&&(_=lh(g.navigation));let I=_||N;if(Ub.has(b.response.status)&&I&&Yt(I.formMethod))await rn(q,D,{submission:Ae({},I,{formAction:k}),preventScrollReset:z});else{let de=Ro(D,_);await rn(q,D,{overrideNavigation:de,fetcherSubmission:N,preventScrollReset:z})}}async function Jl(y,b,E,_){try{let N=await Xb(o,y,b,E,_,r,l);return await Promise.all(N.map((j,k)=>{if(Fb(j)){let D=j.result;return{type:ve.redirect,response:Kb(D,b,E[k].route.id,_,c,d.v7_relativeSplatPath)}}return Qb(j)}))}catch(N){return E.map(()=>({type:ve.error,error:N}))}}async function cd(y,b,E,_,N){let[j,...k]=await Promise.all([E.length?Jl("loader",N,E,b):[],..._.map(D=>{if(D.matches&&D.match&&D.controller){let q=Kn(e.history,D.path,D.controller.signal);return Jl("loader",q,[D.match],D.matches).then(B=>B[0])}else return Promise.resolve({type:ve.error,error:lt(404,{pathname:D.path})})})]);return await Promise.all([nh(y,E,j,j.map(()=>N.signal),!1,g.loaderData),nh(y,_.map(D=>D.match),k,_.map(D=>D.controller?D.controller.signal:null),!0)]),{loaderResults:j,fetcherResults:k}}function Nc(){Ee=!0,Tt.push(...Uc()),pt.forEach((y,b)=>{H.has(b)&&($.push(b),Da(b))})}function xa(y,b,E){E===void 0&&(E={}),g.fetchers.set(y,b),st({fetchers:new Map(g.fetchers)},{flushSync:(E&&E.flushSync)===!0})}function ca(y,b,E,_){_===void 0&&(_={});let N=jr(g.matches,b);Si(y),st({errors:{[N.route.id]:E},fetchers:new Map(g.fetchers)},{flushSync:(_&&_.flushSync)===!0})}function od(y){return d.v7_fetcherPersist&&(jt.set(y,(jt.get(y)||0)+1),qe.has(y)&&qe.delete(y)),g.fetchers.get(y)||Hb}function Si(y){let b=g.fetchers.get(y);H.has(y)&&!(b&&b.state==="loading"&&fe.has(y))&&Da(y),pt.delete(y),fe.delete(y),Ie.delete(y),qe.delete(y),g.fetchers.delete(y)}function ly(y){if(d.v7_fetcherPersist){let b=(jt.get(y)||0)-1;b<=0?(jt.delete(y),qe.add(y)):jt.set(y,b)}else Si(y);st({fetchers:new Map(g.fetchers)})}function Da(y){let b=H.get(y);J(b,"Expected fetch controller: "+y),b.abort(),H.delete(y)}function sd(y){for(let b of y){let E=od(b),_=Ha(E.data);g.fetchers.set(b,_)}}function fd(){let y=[],b=!1;for(let E of Ie){let _=g.fetchers.get(E);J(_,"Expected fetcher: "+E),_.state==="loading"&&(Ie.delete(E),y.push(E),b=!0)}return sd(y),b}function dd(y){let b=[];for(let[E,_]of fe)if(_0}function ry(y,b){let E=g.blockers.get(y)||ir;return ln.get(y)!==b&&ln.set(y,b),E}function hd(y){g.blockers.delete(y),ln.delete(y)}function Ei(y,b){let E=g.blockers.get(y)||ir;J(E.state==="unblocked"&&b.state==="blocked"||E.state==="blocked"&&b.state==="blocked"||E.state==="blocked"&&b.state==="proceeding"||E.state==="blocked"&&b.state==="unblocked"||E.state==="proceeding"&&b.state==="unblocked","Invalid blocker state transition: "+E.state+" -> "+b.state);let _=new Map(g.blockers);_.set(y,b),st({blockers:_})}function md(y){let{currentLocation:b,nextLocation:E,historyAction:_}=y;if(ln.size===0)return;ln.size>1&&wn(!1,"A router only supports one blocker at a time");let N=Array.from(ln.entries()),[j,k]=N[N.length-1],D=g.blockers.get(j);if(!(D&&D.state==="proceeding")&&k({currentLocation:b,nextLocation:E,historyAction:_}))return j}function Lc(y){let b=lt(404,{pathname:y}),E=u||i,{matches:_,route:N}=th(E);return Uc(),{notFoundMatches:_,route:N,error:b}}function Ri(y,b){let E=b.partialMatches,_=E[E.length-1].route,N=lt(400,{type:"route-discovery",routeId:_.id,pathname:y,message:b.error!=null&&"message"in b.error?b.error:String(b.error)});return{notFoundMatches:E,route:_,error:N}}function Uc(y){let b=[];return _t.forEach((E,_)=>{(!y||y(_))&&(E.cancel(),b.push(_),_t.delete(_))}),b}function iy(y,b,E){if(C=y,O=b,S=E||null,!m&&g.navigation===Eo){m=!0;let _=pd(g.location,g.matches);_!=null&&st({restoreScrollPosition:_})}return()=>{C=null,O=null,S=null}}function vd(y,b){return S&&S(y,b.map(_=>mb(_,g.loaderData)))||y.key}function uy(y,b){if(C&&O){let E=vd(y,b);C[E]=O()}}function pd(y,b){if(C){let E=vd(y,b),_=C[E];if(typeof _=="number")return _}return null}function yd(y,b,E){if(s)if(y){if(y[y.length-1].route.path==="*")return{active:!0,matches:ou(b,E,c,!0)}}else return{active:!0,matches:ou(b,E,c,!0)||[]};return{active:!1,matches:null}}async function Ci(y,b,E){let _=y,N=_.length>0?_[_.length-1].route:null;for(;;){try{await Yb(s,b,_,i||u,r,l,Qp,E)}catch(B){return{type:"error",error:B,partialMatches:_}}if(E.aborted)return{type:"aborted"};let j=u||i,k=dn(j,b,c),D=!1;if(k){let B=k[k.length-1].route;if(B.index)return{type:"success",matches:k};if(B.path&&B.path.length>0)if(B.path==="*")D=!0;else return{type:"success",matches:k}}let q=ou(j,b,c,!0);if(!q||_.map(B=>B.route.id).join("-")===q.map(B=>B.route.id).join("-"))return{type:"success",matches:D?k:null};if(_=q,N=_[_.length-1].route,N.path==="*")return{type:"success",matches:_}}}function cy(y){r={},u=ai(y,l,void 0,r)}return x={get basename(){return c},get future(){return d},get state(){return g},get routes(){return i},get window(){return t},initialize:Kp,subscribe:Jp,enableScrollRestoration:iy,navigate:id,fetch:ty,revalidate:Wp,createHref:y=>e.history.createHref(y),encodeLocation:y=>e.history.encodeLocation(y),getFetcher:od,deleteFetcher:ly,dispose:Pp,getBlocker:ry,deleteBlocker:hd,patchRoutes(y,b){return Bv(y,b,i||u,r,l)},_internalFetchControllers:H,_internalActiveDeferreds:_t,_internalSetRoutes:cy},x}function Vb(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function _s(e,t,a,n,l,r,i,u){let c,o;if(i){c=[];for(let d of t)if(c.push(d),d.route.id===i){o=d;break}}else c=t,o=t[t.length-1];let s=Bf(l||".",Hf(c,r),Yl(e.pathname,a)||e.pathname,u==="path");return l==null&&(s.search=e.search,s.hash=e.hash),(l==null||l===""||l===".")&&o&&o.route.index&&!kf(s.search)&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n&&a!=="/"&&(s.pathname=s.pathname==="/"?a:Ca([a,s.pathname])),On(s)}function Z1(e,t,a,n){if(!n||!Vb(n))return{path:a};if(n.formMethod&&!e4(n.formMethod))return{path:a,error:lt(405,{method:n.formMethod})};let l=()=>({path:a,error:lt(400,{type:"invalid-body"})}),r=n.formMethod||"get",i=e?r.toUpperCase():r.toLowerCase(),u=jv(a);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Yt(i))return l();let f=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((p,C)=>{let[S,O]=C;return""+p+S+"="+O+` +`},""):String(n.body);return{path:a,submission:{formMethod:i,formAction:u,formEncType:n.formEncType,formData:void 0,json:void 0,text:f}}}else if(n.formEncType==="application/json"){if(!Yt(i))return l();try{let f=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:a,submission:{formMethod:i,formAction:u,formEncType:n.formEncType,formData:void 0,json:f,text:void 0}}}catch{return l()}}}J(typeof FormData=="function","FormData is not available in this environment");let c,o;if(n.formData)c=ws(n.formData),o=n.formData;else if(n.body instanceof FormData)c=ws(n.body),o=n.body;else if(n.body instanceof URLSearchParams)c=n.body,o=W1(c);else if(n.body==null)c=new URLSearchParams,o=new FormData;else try{c=new URLSearchParams(n.body),o=W1(c)}catch{return l()}let s={formMethod:i,formAction:u,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(Yt(s.formMethod))return{path:a,submission:s};let d=Ma(a);return t&&d.search&&kf(d.search)&&c.append("index",""),d.search="?"+c,{path:On(d),submission:s}}function kb(e,t){let a=e;if(t){let n=e.findIndex(l=>l.route.id===t);n>=0&&(a=e.slice(0,n))}return a}function Q1(e,t,a,n,l,r,i,u,c,o,s,d,f,p,C,S){let O=S?St(S[1])?S[1].error:S[1].data:void 0,m=e.createURL(t.location),h=e.createURL(l),v=S&&St(S[1])?S[0]:void 0,R=v?kb(a,v):a,x=S?S[1].statusCode:void 0,g=i&&x&&x>=400,A=R.filter((U,V)=>{let{route:Y}=U;if(Y.lazy)return!0;if(Y.loader==null)return!1;if(r)return typeof Y.loader!="function"||Y.loader.hydrate?!0:t.loaderData[Y.id]===void 0&&(!t.errors||t.errors[Y.id]===void 0);if(Gb(t.loaderData,t.matches[V],U)||c.some(Ee=>Ee===U.route.id))return!0;let Me=t.matches[V],_e=U;return K1(U,Ae({currentUrl:m,currentParams:Me.params,nextUrl:h,nextParams:_e.params},n,{actionResult:O,unstable_actionStatus:x,defaultShouldRevalidate:g?!1:u||m.pathname+m.search===h.pathname+h.search||m.search!==h.search||Hv(Me,_e)}))}),z=[];return d.forEach((U,V)=>{if(r||!a.some(Tt=>Tt.route.id===U.routeId)||s.has(V))return;let Y=dn(p,U.path,C);if(!Y){z.push({key:V,routeId:U.routeId,path:U.path,matches:null,match:null,controller:null});return}let Me=t.fetchers.get(V),_e=Rr(Y,U.path),Ee=!1;f.has(V)?Ee=!1:o.includes(V)?Ee=!0:Me&&Me.state!=="idle"&&Me.data===void 0?Ee=u:Ee=K1(_e,Ae({currentUrl:m,currentParams:t.matches[t.matches.length-1].params,nextUrl:h,nextParams:a[a.length-1].params},n,{actionResult:O,unstable_actionStatus:x,defaultShouldRevalidate:g?!1:u})),Ee&&z.push({key:V,routeId:U.routeId,path:U.path,matches:Y,match:_e,controller:new AbortController})}),[A,z]}function Gb(e,t,a){let n=!t||a.route.id!==t.route.id,l=e[a.route.id]===void 0;return n||l}function Hv(e,t){let a=e.route.path;return e.pathname!==t.pathname||a!=null&&a.endsWith("*")&&e.params["*"]!==t.params["*"]}function K1(e,t){if(e.route.shouldRevalidate){let a=e.route.shouldRevalidate(t);if(typeof a=="boolean")return a}return t.defaultShouldRevalidate}async function Yb(e,t,a,n,l,r,i,u){let c=[t,...a.map(o=>o.route.id)].join("-");try{let o=i.get(c);o||(o=e({path:t,matches:a,patch:(s,d)=>{u.aborted||Bv(s,d,n,l,r)}}),i.set(c,o)),o&&Wb(o)&&await o}finally{i.delete(c)}}function Bv(e,t,a,n,l){if(e){var r;let i=n[e];J(i,"No route found to patch children into: routeId = "+e);let u=ai(t,l,[e,"patch",String(((r=i.children)==null?void 0:r.length)||"0")],n);i.children?i.children.push(...u):i.children=u}else{let i=ai(t,l,["patch",String(a.length||"0")],n);a.push(...i)}}async function P1(e,t,a){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let l=a[e.id];J(l,"No route found in manifest");let r={};for(let i in n){let c=l[i]!==void 0&&i!=="hasErrorBoundary";wn(!c,'Route "'+l.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!c&&!db.has(i)&&(r[i]=n[i])}Object.assign(l,r),Object.assign(l,Ae({},t(l),{lazy:void 0}))}function qb(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function Xb(e,t,a,n,l,r,i,u){let c=n.reduce((d,f)=>d.add(f.route.id),new Set),o=new Set,s=await e({matches:l.map(d=>{let f=c.has(d.route.id);return Ae({},d,{shouldLoad:f,resolve:C=>(o.add(d.route.id),f?Zb(t,a,d,r,i,C,u):Promise.resolve({type:ve.data,result:void 0}))})}),request:a,params:l[0].params,context:u});return l.forEach(d=>J(o.has(d.route.id),'`match.resolve()` was not called for route id "'+d.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),s.filter((d,f)=>c.has(l[f].route.id))}async function Zb(e,t,a,n,l,r,i){let u,c,o=s=>{let d,f=new Promise((S,O)=>d=O);c=()=>d(),t.signal.addEventListener("abort",c);let p=S=>typeof s!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+a.route.id+"]"))):s({request:t,params:a.params,context:i},...S!==void 0?[S]:[]),C;return r?C=r(S=>p(S)):C=(async()=>{try{return{type:"data",result:await p()}}catch(S){return{type:"error",result:S}}})(),Promise.race([C,f])};try{let s=a.route[e];if(a.route.lazy)if(s){let d,[f]=await Promise.all([o(s).catch(p=>{d=p}),P1(a.route,l,n)]);if(d!==void 0)throw d;u=f}else if(await P1(a.route,l,n),s=a.route[e],s)u=await o(s);else if(e==="action"){let d=new URL(t.url),f=d.pathname+d.search;throw lt(405,{method:t.method,pathname:f,routeId:a.route.id})}else return{type:ve.data,result:void 0};else if(s)u=await o(s);else{let d=new URL(t.url),f=d.pathname+d.search;throw lt(404,{pathname:f})}J(u.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+a.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(s){return{type:ve.error,result:s}}finally{c&&t.signal.removeEventListener("abort",c)}return u}async function Qb(e){let{result:t,type:a,status:n}=e;if(Vv(t)){let i;try{let u=t.headers.get("Content-Type");u&&/\bapplication\/json\b/.test(u)?t.body==null?i=null:i=await t.json():i=await t.text()}catch(u){return{type:ve.error,error:u}}return a===ve.error?{type:ve.error,error:new jf(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:ve.data,data:i,statusCode:t.status,headers:t.headers}}if(a===ve.error)return{type:ve.error,error:t,statusCode:dc(t)?t.status:n};if(Ib(t)){var l,r;return{type:ve.deferred,deferredData:t,statusCode:(l=t.init)==null?void 0:l.status,headers:((r=t.init)==null?void 0:r.headers)&&new Headers(t.init.headers)}}return{type:ve.data,data:t,statusCode:n}}function Kb(e,t,a,n,l,r){let i=e.headers.get("Location");if(J(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Vf.test(i)){let u=n.slice(0,n.findIndex(c=>c.route.id===a)+1);i=_s(new URL(t.url),u,l,!0,i,r),e.headers.set("Location",i)}return e}function J1(e,t,a){if(Vf.test(e)){let n=e,l=n.startsWith("//")?new URL(t.protocol+n):new URL(n),r=Yl(l.pathname,a)!=null;if(l.origin===t.origin&&r)return l.pathname+l.search+l.hash}return e}function Kn(e,t,a,n){let l=e.createURL(jv(t)).toString(),r={signal:a};if(n&&Yt(n.formMethod)){let{formMethod:i,formEncType:u}=n;r.method=i.toUpperCase(),u==="application/json"?(r.headers=new Headers({"Content-Type":u}),r.body=JSON.stringify(n.json)):u==="text/plain"?r.body=n.text:u==="application/x-www-form-urlencoded"&&n.formData?r.body=ws(n.formData):r.body=n.formData}return new Request(l,r)}function ws(e){let t=new URLSearchParams;for(let[a,n]of e.entries())t.append(a,typeof n=="string"?n:n.name);return t}function W1(e){let t=new FormData;for(let[a,n]of e.entries())t.append(a,n);return t}function Pb(e,t,a,n,l,r){let i={},u=null,c,o=!1,s={},d=n&&St(n[1])?n[1].error:void 0;return a.forEach((f,p)=>{let C=t[p].route.id;if(J(!yn(f),"Cannot handle redirect results in processLoaderData"),St(f)){let S=f.error;d!==void 0&&(S=d,d=void 0),u=u||{};{let O=jr(e,C);u[O.route.id]==null&&(u[O.route.id]=S)}i[C]=void 0,o||(o=!0,c=dc(f.error)?f.error.status:500),f.headers&&(s[C]=f.headers)}else pn(f)?(l.set(C,f.deferredData),i[C]=f.deferredData.data,f.statusCode!=null&&f.statusCode!==200&&!o&&(c=f.statusCode),f.headers&&(s[C]=f.headers)):(i[C]=f.data,f.statusCode&&f.statusCode!==200&&!o&&(c=f.statusCode),f.headers&&(s[C]=f.headers))}),d!==void 0&&n&&(u={[n[0]]:d},i[n[0]]=void 0),{loaderData:i,errors:u,statusCode:c||200,loaderHeaders:s}}function F1(e,t,a,n,l,r,i,u){let{loaderData:c,errors:o}=Pb(t,a,n,l,u);for(let s=0;sn.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function th(e){let t=e.length===1?e[0]:e.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function lt(e,t){let{pathname:a,routeId:n,method:l,type:r,message:i}=t===void 0?{}:t,u="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(u="Bad Request",r==="route-discovery"?c='Unable to match URL "'+a+'" - the `children()` function for '+("route `"+n+"` threw the following error:\n"+i):l&&a&&n?c="You made a "+l+' request to "'+a+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":r==="defer-action"?c="defer() is not supported in actions":r==="invalid-body"&&(c="Unable to encode submission body")):e===403?(u="Forbidden",c='Route "'+n+'" does not match URL "'+a+'"'):e===404?(u="Not Found",c='No route matches URL "'+a+'"'):e===405&&(u="Method Not Allowed",l&&a&&n?c="You made a "+l.toUpperCase()+' request to "'+a+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":l&&(c='Invalid request method "'+l.toUpperCase()+'"')),new jf(e||500,u,new Error(c),!0)}function ah(e){for(let t=e.length-1;t>=0;t--){let a=e[t];if(yn(a))return{result:a,idx:t}}}function jv(e){let t=typeof e=="string"?Ma(e):e;return On(Ae({},t,{hash:""}))}function Jb(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Wb(e){return typeof e=="object"&&e!=null&&"then"in e}function Fb(e){return Vv(e.result)&&Lb.has(e.result.status)}function pn(e){return e.type===ve.deferred}function St(e){return e.type===ve.error}function yn(e){return(e&&e.type)===ve.redirect}function Ib(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Vv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function e4(e){return Nb.has(e.toLowerCase())}function Yt(e){return zb.has(e.toLowerCase())}async function nh(e,t,a,n,l,r){for(let i=0;id.route.id===c.route.id),s=o!=null&&!Hv(o,c)&&(r&&r[c.route.id])!==void 0;if(pn(u)&&(l||s)){let d=n[i];J(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await kv(u,d,l).then(f=>{f&&(a[i]=f||a[i])})}}}async function kv(e,t,a){if(a===void 0&&(a=!1),!await e.deferredData.resolveData(t)){if(a)try{return{type:ve.data,data:e.deferredData.unwrappedData}}catch(l){return{type:ve.error,error:l}}return{type:ve.data,data:e.deferredData.data}}}function kf(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Rr(e,t){let a=typeof t=="string"?Ma(t).search:t.search;if(e[e.length-1].route.index&&kf(a||""))return e[e.length-1];let n=Nv(e);return n[n.length-1]}function lh(e){let{formMethod:t,formAction:a,formEncType:n,text:l,formData:r,json:i}=e;if(!(!t||!a||!n)){if(l!=null)return{formMethod:t,formAction:a,formEncType:n,formData:void 0,json:void 0,text:l};if(r!=null)return{formMethod:t,formAction:a,formEncType:n,formData:r,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:a,formEncType:n,formData:void 0,json:i,text:void 0}}}function Ro(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function t4(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function ur(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function a4(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ha(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function n4(e,t){try{let a=e.sessionStorage.getItem(Uv);if(a){let n=JSON.parse(a);for(let[l,r]of Object.entries(n||{}))r&&Array.isArray(r)&&t.set(l,new Set(r||[]))}}catch{}}function l4(e,t){if(t.size>0){let a={};for(let[n,l]of t)a[n]=[...l];try{e.sessionStorage.setItem(Uv,JSON.stringify(a))}catch(n){wn(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** + * React Router v6.24.0 * * Copyright (c) Remix Software Inc. * @@ -65,8 +65,8 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Yu(){return Yu=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current=!0}),w.useCallback(function(o,s){if(s===void 0&&(s={}),!u.current)return;if(typeof o=="number"){n.go(o);return}let d=jf(o,JSON.parse(i),r,s.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Ca([t,d.pathname])),(s.replace?n.replace:n.push)(d,s.state,s)},[t,n,i,r,e])}function y9(){let{matches:e}=w.useContext(nn),t=e[e.length-1];return t?t.params:{}}function Xv(e,t){let{relative:a}=t===void 0?{}:t,{future:n}=w.useContext(Bn),{matches:l}=w.useContext(nn),{pathname:r}=mc(),i=JSON.stringify(Bf(l,n.v7_relativeSplatPath));return w.useMemo(()=>jf(e,JSON.parse(i),r,a==="path"),[e,i,r,a])}function o4(e,t,a,n){yi()||J(!1);let{navigator:l}=w.useContext(Bn),{matches:r}=w.useContext(nn),i=r[r.length-1],u=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let o=mc(),s;s=o;let d=s.pathname||"/",f=d;if(c!=="/"){let S=c.replace(/^\//,"").split("/");f="/"+d.replace(/^\//,"").split("/").slice(S.length).join("/")}let p=dn(e,{pathname:f});return m4(p&&p.map(S=>Object.assign({},S,{params:Object.assign({},u,S.params),pathname:Ca([c,l.encodeLocation?l.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?c:Ca([c,l.encodeLocation?l.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),r,a,n)}function s4(){let e=y4(),t=dc(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),a?w.createElement("pre",{style:l},a):null,null)}const f4=w.createElement(s4,null);class d4 extends w.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,a){return a.location!==t.location||a.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:a.error,location:a.location,revalidation:t.revalidation||a.revalidation}}componentDidCatch(t,a){console.error("React Router caught the following error during render",t,a)}render(){return this.state.error!==void 0?w.createElement(nn.Provider,{value:this.props.routeContext},w.createElement(Yv.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function h4(e){let{routeContext:t,match:a,children:n}=e,l=w.useContext(hc);return l&&l.static&&l.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=a.route.id),w.createElement(nn.Provider,{value:t},n)}function m4(e,t,a,n){var l;if(t===void 0&&(t=[]),a===void 0&&(a=null),n===void 0&&(n=null),e==null){var r;if((r=a)!=null&&r.errors)e=a.matches;else return null}let i=e,u=(l=a)==null?void 0:l.errors;if(u!=null){let s=i.findIndex(d=>d.route.id&&(u==null?void 0:u[d.route.id])!==void 0);s>=0||J(!1),i=i.slice(0,Math.min(i.length,s+1))}let c=!1,o=-1;if(a&&n&&n.v7_partialHydration)for(let s=0;s=0?i=i.slice(0,o+1):i=[i[0]];break}}}return i.reduceRight((s,d,f)=>{let p,C=!1,S=null,O=null;a&&(p=u&&d.route.id?u[d.route.id]:void 0,S=d.route.errorElement||f4,c&&(o<0&&f===0?(C=!0,O=null):o===f&&(C=!0,O=d.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,f+1)),h=()=>{let v;return p?v=S:C?v=O:d.route.Component?v=w.createElement(d.route.Component,null):d.route.element?v=d.route.element:v=s,w.createElement(h4,{match:d,routeContext:{outlet:s,matches:m,isDataRoute:a!=null},children:v})};return a&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?w.createElement(d4,{location:a.location,revalidation:a.revalidation,component:S,error:p,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):h()},null)}var Zv=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Zv||{}),$l=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}($l||{});function v4(e){let t=w.useContext(hc);return t||J(!1),t}function Qv(e){let t=w.useContext(Gv);return t||J(!1),t}function p4(e){let t=w.useContext(nn);return t||J(!1),t}function qf(e){let t=p4(),a=t.matches[t.matches.length-1];return a.route.id||J(!1),a.route.id}function g9(){let e=Qv($l.UseLoaderData),t=qf($l.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function y4(){var e;let t=w.useContext(Yv),a=Qv($l.UseRouteError),n=qf($l.UseRouteError);return t!==void 0?t:(e=a.errors)==null?void 0:e[n]}function g4(){let{router:e}=v4(Zv.UseNavigateStable),t=qf($l.UseNavigateStable),a=w.useRef(!1);return qv(()=>{a.current=!0}),w.useCallback(function(l,r){r===void 0&&(r={}),a.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,Yu({fromRouteId:t},r)))},[e,t])}function b4(e){let{basename:t="/",children:a=null,location:n,navigationType:l=$e.Pop,navigator:r,static:i=!1,future:u}=e;yi()&&J(!1);let c=t.replace(/^\/*/,"/"),o=w.useMemo(()=>({basename:c,navigator:r,static:i,future:Yu({v7_relativeSplatPath:!1},u)}),[c,u,r,i]);typeof n=="string"&&(n=Ma(n));let{pathname:s="/",search:d="",hash:f="",state:p=null,key:C="default"}=n,S=w.useMemo(()=>{let O=Yl(s,c);return O==null?null:{location:{pathname:O,search:d,hash:f,state:p,key:C},navigationType:l}},[c,s,d,f,p,C,l]);return S==null?null:w.createElement(Bn.Provider,{value:o},w.createElement(Yf.Provider,{children:a,value:S}))}new Promise(()=>{});function S4(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:w.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:w.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:w.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** - * React Router DOM v6.24.1 + */function Yu(){return Yu=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current=!0}),T.useCallback(function(o,s){if(s===void 0&&(s={}),!u.current)return;if(typeof o=="number"){n.go(o);return}let d=Bf(o,JSON.parse(i),r,s.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Ca([t,d.pathname])),(s.replace?n.replace:n.push)(d,s.state,s)},[t,n,i,r,e])}function p9(){let{matches:e}=T.useContext(nn),t=e[e.length-1];return t?t.params:{}}function Xv(e,t){let{relative:a}=t===void 0?{}:t,{future:n}=T.useContext(Bn),{matches:l}=T.useContext(nn),{pathname:r}=mc(),i=JSON.stringify(Hf(l,n.v7_relativeSplatPath));return T.useMemo(()=>Bf(e,JSON.parse(i),r,a==="path"),[e,i,r,a])}function c4(e,t,a,n){yi()||J(!1);let{navigator:l}=T.useContext(Bn),{matches:r}=T.useContext(nn),i=r[r.length-1],u=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let o=mc(),s;s=o;let d=s.pathname||"/",f=d;if(c!=="/"){let S=c.replace(/^\//,"").split("/");f="/"+d.replace(/^\//,"").split("/").slice(S.length).join("/")}let p=dn(e,{pathname:f});return h4(p&&p.map(S=>Object.assign({},S,{params:Object.assign({},u,S.params),pathname:Ca([c,l.encodeLocation?l.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?c:Ca([c,l.encodeLocation?l.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),r,a,n)}function o4(){let e=p4(),t=dc(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},t),a?T.createElement("pre",{style:l},a):null,null)}const s4=T.createElement(o4,null);class f4 extends T.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,a){return a.location!==t.location||a.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:a.error,location:a.location,revalidation:t.revalidation||a.revalidation}}componentDidCatch(t,a){console.error("React Router caught the following error during render",t,a)}render(){return this.state.error!==void 0?T.createElement(nn.Provider,{value:this.props.routeContext},T.createElement(Yv.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function d4(e){let{routeContext:t,match:a,children:n}=e,l=T.useContext(hc);return l&&l.static&&l.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=a.route.id),T.createElement(nn.Provider,{value:t},n)}function h4(e,t,a,n){var l;if(t===void 0&&(t=[]),a===void 0&&(a=null),n===void 0&&(n=null),e==null){var r;if((r=a)!=null&&r.errors)e=a.matches;else return null}let i=e,u=(l=a)==null?void 0:l.errors;if(u!=null){let s=i.findIndex(d=>d.route.id&&(u==null?void 0:u[d.route.id])!==void 0);s>=0||J(!1),i=i.slice(0,Math.min(i.length,s+1))}let c=!1,o=-1;if(a&&n&&n.v7_partialHydration)for(let s=0;s=0?i=i.slice(0,o+1):i=[i[0]];break}}}return i.reduceRight((s,d,f)=>{let p,C=!1,S=null,O=null;a&&(p=u&&d.route.id?u[d.route.id]:void 0,S=d.route.errorElement||s4,c&&(o<0&&f===0?(C=!0,O=null):o===f&&(C=!0,O=d.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,f+1)),h=()=>{let v;return p?v=S:C?v=O:d.route.Component?v=T.createElement(d.route.Component,null):d.route.element?v=d.route.element:v=s,T.createElement(d4,{match:d,routeContext:{outlet:s,matches:m,isDataRoute:a!=null},children:v})};return a&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?T.createElement(f4,{location:a.location,revalidation:a.revalidation,component:S,error:p,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):h()},null)}var Zv=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Zv||{}),$l=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}($l||{});function m4(e){let t=T.useContext(hc);return t||J(!1),t}function Qv(e){let t=T.useContext(Gv);return t||J(!1),t}function v4(e){let t=T.useContext(nn);return t||J(!1),t}function Yf(e){let t=v4(),a=t.matches[t.matches.length-1];return a.route.id||J(!1),a.route.id}function y9(){let e=Qv($l.UseLoaderData),t=Yf($l.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function p4(){var e;let t=T.useContext(Yv),a=Qv($l.UseRouteError),n=Yf($l.UseRouteError);return t!==void 0?t:(e=a.errors)==null?void 0:e[n]}function y4(){let{router:e}=m4(Zv.UseNavigateStable),t=Yf($l.UseNavigateStable),a=T.useRef(!1);return qv(()=>{a.current=!0}),T.useCallback(function(l,r){r===void 0&&(r={}),a.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,Yu({fromRouteId:t},r)))},[e,t])}function g4(e){let{basename:t="/",children:a=null,location:n,navigationType:l=$e.Pop,navigator:r,static:i=!1,future:u}=e;yi()&&J(!1);let c=t.replace(/^\/*/,"/"),o=T.useMemo(()=>({basename:c,navigator:r,static:i,future:Yu({v7_relativeSplatPath:!1},u)}),[c,u,r,i]);typeof n=="string"&&(n=Ma(n));let{pathname:s="/",search:d="",hash:f="",state:p=null,key:C="default"}=n,S=T.useMemo(()=>{let O=Yl(s,c);return O==null?null:{location:{pathname:O,search:d,hash:f,state:p,key:C},navigationType:l}},[c,s,d,f,p,C,l]);return S==null?null:T.createElement(Bn.Provider,{value:o},T.createElement(Gf.Provider,{children:a,value:S}))}new Promise(()=>{});function b4(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:T.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:T.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:T.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + * React Router DOM v6.24.0 * * Copyright (c) Remix Software Inc. * @@ -74,16 +74,16 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function ni(){return ni=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(a[l]=e[l]);return a}function R4(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function C4(e,t){return e.button===0&&(!t||t==="_self")&&!R4(e)}const A4=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],T4="6";try{window.__reactRouterVersion=T4}catch{}function w4(e,t){return Vb({basename:void 0,future:ni({},void 0,{v7_prependBasename:!0}),history:sb({window:void 0}),hydrationData:_4(),routes:e,mapRouteProperties:S4,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function _4(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=ni({},t,{errors:O4(t.errors)})),t}function O4(e){if(!e)return null;let t=Object.entries(e),a={};for(let[n,l]of t)if(l&&l.__type==="RouteErrorResponse")a[n]=new Vf(l.status,l.statusText,l.data,l.internal===!0);else if(l&&l.__type==="Error"){if(l.__subType){let r=window[l.__subType];if(typeof r=="function")try{let i=new r(l.message);i.stack="",a[n]=i}catch{}}if(a[n]==null){let r=new Error(l.message);r.stack="",a[n]=r}}else a[n]=l;return a}const M4=w.createContext({isTransitioning:!1}),x4=w.createContext(new Map),D4="startTransition",rh=Uo[D4],z4="flushSync",ih=$y[z4];function $4(e){rh?rh(e):e()}function cr(e){ih?ih(e):e()}class N4{constructor(){this.status="pending",this.promise=new Promise((t,a)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",a(n))}})}}function L4(e){let{fallbackElement:t,router:a,future:n}=e,[l,r]=w.useState(a.state),[i,u]=w.useState(),[c,o]=w.useState({isTransitioning:!1}),[s,d]=w.useState(),[f,p]=w.useState(),[C,S]=w.useState(),O=w.useRef(new Map),{v7_startTransition:m}=n||{},h=w.useCallback(A=>{m?$4(A):A()},[m]),v=w.useCallback((A,z)=>{let{deletedFetchers:U,unstable_flushSync:j,unstable_viewTransitionOpts:q}=z;U.forEach(we=>O.current.delete(we)),A.fetchers.forEach((we,Ee)=>{we.data!==void 0&&O.current.set(Ee,we.data)});let Me=a.window==null||a.window.document==null||typeof a.window.document.startViewTransition!="function";if(!q||Me){j?cr(()=>r(A)):h(()=>r(A));return}if(j){cr(()=>{f&&(s&&s.resolve(),f.skipTransition()),o({isTransitioning:!0,flushSync:!0,currentLocation:q.currentLocation,nextLocation:q.nextLocation})});let we=a.window.document.startViewTransition(()=>{cr(()=>r(A))});we.finished.finally(()=>{cr(()=>{d(void 0),p(void 0),u(void 0),o({isTransitioning:!1})})}),cr(()=>p(we));return}f?(s&&s.resolve(),f.skipTransition(),S({state:A,currentLocation:q.currentLocation,nextLocation:q.nextLocation})):(u(A),o({isTransitioning:!0,flushSync:!1,currentLocation:q.currentLocation,nextLocation:q.nextLocation}))},[a.window,f,s,O,h]);w.useLayoutEffect(()=>a.subscribe(v),[a,v]),w.useEffect(()=>{c.isTransitioning&&!c.flushSync&&d(new N4)},[c]),w.useEffect(()=>{if(s&&i&&a.window){let A=i,z=s.promise,U=a.window.document.startViewTransition(async()=>{h(()=>r(A)),await z});U.finished.finally(()=>{d(void 0),p(void 0),u(void 0),o({isTransitioning:!1})}),p(U)}},[h,i,s,a.window]),w.useEffect(()=>{s&&i&&l.location.key===i.location.key&&s.resolve()},[s,f,l.location,i]),w.useEffect(()=>{!c.isTransitioning&&C&&(u(C.state),o({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),S(void 0))},[c.isTransitioning,C]),w.useEffect(()=>{},[]);let R=w.useMemo(()=>({createHref:a.createHref,encodeLocation:a.encodeLocation,go:A=>a.navigate(A),push:(A,z,U)=>a.navigate(A,{state:z,preventScrollReset:U==null?void 0:U.preventScrollReset}),replace:(A,z,U)=>a.navigate(A,{replace:!0,state:z,preventScrollReset:U==null?void 0:U.preventScrollReset})}),[a]),x=a.basename||"/",g=w.useMemo(()=>({router:a,navigator:R,static:!1,basename:x}),[a,R,x]);return w.createElement(w.Fragment,null,w.createElement(hc.Provider,{value:g},w.createElement(Gv.Provider,{value:l},w.createElement(x4.Provider,{value:O.current},w.createElement(M4.Provider,{value:c},w.createElement(b4,{basename:x,location:l.location,navigationType:l.historyAction,navigator:R,future:{v7_relativeSplatPath:a.future.v7_relativeSplatPath}},l.initialized||a.future.v7_partialHydration?w.createElement(U4,{routes:a.routes,future:a.future,state:l}):t))))),null)}function U4(e){let{routes:t,future:a,state:n}=e;return o4(t,void 0,n,a)}const H4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",B4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,b9=w.forwardRef(function(t,a){let{onClick:n,relative:l,reloadDocument:r,replace:i,state:u,target:c,to:o,preventScrollReset:s,unstable_viewTransition:d}=t,f=E4(t,A4),{basename:p}=w.useContext(Bn),C,S=!1;if(typeof o=="string"&&B4.test(o)&&(C=o,H4))try{let v=new URL(window.location.href),R=o.startsWith("//")?new URL(v.protocol+o):new URL(o),x=Yl(R.pathname,p);R.origin===v.origin&&x!=null?o=x+R.search+R.hash:S=!0}catch{}let O=i4(o,{relative:l}),m=j4(o,{replace:i,state:u,target:c,preventScrollReset:s,relative:l,unstable_viewTransition:d});function h(v){n&&n(v),v.defaultPrevented||m(v)}return w.createElement("a",ni({},f,{href:C||O,onClick:S||r?n:h,ref:a,target:c}))});var uh;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(uh||(uh={}));var ch;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ch||(ch={}));function j4(e,t){let{target:a,replace:n,state:l,preventScrollReset:r,relative:i,unstable_viewTransition:u}=t===void 0?{}:t,c=u4(),o=mc(),s=Xv(e,{relative:i});return w.useCallback(d=>{if(C4(d,a)){d.preventDefault();let f=n!==void 0?n:On(o)===On(s);c(e,{replace:f,state:l,preventScrollReset:r,relative:i,unstable_viewTransition:u})}},[o,c,s,n,l,a,e,r,i,u])}function V4(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ke(ql,--mt):0,Nl--,Le===10&&(Nl=1,pc--),Le}function Ct(){return Le=mt2||ri(Le)>3?"":" "}function I4(e,t){for(;--t&&Ct()&&!(Le<48||Le>102||Le>57&&Le<65||Le>70&&Le<97););return gi(e,su()+(t<6&&na()==32&&Ct()==32))}function xs(e){for(;Ct();)switch(Le){case e:return mt;case 34:case 39:e!==34&&e!==39&&xs(Le);break;case 40:e===41&&xs(e);break;case 92:Ct();break}return mt}function e3(e,t){for(;Ct()&&e+Le!==57;)if(e+Le===84&&na()===47)break;return"/*"+gi(t,mt-1)+"*"+vc(e===47?e:Ct())}function t3(e){for(;!ri(na());)Ct();return gi(e,mt)}function a3(e){return Iv(du("",null,null,null,[""],e=Fv(e),0,[0],e))}function du(e,t,a,n,l,r,i,u,c){for(var o=0,s=0,d=i,f=0,p=0,C=0,S=1,O=1,m=1,h=0,v="",R=l,x=r,g=n,A=v;O;)switch(C=h,h=Ct()){case 40:if(C!=108&&Ke(A,d-1)==58){Ms(A+=te(fu(h),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:A+=fu(h);break;case 9:case 10:case 13:case 32:A+=F4(C);break;case 92:A+=I4(su()-1,7);continue;case 47:switch(na()){case 42:case 47:qi(n3(e3(Ct(),su()),t,a),c);break;default:A+="/"}break;case 123*S:u[o++]=Jt(A)*m;case 125*S:case 59:case 0:switch(h){case 0:case 125:O=0;case 59+s:m==-1&&(A=te(A,/\f/g,"")),p>0&&Jt(A)-d&&qi(p>32?sh(A+";",n,a,d-1):sh(te(A," ","")+";",n,a,d-2),c);break;case 59:A+=";";default:if(qi(g=oh(A,t,a,o,s,l,u,v,R=[],x=[],d),r),h===123)if(s===0)du(A,t,g,g,R,r,d,u,x);else switch(f===99&&Ke(A,3)===110?100:f){case 100:case 108:case 109:case 115:du(e,g,g,n&&qi(oh(e,g,g,0,0,l,u,v,l,R=[],d),x),l,x,d,u,n?R:x);break;default:du(A,g,g,g,[""],x,0,u,x)}}o=s=p=0,S=m=1,v=A="",d=i;break;case 58:d=1+Jt(A),p=C;default:if(S<1){if(h==123)--S;else if(h==125&&S++==0&&W4()==125)continue}switch(A+=vc(h),h*S){case 38:m=s>0?1:(A+="\f",-1);break;case 44:u[o++]=(Jt(A)-1)*m,m=1;break;case 64:na()===45&&(A+=fu(Ct())),f=na(),s=d=Jt(v=A+=t3(su())),h++;break;case 45:C===45&&Jt(A)==2&&(S=0)}}return r}function oh(e,t,a,n,l,r,i,u,c,o,s){for(var d=l-1,f=l===0?r:[""],p=Qf(f),C=0,S=0,O=0;C0?f[m]+" "+h:te(h,/&\f/g,f[m])))&&(c[O++]=v);return yc(e,t,a,l===0?Xf:u,c,o,s)}function n3(e,t,a){return yc(e,t,a,Kv,vc(J4()),li(e,2,-2),0)}function sh(e,t,a,n){return yc(e,t,a,Zf,li(e,0,n),li(e,n+1,-1),n)}function Cl(e,t){for(var a="",n=Qf(e),l=0;l6)switch(Ke(e,t+1)){case 109:if(Ke(e,t+4)!==45)break;case 102:return te(e,/(.+:)(.+)-([^]+)/,"$1"+ee+"$2-$3$1"+qu+(Ke(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ms(e,"stretch")?tp(te(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ke(e,t+1)!==115)break;case 6444:switch(Ke(e,Jt(e)-3-(~Ms(e,"!important")&&10))){case 107:return te(e,":",":"+ee)+e;case 101:return te(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ee+(Ke(e,14)===45?"inline-":"")+"box$3$1"+ee+"$2$3$1"+et+"$2box$3")+e}break;case 5936:switch(Ke(e,t+11)){case 114:return ee+e+et+te(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ee+e+et+te(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ee+e+et+te(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ee+e+et+e+e}return e}var d3=function(t,a,n,l){if(t.length>-1&&!t.return)switch(t.type){case Zf:t.return=tp(t.value,t.length);break;case Pv:return Cl([or(t,{value:te(t.value,"@","@"+ee)})],l);case Xf:if(t.length)return P4(t.props,function(r){switch(K4(r,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Cl([or(t,{props:[te(r,/:(read-\w+)/,":"+qu+"$1")]})],l);case"::placeholder":return Cl([or(t,{props:[te(r,/:(plac\w+)/,":"+ee+"input-$1")]}),or(t,{props:[te(r,/:(plac\w+)/,":"+qu+"$1")]}),or(t,{props:[te(r,/:(plac\w+)/,et+"input-$1")]})],l)}return""})}},h3=[d3],m3=function(t){var a=t.key;if(a==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(S){var O=S.getAttribute("data-emotion");O.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""))})}var l=t.stylisPlugins||h3,r={},i,u=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+a+' "]'),function(S){for(var O=S.getAttribute("data-emotion").split(" "),m=1;m=0)&&(a[l]=e[l]);return a}function E4(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function R4(e,t){return e.button===0&&(!t||t==="_self")&&!E4(e)}const C4=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],A4="6";try{window.__reactRouterVersion=A4}catch{}function T4(e,t){return jb({basename:void 0,future:ni({},void 0,{v7_prependBasename:!0}),history:ob({window:void 0}),hydrationData:_4(),routes:e,mapRouteProperties:b4,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function _4(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=ni({},t,{errors:w4(t.errors)})),t}function w4(e){if(!e)return null;let t=Object.entries(e),a={};for(let[n,l]of t)if(l&&l.__type==="RouteErrorResponse")a[n]=new jf(l.status,l.statusText,l.data,l.internal===!0);else if(l&&l.__type==="Error"){if(l.__subType){let r=window[l.__subType];if(typeof r=="function")try{let i=new r(l.message);i.stack="",a[n]=i}catch{}}if(a[n]==null){let r=new Error(l.message);r.stack="",a[n]=r}}else a[n]=l;return a}const O4=T.createContext({isTransitioning:!1}),M4=T.createContext(new Map),x4="startTransition",rh=Lo[x4],D4="flushSync",ih=zy[D4];function z4(e){rh?rh(e):e()}function cr(e){ih?ih(e):e()}class $4{constructor(){this.status="pending",this.promise=new Promise((t,a)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",a(n))}})}}function N4(e){let{fallbackElement:t,router:a,future:n}=e,[l,r]=T.useState(a.state),[i,u]=T.useState(),[c,o]=T.useState({isTransitioning:!1}),[s,d]=T.useState(),[f,p]=T.useState(),[C,S]=T.useState(),O=T.useRef(new Map),{v7_startTransition:m}=n||{},h=T.useCallback(A=>{m?z4(A):A()},[m]),v=T.useCallback((A,z)=>{let{deletedFetchers:U,unstable_flushSync:V,unstable_viewTransitionOpts:Y}=z;U.forEach(_e=>O.current.delete(_e)),A.fetchers.forEach((_e,Ee)=>{_e.data!==void 0&&O.current.set(Ee,_e.data)});let Me=a.window==null||a.window.document==null||typeof a.window.document.startViewTransition!="function";if(!Y||Me){V?cr(()=>r(A)):h(()=>r(A));return}if(V){cr(()=>{f&&(s&&s.resolve(),f.skipTransition()),o({isTransitioning:!0,flushSync:!0,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation})});let _e=a.window.document.startViewTransition(()=>{cr(()=>r(A))});_e.finished.finally(()=>{cr(()=>{d(void 0),p(void 0),u(void 0),o({isTransitioning:!1})})}),cr(()=>p(_e));return}f?(s&&s.resolve(),f.skipTransition(),S({state:A,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation})):(u(A),o({isTransitioning:!0,flushSync:!1,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation}))},[a.window,f,s,O,h]);T.useLayoutEffect(()=>a.subscribe(v),[a,v]),T.useEffect(()=>{c.isTransitioning&&!c.flushSync&&d(new $4)},[c]),T.useEffect(()=>{if(s&&i&&a.window){let A=i,z=s.promise,U=a.window.document.startViewTransition(async()=>{h(()=>r(A)),await z});U.finished.finally(()=>{d(void 0),p(void 0),u(void 0),o({isTransitioning:!1})}),p(U)}},[h,i,s,a.window]),T.useEffect(()=>{s&&i&&l.location.key===i.location.key&&s.resolve()},[s,f,l.location,i]),T.useEffect(()=>{!c.isTransitioning&&C&&(u(C.state),o({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),S(void 0))},[c.isTransitioning,C]),T.useEffect(()=>{},[]);let R=T.useMemo(()=>({createHref:a.createHref,encodeLocation:a.encodeLocation,go:A=>a.navigate(A),push:(A,z,U)=>a.navigate(A,{state:z,preventScrollReset:U==null?void 0:U.preventScrollReset}),replace:(A,z,U)=>a.navigate(A,{replace:!0,state:z,preventScrollReset:U==null?void 0:U.preventScrollReset})}),[a]),x=a.basename||"/",g=T.useMemo(()=>({router:a,navigator:R,static:!1,basename:x}),[a,R,x]);return T.createElement(T.Fragment,null,T.createElement(hc.Provider,{value:g},T.createElement(Gv.Provider,{value:l},T.createElement(M4.Provider,{value:O.current},T.createElement(O4.Provider,{value:c},T.createElement(g4,{basename:x,location:l.location,navigationType:l.historyAction,navigator:R,future:{v7_relativeSplatPath:a.future.v7_relativeSplatPath}},l.initialized||a.future.v7_partialHydration?T.createElement(L4,{routes:a.routes,future:a.future,state:l}):t))))),null)}function L4(e){let{routes:t,future:a,state:n}=e;return c4(t,void 0,n,a)}const U4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",H4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,g9=T.forwardRef(function(t,a){let{onClick:n,relative:l,reloadDocument:r,replace:i,state:u,target:c,to:o,preventScrollReset:s,unstable_viewTransition:d}=t,f=S4(t,C4),{basename:p}=T.useContext(Bn),C,S=!1;if(typeof o=="string"&&H4.test(o)&&(C=o,U4))try{let v=new URL(window.location.href),R=o.startsWith("//")?new URL(v.protocol+o):new URL(o),x=Yl(R.pathname,p);R.origin===v.origin&&x!=null?o=x+R.search+R.hash:S=!0}catch{}let O=r4(o,{relative:l}),m=B4(o,{replace:i,state:u,target:c,preventScrollReset:s,relative:l,unstable_viewTransition:d});function h(v){n&&n(v),v.defaultPrevented||m(v)}return T.createElement("a",ni({},f,{href:C||O,onClick:S||r?n:h,ref:a,target:c}))});var uh;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(uh||(uh={}));var ch;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ch||(ch={}));function B4(e,t){let{target:a,replace:n,state:l,preventScrollReset:r,relative:i,unstable_viewTransition:u}=t===void 0?{}:t,c=i4(),o=mc(),s=Xv(e,{relative:i});return T.useCallback(d=>{if(R4(d,a)){d.preventDefault();let f=n!==void 0?n:On(o)===On(s);c(e,{replace:f,state:l,preventScrollReset:r,relative:i,unstable_viewTransition:u})}},[o,c,s,n,l,a,e,r,i,u])}function j4(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ke(ql,--mt):0,Nl--,Le===10&&(Nl=1,pc--),Le}function Ct(){return Le=mt2||ri(Le)>3?"":" "}function F4(e,t){for(;--t&&Ct()&&!(Le<48||Le>102||Le>57&&Le<65||Le>70&&Le<97););return gi(e,su()+(t<6&&na()==32&&Ct()==32))}function Ms(e){for(;Ct();)switch(Le){case e:return mt;case 34:case 39:e!==34&&e!==39&&Ms(Le);break;case 40:e===41&&Ms(e);break;case 92:Ct();break}return mt}function I4(e,t){for(;Ct()&&e+Le!==57;)if(e+Le===84&&na()===47)break;return"/*"+gi(t,mt-1)+"*"+vc(e===47?e:Ct())}function e3(e){for(;!ri(na());)Ct();return gi(e,mt)}function t3(e){return Iv(du("",null,null,null,[""],e=Fv(e),0,[0],e))}function du(e,t,a,n,l,r,i,u,c){for(var o=0,s=0,d=i,f=0,p=0,C=0,S=1,O=1,m=1,h=0,v="",R=l,x=r,g=n,A=v;O;)switch(C=h,h=Ct()){case 40:if(C!=108&&Ke(A,d-1)==58){Os(A+=te(fu(h),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:A+=fu(h);break;case 9:case 10:case 13:case 32:A+=W4(C);break;case 92:A+=F4(su()-1,7);continue;case 47:switch(na()){case 42:case 47:qi(a3(I4(Ct(),su()),t,a),c);break;default:A+="/"}break;case 123*S:u[o++]=Jt(A)*m;case 125*S:case 59:case 0:switch(h){case 0:case 125:O=0;case 59+s:m==-1&&(A=te(A,/\f/g,"")),p>0&&Jt(A)-d&&qi(p>32?sh(A+";",n,a,d-1):sh(te(A," ","")+";",n,a,d-2),c);break;case 59:A+=";";default:if(qi(g=oh(A,t,a,o,s,l,u,v,R=[],x=[],d),r),h===123)if(s===0)du(A,t,g,g,R,r,d,u,x);else switch(f===99&&Ke(A,3)===110?100:f){case 100:case 108:case 109:case 115:du(e,g,g,n&&qi(oh(e,g,g,0,0,l,u,v,l,R=[],d),x),l,x,d,u,n?R:x);break;default:du(A,g,g,g,[""],x,0,u,x)}}o=s=p=0,S=m=1,v=A="",d=i;break;case 58:d=1+Jt(A),p=C;default:if(S<1){if(h==123)--S;else if(h==125&&S++==0&&J4()==125)continue}switch(A+=vc(h),h*S){case 38:m=s>0?1:(A+="\f",-1);break;case 44:u[o++]=(Jt(A)-1)*m,m=1;break;case 64:na()===45&&(A+=fu(Ct())),f=na(),s=d=Jt(v=A+=e3(su())),h++;break;case 45:C===45&&Jt(A)==2&&(S=0)}}return r}function oh(e,t,a,n,l,r,i,u,c,o,s){for(var d=l-1,f=l===0?r:[""],p=Zf(f),C=0,S=0,O=0;C0?f[m]+" "+h:te(h,/&\f/g,f[m])))&&(c[O++]=v);return yc(e,t,a,l===0?qf:u,c,o,s)}function a3(e,t,a){return yc(e,t,a,Kv,vc(P4()),li(e,2,-2),0)}function sh(e,t,a,n){return yc(e,t,a,Xf,li(e,0,n),li(e,n+1,-1),n)}function Cl(e,t){for(var a="",n=Zf(e),l=0;l6)switch(Ke(e,t+1)){case 109:if(Ke(e,t+4)!==45)break;case 102:return te(e,/(.+:)(.+)-([^]+)/,"$1"+ee+"$2-$3$1"+qu+(Ke(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Os(e,"stretch")?tp(te(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ke(e,t+1)!==115)break;case 6444:switch(Ke(e,Jt(e)-3-(~Os(e,"!important")&&10))){case 107:return te(e,":",":"+ee)+e;case 101:return te(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ee+(Ke(e,14)===45?"inline-":"")+"box$3$1"+ee+"$2$3$1"+et+"$2box$3")+e}break;case 5936:switch(Ke(e,t+11)){case 114:return ee+e+et+te(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ee+e+et+te(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ee+e+et+te(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ee+e+et+e+e}return e}var f3=function(t,a,n,l){if(t.length>-1&&!t.return)switch(t.type){case Xf:t.return=tp(t.value,t.length);break;case Pv:return Cl([or(t,{value:te(t.value,"@","@"+ee)})],l);case qf:if(t.length)return K4(t.props,function(r){switch(Q4(r,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Cl([or(t,{props:[te(r,/:(read-\w+)/,":"+qu+"$1")]})],l);case"::placeholder":return Cl([or(t,{props:[te(r,/:(plac\w+)/,":"+ee+"input-$1")]}),or(t,{props:[te(r,/:(plac\w+)/,":"+qu+"$1")]}),or(t,{props:[te(r,/:(plac\w+)/,et+"input-$1")]})],l)}return""})}},d3=[f3],h3=function(t){var a=t.key;if(a==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(S){var O=S.getAttribute("data-emotion");O.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""))})}var l=t.stylisPlugins||d3,r={},i,u=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+a+' "]'),function(S){for(var O=S.getAttribute("data-emotion").split(" "),m=1;m=4;++n,l-=4)a=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,a=(a&65535)*1540483477+((a>>>16)*59797<<16),a^=a>>>24,t=(a&65535)*1540483477+((a>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(l){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var z3={animationIterationCount:1,aspectRatio: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},$3=/[A-Z]|^ms/g,N3=/_EMO_([^_]+?)_([^]*?)_EMO_/g,cp=function(t){return t.charCodeAt(1)===45},ph=function(t){return t!=null&&typeof t!="boolean"},Ao=ep(function(e){return cp(e)?e:e.replace($3,"-$&").toLowerCase()}),yh=function(t,a){switch(t){case"animation":case"animationName":if(typeof a=="string")return a.replace(N3,function(n,l,r){return Wt={name:l,styles:r,next:Wt},l})}return z3[t]!==1&&!cp(t)&&typeof a=="number"&&a!==0?a+"px":a};function ii(e,t,a){if(a==null)return"";if(a.__emotion_styles!==void 0)return a;switch(typeof a){case"boolean":return"";case"object":{if(a.anim===1)return Wt={name:a.name,styles:a.styles,next:Wt},a.name;if(a.styles!==void 0){var n=a.next;if(n!==void 0)for(;n!==void 0;)Wt={name:n.name,styles:n.styles,next:Wt},n=n.next;var l=a.styles+";";return l}return L3(e,t,a)}case"function":{if(e!==void 0){var r=Wt,i=a(e);return Wt=r,ii(e,t,i)}break}}return a}function L3(e,t,a){var n="";if(Array.isArray(a))for(var l=0;la=>{if(typeof e=="function"){const n=a.displayName||a.name,l=e(a,...t);return l.displayName=n,l}else return a}}function vp(e,t,a,n,...l){}const Mn=(e,t,...a)=>vp("error",!0,e,t,...a),Xu=(e,t,...a)=>vp("warn",!0,e,t,...a);var F3=function e(t,a){if(t===a)return!0;if(t&&a&&typeof t=="object"&&typeof a=="object"){if(t.constructor!==a.constructor)return!1;var n,l,r;if(Array.isArray(t)){if(n=t.length,n!=a.length)return!1;for(l=n;l--!==0;)if(!e(t[l],a[l]))return!1;return!0}if(t.constructor===RegExp)return t.source===a.source&&t.flags===a.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===a.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===a.toString();if(r=Object.keys(t),n=r.length,n!==Object.keys(a).length)return!1;for(l=n;l--!==0;)if(!Object.prototype.hasOwnProperty.call(a,r[l]))return!1;for(l=n;l--!==0;){var i=r[l];if(!e(t[i],a[i]))return!1}return!0}return t!==t&&a!==a};const I3=Ll(F3),e5=(e,t)=>(t.has(e)?t.set(e,t.get(e)+1):t.set(e,0),`${e}_${t.get(e)}`),t5=Object.prototype.hasOwnProperty;function pp(e){if(typeof e!="object")return!0;for(const t in e)if(t5.call(e,t))return!1;return!0}function yp(...e){let t={};return e.forEach(a=>{t=gp(t,a)}),t}function gp(e,t){if(To(t)){const a=[...Object.keys(t),...Object.getOwnPropertySymbols(t)],n={...e};return a.forEach(l=>{To(e[l])&&To(t[l])?n[l]=gp(e[l],t[l]):wo(t[l])&&wo(e[l])?n[l]=[...new Set([...e[l],...t[l]])]:wo(e[l])?n[l]=[...new Set([...e[l],t[l]])]:n[l]=t[l]}),n}else return{...e}}function To(e){return e&&(typeof e=="object"||typeof e=="function")&&!Array.isArray(e)}function wo(e){return Array.isArray(e)}function a5(e){if(Array.isArray(e))return e}function n5(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var n,l,r,i,u=[],c=!0,o=!1;try{if(r=(a=a.call(e)).next,t===0){if(Object(a)!==a)return;c=!1}else for(;!(c=(n=r.call(a)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(s){o=!0,l=s}finally{try{if(!c&&a.return!=null&&(i=a.return(),Object(i)!==i))return}finally{if(o)throw l}}return u}}function Sh(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,n=Array(t);a!!e&&e.ref!==void 0,c5=e=>!!e&&e.current!==void 0;function bi(e){const t=typeof e=="function"?e():e;if(t&&t===document)return document.documentElement;if(t instanceof Element||t===window||t&&typeof t.nodeType<"u")return t;if(t){const a=t;if(u5(a)){const n=c5(a.ref)?a.ref.current:a.ref;return n instanceof HTMLElement?n:bi(n)}else return a.constructor.componentId?a.constructor.componentId:a.constructor.name,Jh.findDOMNode(t)}}const Mc=!!(typeof window<"u"&&window.document&&window.document.createElement);function o5(e){const t=e&&bi(e);let a;t&&"ownerDocument"in t&&(a=t.ownerDocument);const n=Mc?window.document:void 0;return a||n}function s5(e){const t=e&&bi(e),a=o5(t);return a&&a.defaultView}function f5(e,t){let a={};if(Mc){const n=e&&bi(e);if(n){const l=s5(e);a=l?l.getComputedStyle(n,t):{}}}return a}function bp(e){return e.replace(/-([a-z])/g,t=>t[1].toUpperCase())}const d5=["borders","breakpoints","colors","forms","media","shadows","spacing","stacking","transitions","typography"],Sp=e=>{if(Array.isArray(e)||typeof e=="function")throw new Error;try{return"key"in e&&d5.every(t=>t in e)}catch{throw new Error}};function Ep(e,t,a){var n,l;return t.as&&t.as!==((n=e.defaultProps)===null||n===void 0?void 0:n.as)?t.as:typeof a=="function"?a():t.href?"a":t.to?(Xu(!t.as,`[${e.displayName}] \`as\` prop should be provided when using \`to\``),"a"):typeof t.onClick=="function"?"button":((l=e.defaultProps)===null||l===void 0?void 0:l.as)||"span"}function Rp(e,t,a){const n=Array.isArray(t)?t:Object.keys(t||{}),l=a?n.concat(a):n;return m5(e,l)}const h5=Object.prototype.hasOwnProperty,m5=(e,t)=>{const a={};for(const n in e)n==="theme"||n==="children"||n==="className"||n==="style"||n==="styles"||n==="makeStyles"||n==="themeOverride"||n==="deterministicId"||t.includes(n)||!h5.call(e,n)||(a[n]=e[n]);return a};var v5=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,p5=ep(function(e){return v5.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function y5(e){const t={};return Object.keys(e).filter(a=>p5(a)&&a!=="style"&&a!=="className"&&a!=="children"&&a!=="styles"&&a!=="makeStyles"&&a!=="deterministicId").forEach(a=>{t[a]=e[a]}),t}function Cp(e,t,a){const n=Array.isArray(t)?t:Object.keys(t||{}),l=a?n.concat(a):n;return g5(e,l)}function g5(e,t){const a={},n=t.length;let l=-1,r;for(;++lbe.createElement(Tp.Provider,{value:t},e),E5=Oc(e=>{const t=w.forwardRef((a,n)=>{const l=e.componentId||e.displayName||e.name,r=w.useContext(Tp),i=(u=l)=>e5(u,r);return a.deterministicId&&Xu(!1,`Manually passing the "deterministicId" property is not allowed on the ${l} component. -`,a.deterministicId),be.createElement(e,Object.assign({ref:n,deterministicId:i},a))});return If(t,e),t.propTypes=e.propTypes,t.defaultProps=e.defaultProps,t.allowedProps=e.allowedProps,t.originalType=e.originalType||e,t});function R5(e,t){if(e==null)return{};var a={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;a[n]=e[n]}return a}function xn(e,t){if(e==null)return{};var a,n,l=R5(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||{}.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}let sr,Xi,_o;const C5=()=>{if(sr)return sr;if(Mc){const e=document.documentElement;return Xi=e.getAttribute("dir"),sr=Xi||f5(e).direction,_o||(_o=new MutationObserver(()=>{const t=e.getAttribute("dir");t&&t!==Xi&&(Xi=sr=t)}),_o.observe(e,{attributes:!0})),sr}};function A5(e){if(Mc)return C5()}const $s=w.createContext(A5()||"ltr"),xc={ltr:"ltr",rtl:"rtl"},T5=["forwardedRef"],ad=Oc(e=>{class t extends be.Component{render(){const l=this.props,r=l.forwardedRef,i=xn(l,T5);return be.createElement($s.Consumer,null,u=>be.createElement(e,Object.assign({ref:r,dir:u},i)))}}t.displayName="TextDirectionContextConsumerComponent";const a=w.forwardRef((n,l)=>be.createElement(t,Object.assign({},n,{forwardedRef:l})));return If(a,e),a.defaultProps=e.defaultProps,a.propTypes=e.propTypes,a.allowedProps=e.allowedProps,a.originalType=e.originalType||e,a});ad.DIRECTION=xc;const w5=L.oneOf(["auto","default","none","context-menu","help","pointer","progress","wait","cell","crosshair","text","vertical-text","alias","copy","move","no-drop","not-allowed","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out"]),_5=Object.freeze({radiusSmall:"0.125rem",radiusMedium:"0.25rem",radiusLarge:"0.5rem",widthSmall:"0.0625rem",widthMedium:"0.125rem",widthLarge:"0.25rem",style:"solid"});function O5(e){const t={textDarkest:e.licorice,textDark:e.ash,textLight:e.porcelain,textLightest:e.white,textBrand:e.brand,textLink:e.link,textAlert:e.barney,textInfo:e.brand,textSuccess:e.shamrock,textDanger:e.crimson,textWarning:e.fire},a={backgroundDarkest:e.licorice,backgroundDark:e.ash,backgroundMedium:e.tiara,backgroundLight:e.porcelain,backgroundLightest:e.white,backgroundBrand:e.brand,backgroundBrandSecondary:e.oxford,backgroundAlert:e.barney,backgroundInfo:e.brand,backgroundSuccess:e.shamrock,backgroundDanger:e.crimson,backgroundWarning:e.fire},n={borderLightest:e.white,borderLight:e.porcelain,borderMedium:e.tiara,borderDark:e.ash,borderDarkest:e.licorice,borderBrand:e.brand,borderAlert:e.barney,borderInfo:e.brand,borderSuccess:e.shamrock,borderDanger:e.crimson,borderWarning:e.fire,borderDebug:e.crimson};return{...e,...t,...a,...n,values:e,text:t,background:a,border:n}}const M5={brand:"#0374B5",link:"#0374B5",electric:"#0374B5",shamrock:"#0B874B",barney:"#BF32A4",crimson:"#E0061F",fire:"#FC5E13",licorice:"#2D3B45",oxford:"#394B58",ash:"#6B7780",slate:"#8B969E",tiara:"#C7CDD1",porcelain:"#F5F5F5",white:"#FFFFFF"},x5=Object.freeze(O5(M5)),D5=Object.freeze({duration:"300ms",timing:"ease-in-out"}),z5=Object.freeze({fontFamily:'LatoWeb, Lato, "Helvetica Neue", Helvetica, Arial, sans-serif',fontFamilyMonospace:'Menlo, Consolas, Monaco, "Andale Mono", monospace',fontSizeXSmall:"0.75rem",fontSizeSmall:"0.875rem",fontSizeMedium:"1rem",fontSizeLarge:"1.375rem",fontSizeXLarge:"1.75rem",fontSizeXXLarge:"2.375rem",fontWeightLight:300,fontWeightNormal:400,fontWeightBold:700,lineHeight:1.5,lineHeightFit:1.125,lineHeightCondensed:1.25,lineHeightDouble:2,letterSpacingNormal:0,letterSpacingCondensed:"-0.0625rem",letterSpacingExpanded:"0.0625rem"}),$5=Object.freeze({xxxSmall:"0.125rem",xxSmall:"0.375rem",xSmall:"0.5rem",small:"0.75rem",mediumSmall:"1rem",medium:"1.5rem",large:"2.25rem",xLarge:"3rem",xxLarge:"3.75rem"}),N5=Object.freeze({inputHeightSmall:"1.75rem",inputHeightMedium:"2.375rem",inputHeightLarge:"3rem"}),L5=.0625,ma={xxSmall:8,xSmall:16,small:30,medium:48,tablet:48,large:62,desktop:64,xLarge:75},hu=Object.freeze({xxSmall:`${ma.xxSmall}em`,xSmall:`${ma.xSmall}em`,small:`${ma.small}em`,medium:`${ma.medium}em`,tablet:`${ma.tablet}em`,large:`${ma.large}em`,desktop:`${ma.desktop}em`,xLarge:`${ma.xLarge}em`,maxWidth:`${ma.large-L5}em`}),U5=Object.freeze({mediumMin:`min-width: ${hu.medium}`,largeMin:`min-width: ${hu.large}`,xLargeMin:`min-width: ${hu.xLarge}`}),Pn=["0 0.0625rem 0.125rem rgba(0, 0, 0, 0.2), 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.1)","0 0.1875rem 0.375rem rgba(0, 0, 0, 0.1), 0 0.1875rem 0.375rem rgba(0, 0, 0, 0.16)","0 0.375rem 0.4375rem rgba(0, 0, 0, 0.1), 0 0.625rem 1.75rem rgba(0, 0, 0, 0.25)"],H5=Object.freeze({depth1:Pn[0],depth2:Pn[1],depth3:Pn[2],resting:Pn[0],above:Pn[1],topmost:Pn[2]}),B5=Object.freeze({topmost:9999,above:1,below:-1,deepest:-9999}),wp={colors:x5,borders:_5,transitions:D5,typography:z5,spacing:$5,forms:N5,media:U5,breakpoints:hu,shadows:H5,stacking:B5},j5=["key","description"],V5=["key","description","use"],k5="@@themeRegistryDefaultTheme",Zu="__GLOBAL_THEME_REGISTRY__";globalThis[Zu]?nd(G5(globalThis[Zu])):Op();function _p(){return{currentThemeKey:null,themes:{},registered:[]}}function G5(e){const t=_p();if(typeof e>"u")return t;let a=!0;return Object.keys(t).forEach(n=>{typeof e[n]>"u"&&(a=!1)}),Mn(a,"[theme-registry] Invalid global theme registry!"),e}function Dc(){return globalThis[Zu]}function nd(e){globalThis[Zu]=e}function Op(){nd(_p())}function Y5(){const e=Dc(),t=e.currentThemeKey;if(t)return e.themes[t]}function q5(e,t){const a=Dc(),n=a.themes[e];n||e!==k5&&Mn(n,`[theme-registry] Could not find theme: '${e}' in the registry.`),a.currentThemeKey=e;const l=yp(n,t);return a.themes[e]=l,l}function X5(e){const t=e.key,a=e.description,n=xn(e,j5),l={key:t,description:a,...n,use(r){q5(t,(r==null?void 0:r.overrides)||{})}};return new Proxy(l,{get(r,i){r.key,r.description,r.use;const u=xn(r,V5);return i==="variables"?u:Reflect.get(r,i)}})}function Z5(e){const t=Dc();if(e.key&&t.themes[e.key])return t.themes[e.key];{if(!Sp(e))throw Mn(!1,`[theme-registry] The theme provided to 'registerTheme' is not a valid theme object! -For it to be valid some properties have to be present, check out https://instructure.design/#canvas as a reference.`),new Error;const a=X5(e);return t.themes[a.key]=a,t.registered.push(a.key),a}}const ld={getRegistry:Dc,clearRegistry:Op,setRegistry:nd,registerTheme:Z5,getCurrentTheme:Y5},gt=wp.colors,Q5="canvas",K5={"ic-brand-primary":gt.textBrand,"ic-brand-font-color-dark":gt.textDarkest,"ic-link-color":gt.textLink,"ic-link-decoration":"none","ic-brand-button--primary-bgd":gt.backgroundBrand,"ic-brand-button--primary-text":gt.textLightest,"ic-brand-button--secondary-bgd":gt.backgroundDarkest,"ic-brand-button--secondary-text":gt.textLightest,"ic-brand-global-nav-bgd":gt.backgroundBrandSecondary,"ic-global-nav-link-hover":gt.backgroundDarkest,"ic-brand-global-nav-ic-icon-svg-fill":gt.textLightest,"ic-brand-global-nav-ic-icon-svg-fill--active":gt.textBrand,"ic-brand-global-nav-menu-item__text-color":gt.textLightest,"ic-brand-global-nav-menu-item__text-color--active":gt.textBrand},P5={key:Q5,...wp,...K5},rd=ld.registerTheme(P5),J5=e=>(t={})=>{var a,n;try{if(Sp(e))return e}catch{e={}}let l;Object.keys(t).length===0?l=ld.getCurrentTheme()||rd:l=t;const r=l.key,i=((a=e)===null||a===void 0||(n=a.themeOverrides)===null||n===void 0?void 0:n[r])||e.themeOverrides||{};return yp(l,e,i)};function zc({children:e,theme:t={},dir:a,instanceCounterMap:n,as:l}){const r=a||w.useContext($s);let i=be.createElement(S5,{instanceCounterMap:n},be.createElement(k3,{theme:J5(t)},be.createElement($s.Provider,{value:r},e)));if(a){const u=Ep(zc,{as:l});i=be.createElement(u,{dir:r},i)}return i}zc.propTypes={children:L.node,theme:L.object,dir:L.oneOf(["ltr","rtl"]),instanceCounterMap:L.instanceOf(Map),as:L.string};zc.defaultProps={theme:{},as:void 0};const W5=(e,t,a,n,l)=>{const r=t,i=a,u=n,c=u.themeOverride,o=e,s=o.componentOverrides;let d={},f={};return s&&(d=r&&s[r]||i&&s[i]||{}),c&&(typeof c=="function"?f=c(l||{},e):f=c),{...d,...f}},F5=()=>{let e=B3();if(pp(e)){const t=ld.getCurrentTheme();if(t)return t;e=rd}return e},Oo={styles:{},makeStyles:()=>{}},id=Oc((e,t,a)=>{const n=e.displayName||e.name,l=w.forwardRef((r,i)=>{const u=F5();r.styles&&Xu(!1,`Manually passing the "styles" property is not allowed on the ${n} component. Using the default styles calculated by the @withStyle decorator instead. -`,r.styles),r.makeStyles&&Xu(!1,`Manually passing the "makeStyles" property is not allowed on the ${n} component. Styles are calculated by the @withStyle decorator.`);const c={...e.defaultProps,...r,...Oo};let o=typeof a=="function"?a(u):{};const s=W5(u,n,e.componentId,c,o);o={...o,...s};const d=w.useState(t?t(o,c,{}):{}),f=i5(d,2),p=f[0],C=f[1],S=O=>{const m=t(o,c,O);I3(m,p)||C(m)};return be.createElement(e,Object.assign({ref:i},r,{makeStyles:S,styles:p,themeOverride:s}))});return If(l,e),l.originalType=e.originalType||e,l.propTypes=e.propTypes,l.defaultProps=e.defaultProps,l.allowedProps=e.allowedProps,l.generateComponentTheme=a,e.defaultProps={...e.defaultProps,makeStyles:Oo.makeStyles,styles:Oo.styles},l}),jn={SHADOW_TYPES:{resting:"resting",above:"above",topmost:"topmost",none:"none"},STACKING_TYPES:{deepest:"deepest",below:"below",resting:"resting",above:"above",topmost:"topmost"},BORDER_WIDTHS:{0:"0",none:"none",small:"small",medium:"medium",large:"large"},BORDER_RADII:{0:"0",none:"none",small:"small",medium:"medium",large:"large",circle:"circle",pill:"pill"},BACKGROUNDS:{default:"default",inverse:"inverse",transparent:"transparent"},SIZES:{xSmall:"x-small",small:"small",medium:"medium",large:"large",xLarge:"x-large"},SPACING:{0:"0",none:"none",auto:"auto",xxxSmall:"xxx-small",xxSmall:"xx-small",xSmall:"x-small",small:"small",mediumSmall:"mediumSmall",medium:"medium",large:"large",xLarge:"x-large",xxLarge:"xx-large"}},I5=jn.SHADOW_TYPES,eS=jn.STACKING_TYPES,tS=jn.BORDER_WIDTHS,aS=jn.BORDER_RADII,nS=jn.BACKGROUNDS,lS=jn.SIZES,rS=jn.SPACING,Jn={shadow:L.oneOf(Object.values(I5)),stacking:L.oneOf(Object.values(eS)),borderWidth:Mo(Object.values(tS)),borderRadius:Mo(Object.values(aS)),background:L.oneOf(Object.values(nS)),size:L.oneOf(Object.values(lS)),spacing:Mo(Object.values(rS))};function Mo(e){return function(t,a,n,l){const r=t[a];if(typeof r>"u")return null;if(typeof r!="string")return new Error(`Invalid ${l} \`${a}\` of type \`${typeof r}\` supplied to \`${n}\`, expected a string.`);const i=r.split(" "),u=i.length;if(u>0&&u<5){for(let c=0;c{a[bp(`${e}-${String(n)}`)]=t[n]}),a}function Qu(e,t,a,n){if(!(typeof a!="string"||pp(t)))return a.split(" ").map(l=>{if(l==="auto"||l==="0")return l;if(l==="none")return"0";if(l==="circle")return"100%";if(l==="pill")return"999em";const r=bp(`${n}-${l}`),i=t[r];return Mn(typeof i<"u",`[${e}] '${r}' is an invalid '${n}' value.`),i||"0"}).join(" ").trim()}function Ns(e){if(typeof e!="string")return;const t=e.split(" ");if(t.length===4){var a=[t[3],t[1]];t[1]=a[0],t[3]=a[1]}return t.join(" ")}function iS(e){if(typeof e!="string")return;const t=e.split(" ");if(t.length===2){var a=[t[1],t[0]];t[0]=a[0],t[1]=a[1]}if(t.length===3&&t.push(t[1]),t.length===4){var n=[t[1],t[0],t[3],t[2]];t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3]}return t.join(" ")}let Ls=!0;try{var xo,Do;Ls=!((xo=process)!==null&&xo!==void 0&&(Do=xo.env)!==null&&Do!==void 0&&Do.ALWAYS_APPEND_UI_TESTABLE_LOCATORS)}catch(e){if(e instanceof ReferenceError)Ls=!1;else throw e}const Mp=Ls?()=>e=>e:Oc(e=>{const a={attribute:"data-cid",value:e.displayName||e.name},n=`[${a.attribute}~="${a.value}"]`;class l extends e{constructor(...i){super(...i),this._testableUnmounted=void 0,this._locatorTimeout=void 0}componentDidMount(){this._testableUnmounted=!1,super.componentDidMount&&super.componentDidMount(),this.appendLocatorAttribute()}componentDidUpdate(i,u,c){super.componentDidUpdate&&super.componentDidUpdate(i,u,c),this.appendLocatorAttribute()}componentWillUnmount(){this._testableUnmounted=!0,super.componentWillUnmount&&super.componentWillUnmount(),this._locatorTimeout&&clearTimeout(this._locatorTimeout)}appendLocatorAttribute(){this._locatorTimeout=setTimeout(()=>{let i;if(!this._testableUnmounted){try{i=this.DOMNode||bi(this)}catch{}if(i){const u=i.getAttribute(a.attribute),c=typeof u=="string"?u.split(/\s+/):[];c.includes(a.value)||c.push(a.value),i.setAttribute(a.attribute,c.join(" "))}}})}}return l.selector=n,l}),uS=({borderRadius:e,borderWidth:t,dir:a,theme:n})=>{const l=a===xc.rtl;return{borderRadius:Qu("View",n,l?iS(e):e,"borderRadius"),borderWidth:Qu("View",n,l?Ns(t):t,"borderWidth")}},cS=({margin:e,padding:t,dir:a,theme:n})=>{const l=a===xc.rtl;return{margin:Qu("View",n,l?Ns(e):e,"margin"),padding:Qu("View",n,l?Ns(t):t,"padding")}},oS=({insetBlockStart:e,insetBlockEnd:t,insetInlineStart:a,insetInlineEnd:n,dir:l})=>{const r=l===xc.rtl;return{...{top:e,insetBlockStart:e},...{bottom:t,insetBlockEnd:t},...{left:r?n:a,right:r?a:n}}},sS=({cursor:e,style:t})=>{const a=Cp(t||{},{},["top","left","position","display","transform","overflow","minWidth","minHeight","filter","flexBasis","backgroundImage","pointerEvents"]);return e&&(a.cursor=e),a},fS=(e,t)=>typeof t!="string"?!1:t.trim().split(" ").every(a=>e===a),dS=e=>{const t="focusRing--radius",a=(e||"").trim().split(" ")[0];if(fS(a,e)){const n=l=>`${l.charAt(0).toUpperCase()}${l.slice(1)}`;if(["small","medium","large"].includes(a))return`${t}${n(a)}`;if(["circle","pill"].includes(a))return`${t}Inherit`}return`${t}None`},hS=e=>{const t=e.position,a=e.display,n=e.focusPosition,l=e.withFocusOutline;return typeof l>"u"||l&&(Mn(a==="inline"||t==="relative","[View] the focus outline will only show if the `position` prop is `relative`."),Mn(a!=="inline"||n==="inset","[View] when display is set to `inline` the focus outline will only show if `focusPosition` is set to `inset`.")),l},mS=e=>{const t=e.borderWidth;return t&&t!=="0"&&t!=="none"},vS=(e,t)=>{const a=e.focusColor,n=e.focusPosition,l=e.position,r=e.shouldAnimateFocus,i=e.borderRadius,u=hS(e),c=typeof u>"u",o={offset:{top:`calc(${t.focusOutlineOffset} * -1)`,left:`calc(${t.focusOutlineOffset} * -1)`,right:`calc(${t.focusOutlineOffset} * -1)`,bottom:`calc(${t.focusOutlineOffset}* -1)`},inset:{top:`calc(${t.focusOutlineInset} * -1)`,left:`calc(${t.focusOutlineInset} * -1)`,right:`calc(${t.focusOutlineInset} * -1)`,bottom:`calc(${t.focusOutlineInset} * -1)`}},s={info:t.focusColorInfo,inverse:t.focusColorInverse,success:t.focusColorSuccess,danger:t.focusColorDanger};if(l==="relative"){const d=dS(i),f={"focusRing--radiusInherit":"inherit","focusRing--radiusNone":0},p={offset:{"focusRing--radiusSmall":{borderRadius:`calc(${t.borderRadiusSmall} + (${t.focusOutlineOffset} - ${t.focusOutlineWidth}))`},"focusRing--radiusMedium":{borderRadius:`calc(${t.borderRadiusMedium} + (${t.focusOutlineOffset} - ${t.focusOutlineWidth}))`},"focusRing--radiusLarge":{borderRadius:`calc(${t.borderRadiusLarge} + (${t.focusOutlineOffset} - ${t.focusOutlineWidth}))`}},inset:{"focusRing--radiusSmall":{borderRadius:`calc(${t.borderRadiusSmall} - (${t.focusOutlineInset} + ${t.focusOutlineWidth}))`},"focusRing--radiusMedium":{borderRadius:`calc(${t.borderRadiusMedium} - (${t.focusOutlineInset} + ${t.focusOutlineWidth}))`},"focusRing--radiusLarge":{borderRadius:`calc(${t.borderRadiusLarge} - (${t.focusOutlineInset} + ${t.focusOutlineWidth}))`}}};return{"&::before":{pointerEvents:"none",content:'""',position:"absolute",borderStyle:t.focusOutlineStyle,borderWidth:t.focusOutlineWidth,borderColor:s[a],opacity:0,borderRadius:f[d],...p[n][d],...o[n],...r?{transition:"all 0.2s",transform:"scale(0.95)"}:{},...u?{opacity:1,transform:"scale(1)"}:{}},"&:focus":{outline:"none","&::before":{...c?{opacity:1,transform:"scale(1)"}:{}}}}}return{"&::before":{borderStyle:"none"},outlineStyle:"none",outlineColor:s[a],...u?{outlineWidth:t.focusOutlineWidth,outlineStyle:t.focusOutlineStyle}:{},"&:focus":{...c?{outlineWidth:t.focusOutlineWidth,outlineStyle:t.focusOutlineStyle}:{}}}},pS=(e,t)=>{const a=t.borderRadius,n=t.borderWidth,l=t.margin,r=t.padding,i=t.position,u=t.display,c=t.focusPosition,o=t.textAlign,s=t.borderColor,d=t.background,f=t.stacking,p=t.shadow,C=t.overflowY,S=t.overflowX,O=t.overscrollBehavior,m=t.insetBlockEnd,h=t.insetBlockStart,v=t.insetInlineEnd,R=t.insetInlineStart,x=t.width,g=t.height,A=t.minWidth,z=t.minHeight,U=t.maxWidth,j=t.maxHeight,q=t.withVisualDebug,Me=t.dir,we=uS({theme:e,borderRadius:a,borderWidth:n,dir:Me}),Ee=cS({margin:l,padding:r,theme:e,dir:Me}),Tt=oS({dir:Me,insetBlockEnd:m,insetBlockStart:h,insetInlineEnd:v,insetInlineStart:R}),$=i==="relative"||u==="inline"&&c==="inset",H={inline:{label:"view--inline",display:"inline"},block:{label:"view--block",display:"block"},"inline-block":{label:"view--inlineBlock",display:"inline-block",verticalAlign:"middle"},flex:{label:"view--flex",display:"flex"},"inline-flex":{label:"view--inlineFlex",display:"inline-flex",verticalAlign:"middle"},auto:{}},Y={start:{textAlign:"start"},center:{textAlign:"center"},end:{textAlign:"end"}},re={transparent:{borderColor:e.borderColorTransparent},primary:{borderColor:e.borderColorPrimary},secondary:{borderColor:e.borderColorSecondary},brand:{borderColor:e.borderColorBrand},info:{borderColor:e.borderColorInfo},success:{borderColor:e.borderColorSuccess},warning:{borderColor:e.borderColorWarning},alert:{borderColor:e.borderColorAlert},danger:{borderColor:e.borderColorDanger}},fe={transparent:{color:e.color,background:"none"},primary:{color:e.color,background:e.backgroundPrimary},secondary:{color:e.color,background:e.backgroundSecondary},"primary-inverse":{color:e.colorPrimaryInverse,background:e.backgroundPrimaryInverse},brand:{color:e.colorPrimaryInverse,background:e.backgroundBrand},info:{color:e.colorPrimaryInverse,background:e.backgroundInfo},alert:{color:e.colorPrimaryInverse,background:e.backgroundAlert},success:{color:e.colorPrimaryInverse,background:e.backgroundSuccess},danger:{color:e.colorPrimaryInverse,background:e.backgroundDanger},warning:{color:e.colorPrimaryInverse,background:e.backgroundWarning}},Ie={topmost:{zIndex:e.stackingTopmost},above:{zIndex:e.stackingAbove},resting:{},below:{zIndex:e.stackingBelow},deepest:{zIndex:e.stackingDeepest}},pt={topmost:{boxShadow:e.shadowTopmost},resting:{boxShadow:e.shadowResting},above:{boxShadow:e.shadowAbove},none:{}},jt=vS(t,e);return{view:{label:"view",boxSizing:"border-box",fontFamily:e.fontFamily,maxWidth:"100%",overflow:"visible",...H[u],...d&&fe[d],...f&&Ie[f],...p&&pt[p],...o&&Y[o],overflowX:S&&S!=="visible"?S:"",overflowY:C&&C!=="visible"?C:"",position:i!=="static"?i:"",overscrollBehavior:O||"auto",...q?{outline:`0.0625rem dashed ${e.debugOutlineColor}`}:{},...mS(t)?{borderStyle:e.borderStyle,...re[s]}:{},...$?jt:{}},inlineStyles:{"&&&&&&&&&&":{...Ee,...we,...Tt,width:x,height:g,minWidth:A,minHeight:z,maxWidth:U,maxHeight:j,...sS(t)}}}},yS=e=>{const t=e.colors,a=e.typography,n=e.borders,l=e.breakpoints,r=e.spacing,i=e.shadows,u=e.stacking,c=e.key,o={canvas:{color:e["ic-brand-font-color-dark"],focusColorInfo:e["ic-brand-primary"],backgroundBrand:e["ic-brand-primary"],backgroundInfo:e["ic-brand-primary"],borderColorBrand:e["ic-brand-primary"],borderColorInfo:e["ic-brand-primary"]}};return{...{fontFamily:a==null?void 0:a.fontFamily,color:t==null?void 0:t.textDarkest,colorPrimaryInverse:t==null?void 0:t.textLightest,borderColorPrimary:t==null?void 0:t.borderMedium,borderColorSecondary:t==null?void 0:t.borderDark,borderColorSuccess:t==null?void 0:t.borderSuccess,borderColorBrand:t==null?void 0:t.borderBrand,borderColorInfo:t==null?void 0:t.borderInfo,borderColorAlert:t==null?void 0:t.borderAlert,borderColorWarning:t==null?void 0:t.borderWarning,borderColorDanger:t==null?void 0:t.borderDanger,borderColorTransparent:"transparent",debugOutlineColor:t==null?void 0:t.borderDebug,backgroundPrimary:t==null?void 0:t.backgroundLightest,backgroundSecondary:t==null?void 0:t.backgroundLight,backgroundPrimaryInverse:t==null?void 0:t.backgroundDarkest,backgroundBrand:t==null?void 0:t.backgroundBrand,backgroundInfo:t==null?void 0:t.backgroundInfo,backgroundAlert:t==null?void 0:t.backgroundAlert,backgroundSuccess:t==null?void 0:t.backgroundSuccess,backgroundDanger:t==null?void 0:t.backgroundDanger,backgroundWarning:t==null?void 0:t.backgroundWarning,arrowSize:"0.5rem",focusOutlineStyle:n==null?void 0:n.style,focusOutlineWidth:n==null?void 0:n.widthMedium,focusOutlineOffset:"0.3125rem",focusOutlineInset:"0rem",focusColorInfo:t==null?void 0:t.borderInfo,focusColorDanger:t==null?void 0:t.borderDanger,focusColorSuccess:t==null?void 0:t.borderSuccess,focusColorInverse:t==null?void 0:t.borderLightest,xSmallMaxWidth:l==null?void 0:l.xSmall,smallMaxWidth:l==null?void 0:l.small,mediumMaxWidth:l==null?void 0:l.medium,largeMaxWidth:l==null?void 0:l.large,...fr("margin",r),...fr("padding",r),...fr("shadow",i),...fr("stacking",u),...fr("border",n)},...o[c]}},gS={as:L.elementType,elementRef:L.func,display:L.oneOf(["auto","inline","block","inline-block","flex","inline-flex"]),overflowX:L.oneOf(["auto","hidden","visible"]),overflowY:L.oneOf(["auto","hidden","visible"]),margin:Jn.spacing,padding:Jn.spacing,height:L.oneOfType([L.string,L.number]),width:L.oneOfType([L.string,L.number]),maxHeight:L.oneOfType([L.string,L.number]),maxWidth:L.oneOfType([L.string,L.number]),minHeight:L.oneOfType([L.string,L.number]),minWidth:L.oneOfType([L.string,L.number]),children:L.node,textAlign:L.oneOf(["start","center","end"]),borderWidth:Jn.borderWidth,borderRadius:Jn.borderRadius,borderColor:L.oneOf(["transparent","primary","secondary","brand","info","success","warning","alert","danger"]),background:L.oneOf(["transparent","primary","secondary","primary-inverse","brand","info","alert","success","danger","warning"]),shadow:Jn.shadow,stacking:Jn.stacking,cursor:w5,position:L.oneOf(["static","absolute","relative","sticky","fixed"]),insetInlineStart:L.string,insetInlineEnd:L.string,insetBlockStart:L.string,insetBlockEnd:L.string,withFocusOutline:L.bool,focusPosition:L.oneOf(["offset","inset"]),focusColor:L.oneOf(["info","inverse","success","danger"]),shouldAnimateFocus:L.bool,withVisualDebug:L.bool,dir:L.oneOf(Object.values(ad.DIRECTION)),overscrollBehavior:L.oneOf(["auto","contain","none"])},bS=["as","background","borderColor","borderRadius","borderWidth","children","cursor","dir","display","elementRef","focusColor","focusPosition","height","insetBlockEnd","insetBlockStart","insetInlineEnd","insetInlineStart","margin","maxHeight","maxWidth","minHeight","minWidth","overflowX","overflowY","overscrollBehavior","padding","position","shadow","shouldAnimateFocus","stacking","textAlign","width","withFocusOutline","withVisualDebug"],SS=["children","textAlign","background","display","withVisualDebug","width","height","minWidth","minHeight","maxWidth","maxHeight","overflowX","overflowY","stacking","shadow","position","focusPosition","focusColor","shouldAnimateFocus","borderColor","className","overscrollBehavior","styles","makeStyles"];var Eh,Rh,Zi,va;let ES=(Eh=ad(),Rh=id(pS,yS),Eh(Zi=Rh(Zi=(va=class xp extends w.Component{get _element(){return this.ref}constructor(t){super(t),this.spanMarginVerified=void 0,this.ref=null,this.handleElementRef=a=>{typeof this.props.elementRef=="function"&&this.props.elementRef(a),this.ref=a},this.spanMarginVerified=!1}componentDidMount(){var t,a;(t=(a=this.props).makeStyles)===null||t===void 0||t.call(a)}componentDidUpdate(){var t,a;(t=(a=this.props).makeStyles)===null||t===void 0||t.call(a)}render(){const t=this.props,a=t.children;t.textAlign,t.background,t.display,t.withVisualDebug,t.width,t.height,t.minWidth,t.minHeight,t.maxWidth,t.maxHeight,t.overflowX,t.overflowY,t.stacking,t.shadow,t.position,t.focusPosition,t.focusColor,t.shouldAnimateFocus,t.borderColor;const n=t.className;t.overscrollBehavior;const l=t.styles;t.makeStyles;const r=xn(t,SS),i=Ep(xp,this.props);return hn(i,Object.assign({},y5(r),{className:n,css:[l==null?void 0:l.view,l==null?void 0:l.inlineStyles],ref:this.handleElementRef}),a)}},va.displayName="View",va.componentId="View",va.allowedProps=bS,va.propTypes=gS,va.defaultProps={display:"auto",overflowX:"visible",overflowY:"visible",withVisualDebug:!1,borderColor:"primary",position:"static",focusPosition:"offset",focusColor:"info",shouldAnimateFocus:!0,overscrollBehavior:"auto"},va.omitViewProps=(e,t)=>{const a=[...va.allowedProps,"styles","makeStyles","themeOverride"];let n=!0;try{n=!1}catch(l){if(l instanceof ReferenceError)n=!1;else throw l}return n&&Object.keys(Cp(e,a)).forEach(l=>{Mn(!1,`[${t.name}] prop '${l}' is not allowed.`)}),Rp(e,a)},va))||Zi)||Zi);const RS=(e,t)=>{const a=t.inline,n=t.color,l={inherit:{color:"inherit"},primary:{color:e.primaryColor},secondary:{color:e.secondaryColor},"primary-inverse":{color:e.primaryInverseColor},"secondary-inverse":{color:e.secondaryInverseColor},success:{color:e.successColor},brand:{color:e.brandColor},warning:{color:e.warningColor},error:{color:e.errorColor},alert:{color:e.alertColor},auto:{}};return{inlineSVG:{label:"inlineSVG",fill:"currentColor",display:a?"inline-block":"block",overflow:"visible",...l[n]}}},CS=e=>{const t=e.colors,a=e.key,n={canvas:{primaryColor:e["ic-brand-font-color-dark"],brandColor:e["ic-brand-primary"]}};return{...{primaryInverseColor:t==null?void 0:t.textLightest,primaryColor:t==null?void 0:t.textDarkest,secondaryColor:t==null?void 0:t.textDark,secondaryInverseColor:t==null?void 0:t.textLight,warningColor:t==null?void 0:t.textWarning,brandColor:t==null?void 0:t.textBrand,errorColor:t==null?void 0:t.textDanger,alertColor:t==null?void 0:t.textAlert,successColor:t==null?void 0:t.textSuccess},...n[a]}},AS={children:L.node,src:L.string,title:L.string,description:L.string,focusable:L.bool,width:L.oneOfType([L.string,L.number]),height:L.oneOfType([L.string,L.number]),inline:L.bool,color:L.oneOf(["inherit","primary","secondary","primary-inverse","secondary-inverse","success","error","alert","warning","brand","auto"]),elementRef:L.func},TS=["children","src","title","description","focusable","width","height","inline","color","elementRef"],wS=["style","title","description","focusable","children","src","styles"];var Ch,Ah,Th,Wn,Na;let Dp=(Ch=E5(),Ah=id(RS,CS),Th=Mp(),Ch(Wn=Ah(Wn=Th(Wn=(Na=class Us extends w.Component{constructor(t){super(t),this.titleId=void 0,this.descId=void 0,this.ref=null,this.handleRef=a=>{const n=this.props.elementRef;this.ref=a,typeof n=="function"&&n(a)},this.titleId=t.deterministicId("InlineSVG-title"),this.descId=t.deterministicId("InlineSVG-desc")}componentDidMount(){var t,a;(t=(a=this.props).makeStyles)===null||t===void 0||t.call(a)}componentDidUpdate(){var t,a;(t=(a=this.props).makeStyles)===null||t===void 0||t.call(a)}get role(){return this.props.title?"img":"presentation"}renderTitle(){const t=this.props.title;return t?hn("title",{id:this.titleId},t):null}renderDesc(t){return t?hn("desc",{id:this.descId},t):null}get labelledBy(){const t=[];return this.props.title&&t.push(this.titleId),this.props.description&&t.push(this.descId),t.length>0?t.join(" "):void 0}renderContent(){if(this.props.src){const t=Us.prepareSrc(this.props.src);return hn("g",{role:"presentation",dangerouslySetInnerHTML:{__html:t}})}else return hn("g",{role:"presentation"},this.props.children)}render(){const t=this.props,a=t.style,n=t.title,l=t.description,r=t.focusable;t.children;const i=t.src,u=t.styles,c=xn(t,wS),o=this.props.width==="auto"?void 0:this.props.width,s=this.props.height==="auto"?void 0:this.props.height;return hn("svg",Object.assign({},_S(i),Rp(this.props,Us.allowedProps,["inline"]),{style:{...a,width:o,height:s},width:o,height:s,"aria-hidden":n?void 0:"true","aria-labelledby":this.labelledBy,role:this.role,focusable:r?"true":"false",css:u==null?void 0:u.inlineSVG,className:c.className,ref:this.handleRef}),this.renderTitle(),this.renderDesc(l),this.renderContent())}},Na.displayName="InlineSVG",Na.componentId="InlineSVG",Na.allowedProps=TS,Na.propTypes=AS,Na.defaultProps={focusable:!1,src:"",title:"",description:"",inline:!0,width:"1em",height:"1em",color:"inherit"},Na.prepareSrc=e=>{const a=/]*>((.|[\n\r])*)<\/svg>/.exec(e);return a?a[1]:e},Na))||Wn)||Wn)||Wn);function _S(e){const t={},a=/]*)\s*>/,n=/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?/g;if(typeof e=="string"){const l=a.exec(e),r=l?l[1]:"",i=["xmlns","xmlns:xlink","version"];let u=n.exec(r);for(;u!=null;)i.indexOf(u[1])===-1&&(t[u[1]]=u[2]||(u[3]?u[3]:u[4]?u[4]:u[5])||u[1]),u=n.exec(r)}return t}const OS=(e,t)=>{const a=t.rotate,n=t.size,l=t.bidirectional,r={0:{},90:{transform:"rotate(90deg)"},180:{transform:"rotate(180deg)"},270:{transform:"rotate(270deg)"}},i={0:{transform:"scale3d(-1, 1, 1)"},90:{transform:"scale3d(-1, 1, 1) rotate(90deg)"},180:{transform:"scale3d(-1, 1, 1) rotate(180deg)"},270:{transform:"scale3d(-1, 1, 1) rotate(270deg)"}},u={"x-small":{fontSize:e.sizeXSmall},small:{fontSize:e.sizeSmall},medium:{fontSize:e.sizeMedium},large:{fontSize:e.sizeLarge},"x-large":{fontSize:e.sizeXLarge}};return{svgIcon:{label:"svgIcon",verticalAlign:"middle",lineHeight:1,width:"1em",height:"1em",...r[a],...n&&u[n],...l&&{'[dir="rtl"] &':i[a]}}}},MS=()=>({...{sizeXSmall:"1.125rem",sizeSmall:"2rem",sizeMedium:"3rem",sizeLarge:"5rem",sizeXLarge:"10rem"}}),xS={...Dp.propTypes,rotate:L.oneOf(["0","90","180","270"]),size:L.oneOf(["x-small","small","medium","large","x-large"]),bidirectional:L.bool},DS=["children","src","title","description","focusable","width","height","inline","color","elementRef","rotate","size","bidirectional"],zS=["rotate","className","themeOverride","size","bidirectional","makeStyles","styles"],$S=["sizeXSmall","sizeSmall","sizeMedium","sizeLarge","sizeXLarge"];var wh,_h,Qi,cn;let Fe=(wh=id(OS,MS),_h=Mp(),wh(Qi=_h(Qi=(cn=class extends w.Component{constructor(...t){super(...t),this.ref=null,this.handleRef=a=>{const n=this.props.elementRef;this.ref=a,typeof n=="function"&&n(a)}}componentDidMount(){var t,a;(t=(a=this.props).makeStyles)===null||t===void 0||t.call(a)}componentDidUpdate(){var t,a;(t=(a=this.props).makeStyles)===null||t===void 0||t.call(a)}render(){const t=this.props,a=t.rotate,n=t.className,l=t.themeOverride;t.size,t.bidirectional,t.makeStyles;const r=t.styles,i=xn(t,zS),u=l;u.sizeXSmall,u.sizeSmall,u.sizeMedium,u.sizeLarge,u.sizeXLarge;const c=xn(u,$S);return hn(Dp,Object.assign({},i,{themeOverride:c,rotate:a,css:r==null?void 0:r.svgIcon,className:n,elementRef:this.handleRef}))}},cn.displayName="SVGIcon",cn.componentId="SVGIcon",cn.allowedProps=DS,cn.propTypes=xS,cn.defaultProps={rotate:"0",bidirectional:!1},cn))||Qi)||Qi);var Oh;class Xl extends w.Component{constructor(...t){super(...t),this.ref=null,this.handleRef=a=>{const n=this.props.elementRef;this.ref=a,typeof n=="function"&&n(a)}}render(){return be.createElement(Fe,Object.assign({},this.props,{name:"IconCanvasLogo",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Oh||(Oh=be.createElement("path",{d:"M958.568 277.97C1100.42 277.97 1216.48 171.94 1233.67 34.3881 1146.27 12.8955 1054.57 0 958.568 0 864.001 0 770.867 12.8955 683.464 34.3881 700.658 171.94 816.718 277.97 958.568 277.97ZM35.8207 682.031C173.373 699.225 279.403 815.285 279.403 957.136 279.403 1098.99 173.373 1215.05 35.8207 1232.24 12.8953 1144.84 1.43262 1051.7 1.43262 957.136 1.43262 862.569 12.8953 769.434 35.8207 682.031ZM528.713 957.142C528.713 1005.41 489.581 1044.55 441.31 1044.55 393.038 1044.55 353.907 1005.41 353.907 957.142 353.907 908.871 393.038 869.74 441.31 869.74 489.581 869.74 528.713 908.871 528.713 957.142ZM1642.03 957.136C1642.03 1098.99 1748.06 1215.05 1885.61 1232.24 1908.54 1144.84 1920 1051.7 1920 957.136 1920 862.569 1908.54 769.434 1885.61 682.031 1748.06 699.225 1642.03 815.285 1642.03 957.136ZM1567.51 957.142C1567.51 1005.41 1528.38 1044.55 1480.11 1044.55 1431.84 1044.55 1392.71 1005.41 1392.71 957.142 1392.71 908.871 1431.84 869.74 1480.11 869.74 1528.38 869.74 1567.51 908.871 1567.51 957.142ZM958.568 1640.6C816.718 1640.6 700.658 1746.63 683.464 1884.18 770.867 1907.11 864.001 1918.57 958.568 1918.57 1053.14 1918.57 1146.27 1907.11 1233.67 1884.18 1216.48 1746.63 1100.42 1640.6 958.568 1640.6ZM1045.98 1480.11C1045.98 1528.38 1006.85 1567.51 958.575 1567.51 910.304 1567.51 871.172 1528.38 871.172 1480.11 871.172 1431.84 910.304 1392.71 958.575 1392.71 1006.85 1392.71 1045.98 1431.84 1045.98 1480.11ZM1045.98 439.877C1045.98 488.148 1006.85 527.28 958.575 527.28 910.304 527.28 871.172 488.148 871.172 439.877 871.172 391.606 910.304 352.474 958.575 352.474 1006.85 352.474 1045.98 391.606 1045.98 439.877ZM1441.44 1439.99C1341.15 1540.29 1333.98 1697.91 1418.52 1806.8 1579 1712.23 1713.68 1577.55 1806.82 1418.5 1699.35 1332.53 1541.74 1339.7 1441.44 1439.99ZM1414.21 1325.37C1414.21 1373.64 1375.08 1412.77 1326.8 1412.77 1278.53 1412.77 1239.4 1373.64 1239.4 1325.37 1239.4 1277.1 1278.53 1237.97 1326.8 1237.97 1375.08 1237.97 1414.21 1277.1 1414.21 1325.37ZM478.577 477.145C578.875 376.846 586.039 219.234 501.502 110.339 341.024 204.906 206.338 339.592 113.203 498.637 220.666 584.607 378.278 576.01 478.577 477.145ZM679.155 590.32C679.155 638.591 640.024 677.723 591.752 677.723 543.481 677.723 504.349 638.591 504.349 590.32 504.349 542.048 543.481 502.917 591.752 502.917 640.024 502.917 679.155 542.048 679.155 590.32ZM1440 475.712C1540.3 576.01 1697.91 583.174 1806.8 498.637 1712.24 338.159 1577.55 203.473 1418.51 110.339 1332.54 217.801 1341.13 375.413 1440 475.712ZM1414.21 590.32C1414.21 638.591 1375.08 677.723 1326.8 677.723 1278.53 677.723 1239.4 638.591 1239.4 590.32 1239.4 542.048 1278.53 502.917 1326.8 502.917 1375.08 502.917 1414.21 542.048 1414.21 590.32ZM477.145 1438.58C376.846 1338.28 219.234 1331.12 110.339 1415.65 204.906 1576.13 339.593 1710.82 498.637 1805.39 584.607 1696.49 577.443 1538.88 477.145 1438.58ZM679.155 1325.37C679.155 1373.64 640.024 1412.77 591.752 1412.77 543.481 1412.77 504.349 1373.64 504.349 1325.37 504.349 1277.1 543.481 1237.97 591.752 1237.97 640.024 1237.97 679.155 1277.1 679.155 1325.37Z"})))}}Xl.glyphName="canvas-logo";Xl.variant="Line";Xl.displayName="IconCanvasLogoLine";Xl.propTypes={...Fe.propTypes};Xl.allowedProps=[...Fe.allowedProps];var Mh;class Zl extends w.Component{constructor(...t){super(...t),this.ref=null,this.handleRef=a=>{const n=this.props.elementRef;this.ref=a,typeof n=="function"&&n(a)}}render(){return be.createElement(Fe,Object.assign({},this.props,{name:"IconElevateLogo",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Mh||(Mh=be.createElement("path",{d:"M1070.45 53.9152C1104.97 88.4365 1124.36 135.258 1124.36 184.078L1123.51 1188.09C1123.74 1229.1 1110.25 1269.01 1085.18 1301.47 1060.11 1333.93 1024.9 1357.08 985.16 1367.22 945.419 1377.35 903.428 1373.91 865.87 1357.43 828.312 1340.95 797.346 1312.38 777.899 1276.28 763.314 1249.19 755.85 1218.85 756.21 1188.09V184.078C756.21 135.258 775.603 88.4365 810.124 53.9152 844.646 19.3939 891.467 0 940.288 0 989.108 0 1035.93 19.3939 1070.45 53.9152ZM161.091 1320.33C194.624 1353.7 240.009 1372.44 287.319 1372.44 310.767 1372.44 333.985 1367.81 355.644 1358.83 377.304 1349.85 396.98 1336.69 413.547 1320.1 430.113 1303.5 443.246 1283.8 452.193 1262.13 461.141 1240.45 465.726 1217.23 465.689 1193.78L463.406 359.01 106.666 741.15 108.378 1194.35C108.605 1241.67 127.558 1286.96 161.091 1320.33ZM1592.41 1372.44C1639.74 1372.51 1685.17 1353.81 1718.72 1320.42 1752.27 1287.02 1771.2 1241.69 1771.35 1194.35L1773.06 741.15 1416.33 359.01 1414.32 1193.78C1414.29 1217.21 1418.87 1240.41 1427.79 1262.06 1436.72 1283.71 1449.83 1303.41 1466.37 1319.99 1482.9 1336.58 1502.55 1349.75 1524.17 1358.75 1545.8 1367.75 1568.99 1372.4 1592.41 1372.44ZM1123.46 1752.39C1126.77 1716.09 1119.25 1679.61 1101.83 1647.56 1090.29 1626.27 1074.66 1607.47 1055.85 1592.22 1037.03 1576.97 1015.39 1565.59 992.163 1558.73 968.939 1551.86 944.588 1549.64 920.506 1552.2 896.423 1554.76 873.083 1562.05 851.822 1573.65 819.782 1591.06 793.627 1617.59 776.661 1649.87 759.697 1682.14 752.685 1718.73 756.513 1754.99 760.341 1791.25 774.837 1825.57 798.168 1853.59 821.499 1881.62 852.616 1902.09 887.585 1912.44 922.554 1922.77 959.804 1922.51 994.623 1911.68 1029.44 1900.84 1060.27 1879.94 1083.2 1851.58 1106.13 1823.23 1120.14 1788.71 1123.46 1752.39Z"})))}}Zl.glyphName="elevate-logo";Zl.variant="Line";Zl.displayName="IconElevateLogoLine";Zl.propTypes={...Fe.propTypes};Zl.allowedProps=[...Fe.allowedProps];var xh;class Ql extends w.Component{constructor(...t){super(...t),this.ref=null,this.handleRef=a=>{const n=this.props.elementRef;this.ref=a,typeof n=="function"&&n(a)}}render(){return be.createElement(Fe,Object.assign({},this.props,{name:"IconImpactLogo",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),xh||(xh=be.createElement("path",{d:"M910.001 203.918C910.001 163.587 921.96 124.161 944.366 90.6273 966.773 57.0931 998.621 30.9565 1035.88 15.5225 1073.14.0883516 1114.15-3.9499 1153.7 3.91831 1193.26 11.7866 1229.59 31.2078 1258.11 59.7263 1286.63 88.2447 1306.05 124.579 1313.92 164.135 1321.78 203.692 1317.75 244.693 1302.32 281.954 1286.88 319.215 1260.74 351.062 1227.21 373.47 1193.68 395.876 1154.25 407.836 1113.92 407.836 1087.13 407.869 1060.6 402.617 1035.84 392.38 1011.09 382.144 988.596 367.124 969.654 348.182 950.712 329.241 935.692 306.748 925.457 281.993 915.22 257.237 909.967 230.706 910.001 203.918ZM167.424 913.308 458.311 622.422H1045.04L460.789 1206.68C421.886 1245.58 369.124 1267.44 314.107 1267.44 259.09 1267.44 206.327 1245.58 167.424 1206.68 128.522 1167.77 106.667 1115.01 106.667 1059.99 106.667 1004.97 128.522 952.211 167.424 913.308ZM1738.81 1027.77 1454.11 1313.21H867.136L1444.7 734.406C1483.6 695.405 1536.4 673.455 1591.49 673.386 1646.57 673.316 1699.43 695.132 1738.43 734.034 1777.43 772.936 1799.38 825.739 1799.45 880.826 1799.52 935.911 1777.71 988.769 1738.81 1027.77ZM587.075 1602.79C564.668 1636.33 552.709 1675.75 552.709 1716.08 552.709 1770.16 574.192 1822.02 612.435 1860.27 650.677 1898.51 702.543 1920 756.627 1920 796.957 1920 836.382 1908.04 869.917 1885.63 903.451 1863.23 929.588 1831.38 945.021 1794.12 960.456 1756.85 964.494 1715.85 956.625 1676.29 948.758 1636.74 929.336 1600.4 900.817 1571.89 872.299 1543.37 835.965 1523.94 796.409 1516.08 756.853 1508.21 715.851 1512.25 678.59 1527.69 641.329 1543.12 609.481 1569.25 587.075 1602.79Z"})))}}Ql.glyphName="impact-logo";Ql.variant="Line";Ql.displayName="IconImpactLogoLine";Ql.propTypes={...Fe.propTypes};Ql.allowedProps=[...Fe.allowedProps];var Dh;class Dn extends w.Component{constructor(...t){super(...t),this.ref=null,this.handleRef=a=>{const n=this.props.elementRef;this.ref=a,typeof n=="function"&&n(a)}}render(){return be.createElement(Fe,Object.assign({},this.props,{name:"IconInstructureLogo",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Dh||(Dh=be.createElement("path",{d:"M1448.57 288.052 1084.46 502.746 1448.55 718.026 1813.23 502.732 1448.57 288.052ZM959.965 429.191 1323.92 214.589 959.988 0 596.032 214.602 959.965 429.191ZM835.499 502.732 471.388 288.038 106.704 502.732 471.388 718.026 835.499 502.732ZM106.667 1416.54 960 1920 1813.33 1416.54 960 913.07 106.667 1416.54Z"})))}}Dn.glyphName="instructure-logo";Dn.variant="Line";Dn.displayName="IconInstructureLogoLine";Dn.propTypes={...Fe.propTypes};Dn.allowedProps=[...Fe.allowedProps];var zh;class Kl extends w.Component{constructor(...t){super(...t),this.ref=null,this.handleRef=a=>{const n=this.props.elementRef;this.ref=a,typeof n=="function"&&n(a)}}render(){return be.createElement(Fe,Object.assign({},this.props,{name:"IconMasteryLogo",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),zh||(zh=be.createElement("path",{d:"M672.274 547.699V889.681L371.706 760.866C332.318 747.272 297.441 723.083 270.907 690.958 244.373 658.833 227.209 620.015 221.301 578.769 215.392 537.524 220.969 495.447 237.417 457.164 253.866 418.883 280.55 385.876 314.537 361.771 348.524 337.668 388.498 323.399 430.066 320.536 471.634 317.672 513.187 326.323 550.158 345.538 587.13 364.753 618.089 393.788 639.632 429.453 661.176 465.119 672.47 506.033 672.274 547.699ZM959.895 1550.52C1013.45 1550.76 1065.35 1531.95 1106.32 1497.47 1147.3 1462.98 1174.68 1415.06 1183.6 1362.25 1192.51 1309.44 1182.37 1255.17 1154.98 1209.16 1127.6 1163.13 1084.75 1128.34 1034.08 1110.97L733.516 982.161V1324.15C733.584 1384.17 757.456 1441.7 799.895 1484.15 842.335 1526.59 899.876 1550.46 959.895 1550.52ZM226.887 1097.53C182.052 1097.47 138.21 1110.72 100.908 1135.6 63.6045 1160.47 34.5168 1195.85 17.3245 1237.26.13224 1278.67-4.39211 1324.24 4.32386 1368.21 13.0399 1412.19 34.6045 1452.61 66.2896 1484.32 97.9747 1516.04 138.356 1537.65 182.325 1546.42 226.295 1555.19 271.876 1550.71 313.303 1533.57 354.73 1516.42 390.14 1487.37 415.054 1450.1 439.968 1412.82 453.266 1368.99 453.266 1324.16 453.199 1264.12 429.335 1206.55 386.902 1164.08 344.47 1121.59 286.929 1097.66 226.887 1097.53ZM1693.14 1550.52C1746.69 1550.76 1798.6 1531.95 1839.57 1497.47 1880.54 1462.98 1907.93 1415.06 1916.85 1362.25 1925.75 1309.44 1915.62 1255.17 1888.23 1209.16 1860.85 1163.13 1818 1128.34 1767.33 1110.97L1466.51 982.161V1324.15C1466.64 1384.19 1490.57 1441.72 1533.05 1484.16 1575.53 1526.59 1633.1 1550.46 1693.14 1550.52ZM1405.53 547.689V889.671L1104.7 760.856C1065.35 747.221 1030.51 723.005 1004.02 690.865 977.527 658.724 960.404 619.905 954.531 578.67 948.656 537.434 954.261 495.378 970.726 457.12 987.192 418.861 1013.88 385.879 1047.87 361.798 1081.85 337.716 1121.81 323.465 1163.37 320.611 1204.92 317.757 1246.46 326.408 1283.41 345.617 1320.37 364.825 1351.33 393.847 1372.86 429.495 1394.41 465.143 1405.71 506.038 1405.53 547.689Z"})))}}Kl.glyphName="mastery-logo";Kl.variant="Line";Kl.displayName="IconMasteryLogoLine";Kl.propTypes={...Fe.propTypes};Kl.allowedProps=[...Fe.allowedProps];const NS="isp-site",LS="4.3.1+1720017714",US="https://inst.bid/#/",HS="module",BS={dev:"vite","biome:check":"pnpm lint && pnpm check && pnpm format","biome:apply":"pnpm lint:apply && pnpm check:apply && pnpm format:apply",build:"pnpm build:preview && pnpm build:git","build:git":'git add . && git commit -m "Build v$npm_package_version" && git push',"build:js":"vite build","build:preview":"pnpm biome:apply && pnpm sec && pnpm build:version && pnpm build:ts && pnpm build:js","build:ts":"tsc","build:version":`node-jq -r '.version=$ARGS.positional[0]+"+"+$ARGS.positional[1]' package.json --args "$(pnpm -s env:semver)" "$(date +%s)" | sponge package.json`,check:"biome check","check:apply":"biome check --write","env:package":"node-jq '.' package.json","env:biome":"biome rage","env:buildtime":`date -r $(node-jq -r '(.version | split("+"))[1]' package.json)`,"env:semver":`node-jq -r '(.version | split("+"))[0]' package.json`,"env:version":'echo "$npm_package_version"',format:"biome format","format:apply":"biome format --write",lint:"biome lint","lint:apply":"biome lint --write",preview:"pnpm build:preview && vite preview",push:`pnpm build && {pnpm tag || printf "git tag already exists.\r -";} && gh-pages -t -m "Deploy v$(pnpm -s env:version)" -d dist`,sec:"pnpm sec:audit && pnpm sec:scan","sec:audit":"snyk test && pnpm audit","sec:scan":"snyk code test",tag:"git tag isp-site-v$(pnpm -s env:semver) && git push origin isp-site-v$(pnpm -s env:semver)"},jS={"@instructure/browserslist-config-canvas-lms":"^2.0.0","@instructure/ui":"^9.1.0","gh-pages":"^6.1.1",react:"19.0.0-rc-fb9a90fa48-20240614","react-dom":"19.0.0-rc-fb9a90fa48-20240614","react-markdown":"^9.0.1","react-router-dom":"^6.24.1","rehype-raw":"^7.0.0","remark-gemoji":"^8.0.0","remark-gfm":"^4.0.0"},VS={"@babel/plugin-syntax-import-attributes":"^7.24.7","@biomejs/biome":"1.8.2","@instructure/shared-types":"^9.1.0","@octokit/types":"^13.5.0","@types/react":"npm:types-react@19.0.0-rc.0","@types/react-dom":"npm:types-react-dom@19.0.0-rc.0","@vitejs/plugin-react":"^4.3.1","babel-plugin-react-compiler":"0.0.0-experimental-938cd9a-20240601","node-jq":"^4.4.0",snyk:"^1.1292.1","snyk-policy":"^3.0.0",typescript:"^5.5.3",vite:"^5.3.3"},kS={node:">=22.2.0",pnpm:">=9.3.0"},GS="pnpm@9.5.0-beta.0+sha512.c2e60e7ed04e459591c982f2760cd8f7d1f48fe1ca4d46ccbbf8377df1eb2d077ace1e9d334b06250dddf23c03b4562858f77992b9a3bb4a93355aefd173df32",YS={overrides:{react:"^19.0.0-rc-f994737d14-20240522","react-dom":"^19.0.0-rc-f994737d14-20240522","@instructure/ui-test-sandbox>sinon":"^17.0.1","gh-pages>globby":"11.1.0","node-jq>tempfile":"^5.0.0","bin-build>tempfile":"^5.0.0","bin-build>download":"^8.0.0","download>got":"^14.4.1"}},qS=["extends @instructure/browserslist-config-canvas-lms"],XS={name:NS,version:LS,homepage:US,private:!0,type:HS,scripts:BS,dependencies:jS,devDependencies:VS,engines:kS,packageManager:GS,pnpm:YS,browserslist:qS},M={owner:"thedannywahl",repo:"instructure-security-package",branch:"main",url:XS.homepage.replace("/#/",""),gh:"https://github.com",api:"https://api.github.com",raw:"https://raw.githubusercontent.com"},La=`${M.raw}/${M.owner}/${M.repo}/${M.branch}/README`,ZS=["Instructure","Canvas","Mastery","Elevate","Impact","LearnPlatform","Intelligent Insights","Parchment"],C9=[...ZS,"Canvas LMS","Canvas Mobile","Canvas Studio","Canvas Credentials","Canvas Catalog","Canvas Commons","Canvas Data","Mastery Connect","Mastery Item Bank","Mastery View Assessments","Elevate Data Quality","Elevate Data Sync","Learn Platform"],QS=[{brandName:"Instructure",get title(){return this.brandName.toLowerCase()},route:"/",readme:`${La}.md`,color:"#287A9F",Icon:Dn},{brandName:"Canvas",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${La}-${this.brandName}.md`},color:"#E72429",Icon:Xl},{brandName:"Mastery",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${La}-${this.brandName}.md`},color:"#24A159",Icon:Kl},{brandName:"Elevate",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${La}-${this.brandName}.md`},color:"#0097D3",Icon:Zl},{brandName:"Impact",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${La}-${this.brandName}.md`},color:"#F76400",Icon:Ql},{brandName:"LearnPlatform",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${La}-${this.brandName}.md`},color:"#0077CC",Icon:()=>Ze.jsxs(Fe,{viewBox:"0 0 300 300",size:"small",color:"primary-inverse",height:"2.5rem",width:"2.5rem",children:[Ze.jsx("path",{d:"M191.431 212.736H205.086C204.961 212.34 204.846 211.974 204.738 211.63C204.404 210.567 204.135 209.713 203.834 208.81C199.852 198.417 195.964 187.986 192.171 177.517C181.493 149.012 170.872 120.497 160.309 91.9733C159.911 90.214 158.223 89.0597 156.44 89.3276C151.091 89.4698 145.743 89.5267 140.423 89.3276C138.432 89 136.546 90.3293 136.184 92.3147C121.657 131.422 107.129 170.519 92.6017 209.607C92.414 210.136 92.2467 210.686 92.0507 211.329C91.9201 211.759 91.7767 212.23 91.606 212.765C93.7973 212.765 95.9464 212.748 98.0664 212.732C102.222 212.701 106.265 212.67 110.297 212.765C112.402 212.935 113.17 211.94 113.824 210.091C115.474 205.226 117.167 200.375 118.859 195.525C120.552 190.675 122.245 185.824 123.895 180.959C124.199 179.276 125.788 178.141 127.479 178.399H168.729C170.418 178.138 172.011 179.255 172.342 180.931C173.799 185.14 175.307 189.334 176.814 193.524C178.251 197.519 179.687 201.511 181.076 205.51C182.365 209.107 183.012 210.914 184.295 211.821C185.589 212.736 187.531 212.736 191.431 212.736ZM148.417 109.213C154.145 126.092 159.977 143.351 165.913 160.989H131.121L148.417 109.213Z"}),Ze.jsx("path",{d:"M225 110.209V114.191H207.931V133.707H203.522V114.191H186.453V110.209H203.522V90.8069H207.732V110.209H225Z"}),Ze.jsx("path",{d:"M219.488 246.567C178.123 277.109 121.739 277.405 80.0539 247.301L86.1316 238.9C47.7742 211.418 31.5805 162.32 46.069 117.435L55.9454 119.307C69.5589 79.1029 107.372 52.0989 149.847 52.2484V13C90.0696 13.0663 37.1326 51.5854 18.7192 108.414C0.305744 165.242 20.6036 227.455 68.998 262.519C117.392 297.583 182.877 297.523 231.207 262.37C279.537 227.218 299.72 164.967 281.203 108.173L272.111 111.134C289.714 164.146 271.022 222.449 225.87 255.373"}),Ze.jsx("path",{d:"M219.488 246.567C178.123 277.109 121.739 277.405 80.0539 247.301L86.1316 238.9C47.7742 211.418 31.5805 162.32 46.069 117.435L55.9454 119.307C69.5589 79.1029 107.372 52.0989 149.847 52.2484V13C90.0696 13.0663 37.1326 51.5854 18.7192 108.414C0.305744 165.242 20.6036 227.455 68.998 262.519C117.392 297.583 182.877 297.523 231.207 262.37C279.537 227.218 299.72 164.967 281.203 108.173L272.111 111.134C289.714 164.146 271.022 222.449 225.87 255.373"})]})},{brandName:"Intelligent Insights",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title.replace(/ /g,"-")}`},get readme(){return`${La}-${this.brandName.replace(/ /g,"-")}.md`},color:"#287A9F",Icon:Dn},{brandName:"Parchment",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${La}-${this.brandName}.md`},color:"#0093b2",Icon:()=>Ze.jsxs(Fe,{viewBox:"0 -3 29 31.68",size:"small",color:"primary-inverse",height:"2.5rem",width:"2.5rem",children:[Ze.jsx("polygon",{points:"26.87 21.98 2.44 21.98 2.44 2.44 19.54 2.44 19.54 0 0 0 0 24.43 29.31 24.43 29.31 9.77 26.87 9.77"}),Ze.jsx("rect",{x:"26.87",y:"4.89",width:"2.44",height:"2.44"}),Ze.jsx("rect",{x:"21.98",width:"2.44",height:"2.44"}),Ze.jsx("rect",{x:"26.87",width:"2.44",height:"2.44"}),Ze.jsxs("g",{children:[Ze.jsx("path",{d:"M9.38,13.2c-.5,0-.62.37-.62.71v1.53c0,.4.23.69.66.69.36,0,.55-.21.55-.69v-1.53c0-.42-.13-.71-.58-.71Z"}),Ze.jsx("path",{d:"M9.15,11.01c-2.36,0-4.27,1.91-4.27,4.27s1.91,4.27,4.27,4.27,4.27-1.91,4.27-4.27-1.91-4.27-4.27-4.27ZM10.86,15.4c0,.81-.54,1.44-1.27,1.44-.31,0-.84-.14-.84-.38v1.87c0,.14-.18.23-.3.23h-.3c-.13,0-.31-.08-.31-.23v-5.53c0-.14.18-.28.31-.28h.31c.13,0,.29.13.29.28v.05c0-.18.44-.36.8-.36.8,0,1.31.5,1.31,1.48v1.43Z"})]})]})}],KS=`${M.raw}/${M.owner}/${M.repo}`,Fn=`${KS}/${M.branch}`,PS=[{title:"CAIQ",from:"/aws/caiq/dl",to:`${Fn}/Amazon%20Web%20Services/AWS%20CAIQ.pdf`},{title:"Cyber Essentials+ Certificate",from:"/aws/ce/dl",to:`${Fn}/Amazon%20Web%20Services/AWS%20Cyber%20Essentials%20Plus%20Certificate.pdf`},{title:"CSA Star Level 2 Certificate",from:"/aws/csa/dl",to:`${Fn}/Amazon%20Web%20Services/AWS%20CSA%20Star%20Certification.pdf`},{title:"ISO 27001 Certificate",from:"/aws/iso/dl",to:`${Fn}/Amazon%20Web%20Services/AWS%20ISO%2027001%20Certificate.pdf`},{title:"ISO 9001 Certificate",from:"/aws/iso9001/dl",to:`${Fn}/Amazon%20Web%20Services/AWS%20ISO%209001%20Certificate.pdf`},{title:"SOC 3 Report",from:"/aws/soc/dl",to:`${Fn}/Amazon%20Web%20Services/AWS%20SOC%203.pdf`}],JS=PS.map(e=>({...e,lang:"EN"})),WS={brand:"AWS",links:JS},zp="canvas-catalog",FS=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,IS=`${M.raw}/${M.owner}/${M.repo}`,In=`${IS}/${zp}`,e7=[{title:"Compliance Package",from:"/canvas/catalog/dl",to:`${FS}/${zp}.zip`},{title:"PCI AOC SAQ",from:"/canvas/catalog/aoc/dl",to:`${In}/Canvas%20Catalog/2023%20Instructure%20PCI%20DSS%20v3.2.1%20AOC%20SAQ-D%20Service%20Provider.pdf`},{title:"Architecture Paper",from:"/canvas/catalog/architecture/dl",to:`${In}/Canvas%20Catalog/Canvas%20Catalog%20Architecture.pdf`},{title:"HECVAT Lite",from:"/canvas/catalog/hecvat/dl",to:`${In}/Canvas%20Catalog/Canvas%20Catalog%20HECVAT%20Lite.xlsx`},{title:"PCI Shared Responsibility Matrix",from:"/canvas/catalog/pci/dl",to:`${In}/Canvas%20Catalog/Canvas%20Catalog%20PCI%20Responsibility%20Matrix.pdf`},{title:"TX-RAMP Certification",from:"/canvas/catalog/tx-ramp/dl",to:`${In}/Canvas%20Catalog/Canvas%20Catalog%20TX-RAMP%20Provisional%20Certificate.pdf`},{title:"Payment Redirector",from:"/canvas/catalog/payments/dl",to:`${In}/Canvas%20Catalog/Catalog%20Payment%20Redirector.png`},{title:"Home (HE)",from:"/canvas/catalog",to:"https://www.instructure.com/higher-education/products/canvas/canvas-catalog/"},{title:"Home (K12)",from:"/canvas/catalog/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-catalog/"},{title:"Guides",from:"/canvas/catalog/guides",to:"https://community.canvaslms.com/t5/Canvas-Catalog/ct-p/canvas_catalog"},{title:"Release Notes",from:"/canvas/catalog/releases",to:"https://community.canvaslms.com/t5/Catalog-Releases/ct-p/catalog_releases"},{title:"API",from:"/canvas/catalog/api",to:"https://api.catalog.instructure.com/api/docs"}],t7=e7.map(e=>({...e,lang:"EN"})),a7={brand:"Canvas Catalog",links:t7},n7=[{title:"Home",from:"/canvas/commons",to:"https://lor.instructure.com/"},{title:"Guides",from:"/canvas/commons/guides",to:"https://community.canvaslms.com/t5/Canvas-Commons/tkb-p/commons"},{title:"API",from:"/canvas/commons/api",to:"https://lor.instructure.com/docs/api/"}],l7=n7.map(e=>({...e,lang:"EN"})),r7={brand:"Canvas Commons",links:l7},$p="canvas-credentials",i7=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,u7=`${M.raw}/${M.owner}/${M.repo}`,Ki=`${u7}/${$p}`,c7=[{title:"Compliance Package",from:"/canvas/credentials/dl",to:`${i7}/${$p}.zip`},{title:"VPAT",from:"/canvas/credentials/vpat/dl",to:`${Ki}/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf`},{title:"Architecture Paper",from:"/canvas/credentials/architecture/dl",to:`${Ki}/Canvas%20Credentials/Canvas%20Credentials%20Architecture.pdf`},{title:"HECVAT",from:"/canvas/credentials/hecvat/dl",to:`${Ki}/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx`},{title:"TX-RAMP Certification",from:"/canvas/credentials/tx-ramp/dl",to:`${Ki}/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Home (HE)",from:"/canvas/credentials",to:"https://www.instructure.com/higher-education/products/canvas/canvas-credentials-digital-badges/"},{title:"Home (K12)",from:"/canvas/credentials/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-credentials-digital-badges/"},{title:"Guides",from:"/canvas/credentials/guides",to:"https://community.canvaslms.com/t5/Canvas-Credentials-Badges-Badgr/ct-p/canvas-credentials-badges"},{title:"Release Notes",from:"/canvas/credentials/releases",to:"https://community.canvaslms.com/t5/Badges-Credentials-Releases/tkb-p/badges-release"},{title:"API",from:"/canvas/credentials/api",to:"https://api.badgr.io/docs/v2/"}],o7=c7.map(e=>({...e,lang:"EN"})),Np="canvas-credentials-ES_LA",s7=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,f7=`${M.raw}/${M.owner}/${M.repo}`,Pi=`${f7}/${Np}`,d7=[{title:"Compliance Package",from:"/es-la/canvas/credentials/dl",to:`${s7}/${Np}.zip`},{title:"VPAT",from:"/es-la/canvas/credentials/vpat/dl",to:`${Pi}/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf`},{title:"Papel de Arquitectura",from:"/es-la/canvas/credentials/arquitectura/dl",to:`${Pi}/Canvas%20Credentials/Canvas%20Credentials%20Architecture_ES.pdf`},{title:"HECVAT",from:"/es-la/canvas/credentials/hecvat/dl",to:`${Pi}/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx`},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/canvas/credentials/tx-ramp/dl",to:`${Pi}/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf`}],h7=d7.map(e=>({...e,lang:"ES_LA"})),Lp="canvas-credentials-PT_BR",m7=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,v7=`${M.raw}/${M.owner}/${M.repo}`,Ji=`${v7}/${Lp}`,p7=[{title:"Compliance Package",from:"/pt-br/canvas/credentials/dl",to:`${m7}/${Lp}.zip`},{title:"VPAT",from:"/pt-br/canvas/credentials/vpat/dl",to:`${Ji}/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf`},{title:"Papel de Arquitectura",from:"/pt-br/canvas/credentials/arquitectura/dl",to:`${Ji}/Canvas%20Credentials/Canvas%20Credentials%20Architecture_PT.pdf`},{title:"HECVAT",from:"/pt-br/canvas/credentials/hecvat/dl",to:`${Ji}/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx`},{title:"Certificado de Nível 2 de TX-RAMP",from:"/pt-br/canvas/credentials/tx-ramp/dl",to:`${Ji}/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf`}],y7=p7.map(e=>({...e,lang:"PT_BR"})),g7={brand:"Canvas Credentials",links:[...o7,...h7,...y7]},b7=[{title:"Guides",from:"/canvas/data/guides",to:"https://community.canvaslms.com/t5/Canvas-Data-Users/gh-p/data"},{title:"API",from:"/canvas/data/api",to:"https://portal.inshosteddata.com/docs"}],S7=b7.map(e=>({...e,lang:"EN"})),E7={brand:"Canvas Data",links:S7},R7=[{title:"Startseite",from:"/de/canvas/lms",to:"https://www.instructure.com/de/hochschule/produkt/canvas/canvas-lms/"},{title:"Handbücher",from:"/de/canvas/handbuch",to:"https://community.canvaslms.com/t5/Ressourcen-auf-Deutsch-German/ct-p/german_resources"}],C7=R7.map(e=>({...e,lang:"DE"})),Up="canvas-lms",A7=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,T7=`${M.raw}/${M.owner}/${M.repo}`,dr=`${T7}/${Up}`,w7=[{title:"Compliance Package",from:"/canvas/lms/dl",to:`${A7}/${Up}.zip`},{title:"Architecture Paper",from:"/canvas/lms/architecture/dl",to:`${dr}/Canvas%20LMS/Canvas%20LMS%20Architecture.pdf`},{title:"HECVAT",from:"/canvas/lms/hecvat/dl",to:`${dr}/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx`},{title:"K12CVAT",from:"/canvas/lms/k12cvat/dl",to:`${dr}/Canvas%20LMS/Canvas%20LMS%20K12CVAT%20Full.xlsx`},{title:"SOC 3 Report",from:"/canvas/lms/soc/dl",to:`${dr}/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf`},{title:"TX-RAMP Level 2 Certificate",from:"/canvas/lms/txramp/dl",to:`${dr}/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Home (HE)",from:"/canvas/lms",to:"https://www.instructure.com/higher-education/products/canvas/canvas-lms/"},{title:"Home (K12)",from:"/canvas/lms/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-lms/"},{title:"VPAT",from:"/canvas/lms/vpat",to:"https://www.instructure.com/products/canvas/accessibility/"},{title:"Guides",from:"/canvas/lms/guides",to:"https://community.canvaslms.com/t5/Canvas-Guides/ct-p/canvas_guides/"},{title:"Release Notes",from:"/canvas/lms/releases",to:"https://community.canvaslms.com/t5/Canvas-Releases/tkb-p/canvas-release"},{title:"API",from:"/canvas/lms/api",to:"https://canvas.instructure.com/doc/api/index.html"}],_7=w7.map(e=>({...e,lang:"EN"})),Hp="canvas-lms-ES_LA",O7=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,M7=`${M.raw}/${M.owner}/${M.repo}`,hr=`${M7}/${Hp}`,x7=[{title:"Compliance Package",from:"/es-la/canvas/lms/dl",to:`${O7}/${Hp}.zip`},{title:"Papel de Arquitectura",from:"/es-la/canvas/lms/arquitectura/dl",to:`${hr}/Canvas%20LMS/Canvas%20LMS%20Architecture_ES.pdf`},{title:"HECVAT",from:"/es-la/canvas/lms/hecvat/dl",to:`${hr}/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx`},{title:"K12CVAT",from:"/es-la/canvas/lms/k12cvat/dl",to:`${hr}/Canvas%20LMS/Canvas%20LMS%20K-12CVAT-Lite.xlsx`},{title:"Informe SOC 3",from:"/es-la/canvas/lms/soc/dl",to:`${hr}/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf`},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/canvas/lms/txramp/dl",to:`${hr}/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Página de inicio (HE)",from:"/es-la/canvas/lms",to:"https://www.instructure.com/es/canvas/educacion-superior/"},{title:"Página de inicio (K12)",from:"/es-la/canvas/lms/basica",to:"https://www.instructure.com/es/educacion-basica/"},{title:"Guías",from:"/es-la/canvas/guias",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"},{title:"Notas de implementación",from:"/es-la/canvas/lms/publicacion",to:"https://community.canvaslms.com/t5/Espa%C3%B1ol/tkb-p/canvas-release-espanol"}],D7=x7.map(e=>({...e,lang:"ES_LA"})),Bp="canvas-lms-PT_BR",z7=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,$7=`${M.raw}/${M.owner}/${M.repo}`,mr=`${$7}/${Bp}`,N7=[{title:"Compliance Package",from:"/pt-br/canvas/lms/dl",to:`${z7}/${Bp}.zip`},{title:"Papel de Arquitetura",from:"/pt-br/canvas/lms/arquitetura/dl",to:`${mr}/Canvas%20LMS/Canvas%20LMS%20Architecture_PT.pdf`},{title:"HECVAT",from:"/pt-br/canvas/lms/hecvat/dl",to:`${mr}/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx`},{title:"K12CVAT",from:"/pt-br/canvas/lms/k12cvat/dl",to:`${mr}/Canvas%20LMS/Canvas%20LMS%20K-12CVAT-Lite.xlsx`},{title:"Relatório SOC 3",from:"/pt-br/canvas/lms/soc/dl",to:`${mr}/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf`},{title:"Certificado de Nível 2 do TX-RAMP",from:"/pt-br/canvas/lms/txramp/dl",to:`${mr}/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Página inicial (HE)",from:"/canvas/lms/pt",to:"https://www.instructure.com/pt-br/canvas/ensino-superior/"},{title:"Página inicial (K12)",from:"/canvas/lms/pt/basica",to:"https://www.instructure.com/pt-br/ensino-fundamental-e-medio/"},{title:"Guias",from:"/pt-br/canvas/guias",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"},{title:"Notas de lançamento (Canvas LMS)",from:"/canvas/lms/lancamentos",to:"https://community.canvaslms.com/t5/Portugues/tkb-p/canvas-release-portugues"}],L7=N7.map(e=>({...e,lang:"PT_BR"})),U7={brand:"Canvas LMS",links:[..._7,...D7,...L7,...C7]},H7=[{title:"Mobile Apps (Android)",from:"/canvas/mobile/android",to:"https://play.google.com/store/apps/developer?id=Instructure"},{title:"Mobile Apps (iOS)",from:"/canvas/mobile/ios",to:"https://apps.apple.com/us/developer/instructure-inc/id418441198"},{title:"Release Notes",from:"/canvas/mobile/releases",to:"https://community.canvaslms.com/t5/Canvas-Mobile-Releases/tkb-p/CanvasMobileReleases"},{title:"Guides",from:"/canvas/mobile/guides",to:"https://community.canvaslms.com/t5/Canvas-Mobile-Users/gh-p/mobile"}],B7=H7.map(e=>({...e,lang:"EN"})),j7={brand:"Canvas Mobile",links:B7},jp="canvas-studio",V7=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,k7=`${M.raw}/${M.owner}/${M.repo}`,$h=`${k7}/${jp}`,G7=[{title:"Compliance Package",from:"/canvas/studio/dl",to:`${V7}/${jp}.zip`},{title:"Architecture Paper",from:"/canvas/studio/architecture/dl",to:`${$h}/Canvas%20Studio/Canvas%20Studio%20Architecture.pdf`},{title:"HECVAT",from:"/canvas/studio/hecvat/dl",to:`${$h}/Canvas%20Studio/Canvas%20Studio%20HECVAT%20Lite.xlsx`},{title:"Home (HE)",from:"/canvas/studio",to:"https://www.instructure.com/higher-education/products/canvas/canvas-studio/"},{title:"Home (K12)",from:"/canvas/studio/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-studio/"},{title:"VPAT",from:"/canvas/studio/vpat",to:"https://www.instructure.com/accessibility/canvas/canvas-studio-vpat/"},{title:"Guides",from:"/canvas/studio/guides",to:"https://community.canvaslms.com/t5/Canvas-Studio/ct-p/studio_guides"},{title:"Release Notes",from:"/canvas/studio/releases",to:"https://community.canvaslms.com/t5/Studio-Releases/ct-p/studio_releases"},{title:"API",from:"/canvas/studio/api",to:"https://canvas.instructuremedia.com/api/public/docs/#/"}],Y7=G7.map(e=>({...e,lang:"EN"})),q7={brand:"Canvas Studio",links:Y7},X7=[{title:"Gemeinschaft",from:"/de/canvas/gemeinschaft",to:"https://community.canvaslms.com/t5/Ressourcen-auf-Deutsch-German/ct-p/german_resources"}],Z7=X7.map(e=>({...e,lang:"DE"})),Q7="canvas-lms",K7=`${M.raw}/${M.owner}/${M.repo}`,P7=`${K7}/${Q7}`,J7=[{title:"Security Audit Report",from:"/canvas/audit/dl",to:`${P7}/Canvas%20LMS/Canvas%20Security%20Audit%20Report.pdf`},{title:"Try Canvas (FFT)",from:"/canvas/try",to:"https://www.instructure.com/try-canvas"},{title:"Community",from:"/canvas/community",to:"https://community.canvaslms.com/t5/Canvas/ct-p/canvas"},{title:"Roadmap",from:"/canvas/roadmap",to:"https://community.canvaslms.com/t5/Canvas-Product-Roadmap/ct-p/canvas-product-roadmap"},{title:"Ideas",from:"/canvas/ideas",to:"https://community.canvaslms.com/t5/Canvas-Ideas-and-Themes/ct-p/canvas-ideas-themes?tab=identified"}],W7=J7.map(e=>({...e,lang:"EN"})),F7=[{title:"Communidad",from:"/es-la/canvas/lms/communidad",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"}],I7=F7.map(e=>({...e,lang:"ES_LA"})),e6=[{title:"Comunidade",from:"/pt-br/canvas/comunidade",to:"https://community.canvaslms.com/t5/Recursos-em-Portugu%C3%AAs-Portuguese/ct-p/portuguese_resources"}],t6=e6.map(e=>({...e,lang:"PT_BR"})),a6={brand:"Canvas",links:[...W7,...I7,...t6,...Z7]},n6=[{title:"Home",from:"/elevate/dataquality",to:"https://www.instructure.com/k12/products/elevate/elevate-data-quality/"},{title:"Guides",from:"/elevate/dataquality/guides",to:"https://community.canvaslms.com/t5/Elevate-Data-Quality/ct-p/certify"}],l6=n6.map(e=>({...e,lang:"EN"})),r6={brand:"Elevate Data Quality",links:l6},i6=[{title:"Guides",from:"/elevate/datasync/guides",to:"https://community.canvaslms.com/t5/Elevate-Data-Sync/ct-p/elevate_data_sync"}],u6=i6.map(e=>({...e,lang:"EN"})),c6={brand:"Elevate Data Sync",links:u6},Vp="elevate-standards-alignment",o6=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,s6=`${M.raw}/${M.owner}/${M.repo}`,f6=`${s6}/${Vp}`,d6=[{title:"Compliance Package",from:"/elevate/standards-alignment/dl",to:`${o6}/${Vp}.zip`},{title:"HECVAT Lite",from:"/elevate/standards-alignment/hecvat/dl",to:`${f6}/Elevate%20Standards%20Alignment/Elevate%20Standards%20Alignment%20HECVAT%20Lite.xlsx`},{title:"Home",from:"/elevate/standards-alignment",to:"https://www.instructure.com/corporate-education/products/elevate/elevate-standards-alignment"},{title:"Release Notes",from:"/elevate/standards-alignment/releases",to:"https://community.canvaslms.com/t5/Elevate-Standards-Alignment/tkb-p/esa_releases"},{title:"Guides",from:"/elevate/standards-alignment/guides",to:"https://community.canvaslms.com/t5/Elevate-Standards-Alignment/tkb-p/ab_basics"}],h6=d6.map(e=>({...e,lang:"EN"})),m6={brand:"Elevate Standards Alignment",links:h6},v6=[{title:"Community",from:"/elevate/community",to:"https://community.canvaslms.com/t5/Elevate/ct-p/elevate"},{title:"Roadmap",from:"/elevate/roadmap",to:"https://community.canvaslms.com/t5/Elevate-Product-Roadmap/ct-p/elevate-product-roadmap"}],p6=v6.map(e=>({...e,lang:"EN"})),y6={brand:"Elevate",links:p6},kp="impact",g6=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,b6=`${M.raw}/${M.owner}/${M.repo}`,zo=`${b6}/${kp}`,S6=[{title:"Compliance Package",from:"/impact/dl",to:`${g6}/${kp}.zip`},{title:"Architecture Paper",from:"/impact/architecture/dl",to:`${zo}/Impact/Impact%20Architecture.pdf`},{title:"HECVAT",from:"/impact/hecvat/dl",to:`${zo}/Impact/Impact%20by%20Instructure%20HECVAT%20Full.xlsx`},{title:"TX-RAMP Level 2 Certification",from:"/impact/tx-ramp/dl",to:`${zo}/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Home (HE)",from:"/impact/he",to:"https://www.instructure.com/higher-education/products/impact/"},{title:"Home (K12)",from:"/impact/k12",to:"https://www.instructure.com/k12/products/impact/"},{title:"Community",from:"/impact/community",to:"https://community.canvaslms.com/t5/Impact/ct-p/impact"},{title:"Guides",from:"/impact/guides",to:"https://community.canvaslms.com/t5/Impact-Guides/tkb-p/impact_guides"},{title:"Release Notes",from:"/impact/releases",to:"https://community.canvaslms.com/t5/Impact-Releases/ct-p/impact_releases"}],E6=S6.map(e=>({...e,lang:"EN"})),Gp="impact-ES_LA",R6=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,C6=`${M.raw}/${M.owner}/${M.repo}`,$o=`${C6}/${Gp}`,A6=[{title:"Compliance Package",from:"/es-la/impact/dl",to:`${R6}/${Gp}.zip`},{title:"Papel de Arquitectura",from:"/es-la/impact/arquitectura/dl",to:`${$o}/Impact/Impact%20Architecture_ES.pdf`},{title:"HECVAT",from:"/es-la/impact/hecvat/dl",to:`${$o}/Impact/Impact%20by%20Instructure%20HECVAT%20Full.xlsx`},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/impact/tx-ramp/dl",to:`${$o}/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf`}],T6=A6.map(e=>({...e,lang:"ES_LA"})),Yp="impact-PT_BR",w6=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,_6=`${M.raw}/${M.owner}/${M.repo}`,No=`${_6}/${Yp}`,O6=[{title:"Compliance Package",from:"/pt-br/impact/dl",to:`${w6}/${Yp}.zip`},{title:"Papel de Arquitetura",from:"/pt-br/impact/arquitetura/dl",to:`${No}/Impact/Impact%20Architecture_PT.pdf`},{title:"HECVAT",from:"/pt-br/impact/hecvat/dl",to:`${No}/Impact/Impact%20by%20Instructure%20HECVAT%20Full.xlsx`},{title:"Certificado de Nível 2 do TX-RAMP",from:"/pt-br/impact/tx-ramp/dl",to:`${No}/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf`}],M6=O6.map(e=>({...e,lang:"PT_BR"})),x6={brand:"Impact",links:[...E6,...T6,...M6]},D6=[{title:"Startseite",from:"/de/home",to:"https://www.instructure.com/de"},{title:"Kontakt",from:"/de/kontakt",to:"https://www.instructure.com/de/contact-us"}],z6=D6.map(e=>({...e,lang:"DE"})),$6=`${M.raw}/${M.owner}/${M.repo}`,Pt=`${$6}/${M.branch}`,N6=[{title:"Security White Paper",from:"/security/dl",to:`${Pt}/Instructure/Instructure%20Security%20Overview.pdf`},{title:"Business Continuity White Paper",from:"/bc/dl",to:`${Pt}/Instructure/Instructure%20Business%20Continuity%20%26%20Disaster%20Recovery.pdf`},{title:"CAIQ",from:"/caiq/dl",to:`${Pt}/Instructure/Instructure%20ESG%20Report%20FY2023.pdf`},{title:"CSA Star Certificate",from:"/csa/dl",to:`${Pt}/Instructure/Instructure%20CSA%20STAR%20Certificate.pdf`},{title:"Cyber Essentials+ Certificate",from:"/ce/dl",to:`${Pt}/Instructure/Instructure%20Cyber%20Essentials%20Plus.pdf`},{title:"Environmental, Social, and Governance Report",from:"/esg/dl",to:`${Pt}/Instructure/Instructure%20ESG%20Report%20FY2023.pdf`},{title:"Instructure, Inc. Certificate of Insurance",from:"/coi/dl",to:`${Pt}/Instructure/Instructure%20Inc%20COI.pdf`},{title:"Instructure Global Certificate of Insurance",from:"/coi-global/dl",to:`${Pt}/Instructure/Instructure%20Global%20COI.pdf`},{title:"ISO 27001 Certificate",from:"/iso/dl",to:`${Pt}/Instructure/Instructure%20ISO%2027001%20Compliance%20Certificate.pdf`},{title:"Quality Assurance Program",from:"/qa/dl",to:`${Pt}/Instructure/Instructure%20Quality%20Assurance%20Program.pdf`},{title:"Home",from:"/home",to:"https://www.instructure.com/"},{title:"Roadmap",from:"/roadmap",to:"https://community.canvaslms.com/t5/Instructure-Roadmap/ct-p/instructure-roadmap/"},{title:"Accessibility",from:"/a11y",to:"https://www.instructure.com/accessibility/"},{title:"Contact",from:"/contact",to:"https://www.instructure.com/contact-us/"},{title:"Privacy",from:"/privacy",to:"https://www.instructure.com/canvas/privacy/"},{title:"Security",from:"/security",to:"https://www.instructure.com/products/canvas/security/"},{title:"Trust Center",from:"/trust",to:"https://www.instructure.com/trust-center/"},{title:"Community",from:"/community",to:"https://community.canvaslms.com/"},{title:"Terms & Conditions",from:"/tos",to:"https://www.instructure.com/policies/master-terms-conditions/"},{title:"Global Terms & Conditions",from:"/tos/global",to:"https://www.instructure.com/policies/global/master-terms-and-conditions/"},{title:"Acceptable Use Policy",from:"/aup",to:"https://www.instructure.com/policies/acceptable-use/"},{title:"Data Privacy Addendum",from:"/dpa",to:"https://www.instructure.com/policies/data-processing/"},{title:"Investor Relations",from:"/investors",to:"https://ir.instructure.com/overview/default.aspx"},{title:"Status",from:"/status",to:"https://status.instructure.com/"},{title:"CSA Star Registration",from:"/csa",to:"https://cloudsecurityalliance.org/star/registry/instructure/"},{title:"1EdTech Registrations",from:"/1edtech",to:"https://site.imsglobal.org/certifications?query=instructure"},{title:"Our Story",from:"/story",to:"https://www.instructure.com/about/our-story"},{title:"Study Hall",from:"/resources",to:"https://www.instructure.com/resources/"},{title:"EduAppCenter",from:"/apps",to:"https://www.eduappcenter.com/"},{title:"ESG Report (online)",from:"/esg",to:"https://instructure.com/esg-report"}],L6=N6.map(e=>({...e,lang:"EN"})),U6=[{title:"Página de inicio",from:"/es-la/home",to:"https://www.instructure.com/es/"},{title:"Contáctenos",from:"/es-la/contactenos",to:"https://www.instructure.com/es/contactenos/"},{title:"Privacidad",from:"/es-la/privicidad",to:"https://www.instructure.com/es/canvas/privacidad/"},{title:"Seguridad",from:"/es-la/seguridad",to:"https://www.instructure.com/es/canvas/seguridad/"},{title:"Nuestra Historia",from:"/es-la/historia",to:"https://www.instructure.com/es/sobre/nuestra-historia"}],H6=U6.map(e=>({...e,lang:"ES_LA"})),B6=[{title:"Pagina inicial",from:"/pt-br/home",to:"https://www.instructure.com/pt-br/"},{title:"Contato",from:"/pt-br/contato",to:"https://www.instructure.com/pt-br/contato/"},{title:"Contato",from:"/pt-br/contato",to:"https://www.instructure.com/pt-br/contato/"},{title:"Privacidade",from:"/pt-br/privacidade",to:"https://www.instructure.com/pt-br/canvas/privacidade/"},{title:"Segurança",from:"/pt-br/seguranca",to:"https://www.instructure.com/pt-br/canvas/seguranca/"},{title:"Nossa História",from:"/pt-br/historia",to:"https://www.instructure.com/pt-br/sobre/nossa-historia"}],j6=B6.map(e=>({...e,lang:"PT_BR"})),V6={brand:"Instructure",links:[...L6,...H6,...j6,...z6]},k6=[],G6=k6.map(e=>({...e,lang:"EN"})),Y6={brand:"Intelligent Insights",links:G6},qp="learnplatform",q6=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,X6=`${M.raw}/${M.owner}/${M.repo}`,Lo=`${X6}/${qp}`,Z6=[{title:"Compliance Package",from:"/learnplatform/dl",to:`${q6}/${qp}.zip`},{title:"EdTech Top 40 Report",from:"/learnplatform/top40/dl",to:`${Lo}/LearnPlatform/EdTech%20Top%2040.pdf`},{title:"Architecture Paper",from:"/learnplatform/architecture/dl",to:`${Lo}/LearnPlatform/LearnPlatform%20Architecture%20Overview.pdf`},{title:"HECVAT Lite",from:"/learnplatform/hecvat/dl",to:`${Lo}/LearnPlatform/LearnPlatform%20HECVAT%20Lite.xlsx`},{title:"Home",from:"/learnplatform",to:"https://www.instructure.com/k12/products/learnplatform/"},{title:"Terms of Service",from:"/learnplatform/tos",to:"https://www.instructure.com/policies/learnplatform-terms-of-service/"},{title:"Privacy",from:"/learnplatform/privacy",to:"https://www.instructure.com/policies/privacy-learnplatform/"},{title:"Data Processing Agreement",from:"/learnplatform/dpa",to:"https://www.instructure.com/policies/learnplatform-data-processing-agreement/"},{title:"Statement of Neutrality",from:"/learnplatform/neutrality",to:"https://www.instructure.com/policies/learnplatform-neutrality/"}],Q6=Z6.map(e=>({...e,lang:"EN"})),K6={brand:"Learnplatform",links:Q6},Xp="mastery-connect",P6=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,J6=`${M.raw}/${M.owner}/${M.repo}`,Nh=`${J6}/${Xp}`,W6=[{title:"Compliance Package",from:"/mastery/connect/dl",to:`${P6}/${Xp}.zip`},{title:"Architecture Paper",from:"/mastery/connect/architecture/dl",to:`${Nh}/Mastery%20Connect/Mastery%20Connect%20Architecture.pdf`},{title:"HECVAT Lite",from:"/mastery/connect/hecvat/dl",to:`${Nh}/Mastery%20Connect/Mastery%20Connect%20HECVAT%20Lite.xlsx`},{title:"Home",from:"/mastery/connect",to:"https://www.instructure.com/k12/products/mastery/mastery-connect"},{title:"Guides",from:"/mastery/connect/guides",to:"https://community.canvaslms.com/t5/Mastery-Connect/ct-p/masteryconnect"},{title:"Release Notes",from:"/mastery/connect/releases",to:"https://community.canvaslms.com/t5/Mastery-Connect-Releases/tkb-p/masteryconnect"},{title:"API",from:"/mastery/connect/api",to:"https://docs.google.com/document/d/19TxyeRzF6nyJDY6ej2dZozbE87JdUygw"},{title:"Mobile App (Android)",from:"/mastery/connect/android",to:"https://play.google.com/store/apps/dev?id=8869528477632015729&hl=EN&gl=US"},{title:"Mobile App (iOS)",from:"/canvas/lms/ios",to:"https://apps.apple.com/us/developer/masteryconnect/id413937396"}],F6=W6.map(e=>({...e,lang:"EN"})),I6={brand:"Mastery Connect",links:F6},e9=[{title:"Home",from:"/mastery/itembank",to:"https://www.instructure.com/k12/products/mastery/mastery-item-bank/"},{title:"Guides",from:"/mastery/itembank/guides",to:"https://community.canvaslms.com/t5/Mastery-Item-Bank/ct-p/mastery-item-bank/"}],t9=e9.map(e=>({...e,lang:"EN"})),a9={brand:"Mastery Item Bank",links:t9},n9=[{title:"Formatives Home",from:"/mastery/view/formative",to:"https://www.instructure.com/k12/products/mastery/mastery-view-formative-assessments/"},{title:"Predictives Home",from:"/mastery/view/predictive",to:"https://www.instructure.com/k12/products/mastery/mastery-view-predictive-assessments/"}],l9=n9.map(e=>({...e,lang:"EN"})),r9={brand:"Mastery View Assessments",links:l9},i9=[{title:"Community",from:"/mastery/community",to:"https://community.canvaslms.com/t5/Mastery/ct-p/mastery"},{title:"Roadmap",from:"/mastery/roadmap",to:"https://community.canvaslms.com/t5/Mastery-Product-Roadmap/ct-p/mastery-product-roadmap"}],u9=i9.map(e=>({...e,lang:"EN"})),c9={brand:"Mastery",links:u9},o9=[],s9=o9.map(e=>({...e,lang:"EN"})),f9={brand:"Parchment",links:s9},d9=[WS,V6,a6,U7,j7,q7,a7,r7,E7,g7,c9,I6,a9,r9,x6,y6,m6,r6,c6,K6,Y6,f9],Vn=[];for(const e of QS)Vn.push({path:`${e.route}`,lazy:()=>Ut(()=>import("./markdownBrand-DRRkJwz6.js"),__vite__mapDeps([0,1,2,3])),loader:()=>({readme:e.readme,brand:e.brandName}),children:[{path:":language",lazy:()=>Ut(()=>import("./markdownBrand-DRRkJwz6.js"),__vite__mapDeps([0,1,2,3])),loader:()=>({readme:e.readme,brand:e.brandName})}]});for(const e of d9)for(const t of e.links)Vn.push({path:t.from,lazy:()=>Ut(()=>import("./redirectTo-De8G5wZL.js"),__vite__mapDeps([4,1,5])),loader:()=>({path:t.from,brand:e.brand,url:t.to}),children:[{path:":language",lazy:()=>Ut(()=>import("./redirectTo-De8G5wZL.js"),__vite__mapDeps([4,1,5])),loader:()=>({path:t.from,brand:e.brand,url:t.to})}]});Vn.push({path:"/links",lazy:()=>Ut(()=>import("./links-pxnmE0x3.js"),__vite__mapDeps([6,1,7,3,8])),children:[{path:":language",lazy:()=>Ut(()=>import("./links-pxnmE0x3.js"),__vite__mapDeps([6,1,7,3,8]))}]});Vn.push({path:"/mdui",lazy:()=>Ut(()=>import("./mdui-DUzyFQJ0.js"),__vite__mapDeps([9,1,2,3,10,8])),children:[{path:":language",lazy:()=>Ut(()=>import("./mdui-DUzyFQJ0.js"),__vite__mapDeps([9,1,2,3,10,8]))}]});Vn.push({path:"/releases",lazy:()=>Ut(()=>import("./releases-wyg0zbfr.js"),__vite__mapDeps([11,1,2,3,12])),children:[{path:":language",lazy:()=>Ut(()=>import("./releases-wyg0zbfr.js"),__vite__mapDeps([11,1,2,3,12]))}]});Vn.push({path:"*",lazy:()=>Ut(()=>import("./error-BC2Hv5fG.js"),__vite__mapDeps([13,1,5])),children:[{path:":language",lazy:()=>Ut(()=>import("./error-BC2Hv5fG.js"),__vite__mapDeps([13,1,5]))}]});const h9=w4(Vn),Zp=document.getElementById("root");if(!Zp)throw new Error("Root element not found");Dv.createRoot(Zp).render(Ze.jsx(be.StrictMode,{children:Ze.jsx(zc,{theme:rd,children:Ze.jsx(ES,{as:"div",minHeight:"100vh",position:"relative",children:Ze.jsx(L4,{router:h9})})})}));export{$s as $,Mc as A,o5 as B,f5 as C,s5 as D,ad as E,Jh as F,I3 as G,S9 as H,zc as I,e5 as J,b5 as K,d9 as L,QS as M,b9 as N,v9 as O,L as P,O5 as Q,be as R,Fe as S,Jn as T,wp as U,ES as V,ld as W,E9 as X,Qu as Y,fr as Z,Ut as _,y9 as a,Dp as a0,rd as a1,Xl as a2,Zl as a3,Ql as a4,Dn as a5,Kl as a6,Ys as b,p9 as c,ZS as d,C9 as e,Mn as f,M as g,xn as h,hn as i,Ze as j,m9 as k,Ll as l,Xu as m,Cp as n,Rp as o,y5 as p,Ep as q,w as r,E5 as s,Mp as t,g9 as u,i5 as v,id as w,y4 as x,dc as y,bi as z}; + */var Ye=typeof Symbol=="function"&&Symbol.for,Qf=Ye?Symbol.for("react.element"):60103,Kf=Ye?Symbol.for("react.portal"):60106,gc=Ye?Symbol.for("react.fragment"):60107,bc=Ye?Symbol.for("react.strict_mode"):60108,Sc=Ye?Symbol.for("react.profiler"):60114,Ec=Ye?Symbol.for("react.provider"):60109,Rc=Ye?Symbol.for("react.context"):60110,Pf=Ye?Symbol.for("react.async_mode"):60111,Cc=Ye?Symbol.for("react.concurrent_mode"):60111,Ac=Ye?Symbol.for("react.forward_ref"):60112,Tc=Ye?Symbol.for("react.suspense"):60113,m3=Ye?Symbol.for("react.suspense_list"):60120,_c=Ye?Symbol.for("react.memo"):60115,wc=Ye?Symbol.for("react.lazy"):60116,v3=Ye?Symbol.for("react.block"):60121,p3=Ye?Symbol.for("react.fundamental"):60117,y3=Ye?Symbol.for("react.responder"):60118,g3=Ye?Symbol.for("react.scope"):60119;function At(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Qf:switch(e=e.type,e){case Pf:case Cc:case gc:case Sc:case bc:case Tc:return e;default:switch(e=e&&e.$$typeof,e){case Rc:case Ac:case wc:case _c:case Ec:return e;default:return t}}case Kf:return t}}}function np(e){return At(e)===Cc}ue.AsyncMode=Pf;ue.ConcurrentMode=Cc;ue.ContextConsumer=Rc;ue.ContextProvider=Ec;ue.Element=Qf;ue.ForwardRef=Ac;ue.Fragment=gc;ue.Lazy=wc;ue.Memo=_c;ue.Portal=Kf;ue.Profiler=Sc;ue.StrictMode=bc;ue.Suspense=Tc;ue.isAsyncMode=function(e){return np(e)||At(e)===Pf};ue.isConcurrentMode=np;ue.isContextConsumer=function(e){return At(e)===Rc};ue.isContextProvider=function(e){return At(e)===Ec};ue.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Qf};ue.isForwardRef=function(e){return At(e)===Ac};ue.isFragment=function(e){return At(e)===gc};ue.isLazy=function(e){return At(e)===wc};ue.isMemo=function(e){return At(e)===_c};ue.isPortal=function(e){return At(e)===Kf};ue.isProfiler=function(e){return At(e)===Sc};ue.isStrictMode=function(e){return At(e)===bc};ue.isSuspense=function(e){return At(e)===Tc};ue.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===gc||e===Cc||e===Sc||e===bc||e===Tc||e===m3||typeof e=="object"&&e!==null&&(e.$$typeof===wc||e.$$typeof===_c||e.$$typeof===Ec||e.$$typeof===Rc||e.$$typeof===Ac||e.$$typeof===p3||e.$$typeof===y3||e.$$typeof===g3||e.$$typeof===v3)};ue.typeOf=At;ap.exports=ue;var b3=ap.exports,Jf=b3,S3={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},E3={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},R3={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},lp={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Wf={};Wf[Jf.ForwardRef]=R3;Wf[Jf.Memo]=lp;function hh(e){return Jf.isMemo(e)?lp:Wf[e.$$typeof]||S3}var C3=Object.defineProperty,A3=Object.getOwnPropertyNames,mh=Object.getOwnPropertySymbols,T3=Object.getOwnPropertyDescriptor,_3=Object.getPrototypeOf,vh=Object.prototype;function rp(e,t,a){if(typeof t!="string"){if(vh){var n=_3(t);n&&n!==vh&&rp(e,n,a)}var l=A3(t);mh&&(l=l.concat(mh(t)));for(var r=hh(e),i=hh(t),u=0;u=4;++n,l-=4)a=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,a=(a&65535)*1540483477+((a>>>16)*59797<<16),a^=a>>>24,t=(a&65535)*1540483477+((a>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(l){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var D3={animationIterationCount:1,aspectRatio: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},z3=/[A-Z]|^ms/g,$3=/_EMO_([^_]+?)_([^]*?)_EMO_/g,cp=function(t){return t.charCodeAt(1)===45},ph=function(t){return t!=null&&typeof t!="boolean"},Co=ep(function(e){return cp(e)?e:e.replace(z3,"-$&").toLowerCase()}),yh=function(t,a){switch(t){case"animation":case"animationName":if(typeof a=="string")return a.replace($3,function(n,l,r){return Wt={name:l,styles:r,next:Wt},l})}return D3[t]!==1&&!cp(t)&&typeof a=="number"&&a!==0?a+"px":a};function ii(e,t,a){if(a==null)return"";if(a.__emotion_styles!==void 0)return a;switch(typeof a){case"boolean":return"";case"object":{if(a.anim===1)return Wt={name:a.name,styles:a.styles,next:Wt},a.name;if(a.styles!==void 0){var n=a.next;if(n!==void 0)for(;n!==void 0;)Wt={name:n.name,styles:n.styles,next:Wt},n=n.next;var l=a.styles+";";return l}return N3(e,t,a)}case"function":{if(e!==void 0){var r=Wt,i=a(e);return Wt=r,ii(e,t,i)}break}}return a}function N3(e,t,a){var n="";if(Array.isArray(a))for(var l=0;la=>{if(typeof e=="function"){const n=a.displayName||a.name,l=e(a,...t);return l.displayName=n,l}else return a}}function vp(e,t,a,n,...l){}const Mn=(e,t,...a)=>vp("error",!0,e,t,...a),Xu=(e,t,...a)=>vp("warn",!0,e,t,...a);var W3=function e(t,a){if(t===a)return!0;if(t&&a&&typeof t=="object"&&typeof a=="object"){if(t.constructor!==a.constructor)return!1;var n,l,r;if(Array.isArray(t)){if(n=t.length,n!=a.length)return!1;for(l=n;l--!==0;)if(!e(t[l],a[l]))return!1;return!0}if(t.constructor===RegExp)return t.source===a.source&&t.flags===a.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===a.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===a.toString();if(r=Object.keys(t),n=r.length,n!==Object.keys(a).length)return!1;for(l=n;l--!==0;)if(!Object.prototype.hasOwnProperty.call(a,r[l]))return!1;for(l=n;l--!==0;){var i=r[l];if(!e(t[i],a[i]))return!1}return!0}return t!==t&&a!==a};const F3=Ll(W3),I3=(e,t)=>(t.has(e)?t.set(e,t.get(e)+1):t.set(e,0),`${e}_${t.get(e)}`),e5=Object.prototype.hasOwnProperty;function pp(e){if(typeof e!="object")return!0;for(const t in e)if(e5.call(e,t))return!1;return!0}function yp(...e){let t={};return e.forEach(a=>{t=gp(t,a)}),t}function gp(e,t){if(Ao(t)){const a=[...Object.keys(t),...Object.getOwnPropertySymbols(t)],n={...e};return a.forEach(l=>{Ao(e[l])&&Ao(t[l])?n[l]=gp(e[l],t[l]):To(t[l])&&To(e[l])?n[l]=[...new Set([...e[l],...t[l]])]:To(e[l])?n[l]=[...new Set([...e[l],t[l]])]:n[l]=t[l]}),n}else return{...e}}function Ao(e){return e&&(typeof e=="object"||typeof e=="function")&&!Array.isArray(e)}function To(e){return Array.isArray(e)}function t5(e){if(Array.isArray(e))return e}function a5(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var n,l,r,i,u=[],c=!0,o=!1;try{if(r=(a=a.call(e)).next,t===0){if(Object(a)!==a)return;c=!1}else for(;!(c=(n=r.call(a)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(s){o=!0,l=s}finally{try{if(!c&&a.return!=null&&(i=a.return(),Object(i)!==i))return}finally{if(o)throw l}}return u}}function Sh(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,n=Array(t);a!!e&&e.ref!==void 0,u5=e=>!!e&&e.current!==void 0;function bi(e){const t=typeof e=="function"?e():e;if(t&&t===document)return document.documentElement;if(t instanceof Element||t===window||t&&typeof t.nodeType<"u")return t;if(t){const a=t;if(i5(a)){const n=u5(a.ref)?a.ref.current:a.ref;return n instanceof HTMLElement?n:bi(n)}else return a.constructor.componentId?a.constructor.componentId:a.constructor.name,Jh.findDOMNode(t)}}const Mc=!!(typeof window<"u"&&window.document&&window.document.createElement);function c5(e){const t=e&&bi(e);let a;t&&"ownerDocument"in t&&(a=t.ownerDocument);const n=Mc?window.document:void 0;return a||n}function o5(e){const t=e&&bi(e),a=c5(t);return a&&a.defaultView}function s5(e,t){let a={};if(Mc){const n=e&&bi(e);if(n){const l=o5(e);a=l?l.getComputedStyle(n,t):{}}}return a}function bp(e){return e.replace(/-([a-z])/g,t=>t[1].toUpperCase())}const f5=["borders","breakpoints","colors","forms","media","shadows","spacing","stacking","transitions","typography"],Sp=e=>{if(Array.isArray(e)||typeof e=="function")throw new Error;try{return"key"in e&&f5.every(t=>t in e)}catch{throw new Error}};function Ep(e,t,a){var n,l;return t.as&&t.as!==((n=e.defaultProps)===null||n===void 0?void 0:n.as)?t.as:typeof a=="function"?a():t.href?"a":t.to?(Xu(!t.as,`[${e.displayName}] \`as\` prop should be provided when using \`to\``),"a"):typeof t.onClick=="function"?"button":((l=e.defaultProps)===null||l===void 0?void 0:l.as)||"span"}function Rp(e,t,a){const n=Array.isArray(t)?t:Object.keys(t||{}),l=a?n.concat(a):n;return h5(e,l)}const d5=Object.prototype.hasOwnProperty,h5=(e,t)=>{const a={};for(const n in e)n==="theme"||n==="children"||n==="className"||n==="style"||n==="styles"||n==="makeStyles"||n==="themeOverride"||n==="deterministicId"||t.includes(n)||!d5.call(e,n)||(a[n]=e[n]);return a};var m5=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,v5=ep(function(e){return m5.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function p5(e){const t={};return Object.keys(e).filter(a=>v5(a)&&a!=="style"&&a!=="className"&&a!=="children"&&a!=="styles"&&a!=="makeStyles"&&a!=="deterministicId").forEach(a=>{t[a]=e[a]}),t}function Cp(e,t,a){const n=Array.isArray(t)?t:Object.keys(t||{}),l=a?n.concat(a):n;return y5(e,l)}function y5(e,t){const a={},n=t.length;let l=-1,r;for(;++lbe.createElement(Tp.Provider,{value:t},e),S5=Oc(e=>{const t=T.forwardRef((a,n)=>{const l=e.componentId||e.displayName||e.name,r=T.useContext(Tp),i=(u=l)=>I3(u,r);return a.deterministicId&&Xu(!1,`Manually passing the "deterministicId" property is not allowed on the ${l} component. +`,a.deterministicId),be.createElement(e,Object.assign({ref:n,deterministicId:i},a))});return Ff(t,e),t.propTypes=e.propTypes,t.defaultProps=e.defaultProps,t.allowedProps=e.allowedProps,t.originalType=e.originalType||e,t});function E5(e,t){if(e==null)return{};var a={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;a[n]=e[n]}return a}function xn(e,t){if(e==null)return{};var a,n,l=E5(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||{}.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}let sr,Xi,_o;const R5=()=>{if(sr)return sr;if(Mc){const e=document.documentElement;return Xi=e.getAttribute("dir"),sr=Xi||s5(e).direction,_o||(_o=new MutationObserver(()=>{const t=e.getAttribute("dir");t&&t!==Xi&&(Xi=sr=t)}),_o.observe(e,{attributes:!0})),sr}};function C5(e){if(Mc)return R5()}const zs=T.createContext(C5()||"ltr"),xc={ltr:"ltr",rtl:"rtl"},A5=["forwardedRef"],td=Oc(e=>{class t extends be.Component{render(){const l=this.props,r=l.forwardedRef,i=xn(l,A5);return be.createElement(zs.Consumer,null,u=>be.createElement(e,Object.assign({ref:r,dir:u},i)))}}t.displayName="TextDirectionContextConsumerComponent";const a=T.forwardRef((n,l)=>be.createElement(t,Object.assign({},n,{forwardedRef:l})));return Ff(a,e),a.defaultProps=e.defaultProps,a.propTypes=e.propTypes,a.allowedProps=e.allowedProps,a.originalType=e.originalType||e,a});td.DIRECTION=xc;const T5=L.oneOf(["auto","default","none","context-menu","help","pointer","progress","wait","cell","crosshair","text","vertical-text","alias","copy","move","no-drop","not-allowed","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out"]),_5=Object.freeze({radiusSmall:"0.125rem",radiusMedium:"0.25rem",radiusLarge:"0.5rem",widthSmall:"0.0625rem",widthMedium:"0.125rem",widthLarge:"0.25rem",style:"solid"});function w5(e){const t={textDarkest:e.licorice,textDark:e.ash,textLight:e.porcelain,textLightest:e.white,textBrand:e.brand,textLink:e.link,textAlert:e.barney,textInfo:e.brand,textSuccess:e.shamrock,textDanger:e.crimson,textWarning:e.fire},a={backgroundDarkest:e.licorice,backgroundDark:e.ash,backgroundMedium:e.tiara,backgroundLight:e.porcelain,backgroundLightest:e.white,backgroundBrand:e.brand,backgroundBrandSecondary:e.oxford,backgroundAlert:e.barney,backgroundInfo:e.brand,backgroundSuccess:e.shamrock,backgroundDanger:e.crimson,backgroundWarning:e.fire},n={borderLightest:e.white,borderLight:e.porcelain,borderMedium:e.tiara,borderDark:e.ash,borderDarkest:e.licorice,borderBrand:e.brand,borderAlert:e.barney,borderInfo:e.brand,borderSuccess:e.shamrock,borderDanger:e.crimson,borderWarning:e.fire,borderDebug:e.crimson};return{...e,...t,...a,...n,values:e,text:t,background:a,border:n}}const O5={brand:"#0374B5",link:"#0374B5",electric:"#0374B5",shamrock:"#0B874B",barney:"#BF32A4",crimson:"#E0061F",fire:"#FC5E13",licorice:"#2D3B45",oxford:"#394B58",ash:"#6B7780",slate:"#8B969E",tiara:"#C7CDD1",porcelain:"#F5F5F5",white:"#FFFFFF"},M5=Object.freeze(w5(O5)),x5=Object.freeze({duration:"300ms",timing:"ease-in-out"}),D5=Object.freeze({fontFamily:'LatoWeb, Lato, "Helvetica Neue", Helvetica, Arial, sans-serif',fontFamilyMonospace:'Menlo, Consolas, Monaco, "Andale Mono", monospace',fontSizeXSmall:"0.75rem",fontSizeSmall:"0.875rem",fontSizeMedium:"1rem",fontSizeLarge:"1.375rem",fontSizeXLarge:"1.75rem",fontSizeXXLarge:"2.375rem",fontWeightLight:300,fontWeightNormal:400,fontWeightBold:700,lineHeight:1.5,lineHeightFit:1.125,lineHeightCondensed:1.25,lineHeightDouble:2,letterSpacingNormal:0,letterSpacingCondensed:"-0.0625rem",letterSpacingExpanded:"0.0625rem"}),z5=Object.freeze({xxxSmall:"0.125rem",xxSmall:"0.375rem",xSmall:"0.5rem",small:"0.75rem",mediumSmall:"1rem",medium:"1.5rem",large:"2.25rem",xLarge:"3rem",xxLarge:"3.75rem"}),$5=Object.freeze({inputHeightSmall:"1.75rem",inputHeightMedium:"2.375rem",inputHeightLarge:"3rem"}),N5=.0625,ma={xxSmall:8,xSmall:16,small:30,medium:48,tablet:48,large:62,desktop:64,xLarge:75},hu=Object.freeze({xxSmall:`${ma.xxSmall}em`,xSmall:`${ma.xSmall}em`,small:`${ma.small}em`,medium:`${ma.medium}em`,tablet:`${ma.tablet}em`,large:`${ma.large}em`,desktop:`${ma.desktop}em`,xLarge:`${ma.xLarge}em`,maxWidth:`${ma.large-N5}em`}),L5=Object.freeze({mediumMin:`min-width: ${hu.medium}`,largeMin:`min-width: ${hu.large}`,xLargeMin:`min-width: ${hu.xLarge}`}),Pn=["0 0.0625rem 0.125rem rgba(0, 0, 0, 0.2), 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.1)","0 0.1875rem 0.375rem rgba(0, 0, 0, 0.1), 0 0.1875rem 0.375rem rgba(0, 0, 0, 0.16)","0 0.375rem 0.4375rem rgba(0, 0, 0, 0.1), 0 0.625rem 1.75rem rgba(0, 0, 0, 0.25)"],U5=Object.freeze({depth1:Pn[0],depth2:Pn[1],depth3:Pn[2],resting:Pn[0],above:Pn[1],topmost:Pn[2]}),H5=Object.freeze({topmost:9999,above:1,below:-1,deepest:-9999}),_p={colors:M5,borders:_5,transitions:x5,typography:D5,spacing:z5,forms:$5,media:L5,breakpoints:hu,shadows:U5,stacking:H5},B5=["key","description"],j5=["key","description","use"],V5="@@themeRegistryDefaultTheme",Zu="__GLOBAL_THEME_REGISTRY__";globalThis[Zu]?ad(k5(globalThis[Zu])):Op();function wp(){return{currentThemeKey:null,themes:{},registered:[]}}function k5(e){const t=wp();if(typeof e>"u")return t;let a=!0;return Object.keys(t).forEach(n=>{typeof e[n]>"u"&&(a=!1)}),Mn(a,"[theme-registry] Invalid global theme registry!"),e}function Dc(){return globalThis[Zu]}function ad(e){globalThis[Zu]=e}function Op(){ad(wp())}function G5(){const e=Dc(),t=e.currentThemeKey;if(t)return e.themes[t]}function Y5(e,t){const a=Dc(),n=a.themes[e];n||e!==V5&&Mn(n,`[theme-registry] Could not find theme: '${e}' in the registry.`),a.currentThemeKey=e;const l=yp(n,t);return a.themes[e]=l,l}function q5(e){const t=e.key,a=e.description,n=xn(e,B5),l={key:t,description:a,...n,use(r){Y5(t,(r==null?void 0:r.overrides)||{})}};return new Proxy(l,{get(r,i){r.key,r.description,r.use;const u=xn(r,j5);return i==="variables"?u:Reflect.get(r,i)}})}function X5(e){const t=Dc();if(e.key&&t.themes[e.key])return t.themes[e.key];{if(!Sp(e))throw Mn(!1,`[theme-registry] The theme provided to 'registerTheme' is not a valid theme object! +For it to be valid some properties have to be present, check out https://instructure.design/#canvas as a reference.`),new Error;const a=q5(e);return t.themes[a.key]=a,t.registered.push(a.key),a}}const nd={getRegistry:Dc,clearRegistry:Op,setRegistry:ad,registerTheme:X5,getCurrentTheme:G5},gt=_p.colors,Z5="canvas",Q5={"ic-brand-primary":gt.textBrand,"ic-brand-font-color-dark":gt.textDarkest,"ic-link-color":gt.textLink,"ic-link-decoration":"none","ic-brand-button--primary-bgd":gt.backgroundBrand,"ic-brand-button--primary-text":gt.textLightest,"ic-brand-button--secondary-bgd":gt.backgroundDarkest,"ic-brand-button--secondary-text":gt.textLightest,"ic-brand-global-nav-bgd":gt.backgroundBrandSecondary,"ic-global-nav-link-hover":gt.backgroundDarkest,"ic-brand-global-nav-ic-icon-svg-fill":gt.textLightest,"ic-brand-global-nav-ic-icon-svg-fill--active":gt.textBrand,"ic-brand-global-nav-menu-item__text-color":gt.textLightest,"ic-brand-global-nav-menu-item__text-color--active":gt.textBrand},K5={key:Z5,..._p,...Q5},ld=nd.registerTheme(K5),P5=e=>(t={})=>{var a,n;try{if(Sp(e))return e}catch{e={}}let l;Object.keys(t).length===0?l=nd.getCurrentTheme()||ld:l=t;const r=l.key,i=((a=e)===null||a===void 0||(n=a.themeOverrides)===null||n===void 0?void 0:n[r])||e.themeOverrides||{};return yp(l,e,i)};function zc({children:e,theme:t={},dir:a,instanceCounterMap:n,as:l}){const r=a||T.useContext(zs);let i=be.createElement(b5,{instanceCounterMap:n},be.createElement(V3,{theme:P5(t)},be.createElement(zs.Provider,{value:r},e)));if(a){const u=Ep(zc,{as:l});i=be.createElement(u,{dir:r},i)}return i}zc.propTypes={children:L.node,theme:L.object,dir:L.oneOf(["ltr","rtl"]),instanceCounterMap:L.instanceOf(Map),as:L.string};zc.defaultProps={theme:{},as:void 0};const J5=(e,t,a,n,l)=>{const r=t,i=a,u=n,c=u.themeOverride,o=e,s=o.componentOverrides;let d={},f={};return s&&(d=r&&s[r]||i&&s[i]||{}),c&&(typeof c=="function"?f=c(l||{},e):f=c),{...d,...f}},W5=()=>{let e=H3();if(pp(e)){const t=nd.getCurrentTheme();if(t)return t;e=ld}return e},wo={styles:{},makeStyles:()=>{}},rd=Oc((e,t,a)=>{const n=e.displayName||e.name,l=T.forwardRef((r,i)=>{const u=W5();r.styles&&Xu(!1,`Manually passing the "styles" property is not allowed on the ${n} component. Using the default styles calculated by the @withStyle decorator instead. +`,r.styles),r.makeStyles&&Xu(!1,`Manually passing the "makeStyles" property is not allowed on the ${n} component. Styles are calculated by the @withStyle decorator.`);const c={...e.defaultProps,...r,...wo};let o=typeof a=="function"?a(u):{};const s=J5(u,n,e.componentId,c,o);o={...o,...s};const d=T.useState(t?t(o,c,{}):{}),f=r5(d,2),p=f[0],C=f[1],S=O=>{const m=t(o,c,O);F3(m,p)||C(m)};return be.createElement(e,Object.assign({ref:i},r,{makeStyles:S,styles:p,themeOverride:s}))});return Ff(l,e),l.originalType=e.originalType||e,l.propTypes=e.propTypes,l.defaultProps=e.defaultProps,l.allowedProps=e.allowedProps,l.generateComponentTheme=a,e.defaultProps={...e.defaultProps,makeStyles:wo.makeStyles,styles:wo.styles},l}),jn={SHADOW_TYPES:{resting:"resting",above:"above",topmost:"topmost",none:"none"},STACKING_TYPES:{deepest:"deepest",below:"below",resting:"resting",above:"above",topmost:"topmost"},BORDER_WIDTHS:{0:"0",none:"none",small:"small",medium:"medium",large:"large"},BORDER_RADII:{0:"0",none:"none",small:"small",medium:"medium",large:"large",circle:"circle",pill:"pill"},BACKGROUNDS:{default:"default",inverse:"inverse",transparent:"transparent"},SIZES:{xSmall:"x-small",small:"small",medium:"medium",large:"large",xLarge:"x-large"},SPACING:{0:"0",none:"none",auto:"auto",xxxSmall:"xxx-small",xxSmall:"xx-small",xSmall:"x-small",small:"small",mediumSmall:"mediumSmall",medium:"medium",large:"large",xLarge:"x-large",xxLarge:"xx-large"}},F5=jn.SHADOW_TYPES,I5=jn.STACKING_TYPES,eS=jn.BORDER_WIDTHS,tS=jn.BORDER_RADII,aS=jn.BACKGROUNDS,nS=jn.SIZES,lS=jn.SPACING,Jn={shadow:L.oneOf(Object.values(F5)),stacking:L.oneOf(Object.values(I5)),borderWidth:Oo(Object.values(eS)),borderRadius:Oo(Object.values(tS)),background:L.oneOf(Object.values(aS)),size:L.oneOf(Object.values(nS)),spacing:Oo(Object.values(lS))};function Oo(e){return function(t,a,n,l){const r=t[a];if(typeof r>"u")return null;if(typeof r!="string")return new Error(`Invalid ${l} \`${a}\` of type \`${typeof r}\` supplied to \`${n}\`, expected a string.`);const i=r.split(" "),u=i.length;if(u>0&&u<5){for(let c=0;c{a[bp(`${e}-${String(n)}`)]=t[n]}),a}function Qu(e,t,a,n){if(!(typeof a!="string"||pp(t)))return a.split(" ").map(l=>{if(l==="auto"||l==="0")return l;if(l==="none")return"0";if(l==="circle")return"100%";if(l==="pill")return"999em";const r=bp(`${n}-${l}`),i=t[r];return Mn(typeof i<"u",`[${e}] '${r}' is an invalid '${n}' value.`),i||"0"}).join(" ").trim()}function $s(e){if(typeof e!="string")return;const t=e.split(" ");if(t.length===4){var a=[t[3],t[1]];t[1]=a[0],t[3]=a[1]}return t.join(" ")}function rS(e){if(typeof e!="string")return;const t=e.split(" ");if(t.length===2){var a=[t[1],t[0]];t[0]=a[0],t[1]=a[1]}if(t.length===3&&t.push(t[1]),t.length===4){var n=[t[1],t[0],t[3],t[2]];t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3]}return t.join(" ")}let Ns=!0;try{var Mo,xo;Ns=!((Mo=process)!==null&&Mo!==void 0&&(xo=Mo.env)!==null&&xo!==void 0&&xo.ALWAYS_APPEND_UI_TESTABLE_LOCATORS)}catch(e){if(e instanceof ReferenceError)Ns=!1;else throw e}const Mp=Ns?()=>e=>e:Oc(e=>{const a={attribute:"data-cid",value:e.displayName||e.name},n=`[${a.attribute}~="${a.value}"]`;class l extends e{constructor(...i){super(...i),this._testableUnmounted=void 0,this._locatorTimeout=void 0}componentDidMount(){this._testableUnmounted=!1,super.componentDidMount&&super.componentDidMount(),this.appendLocatorAttribute()}componentDidUpdate(i,u,c){super.componentDidUpdate&&super.componentDidUpdate(i,u,c),this.appendLocatorAttribute()}componentWillUnmount(){this._testableUnmounted=!0,super.componentWillUnmount&&super.componentWillUnmount(),this._locatorTimeout&&clearTimeout(this._locatorTimeout)}appendLocatorAttribute(){this._locatorTimeout=setTimeout(()=>{let i;if(!this._testableUnmounted){try{i=this.DOMNode||bi(this)}catch{}if(i){const u=i.getAttribute(a.attribute),c=typeof u=="string"?u.split(/\s+/):[];c.includes(a.value)||c.push(a.value),i.setAttribute(a.attribute,c.join(" "))}}})}}return l.selector=n,l}),iS=({borderRadius:e,borderWidth:t,dir:a,theme:n})=>{const l=a===xc.rtl;return{borderRadius:Qu("View",n,l?rS(e):e,"borderRadius"),borderWidth:Qu("View",n,l?$s(t):t,"borderWidth")}},uS=({margin:e,padding:t,dir:a,theme:n})=>{const l=a===xc.rtl;return{margin:Qu("View",n,l?$s(e):e,"margin"),padding:Qu("View",n,l?$s(t):t,"padding")}},cS=({insetBlockStart:e,insetBlockEnd:t,insetInlineStart:a,insetInlineEnd:n,dir:l})=>{const r=l===xc.rtl;return{...{top:e,insetBlockStart:e},...{bottom:t,insetBlockEnd:t},...{left:r?n:a,right:r?a:n}}},oS=({cursor:e,style:t})=>{const a=Cp(t||{},{},["top","left","position","display","transform","overflow","minWidth","minHeight","filter","flexBasis","backgroundImage","pointerEvents"]);return e&&(a.cursor=e),a},sS=(e,t)=>typeof t!="string"?!1:t.trim().split(" ").every(a=>e===a),fS=e=>{const t="focusRing--radius",a=(e||"").trim().split(" ")[0];if(sS(a,e)){const n=l=>`${l.charAt(0).toUpperCase()}${l.slice(1)}`;if(["small","medium","large"].includes(a))return`${t}${n(a)}`;if(["circle","pill"].includes(a))return`${t}Inherit`}return`${t}None`},dS=e=>{const t=e.position,a=e.display,n=e.focusPosition,l=e.withFocusOutline;return typeof l>"u"||l&&(Mn(a==="inline"||t==="relative","[View] the focus outline will only show if the `position` prop is `relative`."),Mn(a!=="inline"||n==="inset","[View] when display is set to `inline` the focus outline will only show if `focusPosition` is set to `inset`.")),l},hS=e=>{const t=e.borderWidth;return t&&t!=="0"&&t!=="none"},mS=(e,t)=>{const a=e.focusColor,n=e.focusPosition,l=e.position,r=e.shouldAnimateFocus,i=e.borderRadius,u=dS(e),c=typeof u>"u",o={offset:{top:`calc(${t.focusOutlineOffset} * -1)`,left:`calc(${t.focusOutlineOffset} * -1)`,right:`calc(${t.focusOutlineOffset} * -1)`,bottom:`calc(${t.focusOutlineOffset}* -1)`},inset:{top:`calc(${t.focusOutlineInset} * -1)`,left:`calc(${t.focusOutlineInset} * -1)`,right:`calc(${t.focusOutlineInset} * -1)`,bottom:`calc(${t.focusOutlineInset} * -1)`}},s={info:t.focusColorInfo,inverse:t.focusColorInverse,success:t.focusColorSuccess,danger:t.focusColorDanger};if(l==="relative"){const d=fS(i),f={"focusRing--radiusInherit":"inherit","focusRing--radiusNone":0},p={offset:{"focusRing--radiusSmall":{borderRadius:`calc(${t.borderRadiusSmall} + (${t.focusOutlineOffset} - ${t.focusOutlineWidth}))`},"focusRing--radiusMedium":{borderRadius:`calc(${t.borderRadiusMedium} + (${t.focusOutlineOffset} - ${t.focusOutlineWidth}))`},"focusRing--radiusLarge":{borderRadius:`calc(${t.borderRadiusLarge} + (${t.focusOutlineOffset} - ${t.focusOutlineWidth}))`}},inset:{"focusRing--radiusSmall":{borderRadius:`calc(${t.borderRadiusSmall} - (${t.focusOutlineInset} + ${t.focusOutlineWidth}))`},"focusRing--radiusMedium":{borderRadius:`calc(${t.borderRadiusMedium} - (${t.focusOutlineInset} + ${t.focusOutlineWidth}))`},"focusRing--radiusLarge":{borderRadius:`calc(${t.borderRadiusLarge} - (${t.focusOutlineInset} + ${t.focusOutlineWidth}))`}}};return{"&::before":{pointerEvents:"none",content:'""',position:"absolute",borderStyle:t.focusOutlineStyle,borderWidth:t.focusOutlineWidth,borderColor:s[a],opacity:0,borderRadius:f[d],...p[n][d],...o[n],...r?{transition:"all 0.2s",transform:"scale(0.95)"}:{},...u?{opacity:1,transform:"scale(1)"}:{}},"&:focus":{outline:"none","&::before":{...c?{opacity:1,transform:"scale(1)"}:{}}}}}return{"&::before":{borderStyle:"none"},outlineStyle:"none",outlineColor:s[a],...u?{outlineWidth:t.focusOutlineWidth,outlineStyle:t.focusOutlineStyle}:{},"&:focus":{...c?{outlineWidth:t.focusOutlineWidth,outlineStyle:t.focusOutlineStyle}:{}}}},vS=(e,t)=>{const a=t.borderRadius,n=t.borderWidth,l=t.margin,r=t.padding,i=t.position,u=t.display,c=t.focusPosition,o=t.textAlign,s=t.borderColor,d=t.background,f=t.stacking,p=t.shadow,C=t.overflowY,S=t.overflowX,O=t.overscrollBehavior,m=t.insetBlockEnd,h=t.insetBlockStart,v=t.insetInlineEnd,R=t.insetInlineStart,x=t.width,g=t.height,A=t.minWidth,z=t.minHeight,U=t.maxWidth,V=t.maxHeight,Y=t.withVisualDebug,Me=t.dir,_e=iS({theme:e,borderRadius:a,borderWidth:n,dir:Me}),Ee=uS({margin:l,padding:r,theme:e,dir:Me}),Tt=cS({dir:Me,insetBlockEnd:m,insetBlockStart:h,insetInlineEnd:v,insetInlineStart:R}),$=i==="relative"||u==="inline"&&c==="inset",H={inline:{label:"view--inline",display:"inline"},block:{label:"view--block",display:"block"},"inline-block":{label:"view--inlineBlock",display:"inline-block",verticalAlign:"middle"},flex:{label:"view--flex",display:"flex"},"inline-flex":{label:"view--inlineFlex",display:"inline-flex",verticalAlign:"middle"},auto:{}},G={start:{textAlign:"start"},center:{textAlign:"center"},end:{textAlign:"end"}},re={transparent:{borderColor:e.borderColorTransparent},primary:{borderColor:e.borderColorPrimary},secondary:{borderColor:e.borderColorSecondary},brand:{borderColor:e.borderColorBrand},info:{borderColor:e.borderColorInfo},success:{borderColor:e.borderColorSuccess},warning:{borderColor:e.borderColorWarning},alert:{borderColor:e.borderColorAlert},danger:{borderColor:e.borderColorDanger}},fe={transparent:{color:e.color,background:"none"},primary:{color:e.color,background:e.backgroundPrimary},secondary:{color:e.color,background:e.backgroundSecondary},"primary-inverse":{color:e.colorPrimaryInverse,background:e.backgroundPrimaryInverse},brand:{color:e.colorPrimaryInverse,background:e.backgroundBrand},info:{color:e.colorPrimaryInverse,background:e.backgroundInfo},alert:{color:e.colorPrimaryInverse,background:e.backgroundAlert},success:{color:e.colorPrimaryInverse,background:e.backgroundSuccess},danger:{color:e.colorPrimaryInverse,background:e.backgroundDanger},warning:{color:e.colorPrimaryInverse,background:e.backgroundWarning}},Ie={topmost:{zIndex:e.stackingTopmost},above:{zIndex:e.stackingAbove},resting:{},below:{zIndex:e.stackingBelow},deepest:{zIndex:e.stackingDeepest}},pt={topmost:{boxShadow:e.shadowTopmost},resting:{boxShadow:e.shadowResting},above:{boxShadow:e.shadowAbove},none:{}},jt=mS(t,e);return{view:{label:"view",boxSizing:"border-box",fontFamily:e.fontFamily,maxWidth:"100%",overflow:"visible",...H[u],...d&&fe[d],...f&&Ie[f],...p&&pt[p],...o&&G[o],overflowX:S&&S!=="visible"?S:"",overflowY:C&&C!=="visible"?C:"",position:i!=="static"?i:"",overscrollBehavior:O||"auto",...Y?{outline:`0.0625rem dashed ${e.debugOutlineColor}`}:{},...hS(t)?{borderStyle:e.borderStyle,...re[s]}:{},...$?jt:{}},inlineStyles:{"&&&&&&&&&&":{...Ee,..._e,...Tt,width:x,height:g,minWidth:A,minHeight:z,maxWidth:U,maxHeight:V,...oS(t)}}}},pS=e=>{const t=e.colors,a=e.typography,n=e.borders,l=e.breakpoints,r=e.spacing,i=e.shadows,u=e.stacking,c=e.key,o={canvas:{color:e["ic-brand-font-color-dark"],focusColorInfo:e["ic-brand-primary"],backgroundBrand:e["ic-brand-primary"],backgroundInfo:e["ic-brand-primary"],borderColorBrand:e["ic-brand-primary"],borderColorInfo:e["ic-brand-primary"]}};return{...{fontFamily:a==null?void 0:a.fontFamily,color:t==null?void 0:t.textDarkest,colorPrimaryInverse:t==null?void 0:t.textLightest,borderColorPrimary:t==null?void 0:t.borderMedium,borderColorSecondary:t==null?void 0:t.borderDark,borderColorSuccess:t==null?void 0:t.borderSuccess,borderColorBrand:t==null?void 0:t.borderBrand,borderColorInfo:t==null?void 0:t.borderInfo,borderColorAlert:t==null?void 0:t.borderAlert,borderColorWarning:t==null?void 0:t.borderWarning,borderColorDanger:t==null?void 0:t.borderDanger,borderColorTransparent:"transparent",debugOutlineColor:t==null?void 0:t.borderDebug,backgroundPrimary:t==null?void 0:t.backgroundLightest,backgroundSecondary:t==null?void 0:t.backgroundLight,backgroundPrimaryInverse:t==null?void 0:t.backgroundDarkest,backgroundBrand:t==null?void 0:t.backgroundBrand,backgroundInfo:t==null?void 0:t.backgroundInfo,backgroundAlert:t==null?void 0:t.backgroundAlert,backgroundSuccess:t==null?void 0:t.backgroundSuccess,backgroundDanger:t==null?void 0:t.backgroundDanger,backgroundWarning:t==null?void 0:t.backgroundWarning,arrowSize:"0.5rem",focusOutlineStyle:n==null?void 0:n.style,focusOutlineWidth:n==null?void 0:n.widthMedium,focusOutlineOffset:"0.3125rem",focusOutlineInset:"0rem",focusColorInfo:t==null?void 0:t.borderInfo,focusColorDanger:t==null?void 0:t.borderDanger,focusColorSuccess:t==null?void 0:t.borderSuccess,focusColorInverse:t==null?void 0:t.borderLightest,xSmallMaxWidth:l==null?void 0:l.xSmall,smallMaxWidth:l==null?void 0:l.small,mediumMaxWidth:l==null?void 0:l.medium,largeMaxWidth:l==null?void 0:l.large,...fr("margin",r),...fr("padding",r),...fr("shadow",i),...fr("stacking",u),...fr("border",n)},...o[c]}},yS={as:L.elementType,elementRef:L.func,display:L.oneOf(["auto","inline","block","inline-block","flex","inline-flex"]),overflowX:L.oneOf(["auto","hidden","visible"]),overflowY:L.oneOf(["auto","hidden","visible"]),margin:Jn.spacing,padding:Jn.spacing,height:L.oneOfType([L.string,L.number]),width:L.oneOfType([L.string,L.number]),maxHeight:L.oneOfType([L.string,L.number]),maxWidth:L.oneOfType([L.string,L.number]),minHeight:L.oneOfType([L.string,L.number]),minWidth:L.oneOfType([L.string,L.number]),children:L.node,textAlign:L.oneOf(["start","center","end"]),borderWidth:Jn.borderWidth,borderRadius:Jn.borderRadius,borderColor:L.oneOf(["transparent","primary","secondary","brand","info","success","warning","alert","danger"]),background:L.oneOf(["transparent","primary","secondary","primary-inverse","brand","info","alert","success","danger","warning"]),shadow:Jn.shadow,stacking:Jn.stacking,cursor:T5,position:L.oneOf(["static","absolute","relative","sticky","fixed"]),insetInlineStart:L.string,insetInlineEnd:L.string,insetBlockStart:L.string,insetBlockEnd:L.string,withFocusOutline:L.bool,focusPosition:L.oneOf(["offset","inset"]),focusColor:L.oneOf(["info","inverse","success","danger"]),shouldAnimateFocus:L.bool,withVisualDebug:L.bool,dir:L.oneOf(Object.values(td.DIRECTION)),overscrollBehavior:L.oneOf(["auto","contain","none"])},gS=["as","background","borderColor","borderRadius","borderWidth","children","cursor","dir","display","elementRef","focusColor","focusPosition","height","insetBlockEnd","insetBlockStart","insetInlineEnd","insetInlineStart","margin","maxHeight","maxWidth","minHeight","minWidth","overflowX","overflowY","overscrollBehavior","padding","position","shadow","shouldAnimateFocus","stacking","textAlign","width","withFocusOutline","withVisualDebug"],bS=["children","textAlign","background","display","withVisualDebug","width","height","minWidth","minHeight","maxWidth","maxHeight","overflowX","overflowY","stacking","shadow","position","focusPosition","focusColor","shouldAnimateFocus","borderColor","className","overscrollBehavior","styles","makeStyles"];var Eh,Rh,Zi,va;let SS=(Eh=td(),Rh=rd(vS,pS),Eh(Zi=Rh(Zi=(va=class xp extends T.Component{get _element(){return this.ref}constructor(t){super(t),this.spanMarginVerified=void 0,this.ref=null,this.handleElementRef=a=>{typeof this.props.elementRef=="function"&&this.props.elementRef(a),this.ref=a},this.spanMarginVerified=!1}componentDidMount(){var t,a;(t=(a=this.props).makeStyles)===null||t===void 0||t.call(a)}componentDidUpdate(){var t,a;(t=(a=this.props).makeStyles)===null||t===void 0||t.call(a)}render(){const t=this.props,a=t.children;t.textAlign,t.background,t.display,t.withVisualDebug,t.width,t.height,t.minWidth,t.minHeight,t.maxWidth,t.maxHeight,t.overflowX,t.overflowY,t.stacking,t.shadow,t.position,t.focusPosition,t.focusColor,t.shouldAnimateFocus,t.borderColor;const n=t.className;t.overscrollBehavior;const l=t.styles;t.makeStyles;const r=xn(t,bS),i=Ep(xp,this.props);return hn(i,Object.assign({},p5(r),{className:n,css:[l==null?void 0:l.view,l==null?void 0:l.inlineStyles],ref:this.handleElementRef}),a)}},va.displayName="View",va.componentId="View",va.allowedProps=gS,va.propTypes=yS,va.defaultProps={display:"auto",overflowX:"visible",overflowY:"visible",withVisualDebug:!1,borderColor:"primary",position:"static",focusPosition:"offset",focusColor:"info",shouldAnimateFocus:!0,overscrollBehavior:"auto"},va.omitViewProps=(e,t)=>{const a=[...va.allowedProps,"styles","makeStyles","themeOverride"];let n=!0;try{n=!1}catch(l){if(l instanceof ReferenceError)n=!1;else throw l}return n&&Object.keys(Cp(e,a)).forEach(l=>{Mn(!1,`[${t.name}] prop '${l}' is not allowed.`)}),Rp(e,a)},va))||Zi)||Zi);const ES=(e,t)=>{const a=t.inline,n=t.color,l={inherit:{color:"inherit"},primary:{color:e.primaryColor},secondary:{color:e.secondaryColor},"primary-inverse":{color:e.primaryInverseColor},"secondary-inverse":{color:e.secondaryInverseColor},success:{color:e.successColor},brand:{color:e.brandColor},warning:{color:e.warningColor},error:{color:e.errorColor},alert:{color:e.alertColor},auto:{}};return{inlineSVG:{label:"inlineSVG",fill:"currentColor",display:a?"inline-block":"block",overflow:"visible",...l[n]}}},RS=e=>{const t=e.colors,a=e.key,n={canvas:{primaryColor:e["ic-brand-font-color-dark"],brandColor:e["ic-brand-primary"]}};return{...{primaryInverseColor:t==null?void 0:t.textLightest,primaryColor:t==null?void 0:t.textDarkest,secondaryColor:t==null?void 0:t.textDark,secondaryInverseColor:t==null?void 0:t.textLight,warningColor:t==null?void 0:t.textWarning,brandColor:t==null?void 0:t.textBrand,errorColor:t==null?void 0:t.textDanger,alertColor:t==null?void 0:t.textAlert,successColor:t==null?void 0:t.textSuccess},...n[a]}},CS={children:L.node,src:L.string,title:L.string,description:L.string,focusable:L.bool,width:L.oneOfType([L.string,L.number]),height:L.oneOfType([L.string,L.number]),inline:L.bool,color:L.oneOf(["inherit","primary","secondary","primary-inverse","secondary-inverse","success","error","alert","warning","brand","auto"]),elementRef:L.func},AS=["children","src","title","description","focusable","width","height","inline","color","elementRef"],TS=["style","title","description","focusable","children","src","styles"];var Ch,Ah,Th,Wn,Na;let Dp=(Ch=S5(),Ah=rd(ES,RS),Th=Mp(),Ch(Wn=Ah(Wn=Th(Wn=(Na=class Ls extends T.Component{constructor(t){super(t),this.titleId=void 0,this.descId=void 0,this.ref=null,this.handleRef=a=>{const n=this.props.elementRef;this.ref=a,typeof n=="function"&&n(a)},this.titleId=t.deterministicId("InlineSVG-title"),this.descId=t.deterministicId("InlineSVG-desc")}componentDidMount(){var t,a;(t=(a=this.props).makeStyles)===null||t===void 0||t.call(a)}componentDidUpdate(){var t,a;(t=(a=this.props).makeStyles)===null||t===void 0||t.call(a)}get role(){return this.props.title?"img":"presentation"}renderTitle(){const t=this.props.title;return t?hn("title",{id:this.titleId},t):null}renderDesc(t){return t?hn("desc",{id:this.descId},t):null}get labelledBy(){const t=[];return this.props.title&&t.push(this.titleId),this.props.description&&t.push(this.descId),t.length>0?t.join(" "):void 0}renderContent(){if(this.props.src){const t=Ls.prepareSrc(this.props.src);return hn("g",{role:"presentation",dangerouslySetInnerHTML:{__html:t}})}else return hn("g",{role:"presentation"},this.props.children)}render(){const t=this.props,a=t.style,n=t.title,l=t.description,r=t.focusable;t.children;const i=t.src,u=t.styles,c=xn(t,TS),o=this.props.width==="auto"?void 0:this.props.width,s=this.props.height==="auto"?void 0:this.props.height;return hn("svg",Object.assign({},_S(i),Rp(this.props,Ls.allowedProps,["inline"]),{style:{...a,width:o,height:s},width:o,height:s,"aria-hidden":n?void 0:"true","aria-labelledby":this.labelledBy,role:this.role,focusable:r?"true":"false",css:u==null?void 0:u.inlineSVG,className:c.className,ref:this.handleRef}),this.renderTitle(),this.renderDesc(l),this.renderContent())}},Na.displayName="InlineSVG",Na.componentId="InlineSVG",Na.allowedProps=AS,Na.propTypes=CS,Na.defaultProps={focusable:!1,src:"",title:"",description:"",inline:!0,width:"1em",height:"1em",color:"inherit"},Na.prepareSrc=e=>{const a=/]*>((.|[\n\r])*)<\/svg>/.exec(e);return a?a[1]:e},Na))||Wn)||Wn)||Wn);function _S(e){const t={},a=/]*)\s*>/,n=/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?/g;if(typeof e=="string"){const l=a.exec(e),r=l?l[1]:"",i=["xmlns","xmlns:xlink","version"];let u=n.exec(r);for(;u!=null;)i.indexOf(u[1])===-1&&(t[u[1]]=u[2]||(u[3]?u[3]:u[4]?u[4]:u[5])||u[1]),u=n.exec(r)}return t}const wS=(e,t)=>{const a=t.rotate,n=t.size,l=t.bidirectional,r={0:{},90:{transform:"rotate(90deg)"},180:{transform:"rotate(180deg)"},270:{transform:"rotate(270deg)"}},i={0:{transform:"scale3d(-1, 1, 1)"},90:{transform:"scale3d(-1, 1, 1) rotate(90deg)"},180:{transform:"scale3d(-1, 1, 1) rotate(180deg)"},270:{transform:"scale3d(-1, 1, 1) rotate(270deg)"}},u={"x-small":{fontSize:e.sizeXSmall},small:{fontSize:e.sizeSmall},medium:{fontSize:e.sizeMedium},large:{fontSize:e.sizeLarge},"x-large":{fontSize:e.sizeXLarge}};return{svgIcon:{label:"svgIcon",verticalAlign:"middle",lineHeight:1,width:"1em",height:"1em",...r[a],...n&&u[n],...l&&{'[dir="rtl"] &':i[a]}}}},OS=()=>({...{sizeXSmall:"1.125rem",sizeSmall:"2rem",sizeMedium:"3rem",sizeLarge:"5rem",sizeXLarge:"10rem"}}),MS={...Dp.propTypes,rotate:L.oneOf(["0","90","180","270"]),size:L.oneOf(["x-small","small","medium","large","x-large"]),bidirectional:L.bool},xS=["children","src","title","description","focusable","width","height","inline","color","elementRef","rotate","size","bidirectional"],DS=["rotate","className","themeOverride","size","bidirectional","makeStyles","styles"],zS=["sizeXSmall","sizeSmall","sizeMedium","sizeLarge","sizeXLarge"];var _h,wh,Qi,cn;let Fe=(_h=rd(wS,OS),wh=Mp(),_h(Qi=wh(Qi=(cn=class extends T.Component{constructor(...t){super(...t),this.ref=null,this.handleRef=a=>{const n=this.props.elementRef;this.ref=a,typeof n=="function"&&n(a)}}componentDidMount(){var t,a;(t=(a=this.props).makeStyles)===null||t===void 0||t.call(a)}componentDidUpdate(){var t,a;(t=(a=this.props).makeStyles)===null||t===void 0||t.call(a)}render(){const t=this.props,a=t.rotate,n=t.className,l=t.themeOverride;t.size,t.bidirectional,t.makeStyles;const r=t.styles,i=xn(t,DS),u=l;u.sizeXSmall,u.sizeSmall,u.sizeMedium,u.sizeLarge,u.sizeXLarge;const c=xn(u,zS);return hn(Dp,Object.assign({},i,{themeOverride:c,rotate:a,css:r==null?void 0:r.svgIcon,className:n,elementRef:this.handleRef}))}},cn.displayName="SVGIcon",cn.componentId="SVGIcon",cn.allowedProps=xS,cn.propTypes=MS,cn.defaultProps={rotate:"0",bidirectional:!1},cn))||Qi)||Qi);var Oh;class Xl extends T.Component{constructor(...t){super(...t),this.ref=null,this.handleRef=a=>{const n=this.props.elementRef;this.ref=a,typeof n=="function"&&n(a)}}render(){return be.createElement(Fe,Object.assign({},this.props,{name:"IconCanvasLogo",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Oh||(Oh=be.createElement("path",{d:"M958.568 277.97C1100.42 277.97 1216.48 171.94 1233.67 34.3881 1146.27 12.8955 1054.57 0 958.568 0 864.001 0 770.867 12.8955 683.464 34.3881 700.658 171.94 816.718 277.97 958.568 277.97ZM35.8207 682.031C173.373 699.225 279.403 815.285 279.403 957.136 279.403 1098.99 173.373 1215.05 35.8207 1232.24 12.8953 1144.84 1.43262 1051.7 1.43262 957.136 1.43262 862.569 12.8953 769.434 35.8207 682.031ZM528.713 957.142C528.713 1005.41 489.581 1044.55 441.31 1044.55 393.038 1044.55 353.907 1005.41 353.907 957.142 353.907 908.871 393.038 869.74 441.31 869.74 489.581 869.74 528.713 908.871 528.713 957.142ZM1642.03 957.136C1642.03 1098.99 1748.06 1215.05 1885.61 1232.24 1908.54 1144.84 1920 1051.7 1920 957.136 1920 862.569 1908.54 769.434 1885.61 682.031 1748.06 699.225 1642.03 815.285 1642.03 957.136ZM1567.51 957.142C1567.51 1005.41 1528.38 1044.55 1480.11 1044.55 1431.84 1044.55 1392.71 1005.41 1392.71 957.142 1392.71 908.871 1431.84 869.74 1480.11 869.74 1528.38 869.74 1567.51 908.871 1567.51 957.142ZM958.568 1640.6C816.718 1640.6 700.658 1746.63 683.464 1884.18 770.867 1907.11 864.001 1918.57 958.568 1918.57 1053.14 1918.57 1146.27 1907.11 1233.67 1884.18 1216.48 1746.63 1100.42 1640.6 958.568 1640.6ZM1045.98 1480.11C1045.98 1528.38 1006.85 1567.51 958.575 1567.51 910.304 1567.51 871.172 1528.38 871.172 1480.11 871.172 1431.84 910.304 1392.71 958.575 1392.71 1006.85 1392.71 1045.98 1431.84 1045.98 1480.11ZM1045.98 439.877C1045.98 488.148 1006.85 527.28 958.575 527.28 910.304 527.28 871.172 488.148 871.172 439.877 871.172 391.606 910.304 352.474 958.575 352.474 1006.85 352.474 1045.98 391.606 1045.98 439.877ZM1441.44 1439.99C1341.15 1540.29 1333.98 1697.91 1418.52 1806.8 1579 1712.23 1713.68 1577.55 1806.82 1418.5 1699.35 1332.53 1541.74 1339.7 1441.44 1439.99ZM1414.21 1325.37C1414.21 1373.64 1375.08 1412.77 1326.8 1412.77 1278.53 1412.77 1239.4 1373.64 1239.4 1325.37 1239.4 1277.1 1278.53 1237.97 1326.8 1237.97 1375.08 1237.97 1414.21 1277.1 1414.21 1325.37ZM478.577 477.145C578.875 376.846 586.039 219.234 501.502 110.339 341.024 204.906 206.338 339.592 113.203 498.637 220.666 584.607 378.278 576.01 478.577 477.145ZM679.155 590.32C679.155 638.591 640.024 677.723 591.752 677.723 543.481 677.723 504.349 638.591 504.349 590.32 504.349 542.048 543.481 502.917 591.752 502.917 640.024 502.917 679.155 542.048 679.155 590.32ZM1440 475.712C1540.3 576.01 1697.91 583.174 1806.8 498.637 1712.24 338.159 1577.55 203.473 1418.51 110.339 1332.54 217.801 1341.13 375.413 1440 475.712ZM1414.21 590.32C1414.21 638.591 1375.08 677.723 1326.8 677.723 1278.53 677.723 1239.4 638.591 1239.4 590.32 1239.4 542.048 1278.53 502.917 1326.8 502.917 1375.08 502.917 1414.21 542.048 1414.21 590.32ZM477.145 1438.58C376.846 1338.28 219.234 1331.12 110.339 1415.65 204.906 1576.13 339.593 1710.82 498.637 1805.39 584.607 1696.49 577.443 1538.88 477.145 1438.58ZM679.155 1325.37C679.155 1373.64 640.024 1412.77 591.752 1412.77 543.481 1412.77 504.349 1373.64 504.349 1325.37 504.349 1277.1 543.481 1237.97 591.752 1237.97 640.024 1237.97 679.155 1277.1 679.155 1325.37Z"})))}}Xl.glyphName="canvas-logo";Xl.variant="Line";Xl.displayName="IconCanvasLogoLine";Xl.propTypes={...Fe.propTypes};Xl.allowedProps=[...Fe.allowedProps];var Mh;class Zl extends T.Component{constructor(...t){super(...t),this.ref=null,this.handleRef=a=>{const n=this.props.elementRef;this.ref=a,typeof n=="function"&&n(a)}}render(){return be.createElement(Fe,Object.assign({},this.props,{name:"IconElevateLogo",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Mh||(Mh=be.createElement("path",{d:"M1070.45 53.9152C1104.97 88.4365 1124.36 135.258 1124.36 184.078L1123.51 1188.09C1123.74 1229.1 1110.25 1269.01 1085.18 1301.47 1060.11 1333.93 1024.9 1357.08 985.16 1367.22 945.419 1377.35 903.428 1373.91 865.87 1357.43 828.312 1340.95 797.346 1312.38 777.899 1276.28 763.314 1249.19 755.85 1218.85 756.21 1188.09V184.078C756.21 135.258 775.603 88.4365 810.124 53.9152 844.646 19.3939 891.467 0 940.288 0 989.108 0 1035.93 19.3939 1070.45 53.9152ZM161.091 1320.33C194.624 1353.7 240.009 1372.44 287.319 1372.44 310.767 1372.44 333.985 1367.81 355.644 1358.83 377.304 1349.85 396.98 1336.69 413.547 1320.1 430.113 1303.5 443.246 1283.8 452.193 1262.13 461.141 1240.45 465.726 1217.23 465.689 1193.78L463.406 359.01 106.666 741.15 108.378 1194.35C108.605 1241.67 127.558 1286.96 161.091 1320.33ZM1592.41 1372.44C1639.74 1372.51 1685.17 1353.81 1718.72 1320.42 1752.27 1287.02 1771.2 1241.69 1771.35 1194.35L1773.06 741.15 1416.33 359.01 1414.32 1193.78C1414.29 1217.21 1418.87 1240.41 1427.79 1262.06 1436.72 1283.71 1449.83 1303.41 1466.37 1319.99 1482.9 1336.58 1502.55 1349.75 1524.17 1358.75 1545.8 1367.75 1568.99 1372.4 1592.41 1372.44ZM1123.46 1752.39C1126.77 1716.09 1119.25 1679.61 1101.83 1647.56 1090.29 1626.27 1074.66 1607.47 1055.85 1592.22 1037.03 1576.97 1015.39 1565.59 992.163 1558.73 968.939 1551.86 944.588 1549.64 920.506 1552.2 896.423 1554.76 873.083 1562.05 851.822 1573.65 819.782 1591.06 793.627 1617.59 776.661 1649.87 759.697 1682.14 752.685 1718.73 756.513 1754.99 760.341 1791.25 774.837 1825.57 798.168 1853.59 821.499 1881.62 852.616 1902.09 887.585 1912.44 922.554 1922.77 959.804 1922.51 994.623 1911.68 1029.44 1900.84 1060.27 1879.94 1083.2 1851.58 1106.13 1823.23 1120.14 1788.71 1123.46 1752.39Z"})))}}Zl.glyphName="elevate-logo";Zl.variant="Line";Zl.displayName="IconElevateLogoLine";Zl.propTypes={...Fe.propTypes};Zl.allowedProps=[...Fe.allowedProps];var xh;class Ql extends T.Component{constructor(...t){super(...t),this.ref=null,this.handleRef=a=>{const n=this.props.elementRef;this.ref=a,typeof n=="function"&&n(a)}}render(){return be.createElement(Fe,Object.assign({},this.props,{name:"IconImpactLogo",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),xh||(xh=be.createElement("path",{d:"M910.001 203.918C910.001 163.587 921.96 124.161 944.366 90.6273 966.773 57.0931 998.621 30.9565 1035.88 15.5225 1073.14.0883516 1114.15-3.9499 1153.7 3.91831 1193.26 11.7866 1229.59 31.2078 1258.11 59.7263 1286.63 88.2447 1306.05 124.579 1313.92 164.135 1321.78 203.692 1317.75 244.693 1302.32 281.954 1286.88 319.215 1260.74 351.062 1227.21 373.47 1193.68 395.876 1154.25 407.836 1113.92 407.836 1087.13 407.869 1060.6 402.617 1035.84 392.38 1011.09 382.144 988.596 367.124 969.654 348.182 950.712 329.241 935.692 306.748 925.457 281.993 915.22 257.237 909.967 230.706 910.001 203.918ZM167.424 913.308 458.311 622.422H1045.04L460.789 1206.68C421.886 1245.58 369.124 1267.44 314.107 1267.44 259.09 1267.44 206.327 1245.58 167.424 1206.68 128.522 1167.77 106.667 1115.01 106.667 1059.99 106.667 1004.97 128.522 952.211 167.424 913.308ZM1738.81 1027.77 1454.11 1313.21H867.136L1444.7 734.406C1483.6 695.405 1536.4 673.455 1591.49 673.386 1646.57 673.316 1699.43 695.132 1738.43 734.034 1777.43 772.936 1799.38 825.739 1799.45 880.826 1799.52 935.911 1777.71 988.769 1738.81 1027.77ZM587.075 1602.79C564.668 1636.33 552.709 1675.75 552.709 1716.08 552.709 1770.16 574.192 1822.02 612.435 1860.27 650.677 1898.51 702.543 1920 756.627 1920 796.957 1920 836.382 1908.04 869.917 1885.63 903.451 1863.23 929.588 1831.38 945.021 1794.12 960.456 1756.85 964.494 1715.85 956.625 1676.29 948.758 1636.74 929.336 1600.4 900.817 1571.89 872.299 1543.37 835.965 1523.94 796.409 1516.08 756.853 1508.21 715.851 1512.25 678.59 1527.69 641.329 1543.12 609.481 1569.25 587.075 1602.79Z"})))}}Ql.glyphName="impact-logo";Ql.variant="Line";Ql.displayName="IconImpactLogoLine";Ql.propTypes={...Fe.propTypes};Ql.allowedProps=[...Fe.allowedProps];var Dh;class Dn extends T.Component{constructor(...t){super(...t),this.ref=null,this.handleRef=a=>{const n=this.props.elementRef;this.ref=a,typeof n=="function"&&n(a)}}render(){return be.createElement(Fe,Object.assign({},this.props,{name:"IconInstructureLogo",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Dh||(Dh=be.createElement("path",{d:"M1448.57 288.052 1084.46 502.746 1448.55 718.026 1813.23 502.732 1448.57 288.052ZM959.965 429.191 1323.92 214.589 959.988 0 596.032 214.602 959.965 429.191ZM835.499 502.732 471.388 288.038 106.704 502.732 471.388 718.026 835.499 502.732ZM106.667 1416.54 960 1920 1813.33 1416.54 960 913.07 106.667 1416.54Z"})))}}Dn.glyphName="instructure-logo";Dn.variant="Line";Dn.displayName="IconInstructureLogoLine";Dn.propTypes={...Fe.propTypes};Dn.allowedProps=[...Fe.allowedProps];var zh;class Kl extends T.Component{constructor(...t){super(...t),this.ref=null,this.handleRef=a=>{const n=this.props.elementRef;this.ref=a,typeof n=="function"&&n(a)}}render(){return be.createElement(Fe,Object.assign({},this.props,{name:"IconMasteryLogo",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),zh||(zh=be.createElement("path",{d:"M672.274 547.699V889.681L371.706 760.866C332.318 747.272 297.441 723.083 270.907 690.958 244.373 658.833 227.209 620.015 221.301 578.769 215.392 537.524 220.969 495.447 237.417 457.164 253.866 418.883 280.55 385.876 314.537 361.771 348.524 337.668 388.498 323.399 430.066 320.536 471.634 317.672 513.187 326.323 550.158 345.538 587.13 364.753 618.089 393.788 639.632 429.453 661.176 465.119 672.47 506.033 672.274 547.699ZM959.895 1550.52C1013.45 1550.76 1065.35 1531.95 1106.32 1497.47 1147.3 1462.98 1174.68 1415.06 1183.6 1362.25 1192.51 1309.44 1182.37 1255.17 1154.98 1209.16 1127.6 1163.13 1084.75 1128.34 1034.08 1110.97L733.516 982.161V1324.15C733.584 1384.17 757.456 1441.7 799.895 1484.15 842.335 1526.59 899.876 1550.46 959.895 1550.52ZM226.887 1097.53C182.052 1097.47 138.21 1110.72 100.908 1135.6 63.6045 1160.47 34.5168 1195.85 17.3245 1237.26.13224 1278.67-4.39211 1324.24 4.32386 1368.21 13.0399 1412.19 34.6045 1452.61 66.2896 1484.32 97.9747 1516.04 138.356 1537.65 182.325 1546.42 226.295 1555.19 271.876 1550.71 313.303 1533.57 354.73 1516.42 390.14 1487.37 415.054 1450.1 439.968 1412.82 453.266 1368.99 453.266 1324.16 453.199 1264.12 429.335 1206.55 386.902 1164.08 344.47 1121.59 286.929 1097.66 226.887 1097.53ZM1693.14 1550.52C1746.69 1550.76 1798.6 1531.95 1839.57 1497.47 1880.54 1462.98 1907.93 1415.06 1916.85 1362.25 1925.75 1309.44 1915.62 1255.17 1888.23 1209.16 1860.85 1163.13 1818 1128.34 1767.33 1110.97L1466.51 982.161V1324.15C1466.64 1384.19 1490.57 1441.72 1533.05 1484.16 1575.53 1526.59 1633.1 1550.46 1693.14 1550.52ZM1405.53 547.689V889.671L1104.7 760.856C1065.35 747.221 1030.51 723.005 1004.02 690.865 977.527 658.724 960.404 619.905 954.531 578.67 948.656 537.434 954.261 495.378 970.726 457.12 987.192 418.861 1013.88 385.879 1047.87 361.798 1081.85 337.716 1121.81 323.465 1163.37 320.611 1204.92 317.757 1246.46 326.408 1283.41 345.617 1320.37 364.825 1351.33 393.847 1372.86 429.495 1394.41 465.143 1405.71 506.038 1405.53 547.689Z"})))}}Kl.glyphName="mastery-logo";Kl.variant="Line";Kl.displayName="IconMasteryLogoLine";Kl.propTypes={...Fe.propTypes};Kl.allowedProps=[...Fe.allowedProps];const $S="isp-site",NS="4.3.1+1720135115",LS="https://inst.bid/#/",US="module",HS={dev:"vite","biome:check":"pnpm lint && pnpm check && pnpm format","biome:apply":"pnpm lint:apply && pnpm check:apply && pnpm format:apply",build:"pnpm build:preview && pnpm build:git","build:git":'git add . && git commit -m "Build v$npm_package_version" && git push',"build:js":"vite build","build:preview":"pnpm biome:apply && pnpm sec && pnpm build:version && pnpm build:ts && pnpm build:js","build:ts":"tsc","build:version":`node-jq -r '.version=$ARGS.positional[0]+"+"+$ARGS.positional[1]' package.json --args "$(pnpm -s env:semver)" "$(date +%s)" | sponge package.json`,check:"biome check","check:apply":"biome check --write","env:package":"node-jq '.' package.json","env:biome":"biome rage","env:buildtime":`date -r $(node-jq -r '(.version | split("+"))[1]' package.json)`,"env:semver":`node-jq -r '(.version | split("+"))[0]' package.json`,"env:version":'echo "$npm_package_version"',format:"biome format","format:apply":"biome format --write",lint:"biome lint","lint:apply":"biome lint --write",preview:"pnpm build:preview && vite preview",push:`pnpm build && {pnpm tag || printf "git tag already exists.\r +";} && gh-pages -t -m "Deploy v$(pnpm -s env:version)" -d dist`,sec:"pnpm sec:audit && pnpm sec:scan","sec:audit":"snyk test && pnpm audit","sec:scan":"snyk code test",tag:"git tag isp-site-v$(pnpm -s env:semver) && git push origin isp-site-v$(pnpm -s env:semver)"},BS={"@instructure/browserslist-config-canvas-lms":"^2.0.0","@instructure/ui":"^9.1.0","gh-pages":"^6.1.1",react:"19.0.0-rc-fb9a90fa48-20240614","react-dom":"19.0.0-rc-fb9a90fa48-20240614","react-markdown":"^9.0.1","react-router-dom":"^6.24.1","rehype-raw":"^7.0.0","remark-gemoji":"^8.0.0","remark-gfm":"^4.0.0"},jS={"@babel/plugin-syntax-import-attributes":"^7.24.7","@biomejs/biome":"1.8.2","@instructure/shared-types":"^9.1.0","@octokit/types":"^13.5.0","@types/react":"npm:types-react@19.0.0-rc.0","@types/react-dom":"npm:types-react-dom@19.0.0-rc.0","@vitejs/plugin-react":"^4.3.1","babel-plugin-react-compiler":"0.0.0-experimental-938cd9a-20240601","node-jq":"^4.4.0",snyk:"^1.1292.1","snyk-policy":"^3.0.0",typescript:"^5.5.3",vite:"^5.3.3"},VS={node:">=22.2.0",pnpm:">=9.3.0"},kS="pnpm@9.5.0-beta.0+sha512.c2e60e7ed04e459591c982f2760cd8f7d1f48fe1ca4d46ccbbf8377df1eb2d077ace1e9d334b06250dddf23c03b4562858f77992b9a3bb4a93355aefd173df32",GS={overrides:{react:"^19.0.0-rc-f994737d14-20240522","react-dom":"^19.0.0-rc-f994737d14-20240522","@instructure/ui-test-sandbox>sinon":"^17.0.1","gh-pages>globby":"11.1.0","node-jq>tempfile":"^5.0.0","bin-build>tempfile":"^5.0.0","bin-build>download":"^8.0.0","download>got":"^14.4.1"}},YS=["extends @instructure/browserslist-config-canvas-lms"],qS={name:$S,version:NS,homepage:LS,private:!0,type:US,scripts:HS,dependencies:BS,devDependencies:jS,engines:VS,packageManager:kS,pnpm:GS,browserslist:YS},M={owner:"thedannywahl",repo:"instructure-security-package",branch:"main",url:qS.homepage.replace("/#/",""),gh:"https://github.com",api:"https://api.github.com",raw:"https://raw.githubusercontent.com"},La=`${M.raw}/${M.owner}/${M.repo}/${M.branch}/README`,XS=["Instructure","Canvas","Mastery","Elevate","Impact","LearnPlatform","Intelligent Insights","Parchment"],R9=[...XS,"Canvas LMS","Canvas Mobile","Canvas Studio","Canvas Credentials","Canvas Catalog","Canvas Commons","Canvas Data","Mastery Connect","Mastery Item Bank","Mastery View Assessments","Elevate Data Quality","Elevate Data Sync","Learn Platform"],ZS=[{brandName:"Instructure",get title(){return this.brandName.toLowerCase()},route:"/",readme:`${La}.md`,color:"#287A9F",Icon:Dn},{brandName:"Canvas",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${La}-${this.brandName}.md`},color:"#E72429",Icon:Xl},{brandName:"Mastery",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${La}-${this.brandName}.md`},color:"#24A159",Icon:Kl},{brandName:"Elevate",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${La}-${this.brandName}.md`},color:"#0097D3",Icon:Zl},{brandName:"Impact",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${La}-${this.brandName}.md`},color:"#F76400",Icon:Ql},{brandName:"LearnPlatform",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${La}-${this.brandName}.md`},color:"#0077CC",Icon:()=>Ze.jsxs(Fe,{viewBox:"0 0 300 300",size:"small",color:"primary-inverse",height:"2.5rem",width:"2.5rem",children:[Ze.jsx("path",{d:"M191.431 212.736H205.086C204.961 212.34 204.846 211.974 204.738 211.63C204.404 210.567 204.135 209.713 203.834 208.81C199.852 198.417 195.964 187.986 192.171 177.517C181.493 149.012 170.872 120.497 160.309 91.9733C159.911 90.214 158.223 89.0597 156.44 89.3276C151.091 89.4698 145.743 89.5267 140.423 89.3276C138.432 89 136.546 90.3293 136.184 92.3147C121.657 131.422 107.129 170.519 92.6017 209.607C92.414 210.136 92.2467 210.686 92.0507 211.329C91.9201 211.759 91.7767 212.23 91.606 212.765C93.7973 212.765 95.9464 212.748 98.0664 212.732C102.222 212.701 106.265 212.67 110.297 212.765C112.402 212.935 113.17 211.94 113.824 210.091C115.474 205.226 117.167 200.375 118.859 195.525C120.552 190.675 122.245 185.824 123.895 180.959C124.199 179.276 125.788 178.141 127.479 178.399H168.729C170.418 178.138 172.011 179.255 172.342 180.931C173.799 185.14 175.307 189.334 176.814 193.524C178.251 197.519 179.687 201.511 181.076 205.51C182.365 209.107 183.012 210.914 184.295 211.821C185.589 212.736 187.531 212.736 191.431 212.736ZM148.417 109.213C154.145 126.092 159.977 143.351 165.913 160.989H131.121L148.417 109.213Z"}),Ze.jsx("path",{d:"M225 110.209V114.191H207.931V133.707H203.522V114.191H186.453V110.209H203.522V90.8069H207.732V110.209H225Z"}),Ze.jsx("path",{d:"M219.488 246.567C178.123 277.109 121.739 277.405 80.0539 247.301L86.1316 238.9C47.7742 211.418 31.5805 162.32 46.069 117.435L55.9454 119.307C69.5589 79.1029 107.372 52.0989 149.847 52.2484V13C90.0696 13.0663 37.1326 51.5854 18.7192 108.414C0.305744 165.242 20.6036 227.455 68.998 262.519C117.392 297.583 182.877 297.523 231.207 262.37C279.537 227.218 299.72 164.967 281.203 108.173L272.111 111.134C289.714 164.146 271.022 222.449 225.87 255.373"}),Ze.jsx("path",{d:"M219.488 246.567C178.123 277.109 121.739 277.405 80.0539 247.301L86.1316 238.9C47.7742 211.418 31.5805 162.32 46.069 117.435L55.9454 119.307C69.5589 79.1029 107.372 52.0989 149.847 52.2484V13C90.0696 13.0663 37.1326 51.5854 18.7192 108.414C0.305744 165.242 20.6036 227.455 68.998 262.519C117.392 297.583 182.877 297.523 231.207 262.37C279.537 227.218 299.72 164.967 281.203 108.173L272.111 111.134C289.714 164.146 271.022 222.449 225.87 255.373"})]})},{brandName:"Intelligent Insights",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title.replace(/ /g,"-")}`},get readme(){return`${La}-${this.brandName.replace(/ /g,"-")}.md`},color:"#287A9F",Icon:Dn},{brandName:"Parchment",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${La}-${this.brandName}.md`},color:"#0093b2",Icon:()=>Ze.jsxs(Fe,{viewBox:"0 -3 29 31.68",size:"small",color:"primary-inverse",height:"2.5rem",width:"2.5rem",children:[Ze.jsx("polygon",{points:"26.87 21.98 2.44 21.98 2.44 2.44 19.54 2.44 19.54 0 0 0 0 24.43 29.31 24.43 29.31 9.77 26.87 9.77"}),Ze.jsx("rect",{x:"26.87",y:"4.89",width:"2.44",height:"2.44"}),Ze.jsx("rect",{x:"21.98",width:"2.44",height:"2.44"}),Ze.jsx("rect",{x:"26.87",width:"2.44",height:"2.44"}),Ze.jsxs("g",{children:[Ze.jsx("path",{d:"M9.38,13.2c-.5,0-.62.37-.62.71v1.53c0,.4.23.69.66.69.36,0,.55-.21.55-.69v-1.53c0-.42-.13-.71-.58-.71Z"}),Ze.jsx("path",{d:"M9.15,11.01c-2.36,0-4.27,1.91-4.27,4.27s1.91,4.27,4.27,4.27,4.27-1.91,4.27-4.27-1.91-4.27-4.27-4.27ZM10.86,15.4c0,.81-.54,1.44-1.27,1.44-.31,0-.84-.14-.84-.38v1.87c0,.14-.18.23-.3.23h-.3c-.13,0-.31-.08-.31-.23v-5.53c0-.14.18-.28.31-.28h.31c.13,0,.29.13.29.28v.05c0-.18.44-.36.8-.36.8,0,1.31.5,1.31,1.48v1.43Z"})]})]})}],QS=`${M.raw}/${M.owner}/${M.repo}`,Fn=`${QS}/${M.branch}`,KS=[{title:"CAIQ",from:"/aws/caiq/dl",to:`${Fn}/Amazon%20Web%20Services/AWS%20CAIQ.pdf`},{title:"Cyber Essentials+ Certificate",from:"/aws/ce/dl",to:`${Fn}/Amazon%20Web%20Services/AWS%20Cyber%20Essentials%20Plus%20Certificate.pdf`},{title:"CSA Star Level 2 Certificate",from:"/aws/csa/dl",to:`${Fn}/Amazon%20Web%20Services/AWS%20CSA%20Star%20Certification.pdf`},{title:"ISO 27001 Certificate",from:"/aws/iso/dl",to:`${Fn}/Amazon%20Web%20Services/AWS%20ISO%2027001%20Certificate.pdf`},{title:"ISO 9001 Certificate",from:"/aws/iso9001/dl",to:`${Fn}/Amazon%20Web%20Services/AWS%20ISO%209001%20Certificate.pdf`},{title:"SOC 3 Report",from:"/aws/soc/dl",to:`${Fn}/Amazon%20Web%20Services/AWS%20SOC%203.pdf`}],PS=KS.map(e=>({...e,lang:"EN"})),JS={brand:"AWS",links:PS},zp="canvas-catalog",WS=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,FS=`${M.raw}/${M.owner}/${M.repo}`,In=`${FS}/${zp}`,IS=[{title:"Compliance Package",from:"/canvas/catalog/dl",to:`${WS}/${zp}.zip`},{title:"PCI AOC SAQ",from:"/canvas/catalog/aoc/dl",to:`${In}/Canvas%20Catalog/2024_Instructure_PCI_DSS_Summary.pdf`},{title:"Architecture Paper",from:"/canvas/catalog/architecture/dl",to:`${In}/Canvas%20Catalog/Canvas%20Catalog%20Architecture.pdf`},{title:"HECVAT Lite",from:"/canvas/catalog/hecvat/dl",to:`${In}/Canvas%20Catalog/Canvas%20Catalog%20HECVAT%20Lite.xlsx`},{title:"PCI Shared Responsibility Matrix",from:"/canvas/catalog/pci/dl",to:`${In}/Canvas%20Catalog/Canvas%20Catalog%20PCI%20Responsibility%20Matrix.pdf`},{title:"TX-RAMP Certification",from:"/canvas/catalog/tx-ramp/dl",to:`${In}/Canvas%20Catalog/Canvas%20Catalog%20TX-RAMP%20Provisional%20Certificate.pdf`},{title:"Payment Redirector",from:"/canvas/catalog/payments/dl",to:`${In}/Canvas%20Catalog/Catalog%20Payment%20Redirector.png`},{title:"Home (HE)",from:"/canvas/catalog",to:"https://www.instructure.com/higher-education/products/canvas/canvas-catalog/"},{title:"Home (K12)",from:"/canvas/catalog/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-catalog/"},{title:"Guides",from:"/canvas/catalog/guides",to:"https://community.canvaslms.com/t5/Canvas-Catalog/ct-p/canvas_catalog"},{title:"Release Notes",from:"/canvas/catalog/releases",to:"https://community.canvaslms.com/t5/Catalog-Releases/ct-p/catalog_releases"},{title:"API",from:"/canvas/catalog/api",to:"https://api.catalog.instructure.com/api/docs"}],e7=IS.map(e=>({...e,lang:"EN"})),t7={brand:"Canvas Catalog",links:e7},a7=[{title:"Home",from:"/canvas/commons",to:"https://lor.instructure.com/"},{title:"Guides",from:"/canvas/commons/guides",to:"https://community.canvaslms.com/t5/Canvas-Commons/tkb-p/commons"},{title:"API",from:"/canvas/commons/api",to:"https://lor.instructure.com/docs/api/"}],n7=a7.map(e=>({...e,lang:"EN"})),l7={brand:"Canvas Commons",links:n7},$p="canvas-credentials",r7=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,i7=`${M.raw}/${M.owner}/${M.repo}`,Ki=`${i7}/${$p}`,u7=[{title:"Compliance Package",from:"/canvas/credentials/dl",to:`${r7}/${$p}.zip`},{title:"VPAT",from:"/canvas/credentials/vpat/dl",to:`${Ki}/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf`},{title:"Architecture Paper",from:"/canvas/credentials/architecture/dl",to:`${Ki}/Canvas%20Credentials/Canvas%20Credentials%20Architecture.pdf`},{title:"HECVAT",from:"/canvas/credentials/hecvat/dl",to:`${Ki}/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx`},{title:"TX-RAMP Certification",from:"/canvas/credentials/tx-ramp/dl",to:`${Ki}/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Home (HE)",from:"/canvas/credentials",to:"https://www.instructure.com/higher-education/products/canvas/canvas-credentials-digital-badges/"},{title:"Home (K12)",from:"/canvas/credentials/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-credentials-digital-badges/"},{title:"Guides",from:"/canvas/credentials/guides",to:"https://community.canvaslms.com/t5/Canvas-Credentials-Badges-Badgr/ct-p/canvas-credentials-badges"},{title:"Release Notes",from:"/canvas/credentials/releases",to:"https://community.canvaslms.com/t5/Badges-Credentials-Releases/tkb-p/badges-release"},{title:"API",from:"/canvas/credentials/api",to:"https://api.badgr.io/docs/v2/"}],c7=u7.map(e=>({...e,lang:"EN"})),Np="canvas-credentials-ES_LA",o7=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,s7=`${M.raw}/${M.owner}/${M.repo}`,Pi=`${s7}/${Np}`,f7=[{title:"Compliance Package",from:"/es-la/canvas/credentials/dl",to:`${o7}/${Np}.zip`},{title:"VPAT",from:"/es-la/canvas/credentials/vpat/dl",to:`${Pi}/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf`},{title:"Papel de Arquitectura",from:"/es-la/canvas/credentials/arquitectura/dl",to:`${Pi}/Canvas%20Credentials/Canvas%20Credentials%20Architecture_ES.pdf`},{title:"HECVAT",from:"/es-la/canvas/credentials/hecvat/dl",to:`${Pi}/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx`},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/canvas/credentials/tx-ramp/dl",to:`${Pi}/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf`}],d7=f7.map(e=>({...e,lang:"ES_LA"})),Lp="canvas-credentials-PT_BR",h7=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,m7=`${M.raw}/${M.owner}/${M.repo}`,Ji=`${m7}/${Lp}`,v7=[{title:"Compliance Package",from:"/pt-br/canvas/credentials/dl",to:`${h7}/${Lp}.zip`},{title:"VPAT",from:"/pt-br/canvas/credentials/vpat/dl",to:`${Ji}/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf`},{title:"Papel de Arquitectura",from:"/pt-br/canvas/credentials/arquitectura/dl",to:`${Ji}/Canvas%20Credentials/Canvas%20Credentials%20Architecture_PT.pdf`},{title:"HECVAT",from:"/pt-br/canvas/credentials/hecvat/dl",to:`${Ji}/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx`},{title:"Certificado de Nível 2 de TX-RAMP",from:"/pt-br/canvas/credentials/tx-ramp/dl",to:`${Ji}/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf`}],p7=v7.map(e=>({...e,lang:"PT_BR"})),y7={brand:"Canvas Credentials",links:[...c7,...d7,...p7]},g7=[{title:"Guides",from:"/canvas/data/guides",to:"https://community.canvaslms.com/t5/Canvas-Data-Users/gh-p/data"},{title:"API",from:"/canvas/data/api",to:"https://portal.inshosteddata.com/docs"}],b7=g7.map(e=>({...e,lang:"EN"})),S7={brand:"Canvas Data",links:b7},E7=[{title:"Startseite",from:"/de/canvas/lms",to:"https://www.instructure.com/de/hochschule/produkt/canvas/canvas-lms/"},{title:"Handbücher",from:"/de/canvas/handbuch",to:"https://community.canvaslms.com/t5/Ressourcen-auf-Deutsch-German/ct-p/german_resources"}],R7=E7.map(e=>({...e,lang:"DE"})),Up="canvas-lms",C7=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,A7=`${M.raw}/${M.owner}/${M.repo}`,dr=`${A7}/${Up}`,T7=[{title:"Compliance Package",from:"/canvas/lms/dl",to:`${C7}/${Up}.zip`},{title:"Architecture Paper",from:"/canvas/lms/architecture/dl",to:`${dr}/Canvas%20LMS/Canvas%20LMS%20Architecture.pdf`},{title:"HECVAT",from:"/canvas/lms/hecvat/dl",to:`${dr}/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx`},{title:"K12CVAT",from:"/canvas/lms/k12cvat/dl",to:`${dr}/Canvas%20LMS/Canvas%20LMS%20K12CVAT%20Full.xlsx`},{title:"SOC 3 Report",from:"/canvas/lms/soc/dl",to:`${dr}/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf`},{title:"TX-RAMP Level 2 Certificate",from:"/canvas/lms/txramp/dl",to:`${dr}/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Home (HE)",from:"/canvas/lms",to:"https://www.instructure.com/higher-education/products/canvas/canvas-lms/"},{title:"Home (K12)",from:"/canvas/lms/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-lms/"},{title:"VPAT",from:"/canvas/lms/vpat",to:"https://www.instructure.com/products/canvas/accessibility/"},{title:"Guides",from:"/canvas/lms/guides",to:"https://community.canvaslms.com/t5/Canvas-Guides/ct-p/canvas_guides/"},{title:"Release Notes",from:"/canvas/lms/releases",to:"https://community.canvaslms.com/t5/Canvas-Releases/tkb-p/canvas-release"},{title:"API",from:"/canvas/lms/api",to:"https://canvas.instructure.com/doc/api/index.html"}],_7=T7.map(e=>({...e,lang:"EN"})),Hp="canvas-lms-ES_LA",w7=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,O7=`${M.raw}/${M.owner}/${M.repo}`,hr=`${O7}/${Hp}`,M7=[{title:"Compliance Package",from:"/es-la/canvas/lms/dl",to:`${w7}/${Hp}.zip`},{title:"Papel de Arquitectura",from:"/es-la/canvas/lms/arquitectura/dl",to:`${hr}/Canvas%20LMS/Canvas%20LMS%20Architecture_ES.pdf`},{title:"HECVAT",from:"/es-la/canvas/lms/hecvat/dl",to:`${hr}/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx`},{title:"K12CVAT",from:"/es-la/canvas/lms/k12cvat/dl",to:`${hr}/Canvas%20LMS/Canvas%20LMS%20K-12CVAT-Lite.xlsx`},{title:"Informe SOC 3",from:"/es-la/canvas/lms/soc/dl",to:`${hr}/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf`},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/canvas/lms/txramp/dl",to:`${hr}/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Página de inicio (HE)",from:"/es-la/canvas/lms",to:"https://www.instructure.com/es/canvas/educacion-superior/"},{title:"Página de inicio (K12)",from:"/es-la/canvas/lms/basica",to:"https://www.instructure.com/es/educacion-basica/"},{title:"Guías",from:"/es-la/canvas/guias",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"},{title:"Notas de implementación",from:"/es-la/canvas/lms/publicacion",to:"https://community.canvaslms.com/t5/Espa%C3%B1ol/tkb-p/canvas-release-espanol"}],x7=M7.map(e=>({...e,lang:"ES_LA"})),Bp="canvas-lms-PT_BR",D7=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,z7=`${M.raw}/${M.owner}/${M.repo}`,mr=`${z7}/${Bp}`,$7=[{title:"Compliance Package",from:"/pt-br/canvas/lms/dl",to:`${D7}/${Bp}.zip`},{title:"Papel de Arquitetura",from:"/pt-br/canvas/lms/arquitetura/dl",to:`${mr}/Canvas%20LMS/Canvas%20LMS%20Architecture_PT.pdf`},{title:"HECVAT",from:"/pt-br/canvas/lms/hecvat/dl",to:`${mr}/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx`},{title:"K12CVAT",from:"/pt-br/canvas/lms/k12cvat/dl",to:`${mr}/Canvas%20LMS/Canvas%20LMS%20K-12CVAT-Lite.xlsx`},{title:"Relatório SOC 3",from:"/pt-br/canvas/lms/soc/dl",to:`${mr}/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf`},{title:"Certificado de Nível 2 do TX-RAMP",from:"/pt-br/canvas/lms/txramp/dl",to:`${mr}/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Página inicial (HE)",from:"/canvas/lms/pt",to:"https://www.instructure.com/pt-br/canvas/ensino-superior/"},{title:"Página inicial (K12)",from:"/canvas/lms/pt/basica",to:"https://www.instructure.com/pt-br/ensino-fundamental-e-medio/"},{title:"Guias",from:"/pt-br/canvas/guias",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"},{title:"Notas de lançamento (Canvas LMS)",from:"/canvas/lms/lancamentos",to:"https://community.canvaslms.com/t5/Portugues/tkb-p/canvas-release-portugues"}],N7=$7.map(e=>({...e,lang:"PT_BR"})),L7={brand:"Canvas LMS",links:[..._7,...x7,...N7,...R7]},U7=[{title:"Mobile Apps (Android)",from:"/canvas/mobile/android",to:"https://play.google.com/store/apps/developer?id=Instructure"},{title:"Mobile Apps (iOS)",from:"/canvas/mobile/ios",to:"https://apps.apple.com/us/developer/instructure-inc/id418441198"},{title:"Release Notes",from:"/canvas/mobile/releases",to:"https://community.canvaslms.com/t5/Canvas-Mobile-Releases/tkb-p/CanvasMobileReleases"},{title:"Guides",from:"/canvas/mobile/guides",to:"https://community.canvaslms.com/t5/Canvas-Mobile-Users/gh-p/mobile"}],H7=U7.map(e=>({...e,lang:"EN"})),B7={brand:"Canvas Mobile",links:H7},jp="canvas-studio",j7=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,V7=`${M.raw}/${M.owner}/${M.repo}`,$h=`${V7}/${jp}`,k7=[{title:"Compliance Package",from:"/canvas/studio/dl",to:`${j7}/${jp}.zip`},{title:"Architecture Paper",from:"/canvas/studio/architecture/dl",to:`${$h}/Canvas%20Studio/Canvas%20Studio%20Architecture.pdf`},{title:"HECVAT",from:"/canvas/studio/hecvat/dl",to:`${$h}/Canvas%20Studio/Canvas%20Studio%20HECVAT%20Lite.xlsx`},{title:"Home (HE)",from:"/canvas/studio",to:"https://www.instructure.com/higher-education/products/canvas/canvas-studio/"},{title:"Home (K12)",from:"/canvas/studio/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-studio/"},{title:"VPAT",from:"/canvas/studio/vpat",to:"https://www.instructure.com/accessibility/canvas/canvas-studio-vpat/"},{title:"Guides",from:"/canvas/studio/guides",to:"https://community.canvaslms.com/t5/Canvas-Studio/ct-p/studio_guides"},{title:"Release Notes",from:"/canvas/studio/releases",to:"https://community.canvaslms.com/t5/Studio-Releases/ct-p/studio_releases"},{title:"API",from:"/canvas/studio/api",to:"https://canvas.instructuremedia.com/api/public/docs/#/"}],G7=k7.map(e=>({...e,lang:"EN"})),Y7={brand:"Canvas Studio",links:G7},q7=[{title:"Gemeinschaft",from:"/de/canvas/gemeinschaft",to:"https://community.canvaslms.com/t5/Ressourcen-auf-Deutsch-German/ct-p/german_resources"}],X7=q7.map(e=>({...e,lang:"DE"})),Z7="canvas-lms",Q7=`${M.raw}/${M.owner}/${M.repo}`,K7=`${Q7}/${Z7}`,P7=[{title:"Security Audit Report",from:"/canvas/audit/dl",to:`${K7}/Canvas%20LMS/Canvas%20Security%20Audit%20Report.pdf`},{title:"Try Canvas (FFT)",from:"/canvas/try",to:"https://www.instructure.com/try-canvas"},{title:"Community",from:"/canvas/community",to:"https://community.canvaslms.com/t5/Canvas/ct-p/canvas"},{title:"Roadmap",from:"/canvas/roadmap",to:"https://community.canvaslms.com/t5/Canvas-Product-Roadmap/ct-p/canvas-product-roadmap"},{title:"Ideas",from:"/canvas/ideas",to:"https://community.canvaslms.com/t5/Canvas-Ideas-and-Themes/ct-p/canvas-ideas-themes?tab=identified"}],J7=P7.map(e=>({...e,lang:"EN"})),W7=[{title:"Communidad",from:"/es-la/canvas/lms/communidad",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"}],F7=W7.map(e=>({...e,lang:"ES_LA"})),I7=[{title:"Comunidade",from:"/pt-br/canvas/comunidade",to:"https://community.canvaslms.com/t5/Recursos-em-Portugu%C3%AAs-Portuguese/ct-p/portuguese_resources"}],e6=I7.map(e=>({...e,lang:"PT_BR"})),t6={brand:"Canvas",links:[...J7,...F7,...e6,...X7]},a6=[{title:"Home",from:"/elevate/dataquality",to:"https://www.instructure.com/k12/products/elevate/elevate-data-quality/"},{title:"Guides",from:"/elevate/dataquality/guides",to:"https://community.canvaslms.com/t5/Elevate-Data-Quality/ct-p/certify"}],n6=a6.map(e=>({...e,lang:"EN"})),l6={brand:"Elevate Data Quality",links:n6},r6=[{title:"Guides",from:"/elevate/datasync/guides",to:"https://community.canvaslms.com/t5/Elevate-Data-Sync/ct-p/elevate_data_sync"}],i6=r6.map(e=>({...e,lang:"EN"})),u6={brand:"Elevate Data Sync",links:i6},Vp="elevate-standards-alignment",c6=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,o6=`${M.raw}/${M.owner}/${M.repo}`,s6=`${o6}/${Vp}`,f6=[{title:"Compliance Package",from:"/elevate/standards-alignment/dl",to:`${c6}/${Vp}.zip`},{title:"HECVAT Lite",from:"/elevate/standards-alignment/hecvat/dl",to:`${s6}/Elevate%20Standards%20Alignment/Elevate%20Standards%20Alignment%20HECVAT%20Lite.xlsx`},{title:"Home",from:"/elevate/standards-alignment",to:"https://www.instructure.com/corporate-education/products/elevate/elevate-standards-alignment"},{title:"Release Notes",from:"/elevate/standards-alignment/releases",to:"https://community.canvaslms.com/t5/Elevate-Standards-Alignment/tkb-p/esa_releases"},{title:"Guides",from:"/elevate/standards-alignment/guides",to:"https://community.canvaslms.com/t5/Elevate-Standards-Alignment/tkb-p/ab_basics"}],d6=f6.map(e=>({...e,lang:"EN"})),h6={brand:"Elevate Standards Alignment",links:d6},m6=[{title:"Community",from:"/elevate/community",to:"https://community.canvaslms.com/t5/Elevate/ct-p/elevate"},{title:"Roadmap",from:"/elevate/roadmap",to:"https://community.canvaslms.com/t5/Elevate-Product-Roadmap/ct-p/elevate-product-roadmap"}],v6=m6.map(e=>({...e,lang:"EN"})),p6={brand:"Elevate",links:v6},kp="impact",y6=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,g6=`${M.raw}/${M.owner}/${M.repo}`,Do=`${g6}/${kp}`,b6=[{title:"Compliance Package",from:"/impact/dl",to:`${y6}/${kp}.zip`},{title:"Architecture Paper",from:"/impact/architecture/dl",to:`${Do}/Impact/Impact%20Architecture.pdf`},{title:"HECVAT",from:"/impact/hecvat/dl",to:`${Do}/Impact/Impact%20by%20Instructure%20HECVAT%20Full.xlsx`},{title:"TX-RAMP Level 2 Certification",from:"/impact/tx-ramp/dl",to:`${Do}/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Home (HE)",from:"/impact/he",to:"https://www.instructure.com/higher-education/products/impact/"},{title:"Home (K12)",from:"/impact/k12",to:"https://www.instructure.com/k12/products/impact/"},{title:"Community",from:"/impact/community",to:"https://community.canvaslms.com/t5/Impact/ct-p/impact"},{title:"Guides",from:"/impact/guides",to:"https://community.canvaslms.com/t5/Impact-Guides/tkb-p/impact_guides"},{title:"Release Notes",from:"/impact/releases",to:"https://community.canvaslms.com/t5/Impact-Releases/ct-p/impact_releases"}],S6=b6.map(e=>({...e,lang:"EN"})),Gp="impact-ES_LA",E6=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,R6=`${M.raw}/${M.owner}/${M.repo}`,zo=`${R6}/${Gp}`,C6=[{title:"Compliance Package",from:"/es-la/impact/dl",to:`${E6}/${Gp}.zip`},{title:"Papel de Arquitectura",from:"/es-la/impact/arquitectura/dl",to:`${zo}/Impact/Impact%20Architecture_ES.pdf`},{title:"HECVAT",from:"/es-la/impact/hecvat/dl",to:`${zo}/Impact/Impact%20by%20Instructure%20HECVAT%20Full.xlsx`},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/impact/tx-ramp/dl",to:`${zo}/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf`}],A6=C6.map(e=>({...e,lang:"ES_LA"})),Yp="impact-PT_BR",T6=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,_6=`${M.raw}/${M.owner}/${M.repo}`,$o=`${_6}/${Yp}`,w6=[{title:"Compliance Package",from:"/pt-br/impact/dl",to:`${T6}/${Yp}.zip`},{title:"Papel de Arquitetura",from:"/pt-br/impact/arquitetura/dl",to:`${$o}/Impact/Impact%20Architecture_PT.pdf`},{title:"HECVAT",from:"/pt-br/impact/hecvat/dl",to:`${$o}/Impact/Impact%20by%20Instructure%20HECVAT%20Full.xlsx`},{title:"Certificado de Nível 2 do TX-RAMP",from:"/pt-br/impact/tx-ramp/dl",to:`${$o}/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf`}],O6=w6.map(e=>({...e,lang:"PT_BR"})),M6={brand:"Impact",links:[...S6,...A6,...O6]},x6=[{title:"Startseite",from:"/de/home",to:"https://www.instructure.com/de"},{title:"Kontakt",from:"/de/kontakt",to:"https://www.instructure.com/de/contact-us"}],D6=x6.map(e=>({...e,lang:"DE"})),z6=`${M.raw}/${M.owner}/${M.repo}`,Pt=`${z6}/${M.branch}`,$6=[{title:"Security White Paper",from:"/security/dl",to:`${Pt}/Instructure/Instructure%20Security%20Overview.pdf`},{title:"Business Continuity White Paper",from:"/bc/dl",to:`${Pt}/Instructure/Instructure%20Business%20Continuity%20%26%20Disaster%20Recovery.pdf`},{title:"CAIQ",from:"/caiq/dl",to:`${Pt}/Instructure/Instructure%20ESG%20Report%20FY2023.pdf`},{title:"CSA Star Certificate",from:"/csa/dl",to:`${Pt}/Instructure/Instructure%20CSA%20STAR%20Certificate.pdf`},{title:"Cyber Essentials+ Certificate",from:"/ce/dl",to:`${Pt}/Instructure/Instructure%20Cyber%20Essentials%20Plus.pdf`},{title:"Environmental, Social, and Governance Report",from:"/esg/dl",to:`${Pt}/Instructure/Instructure%20ESG%20Report%20FY2023.pdf`},{title:"Instructure, Inc. Certificate of Insurance",from:"/coi/dl",to:`${Pt}/Instructure/Instructure%20Inc%20COI.pdf`},{title:"Instructure Global Certificate of Insurance",from:"/coi-global/dl",to:`${Pt}/Instructure/Instructure%20Global%20COI.pdf`},{title:"ISO 27001 Certificate",from:"/iso/dl",to:`${Pt}/Instructure/Instructure%20ISO%2027001%20Compliance%20Certificate.pdf`},{title:"Quality Assurance Program",from:"/qa/dl",to:`${Pt}/Instructure/Instructure%20Quality%20Assurance%20Program.pdf`},{title:"Home",from:"/home",to:"https://www.instructure.com/"},{title:"Roadmap",from:"/roadmap",to:"https://community.canvaslms.com/t5/Instructure-Roadmap/ct-p/instructure-roadmap/"},{title:"Accessibility",from:"/a11y",to:"https://www.instructure.com/accessibility/"},{title:"Contact",from:"/contact",to:"https://www.instructure.com/contact-us/"},{title:"Privacy",from:"/privacy",to:"https://www.instructure.com/canvas/privacy/"},{title:"Security",from:"/security",to:"https://www.instructure.com/products/canvas/security/"},{title:"Trust Center",from:"/trust",to:"https://www.instructure.com/trust-center/"},{title:"Community",from:"/community",to:"https://community.canvaslms.com/"},{title:"Terms & Conditions",from:"/tos",to:"https://www.instructure.com/policies/master-terms-conditions/"},{title:"Global Terms & Conditions",from:"/tos/global",to:"https://www.instructure.com/policies/global/master-terms-and-conditions/"},{title:"Acceptable Use Policy",from:"/aup",to:"https://www.instructure.com/policies/acceptable-use/"},{title:"Data Privacy Addendum",from:"/dpa",to:"https://www.instructure.com/policies/data-processing/"},{title:"Investor Relations",from:"/investors",to:"https://ir.instructure.com/overview/default.aspx"},{title:"Status",from:"/status",to:"https://status.instructure.com/"},{title:"CSA Star Registration",from:"/csa",to:"https://cloudsecurityalliance.org/star/registry/instructure/"},{title:"1EdTech Registrations",from:"/1edtech",to:"https://site.imsglobal.org/certifications?query=instructure"},{title:"Our Story",from:"/story",to:"https://www.instructure.com/about/our-story"},{title:"Study Hall",from:"/resources",to:"https://www.instructure.com/resources/"},{title:"EduAppCenter",from:"/apps",to:"https://www.eduappcenter.com/"},{title:"ESG Report (online)",from:"/esg",to:"https://instructure.com/esg-report"}],N6=$6.map(e=>({...e,lang:"EN"})),L6=[{title:"Página de inicio",from:"/es-la/home",to:"https://www.instructure.com/es/"},{title:"Contáctenos",from:"/es-la/contactenos",to:"https://www.instructure.com/es/contactenos/"},{title:"Privacidad",from:"/es-la/privicidad",to:"https://www.instructure.com/es/canvas/privacidad/"},{title:"Seguridad",from:"/es-la/seguridad",to:"https://www.instructure.com/es/canvas/seguridad/"},{title:"Nuestra Historia",from:"/es-la/historia",to:"https://www.instructure.com/es/sobre/nuestra-historia"}],U6=L6.map(e=>({...e,lang:"ES_LA"})),H6=[{title:"Pagina inicial",from:"/pt-br/home",to:"https://www.instructure.com/pt-br/"},{title:"Contato",from:"/pt-br/contato",to:"https://www.instructure.com/pt-br/contato/"},{title:"Contato",from:"/pt-br/contato",to:"https://www.instructure.com/pt-br/contato/"},{title:"Privacidade",from:"/pt-br/privacidade",to:"https://www.instructure.com/pt-br/canvas/privacidade/"},{title:"Segurança",from:"/pt-br/seguranca",to:"https://www.instructure.com/pt-br/canvas/seguranca/"},{title:"Nossa História",from:"/pt-br/historia",to:"https://www.instructure.com/pt-br/sobre/nossa-historia"}],B6=H6.map(e=>({...e,lang:"PT_BR"})),j6={brand:"Instructure",links:[...N6,...U6,...B6,...D6]},V6=[],k6=V6.map(e=>({...e,lang:"EN"})),G6={brand:"Intelligent Insights",links:k6},qp="learnplatform",Y6=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,q6=`${M.raw}/${M.owner}/${M.repo}`,No=`${q6}/${qp}`,X6=[{title:"Compliance Package",from:"/learnplatform/dl",to:`${Y6}/${qp}.zip`},{title:"EdTech Top 40 Report",from:"/learnplatform/top40/dl",to:`${No}/LearnPlatform/EdTech%20Top%2040.pdf`},{title:"Architecture Paper",from:"/learnplatform/architecture/dl",to:`${No}/LearnPlatform/LearnPlatform%20Architecture%20Overview.pdf`},{title:"HECVAT Lite",from:"/learnplatform/hecvat/dl",to:`${No}/LearnPlatform/LearnPlatform%20HECVAT%20Lite.xlsx`},{title:"Home",from:"/learnplatform",to:"https://www.instructure.com/k12/products/learnplatform/"},{title:"Terms of Service",from:"/learnplatform/tos",to:"https://www.instructure.com/policies/learnplatform-terms-of-service/"},{title:"Privacy",from:"/learnplatform/privacy",to:"https://www.instructure.com/policies/privacy-learnplatform/"},{title:"Data Processing Agreement",from:"/learnplatform/dpa",to:"https://www.instructure.com/policies/learnplatform-data-processing-agreement/"},{title:"Statement of Neutrality",from:"/learnplatform/neutrality",to:"https://www.instructure.com/policies/learnplatform-neutrality/"}],Z6=X6.map(e=>({...e,lang:"EN"})),Q6={brand:"Learnplatform",links:Z6},Xp="mastery-connect",K6=`${M.gh}/${M.owner}/${M.repo}/archive/refs/heads`,P6=`${M.raw}/${M.owner}/${M.repo}`,Nh=`${P6}/${Xp}`,J6=[{title:"Compliance Package",from:"/mastery/connect/dl",to:`${K6}/${Xp}.zip`},{title:"Architecture Paper",from:"/mastery/connect/architecture/dl",to:`${Nh}/Mastery%20Connect/Mastery%20Connect%20Architecture.pdf`},{title:"HECVAT Lite",from:"/mastery/connect/hecvat/dl",to:`${Nh}/Mastery%20Connect/Mastery%20Connect%20HECVAT%20Lite.xlsx`},{title:"Home",from:"/mastery/connect",to:"https://www.instructure.com/k12/products/mastery/mastery-connect"},{title:"Guides",from:"/mastery/connect/guides",to:"https://community.canvaslms.com/t5/Mastery-Connect/ct-p/masteryconnect"},{title:"Release Notes",from:"/mastery/connect/releases",to:"https://community.canvaslms.com/t5/Mastery-Connect-Releases/tkb-p/masteryconnect"},{title:"API",from:"/mastery/connect/api",to:"https://docs.google.com/document/d/19TxyeRzF6nyJDY6ej2dZozbE87JdUygw"},{title:"Mobile App (Android)",from:"/mastery/connect/android",to:"https://play.google.com/store/apps/dev?id=8869528477632015729&hl=EN&gl=US"},{title:"Mobile App (iOS)",from:"/canvas/lms/ios",to:"https://apps.apple.com/us/developer/masteryconnect/id413937396"}],W6=J6.map(e=>({...e,lang:"EN"})),F6={brand:"Mastery Connect",links:W6},I6=[{title:"Home",from:"/mastery/itembank",to:"https://www.instructure.com/k12/products/mastery/mastery-item-bank/"},{title:"Guides",from:"/mastery/itembank/guides",to:"https://community.canvaslms.com/t5/Mastery-Item-Bank/ct-p/mastery-item-bank/"}],e9=I6.map(e=>({...e,lang:"EN"})),t9={brand:"Mastery Item Bank",links:e9},a9=[{title:"Formatives Home",from:"/mastery/view/formative",to:"https://www.instructure.com/k12/products/mastery/mastery-view-formative-assessments/"},{title:"Predictives Home",from:"/mastery/view/predictive",to:"https://www.instructure.com/k12/products/mastery/mastery-view-predictive-assessments/"}],n9=a9.map(e=>({...e,lang:"EN"})),l9={brand:"Mastery View Assessments",links:n9},r9=[{title:"Community",from:"/mastery/community",to:"https://community.canvaslms.com/t5/Mastery/ct-p/mastery"},{title:"Roadmap",from:"/mastery/roadmap",to:"https://community.canvaslms.com/t5/Mastery-Product-Roadmap/ct-p/mastery-product-roadmap"}],i9=r9.map(e=>({...e,lang:"EN"})),u9={brand:"Mastery",links:i9},c9=[],o9=c9.map(e=>({...e,lang:"EN"})),s9={brand:"Parchment",links:o9},f9=[JS,j6,t6,L7,B7,Y7,t7,l7,S7,y7,u9,F6,t9,l9,M6,p6,h6,l6,u6,Q6,G6,s9],Vn=[];for(const e of ZS)Vn.push({path:`${e.route}`,lazy:()=>Ut(()=>import("./markdownBrand-GGRWnoGz.js"),__vite__mapDeps([0,1,2,3])),loader:()=>({readme:e.readme,brand:e.brandName}),children:[{path:":language",lazy:()=>Ut(()=>import("./markdownBrand-GGRWnoGz.js"),__vite__mapDeps([0,1,2,3])),loader:()=>({readme:e.readme,brand:e.brandName})}]});for(const e of f9)for(const t of e.links)Vn.push({path:t.from,lazy:()=>Ut(()=>import("./redirectTo-Dw5dzXUk.js"),__vite__mapDeps([4,1,5])),loader:()=>({path:t.from,brand:e.brand,url:t.to}),children:[{path:":language",lazy:()=>Ut(()=>import("./redirectTo-Dw5dzXUk.js"),__vite__mapDeps([4,1,5])),loader:()=>({path:t.from,brand:e.brand,url:t.to})}]});Vn.push({path:"/links",lazy:()=>Ut(()=>import("./links-D-T-qd9l.js"),__vite__mapDeps([6,1,7,3,8])),children:[{path:":language",lazy:()=>Ut(()=>import("./links-D-T-qd9l.js"),__vite__mapDeps([6,1,7,3,8]))}]});Vn.push({path:"/mdui",lazy:()=>Ut(()=>import("./mdui-DEQHbAAt.js"),__vite__mapDeps([9,1,2,3,10,8])),children:[{path:":language",lazy:()=>Ut(()=>import("./mdui-DEQHbAAt.js"),__vite__mapDeps([9,1,2,3,10,8]))}]});Vn.push({path:"/releases",lazy:()=>Ut(()=>import("./releases-BXrmG0c_.js"),__vite__mapDeps([11,1,2,3,12])),children:[{path:":language",lazy:()=>Ut(()=>import("./releases-BXrmG0c_.js"),__vite__mapDeps([11,1,2,3,12]))}]});Vn.push({path:"*",lazy:()=>Ut(()=>import("./error-Cp8tnuu0.js"),__vite__mapDeps([13,1,5])),children:[{path:":language",lazy:()=>Ut(()=>import("./error-Cp8tnuu0.js"),__vite__mapDeps([13,1,5]))}]});const d9=T4(Vn),Zp=document.getElementById("root");if(!Zp)throw new Error("Root element not found");Dv.createRoot(Zp).render(Ze.jsx(be.StrictMode,{children:Ze.jsx(zc,{theme:ld,children:Ze.jsx(SS,{as:"div",minHeight:"100vh",position:"relative",children:Ze.jsx(N4,{router:d9})})})}));export{zs as $,Mc as A,c5 as B,s5 as C,o5 as D,td as E,Jh as F,F3 as G,b9 as H,zc as I,I3 as J,g5 as K,f9 as L,ZS as M,g9 as N,m9 as O,L as P,w5 as Q,be as R,Fe as S,Jn as T,_p as U,SS as V,nd as W,S9 as X,Qu as Y,fr as Z,Ut as _,p9 as a,Dp as a0,ld as a1,Xl as a2,Zl as a3,Ql as a4,Dn as a5,Kl as a6,Gs as b,v9 as c,XS as d,R9 as e,Mn as f,M as g,xn as h,hn as i,Ze as j,h9 as k,Ll as l,Xu as m,Cp as n,Rp as o,p5 as p,Ep as q,T as r,S5 as s,Mp as t,y9 as u,r5 as v,rd as w,p4 as x,dc as y,bi as z}; diff --git a/assets/index-C5yFM9ST.js b/assets/index-CuKaSjpf.js similarity index 99% rename from assets/index-C5yFM9ST.js rename to assets/index-CuKaSjpf.js index 636f8e6..2cd6057 100644 --- a/assets/index-C5yFM9ST.js +++ b/assets/index-CuKaSjpf.js @@ -1,2 +1,2 @@ -import{k as to,l as oo,r as b,R as H,S as P,P as o,w as M,m as Dt,o as F,i as f,h as B,n as Te,q as Wt,s as ni,f as no,t as xi,p as ei,V as G,v as ti,T as so}from"./index-DCzcanBz.js";import{C as X,S as Le,m as A,s as Se,h as Vt,i as ro,j as lo,k as Ne,l as Nt,n as te,P as Ie,O as we,o as Bi,p as Di,q as ao,r as po}from"./RenderTopNavBar-CILoEAmM.js";var ui={exports:{}};(function(n,e){(function(i,t){var s="1.0.38",d="",c="?",u="function",m="undefined",g="object",v="string",x="major",r="model",a="name",l="type",p="vendor",h="version",L="architecture",z="console",y="mobile",w="tablet",S="smarttv",k="wearable",D="embedded",xe=500,$e="Amazon",se="Apple",Ee="ASUS",Be="BlackBerry",K="Browser",qe="Chrome",Jt="Edge",Ge="Firefox",je="Google",Ci="Huawei",si="LG",ri="Microsoft",Ii="Motorola",De="Opera",Ue="Samsung",Ai="Sharp",Ze="Sony",li="Xiaomi",ai="Zebra",Li="Facebook",Fi="Chromium OS",Pi="Mac OS",Qt=function($,C){var _={};for(var I in $)C[I]&&C[I].length%2===0?_[I]=C[I].concat($[I]):_[I]=$[I];return _},Ye=function($){for(var C={},_=0;_<$.length;_++)C[$[_].toUpperCase()]=$[_];return C},Hi=function($,C){return typeof $===v?We(C).indexOf(We($))!==-1:!1},We=function($){return $.toLowerCase()},eo=function($){return typeof $===v?$.replace(/[^\d\.]/g,d).split(".")[0]:t},di=function($,C){if(typeof $===v)return $=$.replace(/^\s\s*/,d),typeof C===m?$:$.substring(0,xe)},Ve=function($,C){for(var _=0,I,J,j,R,O,U;_0?R.length===2?typeof R[1]==u?this[R[0]]=R[1].call(this,U):this[R[0]]=R[1]:R.length===3?typeof R[1]===u&&!(R[1].exec&&R[1].test)?this[R[0]]=U?R[1].call(this,U,R[2]):t:this[R[0]]=U?U.replace(R[1],R[2]):t:R.length===4&&(this[R[0]]=U?R[3].call(this,U.replace(R[1],R[2])):t):this[R]=U||t;_+=2}},pi=function($,C){for(var _ in C)if(typeof C[_]===g&&C[_].length>0){for(var I=0;I2&&(O[r]="iPad",O[l]=w),O},this.getEngine=function(){var O={};return O[a]=t,O[h]=t,Ve.call(O,I,j.engine),O},this.getOS=function(){var O={};return O[a]=t,O[h]=t,Ve.call(O,I,j.os),R&&!O[a]&&J&&J.platform&&J.platform!="Unknown"&&(O[a]=J.platform.replace(/chrome os/i,Fi).replace(/macos/i,Pi)),O},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return I},this.setUA=function(O){return I=typeof O===v&&O.length>xe?di(O,xe):O,this},this.setUA(I),this};V.VERSION=s,V.BROWSER=Ye([a,h,x]),V.CPU=Ye([L]),V.DEVICE=Ye([r,p,l,z,y,S,w,k,D]),V.ENGINE=V.OS=Ye([a,h]),n.exports&&(e=n.exports=V),e.UAParser=V;var ke=typeof i!==m&&(i.jQuery||i.Zepto);if(ke&&!ke.ua){var Xe=new V;ke.ua=Xe.getResult(),ke.ua.get=function(){return Xe.getUA()},ke.ua.set=function($){Xe.setUA($);var C=Xe.getResult();for(var _ in C)ke.ua[_]=C[_]}}})(typeof window=="object"?window:to)})(ui,ui.exports);var co=ui.exports;const uo=oo(co),ho=()=>new uo().getResult().browser,fo=()=>ho().name==="Safari";var Wi;class Fe extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)}}render(){return H.createElement(P,Object.assign({},this.props,{name:"IconArrowOpenDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Wi||(Wi=H.createElement("path",{d:"m.153 526.146 92.168-92.299 867.767 867.636 867.636-867.636 92.429 92.299-960.065 959.935z",fillRule:"evenodd"})))}}Fe.glyphName="arrow-open-down";Fe.variant="Line";Fe.displayName="IconArrowOpenDownLine";Fe.propTypes={...P.propTypes};Fe.allowedProps=[...P.allowedProps];var Vi;class Pe extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)}}render(){return H.createElement(P,Object.assign({},this.props,{name:"IconArrowOpenUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Vi||(Vi=H.createElement("path",{d:"m.153 1393.854 92.168 92.299 867.767-867.636 867.636 867.636 92.429-92.299L960.088 433.92z",fillRule:"evenodd"})))}}Pe.glyphName="arrow-open-up";Pe.variant="Line";Pe.displayName="IconArrowOpenUpLine";Pe.propTypes={...P.propTypes};Pe.allowedProps=[...P.allowedProps];var Ni;class oe extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)}}render(){return H.createElement(P,Object.assign({},this.props,{name:"IconCheck",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Ni||(Ni=H.createElement("path",{d:"M1827.701 303.065 698.835 1431.801 92.299 825.266 0 917.564 698.835 1616.4 1919.869 395.234z",fillRule:"evenodd"})))}}oe.glyphName="check";oe.variant="Line";oe.displayName="IconCheckLine";oe.propTypes={...P.propTypes};oe.allowedProps=[...P.allowedProps];var Ti;class He extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)}}render(){return H.createElement(P,Object.assign({},this.props,{name:"IconMiniArrowDouble",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Ti||(Ti=H.createElement("path",{d:"M1319.1 790.054 1020.06 355.79c-33.165-48.165-87.553-47.273-120.104 0L600.92 790.054c-33.166 48.165-12.581 87.21 46.116 87.21h625.944c58.64 0 78.67-39.938 46.12-87.21ZM600.634 1129.94l299.035 434.27c33.167 48.16 87.554 47.27 120.101 0l299.04-434.27c33.17-48.16 12.58-87.21-46.12-87.21H646.75c-58.636 0-78.668 39.94-46.116 87.21Z"})))}}He.glyphName="mini-arrow-double";He.variant="Line";He.displayName="IconMiniArrowDoubleLine";He.propTypes={...P.propTypes};He.allowedProps=[...P.allowedProps];var qi;class Me extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)}}render(){return H.createElement(P,Object.assign({},this.props,{name:"IconMiniArrowDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),qi||(qi=H.createElement("path",{d:"M994.034 1226.26c-18.796 27.296-49.269 27.3-68.067 0L574.893 716.424C556.096 689.128 567.713 667 600.852 667h718.297c33.133 0 44.757 22.125 25.959 49.424L994.034 1226.26Z",fillRule:"evenodd"})))}}Me.glyphName="mini-arrow-down";Me.variant="Line";Me.displayName="IconMiniArrowDownLine";Me.propTypes={...P.propTypes};Me.allowedProps=[...P.allowedProps];var Gi;class ze extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)}}render(){return H.createElement(P,Object.assign({},this.props,{name:"IconMiniArrowUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Gi||(Gi=H.createElement("path",{d:"M994.034 694.296c-18.796-27.296-49.269-27.3-68.067 0l-351.074 509.836c-18.797 27.296-7.18 49.424 25.959 49.424h718.297c33.133 0 44.757-22.125 25.959-49.424L994.034 694.296Z",fillRule:"evenodd"})))}}ze.glyphName="mini-arrow-up";ze.variant="Line";ze.displayName="IconMiniArrowUpLine";ze.propTypes={...P.propTypes};ze.allowedProps=[...P.allowedProps];const go=(n,e)=>{const i=e.vAlign,t=e.textAlign,s=e.rowSpacing,d=e.colSpacing,c=e.isLastRow,u=e.isLastCol,m=e.startAt,g=e.visualDebug,v={small:{marginBottom:n.spacingSmall},medium:{marginBottom:n.spacingMedium},large:{marginBottom:n.spacingLarge},none:{marginBottom:0}},x=()=>{const S={small:{paddingLeft:`calc(${n.spacingSmall} / 2)`,paddingRight:`calc(${n.spacingSmall} / 2)`},medium:{paddingLeft:`calc(${n.spacingMedium} / 2)`,paddingRight:`calc(${n.spacingMedium} / 2)`},large:{paddingLeft:`calc(${n.spacingLarge} / 2)`,paddingRight:`calc(${n.spacingLarge} / 2)`},none:{}},k={top:{alignSelf:"flex-start"},middle:{alignSelf:"center"},bottom:{alignSelf:"flex-end"},stretch:{alignSelf:"stretch"}},D={start:{textAlign:"start"},end:{textAlign:"end"},center:{textAlign:"center"},inherit:{textAlign:"inherit"}};return{flexGrow:1,flexShrink:1,flexBasis:"0%",marginBottom:0,boxSizing:"border-box",...d&&S[d],...i&&k[i],...t&&D[t]}},r=()=>{const S=["small","medium","large","x-large",null];return S.slice(S.indexOf(m))},a=S=>r().includes(S),l=S=>{let k=e.width;if(k)return k&&typeof k=="object"&&(k=k[S==="x-large"?"xLarge":S]),k},p=S=>{let k=e.offset;if(k)return k&&typeof k=="object"&&(k=k[S==="x-large"?"xLarge":S]),k},h=(S="1")=>{switch(S){case"auto":return{flexGrow:0,flexShrink:0,flexBasis:"auto"};case 12:return{flex:"0 0 100%"};default:return{flexGrow:0,flexShrink:0,flexBasis:`calc(${S} / 12 * 99.999%)`,maxWidth:`calc(${S} / 12 * 99.999%)`}}},L=(S="1")=>{switch(S){case"auto":case 12:return{};default:return{marginInlineStart:`calc(${S} / 12 * 99.999%)`,marginInlineEnd:0}}},z=S=>m&&m===S?{...x()}:{},y=S=>{const k=l(S),D=p(S);return a(S)?{...k&&h(k),...D&&L(D)}:{}},w=S=>({...z(S),...y(S)});return{gridCol:{label:"gridCol",display:"block",boxSizing:"border-box",textAlign:"inherit",minWidth:"0.0625rem",...s&&v[s],...c&&u&&{marginBottom:0},...w("small"),[`@media screen and (${n.mediumMin})`]:{...w("medium")},[`@media screen and (${n.largeMin})`]:{...w("large")},[`@media screen and (${n.xLargeMin})`]:{...w("x-large")},...g&&{outline:"0.0625rem dashed red"}}}},mo=n=>{const e=n.spacing,i=n.media;return{...{spacingSmall:e==null?void 0:e.small,spacingMedium:e==null?void 0:e.medium,spacingLarge:e==null?void 0:e.large,...i}}},Z=o.oneOfType([o.number,o.oneOf(["auto"])]),bo={children:o.node,colSpacing:o.oneOf(["none","small","medium","large"]),rowSpacing:o.oneOf(["none","small","medium","large"]),textAlign:o.oneOf(["start","end","center","inherit"]),hAlign:o.oneOf(["start","center","end","space-around","space-between"]),vAlign:o.oneOf(["top","middle","bottom","stretch"]),startAt:o.oneOf(["small","medium","large","x-large",null]),visualDebug:o.bool,width:o.oneOfType([Z,o.shape({small:Z,medium:Z,large:Z,xLarge:Z})]),offset:o.oneOfType([Z,o.shape({small:Z,medium:Z,large:Z,xLarge:Z})]),isLastRow:o.bool,isLastCol:o.bool,elementRef:o.func},vo=["children","colSpacing","rowSpacing","textAlign","hAlign","vAlign","startAt","visualDebug","width","offset","isLastRow","isLastCol","elementRef"];var ji,Ui,re;let $i=(ji=M(go,mo),ji(Ui=(re=class Tt extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)}}widthCheck(){const e=this.props.width;let i=!1;e&&(typeof e=="number"&&e<=0&&(i=!0),typeof e=="object"&&Object.keys(e).forEach(t=>{typeof e[t]=="number"&&e[t]<=0&&(i=!0)})),i&&Dt(!1,"Col width must be positive!")}componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i),this.widthCheck()}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i),this.widthCheck()}render(){const e=this.props,i=e.children,t=e.styles,s=F(this.props,Tt.allowedProps);return f("span",Object.assign({},s,{ref:this.handleRef,css:t==null?void 0:t.gridCol}),i)}},re.displayName="GridCol",re.componentId="Grid.Col",re.propTypes=bo,re.allowedProps=vo,re.defaultProps={textAlign:"inherit",children:null,isLastCol:!1,isLastRow:!1},re))||Ui);const yo=(n,e)=>{const i=e.hAlign,t=e.vAlign,s=e.rowSpacing,d=e.colSpacing,c=e.isLastRow,u=e.startAt,m=e.visualDebug,g=()=>{const x={center:{justifyContent:"center"},start:{justifyContent:"flex-start"},end:{justifyContent:"flex-end"},"space-around":{justifyContent:"space-around"},"space-between":{justifyContent:"space-between"}},r={top:{alignItems:"flex-start"},middle:{alignItems:"center"},bottom:{alignItems:"flex-end"},stretch:{alignItems:"stretch"}},a={small:{margin:`0 calc(-1 * ${n.spacingSmall} / 2)`},medium:{margin:`0 calc(-1 * ${n.spacingMedium} / 2)`},large:{margin:`0 calc(-1 * ${n.spacingLarge} / 2)`},none:{}},l={small:{marginBottom:n.spacingSmall},medium:{marginBottom:n.spacingMedium},large:{marginBottom:n.spacingLarge},none:{marginBottom:0}};return{display:"flex",flexFlow:"row nowrap",...i&&x[i],...t&&r[t],...d&&a[d],...s&&l[s],...c&&{marginBottom:0}}},v=x=>u&&u===x?{...g()}:{};return{gridRow:{label:"gridRow",display:"block",boxSizing:"border-box",...v("small"),[`@media screen and (${n.mediumMin})`]:{...v("medium")},[`@media screen and (${n.largeMin})`]:{...v("large")},[`@media screen and (${n.xLargeMin})`]:{...v("x-large")},...m&&{outline:"0.0625rem dashed blue"}}}},wo=n=>{const e=n.spacing,i=n.media;return{...{spacingSmall:e==null?void 0:e.small,spacingMedium:e==null?void 0:e.medium,spacingLarge:e==null?void 0:e.large,...i}}},So={children:X.oneOf([$i,Le]),rowSpacing:o.oneOf(["none","small","medium","large"]),colSpacing:o.oneOf(["none","small","medium","large"]),hAlign:o.oneOf(["start","center","end","space-around","space-between"]),vAlign:o.oneOf(["top","middle","bottom","stretch"]),startAt:o.oneOf(["small","medium","large","x-large",null]),visualDebug:o.bool,isLastRow:o.bool},Oo=["children","rowSpacing","colSpacing","hAlign","vAlign","startAt","visualDebug","isLastRow"],_o=["styles","makeStyles"],xo=["styles"];var Zi,Yi,le;let hi=(Zi=M(yo,wo),Zi(Yi=(le=class fi extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{this.ref=i}}componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}renderChildren(){const e=this.props;e.styles,e.makeStyles;const i=B(e,_o);return b.Children.map(this.props.children,(t,s)=>A(t,[$i])?Se(t,{...Te(i,fi.allowedProps),...t.props,isLastRow:i.isLastRow,isLastCol:s+1===b.Children.count(this.props.children)}):t)}render(){const e=this.props,i=e.styles,t=B(e,xo),s=F(t,fi.allowedProps);return f("span",Object.assign({},s,{css:i==null?void 0:i.gridRow,ref:this.handleRef}),this.renderChildren())}},le.displayName="GridRow",le.componentId="Grid.Row",le.propTypes=So,le.allowedProps=Oo,le.defaultProps={children:null,isLastRow:!1},le))||Yi);const $o=(n,e)=>{const i=e.startAt,t=e.visualDebug,s=d=>i&&i===d?{boxSizing:"border-box"}:{};return{grid:{label:"grid",display:"block",...s("small"),[`@media screen and (${n.mediumMin})`]:{...s("medium")},[`@media screen and (${n.largeMin})`]:{...s("large")},[`@media screen and (${n.xLargeMin})`]:{...s("x-large")},...t&&{outline:"0.0625rem dashed red"}}}},ko=n=>{const e=n.spacing,i=n.media;return{...{spacingSmall:e==null?void 0:e.small,spacingMedium:e==null?void 0:e.medium,spacingLarge:e==null?void 0:e.large,...i}}},Ro={children:X.oneOf([hi,Le]),colSpacing:o.oneOf(["none","small","medium","large"]),rowSpacing:o.oneOf(["none","small","medium","large"]),hAlign:o.oneOf(["start","center","end","space-around","space-between"]),vAlign:o.oneOf(["top","middle","bottom","stretch"]),startAt:o.oneOf(["small","medium","large","x-large",null]),visualDebug:o.bool},Co=["children","colSpacing","rowSpacing","hAlign","vAlign","startAt","visualDebug"],Io=["styles","makeStyles"],Ao=["styles"];var Xi,Ki,Q;let N=(Xi=M($o,ko),Xi(Ki=(Q=class gi extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{this.ref=i}}componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}renderChildren(){const e=this.props;e.styles,e.makeStyles;const i=B(e,Io),t=b.Children.toArray(this.props.children);return t.map((s,d)=>A(s,[hi])?Se(s,{...Te(i,gi.allowedProps),...s.props,isLastRow:d+1===t.length}):s)}render(){const e=this.props,i=e.styles,t=B(e,Ao),s=F(t,gi.allowedProps);return f("span",Object.assign({},s,{css:i==null?void 0:i.grid,ref:this.handleRef}),this.renderChildren())}},Q.displayName="Grid",Q.componentId="Grid",Q.propTypes=Ro,Q.allowedProps=Co,Q.defaultProps={colSpacing:"medium",rowSpacing:"medium",hAlign:"start",startAt:"small",vAlign:"top",visualDebug:!1,children:null},Q.Row=hi,Q.Col=$i,Q))||Ki);const Lo=(n,e)=>{const i=e.children,s={all:"initial",display:"block",...Vt(i)&&{color:n.color,fontFamily:n.fontFamily,fontWeight:n.fontWeight,fontSize:n.fontSize,lineHeight:n.lineHeight,margin:0,textAlign:"inherit"}};return{formFieldLabel:{label:"formFieldLabel",...s,"&:is(label)":s,"&:-webkit-any(label)":s}}},Fo=n=>{const e=n.colors,i=n.typography,t=n.key,s={canvas:{color:n["ic-brand-font-color-dark"]}};return{...{color:e==null?void 0:e.textDarkest,fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightBold,fontSize:i==null?void 0:i.fontSizeMedium,lineHeight:i==null?void 0:i.lineHeightFit},...s[t]}},Po={children:o.node.isRequired,as:o.elementType},Ho=["as","children"];var Ji,Qi,ae;let Mo=(Ji=M(Lo,Fo),Ji(Qi=(ae=class mi extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{this.ref=i}}componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}render(){const e=Wt(mi,this.props),i=this.props,t=i.styles,s=i.children;return f(e,Object.assign({},F(this.props,mi.allowedProps),{css:t==null?void 0:t.formFieldLabel,ref:this.handleRef}),s)}},ae.displayName="FormFieldLabel",ae.componentId="FormFieldLabel",ae.propTypes=Po,ae.allowedProps=Ho,ae.defaultProps={as:"span"},ae))||Qi);const zo=(n,e)=>{const i=e.variant,t={hint:{color:n.colorHint},error:{color:n.colorError},success:{color:n.colorSuccess},"screenreader-only":{}};return{formFieldMessage:{label:"formFieldMessage",fontFamily:n.fontFamily,fontWeight:n.fontWeight,fontSize:n.fontSize,lineHeight:n.lineHeight,display:"block",...t[i]}}},Eo=n=>{const e=n.colors,i=n.typography,t=n.key,s={canvas:{colorHint:n["ic-brand-font-color-dark"]}};return{...{colorHint:e==null?void 0:e.textDarkest,colorError:e==null?void 0:e.textDanger,colorSuccess:e==null?void 0:e.textSuccess,fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,fontSize:i==null?void 0:i.fontSizeSmall,lineHeight:i==null?void 0:i.lineHeight},...s[t]}},qt=o.oneOf(["error","hint","success","screenreader-only"]),Gt=o.node,_e={message:o.shape({type:qt,text:Gt})},Bo={variant:qt,children:Gt},Do=["variant","children"];var et,it,de;let Wo=(et=M(zo,Eo),et(it=(de=class extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{this.ref=i}}componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}render(){const e=this.props,i=e.children,t=e.styles;return this.props.variant!=="screenreader-only"?f("span",{css:t==null?void 0:t.formFieldMessage,ref:this.handleRef},i):f(Le,{elementRef:this.handleRef},i)}},de.displayName="FormFieldMessage",de.componentId="FormFieldMessage",de.propTypes=Bo,de.allowedProps=Do,de.defaultProps={variant:"hint"},de))||it);const Vo=n=>({formFieldMessages:{label:"formFieldMessages",padding:0,display:"block",margin:`calc(-1 * ${n.topMargin}) 0 0 0`},message:{label:"formFieldMessages__message",display:"block"}}),No=n=>{const e=n.spacing;return{...{topMargin:e==null?void 0:e.xxSmall}}},To={messages:o.arrayOf(_e.message)},qo=["messages"];var tt,ot,pe;let nt=(tt=M(Vo,No),tt(ot=(pe=class jt extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{this.ref=i}}componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}render(){const e=this.props,i=e.messages,t=e.styles;return i&&i.length>0?f("span",Object.assign({css:t==null?void 0:t.formFieldMessages},F(this.props,jt.allowedProps),{ref:this.handleRef}),i.map((s,d)=>f("span",{key:`error${d}`,css:t==null?void 0:t.message},f(Wo,{variant:s.type},s.text)))):null}},pe.displayName="FormFieldMessages",pe.componentId="FormFieldMessages",pe.propTypes=To,pe.allowedProps=qo,pe.defaultProps={},pe))||ot);const Go=(n,e)=>({formFieldLayout:{label:"formFieldLayout",all:"initial",border:"0",padding:"0",margin:"0",minWidth:"0",direction:"inherit",textAlign:"start",opacity:"inherit",display:"block",width:"100%",...e.inline&&{display:"inline-block",verticalAlign:"middle",width:"auto"}}}),jo={label:o.node.isRequired,id:o.string,as:o.elementType,messages:o.arrayOf(_e.message),messagesId:o.string,children:o.node,inline:o.bool,layout:o.oneOf(["stacked","inline"]),labelAlign:o.oneOf(["start","end"]),vAlign:o.oneOf(["top","middle","bottom"]),width:o.string,inputContainerRef:o.func,elementRef:o.func},Uo=["label","id","as","messages","messagesId","children","inline","layout","labelAlign","width","inputContainerRef","elementRef"],Zo=["makeStyles","styles"];var st,rt,Ke,ce;let oi=(st=ni(),rt=M(Go,null),st(Ke=rt(Ke=(ce=class bi extends b.Component{constructor(e){super(e),this._messagesId=void 0,this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)},this.handleInputContainerRef=i=>{typeof this.props.inputContainerRef=="function"&&this.props.inputContainerRef(i)},this._messagesId=e.messagesId||e.deterministicId(),no(typeof e.width<"u"||!e.inline||e.layout!=="inline",`[FormFieldLayout] The 'inline' prop is true, and the 'layout' is set to 'inline'. +import{k as to,l as oo,r as b,R as H,S as P,P as o,w as M,m as Dt,o as F,i as f,h as B,n as Te,q as Wt,s as ni,f as no,t as xi,p as ei,V as G,v as ti,T as so}from"./index-C3XQCywa.js";import{C as X,S as Le,m as A,s as Se,h as Vt,i as ro,j as lo,k as Ne,l as Nt,n as te,P as Ie,O as we,o as Bi,p as Di,q as ao,r as po}from"./RenderTopNavBar-D2dLV4g_.js";var ui={exports:{}};(function(n,e){(function(i,t){var s="1.0.38",d="",c="?",u="function",m="undefined",g="object",v="string",x="major",r="model",a="name",l="type",p="vendor",h="version",L="architecture",z="console",y="mobile",w="tablet",S="smarttv",k="wearable",D="embedded",xe=500,$e="Amazon",se="Apple",Ee="ASUS",Be="BlackBerry",K="Browser",qe="Chrome",Jt="Edge",Ge="Firefox",je="Google",Ci="Huawei",si="LG",ri="Microsoft",Ii="Motorola",De="Opera",Ue="Samsung",Ai="Sharp",Ze="Sony",li="Xiaomi",ai="Zebra",Li="Facebook",Fi="Chromium OS",Pi="Mac OS",Qt=function($,C){var _={};for(var I in $)C[I]&&C[I].length%2===0?_[I]=C[I].concat($[I]):_[I]=$[I];return _},Ye=function($){for(var C={},_=0;_<$.length;_++)C[$[_].toUpperCase()]=$[_];return C},Hi=function($,C){return typeof $===v?We(C).indexOf(We($))!==-1:!1},We=function($){return $.toLowerCase()},eo=function($){return typeof $===v?$.replace(/[^\d\.]/g,d).split(".")[0]:t},di=function($,C){if(typeof $===v)return $=$.replace(/^\s\s*/,d),typeof C===m?$:$.substring(0,xe)},Ve=function($,C){for(var _=0,I,J,j,R,O,U;_0?R.length===2?typeof R[1]==u?this[R[0]]=R[1].call(this,U):this[R[0]]=R[1]:R.length===3?typeof R[1]===u&&!(R[1].exec&&R[1].test)?this[R[0]]=U?R[1].call(this,U,R[2]):t:this[R[0]]=U?U.replace(R[1],R[2]):t:R.length===4&&(this[R[0]]=U?R[3].call(this,U.replace(R[1],R[2])):t):this[R]=U||t;_+=2}},pi=function($,C){for(var _ in C)if(typeof C[_]===g&&C[_].length>0){for(var I=0;I2&&(O[r]="iPad",O[l]=w),O},this.getEngine=function(){var O={};return O[a]=t,O[h]=t,Ve.call(O,I,j.engine),O},this.getOS=function(){var O={};return O[a]=t,O[h]=t,Ve.call(O,I,j.os),R&&!O[a]&&J&&J.platform&&J.platform!="Unknown"&&(O[a]=J.platform.replace(/chrome os/i,Fi).replace(/macos/i,Pi)),O},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return I},this.setUA=function(O){return I=typeof O===v&&O.length>xe?di(O,xe):O,this},this.setUA(I),this};V.VERSION=s,V.BROWSER=Ye([a,h,x]),V.CPU=Ye([L]),V.DEVICE=Ye([r,p,l,z,y,S,w,k,D]),V.ENGINE=V.OS=Ye([a,h]),n.exports&&(e=n.exports=V),e.UAParser=V;var ke=typeof i!==m&&(i.jQuery||i.Zepto);if(ke&&!ke.ua){var Xe=new V;ke.ua=Xe.getResult(),ke.ua.get=function(){return Xe.getUA()},ke.ua.set=function($){Xe.setUA($);var C=Xe.getResult();for(var _ in C)ke.ua[_]=C[_]}}})(typeof window=="object"?window:to)})(ui,ui.exports);var co=ui.exports;const uo=oo(co),ho=()=>new uo().getResult().browser,fo=()=>ho().name==="Safari";var Wi;class Fe extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)}}render(){return H.createElement(P,Object.assign({},this.props,{name:"IconArrowOpenDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Wi||(Wi=H.createElement("path",{d:"m.153 526.146 92.168-92.299 867.767 867.636 867.636-867.636 92.429 92.299-960.065 959.935z",fillRule:"evenodd"})))}}Fe.glyphName="arrow-open-down";Fe.variant="Line";Fe.displayName="IconArrowOpenDownLine";Fe.propTypes={...P.propTypes};Fe.allowedProps=[...P.allowedProps];var Vi;class Pe extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)}}render(){return H.createElement(P,Object.assign({},this.props,{name:"IconArrowOpenUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Vi||(Vi=H.createElement("path",{d:"m.153 1393.854 92.168 92.299 867.767-867.636 867.636 867.636 92.429-92.299L960.088 433.92z",fillRule:"evenodd"})))}}Pe.glyphName="arrow-open-up";Pe.variant="Line";Pe.displayName="IconArrowOpenUpLine";Pe.propTypes={...P.propTypes};Pe.allowedProps=[...P.allowedProps];var Ni;class oe extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)}}render(){return H.createElement(P,Object.assign({},this.props,{name:"IconCheck",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Ni||(Ni=H.createElement("path",{d:"M1827.701 303.065 698.835 1431.801 92.299 825.266 0 917.564 698.835 1616.4 1919.869 395.234z",fillRule:"evenodd"})))}}oe.glyphName="check";oe.variant="Line";oe.displayName="IconCheckLine";oe.propTypes={...P.propTypes};oe.allowedProps=[...P.allowedProps];var Ti;class He extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)}}render(){return H.createElement(P,Object.assign({},this.props,{name:"IconMiniArrowDouble",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Ti||(Ti=H.createElement("path",{d:"M1319.1 790.054 1020.06 355.79c-33.165-48.165-87.553-47.273-120.104 0L600.92 790.054c-33.166 48.165-12.581 87.21 46.116 87.21h625.944c58.64 0 78.67-39.938 46.12-87.21ZM600.634 1129.94l299.035 434.27c33.167 48.16 87.554 47.27 120.101 0l299.04-434.27c33.17-48.16 12.58-87.21-46.12-87.21H646.75c-58.636 0-78.668 39.94-46.116 87.21Z"})))}}He.glyphName="mini-arrow-double";He.variant="Line";He.displayName="IconMiniArrowDoubleLine";He.propTypes={...P.propTypes};He.allowedProps=[...P.allowedProps];var qi;class Me extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)}}render(){return H.createElement(P,Object.assign({},this.props,{name:"IconMiniArrowDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),qi||(qi=H.createElement("path",{d:"M994.034 1226.26c-18.796 27.296-49.269 27.3-68.067 0L574.893 716.424C556.096 689.128 567.713 667 600.852 667h718.297c33.133 0 44.757 22.125 25.959 49.424L994.034 1226.26Z",fillRule:"evenodd"})))}}Me.glyphName="mini-arrow-down";Me.variant="Line";Me.displayName="IconMiniArrowDownLine";Me.propTypes={...P.propTypes};Me.allowedProps=[...P.allowedProps];var Gi;class ze extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)}}render(){return H.createElement(P,Object.assign({},this.props,{name:"IconMiniArrowUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Gi||(Gi=H.createElement("path",{d:"M994.034 694.296c-18.796-27.296-49.269-27.3-68.067 0l-351.074 509.836c-18.797 27.296-7.18 49.424 25.959 49.424h718.297c33.133 0 44.757-22.125 25.959-49.424L994.034 694.296Z",fillRule:"evenodd"})))}}ze.glyphName="mini-arrow-up";ze.variant="Line";ze.displayName="IconMiniArrowUpLine";ze.propTypes={...P.propTypes};ze.allowedProps=[...P.allowedProps];const go=(n,e)=>{const i=e.vAlign,t=e.textAlign,s=e.rowSpacing,d=e.colSpacing,c=e.isLastRow,u=e.isLastCol,m=e.startAt,g=e.visualDebug,v={small:{marginBottom:n.spacingSmall},medium:{marginBottom:n.spacingMedium},large:{marginBottom:n.spacingLarge},none:{marginBottom:0}},x=()=>{const S={small:{paddingLeft:`calc(${n.spacingSmall} / 2)`,paddingRight:`calc(${n.spacingSmall} / 2)`},medium:{paddingLeft:`calc(${n.spacingMedium} / 2)`,paddingRight:`calc(${n.spacingMedium} / 2)`},large:{paddingLeft:`calc(${n.spacingLarge} / 2)`,paddingRight:`calc(${n.spacingLarge} / 2)`},none:{}},k={top:{alignSelf:"flex-start"},middle:{alignSelf:"center"},bottom:{alignSelf:"flex-end"},stretch:{alignSelf:"stretch"}},D={start:{textAlign:"start"},end:{textAlign:"end"},center:{textAlign:"center"},inherit:{textAlign:"inherit"}};return{flexGrow:1,flexShrink:1,flexBasis:"0%",marginBottom:0,boxSizing:"border-box",...d&&S[d],...i&&k[i],...t&&D[t]}},r=()=>{const S=["small","medium","large","x-large",null];return S.slice(S.indexOf(m))},a=S=>r().includes(S),l=S=>{let k=e.width;if(k)return k&&typeof k=="object"&&(k=k[S==="x-large"?"xLarge":S]),k},p=S=>{let k=e.offset;if(k)return k&&typeof k=="object"&&(k=k[S==="x-large"?"xLarge":S]),k},h=(S="1")=>{switch(S){case"auto":return{flexGrow:0,flexShrink:0,flexBasis:"auto"};case 12:return{flex:"0 0 100%"};default:return{flexGrow:0,flexShrink:0,flexBasis:`calc(${S} / 12 * 99.999%)`,maxWidth:`calc(${S} / 12 * 99.999%)`}}},L=(S="1")=>{switch(S){case"auto":case 12:return{};default:return{marginInlineStart:`calc(${S} / 12 * 99.999%)`,marginInlineEnd:0}}},z=S=>m&&m===S?{...x()}:{},y=S=>{const k=l(S),D=p(S);return a(S)?{...k&&h(k),...D&&L(D)}:{}},w=S=>({...z(S),...y(S)});return{gridCol:{label:"gridCol",display:"block",boxSizing:"border-box",textAlign:"inherit",minWidth:"0.0625rem",...s&&v[s],...c&&u&&{marginBottom:0},...w("small"),[`@media screen and (${n.mediumMin})`]:{...w("medium")},[`@media screen and (${n.largeMin})`]:{...w("large")},[`@media screen and (${n.xLargeMin})`]:{...w("x-large")},...g&&{outline:"0.0625rem dashed red"}}}},mo=n=>{const e=n.spacing,i=n.media;return{...{spacingSmall:e==null?void 0:e.small,spacingMedium:e==null?void 0:e.medium,spacingLarge:e==null?void 0:e.large,...i}}},Z=o.oneOfType([o.number,o.oneOf(["auto"])]),bo={children:o.node,colSpacing:o.oneOf(["none","small","medium","large"]),rowSpacing:o.oneOf(["none","small","medium","large"]),textAlign:o.oneOf(["start","end","center","inherit"]),hAlign:o.oneOf(["start","center","end","space-around","space-between"]),vAlign:o.oneOf(["top","middle","bottom","stretch"]),startAt:o.oneOf(["small","medium","large","x-large",null]),visualDebug:o.bool,width:o.oneOfType([Z,o.shape({small:Z,medium:Z,large:Z,xLarge:Z})]),offset:o.oneOfType([Z,o.shape({small:Z,medium:Z,large:Z,xLarge:Z})]),isLastRow:o.bool,isLastCol:o.bool,elementRef:o.func},vo=["children","colSpacing","rowSpacing","textAlign","hAlign","vAlign","startAt","visualDebug","width","offset","isLastRow","isLastCol","elementRef"];var ji,Ui,re;let $i=(ji=M(go,mo),ji(Ui=(re=class Tt extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)}}widthCheck(){const e=this.props.width;let i=!1;e&&(typeof e=="number"&&e<=0&&(i=!0),typeof e=="object"&&Object.keys(e).forEach(t=>{typeof e[t]=="number"&&e[t]<=0&&(i=!0)})),i&&Dt(!1,"Col width must be positive!")}componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i),this.widthCheck()}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i),this.widthCheck()}render(){const e=this.props,i=e.children,t=e.styles,s=F(this.props,Tt.allowedProps);return f("span",Object.assign({},s,{ref:this.handleRef,css:t==null?void 0:t.gridCol}),i)}},re.displayName="GridCol",re.componentId="Grid.Col",re.propTypes=bo,re.allowedProps=vo,re.defaultProps={textAlign:"inherit",children:null,isLastCol:!1,isLastRow:!1},re))||Ui);const yo=(n,e)=>{const i=e.hAlign,t=e.vAlign,s=e.rowSpacing,d=e.colSpacing,c=e.isLastRow,u=e.startAt,m=e.visualDebug,g=()=>{const x={center:{justifyContent:"center"},start:{justifyContent:"flex-start"},end:{justifyContent:"flex-end"},"space-around":{justifyContent:"space-around"},"space-between":{justifyContent:"space-between"}},r={top:{alignItems:"flex-start"},middle:{alignItems:"center"},bottom:{alignItems:"flex-end"},stretch:{alignItems:"stretch"}},a={small:{margin:`0 calc(-1 * ${n.spacingSmall} / 2)`},medium:{margin:`0 calc(-1 * ${n.spacingMedium} / 2)`},large:{margin:`0 calc(-1 * ${n.spacingLarge} / 2)`},none:{}},l={small:{marginBottom:n.spacingSmall},medium:{marginBottom:n.spacingMedium},large:{marginBottom:n.spacingLarge},none:{marginBottom:0}};return{display:"flex",flexFlow:"row nowrap",...i&&x[i],...t&&r[t],...d&&a[d],...s&&l[s],...c&&{marginBottom:0}}},v=x=>u&&u===x?{...g()}:{};return{gridRow:{label:"gridRow",display:"block",boxSizing:"border-box",...v("small"),[`@media screen and (${n.mediumMin})`]:{...v("medium")},[`@media screen and (${n.largeMin})`]:{...v("large")},[`@media screen and (${n.xLargeMin})`]:{...v("x-large")},...m&&{outline:"0.0625rem dashed blue"}}}},wo=n=>{const e=n.spacing,i=n.media;return{...{spacingSmall:e==null?void 0:e.small,spacingMedium:e==null?void 0:e.medium,spacingLarge:e==null?void 0:e.large,...i}}},So={children:X.oneOf([$i,Le]),rowSpacing:o.oneOf(["none","small","medium","large"]),colSpacing:o.oneOf(["none","small","medium","large"]),hAlign:o.oneOf(["start","center","end","space-around","space-between"]),vAlign:o.oneOf(["top","middle","bottom","stretch"]),startAt:o.oneOf(["small","medium","large","x-large",null]),visualDebug:o.bool,isLastRow:o.bool},Oo=["children","rowSpacing","colSpacing","hAlign","vAlign","startAt","visualDebug","isLastRow"],_o=["styles","makeStyles"],xo=["styles"];var Zi,Yi,le;let hi=(Zi=M(yo,wo),Zi(Yi=(le=class fi extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{this.ref=i}}componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}renderChildren(){const e=this.props;e.styles,e.makeStyles;const i=B(e,_o);return b.Children.map(this.props.children,(t,s)=>A(t,[$i])?Se(t,{...Te(i,fi.allowedProps),...t.props,isLastRow:i.isLastRow,isLastCol:s+1===b.Children.count(this.props.children)}):t)}render(){const e=this.props,i=e.styles,t=B(e,xo),s=F(t,fi.allowedProps);return f("span",Object.assign({},s,{css:i==null?void 0:i.gridRow,ref:this.handleRef}),this.renderChildren())}},le.displayName="GridRow",le.componentId="Grid.Row",le.propTypes=So,le.allowedProps=Oo,le.defaultProps={children:null,isLastRow:!1},le))||Yi);const $o=(n,e)=>{const i=e.startAt,t=e.visualDebug,s=d=>i&&i===d?{boxSizing:"border-box"}:{};return{grid:{label:"grid",display:"block",...s("small"),[`@media screen and (${n.mediumMin})`]:{...s("medium")},[`@media screen and (${n.largeMin})`]:{...s("large")},[`@media screen and (${n.xLargeMin})`]:{...s("x-large")},...t&&{outline:"0.0625rem dashed red"}}}},ko=n=>{const e=n.spacing,i=n.media;return{...{spacingSmall:e==null?void 0:e.small,spacingMedium:e==null?void 0:e.medium,spacingLarge:e==null?void 0:e.large,...i}}},Ro={children:X.oneOf([hi,Le]),colSpacing:o.oneOf(["none","small","medium","large"]),rowSpacing:o.oneOf(["none","small","medium","large"]),hAlign:o.oneOf(["start","center","end","space-around","space-between"]),vAlign:o.oneOf(["top","middle","bottom","stretch"]),startAt:o.oneOf(["small","medium","large","x-large",null]),visualDebug:o.bool},Co=["children","colSpacing","rowSpacing","hAlign","vAlign","startAt","visualDebug"],Io=["styles","makeStyles"],Ao=["styles"];var Xi,Ki,Q;let N=(Xi=M($o,ko),Xi(Ki=(Q=class gi extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{this.ref=i}}componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}renderChildren(){const e=this.props;e.styles,e.makeStyles;const i=B(e,Io),t=b.Children.toArray(this.props.children);return t.map((s,d)=>A(s,[hi])?Se(s,{...Te(i,gi.allowedProps),...s.props,isLastRow:d+1===t.length}):s)}render(){const e=this.props,i=e.styles,t=B(e,Ao),s=F(t,gi.allowedProps);return f("span",Object.assign({},s,{css:i==null?void 0:i.grid,ref:this.handleRef}),this.renderChildren())}},Q.displayName="Grid",Q.componentId="Grid",Q.propTypes=Ro,Q.allowedProps=Co,Q.defaultProps={colSpacing:"medium",rowSpacing:"medium",hAlign:"start",startAt:"small",vAlign:"top",visualDebug:!1,children:null},Q.Row=hi,Q.Col=$i,Q))||Ki);const Lo=(n,e)=>{const i=e.children,s={all:"initial",display:"block",...Vt(i)&&{color:n.color,fontFamily:n.fontFamily,fontWeight:n.fontWeight,fontSize:n.fontSize,lineHeight:n.lineHeight,margin:0,textAlign:"inherit"}};return{formFieldLabel:{label:"formFieldLabel",...s,"&:is(label)":s,"&:-webkit-any(label)":s}}},Fo=n=>{const e=n.colors,i=n.typography,t=n.key,s={canvas:{color:n["ic-brand-font-color-dark"]}};return{...{color:e==null?void 0:e.textDarkest,fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightBold,fontSize:i==null?void 0:i.fontSizeMedium,lineHeight:i==null?void 0:i.lineHeightFit},...s[t]}},Po={children:o.node.isRequired,as:o.elementType},Ho=["as","children"];var Ji,Qi,ae;let Mo=(Ji=M(Lo,Fo),Ji(Qi=(ae=class mi extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{this.ref=i}}componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}render(){const e=Wt(mi,this.props),i=this.props,t=i.styles,s=i.children;return f(e,Object.assign({},F(this.props,mi.allowedProps),{css:t==null?void 0:t.formFieldLabel,ref:this.handleRef}),s)}},ae.displayName="FormFieldLabel",ae.componentId="FormFieldLabel",ae.propTypes=Po,ae.allowedProps=Ho,ae.defaultProps={as:"span"},ae))||Qi);const zo=(n,e)=>{const i=e.variant,t={hint:{color:n.colorHint},error:{color:n.colorError},success:{color:n.colorSuccess},"screenreader-only":{}};return{formFieldMessage:{label:"formFieldMessage",fontFamily:n.fontFamily,fontWeight:n.fontWeight,fontSize:n.fontSize,lineHeight:n.lineHeight,display:"block",...t[i]}}},Eo=n=>{const e=n.colors,i=n.typography,t=n.key,s={canvas:{colorHint:n["ic-brand-font-color-dark"]}};return{...{colorHint:e==null?void 0:e.textDarkest,colorError:e==null?void 0:e.textDanger,colorSuccess:e==null?void 0:e.textSuccess,fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,fontSize:i==null?void 0:i.fontSizeSmall,lineHeight:i==null?void 0:i.lineHeight},...s[t]}},qt=o.oneOf(["error","hint","success","screenreader-only"]),Gt=o.node,_e={message:o.shape({type:qt,text:Gt})},Bo={variant:qt,children:Gt},Do=["variant","children"];var et,it,de;let Wo=(et=M(zo,Eo),et(it=(de=class extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{this.ref=i}}componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}render(){const e=this.props,i=e.children,t=e.styles;return this.props.variant!=="screenreader-only"?f("span",{css:t==null?void 0:t.formFieldMessage,ref:this.handleRef},i):f(Le,{elementRef:this.handleRef},i)}},de.displayName="FormFieldMessage",de.componentId="FormFieldMessage",de.propTypes=Bo,de.allowedProps=Do,de.defaultProps={variant:"hint"},de))||it);const Vo=n=>({formFieldMessages:{label:"formFieldMessages",padding:0,display:"block",margin:`calc(-1 * ${n.topMargin}) 0 0 0`},message:{label:"formFieldMessages__message",display:"block"}}),No=n=>{const e=n.spacing;return{...{topMargin:e==null?void 0:e.xxSmall}}},To={messages:o.arrayOf(_e.message)},qo=["messages"];var tt,ot,pe;let nt=(tt=M(Vo,No),tt(ot=(pe=class jt extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{this.ref=i}}componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}render(){const e=this.props,i=e.messages,t=e.styles;return i&&i.length>0?f("span",Object.assign({css:t==null?void 0:t.formFieldMessages},F(this.props,jt.allowedProps),{ref:this.handleRef}),i.map((s,d)=>f("span",{key:`error${d}`,css:t==null?void 0:t.message},f(Wo,{variant:s.type},s.text)))):null}},pe.displayName="FormFieldMessages",pe.componentId="FormFieldMessages",pe.propTypes=To,pe.allowedProps=qo,pe.defaultProps={},pe))||ot);const Go=(n,e)=>({formFieldLayout:{label:"formFieldLayout",all:"initial",border:"0",padding:"0",margin:"0",minWidth:"0",direction:"inherit",textAlign:"start",opacity:"inherit",display:"block",width:"100%",...e.inline&&{display:"inline-block",verticalAlign:"middle",width:"auto"}}}),jo={label:o.node.isRequired,id:o.string,as:o.elementType,messages:o.arrayOf(_e.message),messagesId:o.string,children:o.node,inline:o.bool,layout:o.oneOf(["stacked","inline"]),labelAlign:o.oneOf(["start","end"]),vAlign:o.oneOf(["top","middle","bottom"]),width:o.string,inputContainerRef:o.func,elementRef:o.func},Uo=["label","id","as","messages","messagesId","children","inline","layout","labelAlign","width","inputContainerRef","elementRef"],Zo=["makeStyles","styles"];var st,rt,Ke,ce;let oi=(st=ni(),rt=M(Go,null),st(Ke=rt(Ke=(ce=class bi extends b.Component{constructor(e){super(e),this._messagesId=void 0,this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)},this.handleInputContainerRef=i=>{typeof this.props.inputContainerRef=="function"&&this.props.inputContainerRef(i)},this._messagesId=e.messagesId||e.deterministicId(),no(typeof e.width<"u"||!e.inline||e.layout!=="inline",`[FormFieldLayout] The 'inline' prop is true, and the 'layout' is set to 'inline'. This will cause a layout issue in Internet Explorer 11 unless you also add a value for the 'width' prop.`)}componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}get hasVisibleLabel(){return this.props.label&&Vt(this.props.label)}get hasMessages(){return this.props.messages&&this.props.messages.length>0}get elementType(){return Wt(bi,this.props)}get inlineContainerAndLabel(){return this.props.inline&&this.props.layout==="inline"}renderLabel(){return this.hasVisibleLabel?f(N.Col,{textAlign:this.props.labelAlign,width:this.inlineContainerAndLabel?"auto":3},f(Mo,{"aria-hidden":this.elementType==="fieldset"?"true":void 0},this.props.label)):this.elementType!=="fieldset"?this.props.label:null}renderLegend(){return f(Le,{as:"legend"},this.props.label,this.hasMessages&&f(nt,{messages:this.props.messages}))}renderVisibleMessages(){return this.hasMessages?f(N.Row,null,f(N.Col,{offset:this.inlineContainerAndLabel?void 0:3,textAlign:this.inlineContainerAndLabel?"end":void 0},f(nt,{id:this._messagesId,messages:this.props.messages}))):null}render(){const e=this.elementType,i=this.props;i.makeStyles;const t=i.styles,s=B(i,Zo),d=s.width,c=s.layout,u=s.children;return f(e,Object.assign({},F(s,[...bi.allowedProps,...N.allowedProps]),{css:t==null?void 0:t.formFieldLayout,style:{width:d},"aria-describedby":this.hasMessages?this._messagesId:void 0,ref:this.handleRef}),this.elementType==="fieldset"&&this.renderLegend(),f(N,Object.assign({rowSpacing:"small",colSpacing:"small",startAt:c==="inline"&&this.hasVisibleLabel?"medium":null},Te(s,N.allowedProps)),f(N.Row,null,this.renderLabel(),f(N.Col,{width:this.inlineContainerAndLabel?"auto":void 0,elementRef:this.handleInputContainerRef},u)),this.renderVisibleMessages()))}},ce.displayName="FormFieldLayout",ce.componentId="FormFieldLayout",ce.propTypes=jo,ce.allowedProps=Uo,ce.defaultProps={inline:!1,layout:"stacked",as:"label",labelAlign:"end"},ce))||Ke)||Ke);const Yo={label:o.node.isRequired,id:o.string.isRequired,messages:o.arrayOf(_e.message),messagesId:o.string,children:o.node,inline:o.bool,layout:o.oneOf(["stacked","inline"]),labelAlign:o.oneOf(["start","end"]),vAlign:o.oneOf(["top","middle","bottom"]),width:o.string,inputContainerRef:o.func,elementRef:o.func},Xo=["label","id","messages","messagesId","children","inline","layout","labelAlign","vAlign","width","inputContainerRef","elementRef"];class ne extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)}}render(){return H.createElement(oi,Object.assign({},F(this.props,ne.allowedProps),Te(this.props,oi.allowedProps),{label:this.props.label,vAlign:this.props.vAlign,as:"label",htmlFor:this.props.id,elementRef:this.handleRef}))}}ne.displayName="FormField";ne.componentId="FormField";ne.propTypes=Yo;ne.allowedProps=Xo;ne.defaultProps={inline:!1,layout:"stacked",labelAlign:"end",vAlign:"middle"};const Ko=(n,e,i)=>{const t=e.disabled,s=i.invalid;return{formFieldGroup:{label:"formFieldGroup",border:`${n.borderWidth} ${n.borderStyle} ${n.borderColor}`,borderRadius:n.borderRadius,display:"block",...s&&{borderColor:n.errorBorderColor,padding:n.errorFieldsPadding},...t&&{opacity:.6,cursor:"not-allowed",pointerEvents:"none"}}}},Jo=n=>{const e=n.borders,i=n.colors,t=n.spacing;return{...{borderWidth:e==null?void 0:e.widthSmall,borderStyle:e==null?void 0:e.style,borderColor:"transparent",borderRadius:e==null?void 0:e.radiusMedium,errorBorderColor:i==null?void 0:i.borderDanger,errorFieldsPadding:t==null?void 0:t.xSmall}}},Qo={description:o.node.isRequired,as:o.elementType,messages:o.arrayOf(_e.message),messagesId:o.string,disabled:o.bool,children:o.node,layout:o.oneOf(["stacked","columns","inline"]),rowSpacing:o.oneOf(["none","small","medium","large"]),colSpacing:o.oneOf(["none","small","medium","large"]),vAlign:o.oneOf(["top","middle","bottom"]),startAt:o.oneOf(["small","medium","large","x-large",null]),elementRef:o.func},en=["description","as","messages","messagesId","disabled","children","layout","rowSpacing","colSpacing","vAlign","startAt","elementRef"],tn=["styles","makeStyles"];var lt,at,ue;let rs=(lt=M(Ko,Jo),lt(at=(ue=class Ut extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)}}componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i,this.makeStylesVariables)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i,this.makeStylesVariables)}get makeStylesVariables(){return{invalid:this.invalid}}get invalid(){return!!this.props.messages&&this.props.messages.findIndex(e=>e.type==="error")>=0}renderColumns(){return b.Children.map(this.props.children,(e,i)=>e?f(N.Col,{width:e.props&&e.props.width?"auto":void 0,key:i},e):null)}renderChildren(){return f(N,{colSpacing:this.props.colSpacing,rowSpacing:this.props.rowSpacing,vAlign:this.props.vAlign,startAt:this.props.startAt||(this.props.layout==="columns"?"medium":null)},f(N.Row,null,this.renderColumns()))}renderFields(){const e=this.props.styles;return f("span",{key:"fields",css:e==null?void 0:e.formFieldGroup},this.renderChildren())}render(){const e=this.props;e.styles,e.makeStyles;const i=B(e,tn);return f(oi,Object.assign({},F(i,Ut.allowedProps),Te(i,oi.allowedProps),{vAlign:i.vAlign,layout:i.layout==="inline"?"inline":"stacked",label:i.description,"aria-disabled":i.disabled?"true":void 0,"aria-invalid":this.invalid?"true":void 0,elementRef:this.handleRef}),this.renderFields())}},ue.displayName="FormFieldGroup",ue.componentId="FormFieldGroup",ue.propTypes=Qo,ue.allowedProps=en,ue.defaultProps={as:"fieldset",disabled:!1,rowSpacing:"medium",colSpacing:"small",vAlign:"middle"},ue))||at);const on=(n,e,i)=>{const t=e.size,s=e.textAlign,d=e.shouldNotWrap,c=i.disabled,u=i.invalid,m=i.focused,g=i.beforeElementHasWidth,v=i.afterElementHasWidth,x={small:{fontSize:n.smallFontSize,height:`calc(${n.smallHeight} - (2 * ${n.borderWidth}))`,lineHeight:`calc(${n.smallHeight} - (2 * ${n.borderWidth}))`},medium:{fontSize:n.mediumFontSize,height:`calc(${n.mediumHeight} - (2 * ${n.borderWidth}))`,lineHeight:`calc(${n.mediumHeight} - (2 * ${n.borderWidth}))`},large:{fontSize:n.largeFontSize,height:`calc(${n.largeHeight} - (2 * ${n.borderWidth}))`,lineHeight:`calc(${n.largeHeight} - (2 * ${n.borderWidth}))`}},r=c?{cursor:"not-allowed",pointerEvents:"none",opacity:"0.5"}:{},a=m?{opacity:1,transform:"scale(1)"}:{opacity:0,transform:"scale(0.95)"},l=u?{borderColor:n.errorBorderColor}:{},p=u&&m?{borderColor:n.errorBorderColor}:{},h={all:"initial","&::-ms-clear":{display:"none"},WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",appearance:"none",margin:0,width:"100%",display:"block",boxSizing:"border-box",outline:"none",fontFamily:n.fontFamily,fontWeight:n.fontWeight,color:n.color,padding:`0 ${n.padding}`,background:"transparent",border:"none",verticalAlign:"baseline",'&[autocomplete="off"]::-webkit-contacts-auto-fill-button':{display:"none !important"},"&:focus":{boxShadow:"initial"},"&::placeholder":{color:n.placeholderColor},...x[t],textAlign:s},L={boxSizing:"border-box",fontFamily:n.fontFamily,maxWidth:"100%",overflow:"visible",unicodeBidi:"isolate"},z={...L,display:"flex",alignItems:"center",justifyContent:"flex-start",flexDirection:"row"},y={...L,flexShrink:0};return{textInput:{label:"textInput",...h,"&:is(input)[type]":h,"&:-webkit-any(input)[type]":h},facade:{label:"textInput__facade",position:"relative",display:"block",boxSizing:"border-box",border:`${n.borderWidth} ${n.borderStyle} ${n.borderColor}`,borderRadius:n.borderRadius,background:n.background,color:n.color,"&::before":{content:'""',pointerEvents:"none",position:"absolute",display:"block",boxSizing:"border-box",top:"-0.25rem",bottom:"-0.25rem",left:"-0.25rem",right:"-0.25rem",border:`${n.focusOutlineWidth} ${n.focusOutlineStyle} ${n.focusOutlineColor}`,borderRadius:`calc(${n.borderRadius} * 1.5)`,transition:"all 0.2s",...a,...p},...r,...l},layout:{label:"textInput__layout",...z,...!d&&{flexWrap:"wrap"}},beforeElement:{label:"textInput__beforeElement",...y,paddingInlineStart:n.padding,...g===!1&&{paddingInlineStart:0}},innerWrapper:{label:"textInput__innerWrapper",...y,minWidth:"0.0625rem",flexShrink:1,flexGrow:1},inputLayout:{label:"textInput__inputLayout",...z},afterElement:{label:"textInput__afterElement",...y,paddingInlineEnd:n.padding,...v===!1&&{paddingInlineEnd:0}}}},nn=n=>{const e=n.colors,i=n.typography,t=n.borders,s=n.spacing,d=n.forms,c=n.key,u={canvas:{color:n["ic-brand-font-color-dark"],focusOutlineColor:n["ic-brand-primary"]}};return{...{fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,borderWidth:t==null?void 0:t.widthSmall,borderStyle:t==null?void 0:t.style,borderColor:e==null?void 0:e.borderMedium,borderRadius:t==null?void 0:t.radiusMedium,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,padding:s==null?void 0:s.small,focusOutlineWidth:t==null?void 0:t.widthMedium,focusOutlineStyle:t==null?void 0:t.style,focusOutlineColor:e==null?void 0:e.borderBrand,errorBorderColor:e==null?void 0:e.borderDanger,errorOutlineColor:e==null?void 0:e.borderDanger,placeholderColor:e==null?void 0:e.textDark,smallFontSize:i==null?void 0:i.fontSizeSmall,smallHeight:d==null?void 0:d.inputHeightSmall,mediumFontSize:i==null?void 0:i.fontSizeMedium,mediumHeight:d==null?void 0:d.inputHeightMedium,largeFontSize:i==null?void 0:i.fontSizeLarge,largeHeight:d==null?void 0:d.inputHeightLarge},...u[c]}},sn={renderLabel:o.oneOfType([o.node,o.func]),type:o.oneOf(["text","email","url","tel","search","password"]),id:o.string,value:ro(o.string),defaultValue:o.string,interaction:o.oneOf(["enabled","disabled","readonly"]),messages:o.arrayOf(_e.message),size:o.oneOf(["small","medium","large"]),textAlign:o.oneOf(["start","center"]),width:o.string,htmlSize:o.number,display:o.oneOf(["inline-block","block"]),shouldNotWrap:o.bool,placeholder:o.string,isRequired:o.bool,elementRef:o.func,inputRef:o.func,inputContainerRef:o.func,renderBeforeInput:o.oneOfType([o.node,o.func]),renderAfterInput:o.oneOfType([o.node,o.func]),onChange:o.func,onBlur:o.func,onFocus:o.func},rn=["renderLabel","type","id","value","defaultValue","interaction","messages","size","textAlign","width","htmlSize","display","shouldNotWrap","placeholder","isRequired","elementRef","inputRef","inputContainerRef","renderBeforeInput","renderAfterInput","onChange","onBlur","onFocus"],ln=["type","size","htmlSize","display","textAlign","placeholder","value","defaultValue","isRequired","onFocus"];var dt,pt,ct,Re,he;let an=(dt=ni(),pt=M(on,nn),ct=xi(),dt(Re=pt(Re=ct(Re=(he=class extends b.Component{constructor(e){super(e),this.ref=null,this._input=null,this._beforeElement=null,this._afterElement=null,this._defaultId=void 0,this._messagesId=void 0,this._focusListener=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)},this.makeStyleProps=()=>{const i=this.interaction,t=this.state,s=t.hasFocus,d=t.beforeElementHasWidth,c=t.afterElementHasWidth;return{disabled:i==="disabled",invalid:this.invalid,focused:s,beforeElementHasWidth:d,afterElementHasWidth:c}},this.handleInputRef=i=>{this._input=i,typeof this.props.inputRef=="function"&&this.props.inputRef(i)},this.handleChange=i=>{typeof this.props.onChange=="function"&&this.props.onChange(i,i.target.value)},this.handleBlur=i=>{typeof this.props.onBlur=="function"&&this.props.onBlur(i),this.setState({hasFocus:!1})},this.handleFocus=i=>{typeof this.props.onFocus=="function"&&this.props.onFocus(i),this.setState({hasFocus:!0})},this.state={hasFocus:!1,beforeElementHasWidth:void 0,afterElementHasWidth:void 0},this._defaultId=e.deterministicId(),this._messagesId=e.deterministicId("TextInput-messages")}componentDidMount(){var e,i;this._input&&(this._focusListener=lo(this._input,"focus",this.handleFocus),this.setState({beforeElementHasWidth:this.getElementHasWidth(this._beforeElement),afterElementHasWidth:this.getElementHasWidth(this._afterElement)})),(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i,this.makeStyleProps())}componentWillUnmount(){this._focusListener&&this._focusListener.remove()}componentDidUpdate(e){var i,t;e.renderBeforeInput!==this.props.renderBeforeInput&&this.setState({beforeElementHasWidth:this.getElementHasWidth(this._beforeElement)}),e.renderAfterInput!==this.props.renderAfterInput&&this.setState({afterElementHasWidth:this.getElementHasWidth(this._afterElement)}),Ne({props:e})!=="disabled"&&Ne({props:this.props})==="disabled"&&this.setState({hasFocus:!1}),(i=(t=this.props).makeStyles)===null||i===void 0||i.call(t,this.makeStyleProps())}focus(){var e;(e=this._input)===null||e===void 0||e.focus()}get interaction(){return Ne({props:this.props})}get hasMessages(){return!!this.props.messages&&this.props.messages.length>0}get invalid(){return!!this.props.messages&&this.props.messages.findIndex(e=>e.type==="error")>=0}get focused(){return Nt(this._input)}get value(){var e;return(e=this._input)===null||e===void 0?void 0:e.value}get id(){return this.props.id||this._defaultId}renderInput(){var e;const i=this.props,t=i.type;i.size;const s=i.htmlSize;i.display,i.textAlign;const d=i.placeholder,c=i.value,u=i.defaultValue,m=i.isRequired;i.onFocus;const g=B(i,ln),v=ei(g),x=this.interaction;let r="";return v["aria-describedby"]&&(r=`${v["aria-describedby"]}`),this.hasMessages&&(r=r!==""?`${r} ${this._messagesId}`:this._messagesId),f("input",Object.assign({},v,{css:(e=this.props.styles)===null||e===void 0?void 0:e.textInput,defaultValue:u,value:c,placeholder:d,ref:this.handleInputRef,type:t,id:this.id,required:m,"aria-invalid":this.invalid?"true":void 0,disabled:x==="disabled",readOnly:x==="readonly","aria-describedby":r!==""?r:void 0,size:s,onChange:this.handleChange,onBlur:this.handleBlur}))}getElementHasWidth(e){if(!e)return;const i=getComputedStyle(e),t=i.width,s=i.paddingInlineStart,d=i.paddingInlineEnd;return t==="auto"||t===""?!0:parseFloat(t)-parseFloat(s)-parseFloat(d)>0}render(){const e=this.props,i=e.width,t=e.display,s=e.renderLabel,d=e.renderBeforeInput,c=e.renderAfterInput,u=e.messages,m=e.inputContainerRef,g=e.styles,v=d?te(d):null,x=c?te(c):null,r=!!v||!!x;return f(ne,{id:this.id,label:te(s),messagesId:this._messagesId,messages:u,inline:t==="inline-block",width:i,inputContainerRef:m,layout:this.props.layout,elementRef:this.handleRef},f("span",{css:g==null?void 0:g.facade},r?f("div",null,f("span",{css:g==null?void 0:g.layout},v&&f("span",{css:g==null?void 0:g.beforeElement,ref:a=>{this._beforeElement=a}},v),f("span",{css:g==null?void 0:g.innerWrapper},f("span",{css:g==null?void 0:g.inputLayout},f("span",{css:g==null?void 0:g.innerWrapper},this.renderInput()),x&&f("span",{css:g==null?void 0:g.afterElement,ref:a=>{this._afterElement=a}},x))))):this.renderInput()))}},he.displayName="TextInput",he.componentId="TextInput",he.allowedProps=rn,he.propTypes=sn,he.defaultProps={type:"text",interaction:void 0,isRequired:!1,display:"block",shouldNotWrap:!1,size:"medium",textAlign:"start",messages:[]},he))||Re)||Re)||Re);const dn=(n,e)=>{const i=e.size,t={small:{fontSize:n.smallIconSize},medium:{fontSize:n.mediumIconSize},large:{fontSize:n.largeIconSize}};return{select:{label:"select",fontSize:n.fontSize,fontFamily:n.fontFamily,fontWeight:n.fontWeight,color:n.color},icon:{label:"select__icon",...t[i]},assistiveText:{label:"select__assistiveText",display:"none"}}},pn=n=>{const e=n.colors,i=n.typography;return{...{fontSize:i==null?void 0:i.fontSizeMedium,fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,smallIconSize:i==null?void 0:i.fontSizeXSmall,mediumIconSize:i==null?void 0:i.fontSizeSmall,largeIconSize:i==null?void 0:i.fontSizeMedium,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest}}},cn={id:o.string.isRequired,isHighlighted:o.bool,isSelected:o.bool,isDisabled:o.bool,renderBeforeLabel:o.oneOfType([o.node,o.func]),renderAfterLabel:o.oneOfType([o.node,o.func]),children:o.node},un=["id","isHighlighted","isSelected","isDisabled","renderBeforeLabel","renderAfterLabel","children"];let T=class extends b.Component{render(){return null}};T.displayName="Option";T.componentId="Select.Option";T.allowedProps=un;T.propTypes=cn;T.defaultProps={isHighlighted:!1,isSelected:!1,isDisabled:!1};const hn={renderLabel:o.oneOfType([o.node,o.func]).isRequired,children:X.oneOf([T])},fn=["renderLabel","children"];let W=class extends b.Component{render(){return null}};W.displayName="Group";W.componentId="Select.Group";W.allowedProps=fn;W.propTypes=hn;W.defaultProps={};const gn={renderLabel:o.oneOfType([o.node,o.func]).isRequired,inputValue:o.string,id:o.string,size:o.oneOf(["small","medium","large"]),assistiveText:o.string,placeholder:o.string,interaction:o.oneOf(["enabled","disabled","readonly"]),isRequired:o.bool,isInline:o.bool,width:o.string,htmlSize:o.number,visibleOptionsCount:o.number,optionsMaxHeight:o.string,optionsMaxWidth:o.string,messages:o.arrayOf(_e.message),placement:Ie.placement,constrain:Ie.constrain,mountNode:Ie.mountNode,onFocus:o.func,onBlur:o.func,onInputChange:o.func,isShowingOptions:o.bool,onRequestShowOptions:o.func,onRequestHideOptions:o.func,onRequestHighlightOption:o.func,onRequestSelectOption:o.func,inputRef:o.func,listRef:o.func,renderBeforeInput:o.oneOfType([o.node,o.func]),renderAfterInput:o.oneOfType([o.node,o.func]),children:X.oneOf([W,T]),shouldNotWrap:o.bool,scrollToHighlightedOption:o.bool},mn=["renderLabel","inputValue","isShowingOptions","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","htmlSize","visibleOptionsCount","optionsMaxHeight","optionsMaxWidth","messages","placement","constrain","mountNode","onFocus","onBlur","onInputChange","onRequestShowOptions","onRequestHideOptions","onRequestHighlightOption","onRequestSelectOption","inputRef","listRef","renderBeforeInput","renderAfterInput","children","shouldNotWrap","scrollToHighlightedOption"],bn=["id","renderLabel","children"],vn=["renderLabel","inputValue","placeholder","isRequired","shouldNotWrap","size","isInline","width","htmlSize","messages","renderBeforeInput","renderAfterInput","onFocus","onBlur","onInputChange","onRequestHideOptions"],yn=["ref"];var ut,ht,ft,Ce,ee,gt,mt,bt,vt;const Zt=b.memo(function(e){const i=e.optionsItemProps,t=e.children;return f(we.Item,Object.assign({as:"li"},i),t)},(n,e)=>n.selectOption.props.isHighlighted===e.selectOption.props.isHighlighted&&n.selectOption.props.isSelected===e.selectOption.props.isSelected&&n.selectOption.props.isDisabled===e.selectOption.props.isDisabled&&n.selectOption.props.children===e.selectOption.props.children&&n.selectOption.props.id===e.selectOption.props.id&&n.selectOption.props.renderBeforeLabel===e.selectOption.props.renderBeforeLabel&&n.selectOption.props.renderAfterLabel===e.selectOption.props.renderAfterLabel&&n.children===e.children);Zt.displayName="Item";let Je=(ut=ni(),ht=M(dn,pn),ft=xi(),ut(Ce=ht(Ce=ft(Ce=(ee=class Yt extends b.Component{constructor(...e){super(...e),this.state={hasInputRef:!1},this.ref=null,this._input=null,this._defaultId=this.props.deterministicId(),this._inputContainer=null,this._listView=null,this._optionIds=[],this._optionHeight=36,this.handleInputRef=i=>{var t,s;this.state.hasInputRef||this.setState({hasInputRef:!0}),this._input=i,(t=(s=this.props).inputRef)===null||t===void 0||t.call(s,i)},this.handleListRef=i=>{var t,s;(t=(s=this.props).listRef)===null||t===void 0||t.call(s,i),i&&i.querySelector('[role="option"]')&&(this._optionHeight=i.querySelector('[role="option"]').offsetHeight)},this.handleInputContainerRef=i=>{this._inputContainer=i}}componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i),this.props.scrollToHighlightedOption&&requestAnimationFrame(()=>this.scrollToOption(this.highlightedOptionId))}focus(){this._input&&this._input.focus()}get childrenArray(){return b.Children.toArray(this.props.children)}getGroupChildrenArray(e){return b.Children.toArray(e.props.children)}get focused(){return this._input?Nt(this._input):!1}get id(){return this.props.id||this._defaultId}get width(){return this._inputContainer?this._inputContainer.offsetWidth:void 0}get interaction(){return Ne({props:this.props})}get highlightedOptionId(){let e;return this.childrenArray.forEach(i=>{A(i,[W])?this.getGroupChildrenArray(i).forEach(t=>{t.props.isHighlighted&&(e=t.props.id)}):i.props.isHighlighted&&(e=i.props.id)}),e}get selectedOptionId(){const e=[];if(this.childrenArray.forEach(i=>{A(i,[W])?this.getGroupChildrenArray(i).forEach(t=>{t.props.isSelected&&e.push(t.props.id)}):i.props.isSelected&&e.push(i.props.id)}),e.length===1)return e[0];if(e.length!==0)return e}scrollToOption(e){if(this._listView){const i=this._listView.querySelector(`[id="${e}"]`);if(!i)return;const t=i.parentNode,s=Bi(this._listView).top,d=Bi(t).top,c=s+this._listView.clientHeight,u=d+(t?t.clientHeight:0);u>c?this._listView.scrollTop+=u-c:d{t==null||t(c);const u=this.selectedOptionId;u&&!Array.isArray(u)&&this.highlightOption(c,u)},onRequestHideOptions:c=>{s==null||s(c)},onRequestHighlightOption:(c,{id:u,direction:m})=>{if(!i)return;const g=this.highlightedOptionId;let v=this._optionIds.indexOf(u)>-1?u:void 0;if(!v)if(!g)v=this._optionIds[0];else{const x=this._optionIds.indexOf(g);v=x>-1?this._optionIds[x+m]:void 0}v&&this.highlightOption(c,v)},onRequestHighlightFirstOption:c=>{this.highlightOption(c,this._optionIds[0])},onRequestHighlightLastOption:c=>{this.highlightOption(c,this._optionIds[this._optionIds.length-1])},onRequestSelectOption:(c,{id:u})=>{u&&this._optionIds.indexOf(u)!==-1&&(d==null||d(c,{id:u}))}}:{}}renderOption(e,i){const t=i.getOptionProps,s=i.getDisabledOptionProps,d=e.props,c=d.id,u=d.isDisabled,m=d.isHighlighted,g=d.isSelected,v=d.renderBeforeLabel,x=d.renderAfterLabel,r=d.children,a=p=>{var h;return typeof p=="function"&&!(p!=null&&(h=p.prototype)!==null&&h!==void 0&&h.isReactComponent)?p.bind(null,{id:c,isDisabled:u,isSelected:g,isHighlighted:m,children:r}):p};let l={...F(e.props,[...T.allowedProps,...we.Item.allowedProps]),...t({id:c}),renderBeforeLabel:a(v),renderAfterLabel:a(x)};return g?l.variant="selected":m&&(l.variant="highlighted"),u?(l.variant="disabled",l={...l,...s()}):this._optionIds.push(c),f(Zt,{optionsItemProps:l,selectOption:e},r)}renderGroup(e,i){const t=i.getOptionProps,s=i.getDisabledOptionProps,d=i.isFirstChild,c=i.isLastChild,u=i.afterGroup,m=e.props,g=m.id,v=m.renderLabel,x=m.children,r=B(m,bn),a=[];return!d&&!u&&a.push(gt||(gt=f(we.Separator,null))),a.push(f(we,Object.assign({id:g,as:"ul",role:"group",renderLabel:v},F(r,[...we.allowedProps,...W.allowedProps])),b.Children.map(x,l=>this.renderOption(l,{getOptionProps:t,getDisabledOptionProps:s})))),c||a.push(mt||(mt=f(we.Separator,null))),a}renderList(e){const i=e.getListProps,t=e.getOptionProps,s=e.getDisabledOptionProps,d=this.props,c=d.isShowingOptions,u=d.optionsMaxWidth,m=d.optionsMaxHeight,g=d.visibleOptionsCount,v=d.children;let x=!1;const r=c?{display:"block",overflowY:"auto",maxHeight:m||this._optionHeight*g,maxWidth:u||this.width,background:"primary",elementRef:a=>this._listView=a}:{maxHeight:0};return f(G,r,f(we,i({as:"ul",elementRef:this.handleListRef}),c?b.Children.map(v,(a,l)=>{if(!(!a||!A(a,[W,T]))){if(A(a,[T]))return x=!1,this.renderOption(a,{getOptionProps:t,getDisabledOptionProps:s});if(A(a,[W])){const p=x;return x=!0,this.renderGroup(a,{getOptionProps:t,getDisabledOptionProps:s,isFirstChild:l===0,isLastChild:l===b.Children.count(v)-1,afterGroup:p})}}}):null))}renderIcon(){const e=this.props,i=e.styles,t=e.isShowingOptions;return f("span",{css:i==null?void 0:i.icon},t?bt||(bt=f(Pe,{inline:!1})):vt||(vt=f(Fe,{inline:!1})))}renderInput(e){const i=e.getInputProps,t=e.getTriggerProps,s=this.props,d=s.renderLabel,c=s.inputValue,u=s.placeholder,m=s.isRequired,g=s.shouldNotWrap,v=s.size,x=s.isInline,r=s.width,a=s.htmlSize,l=s.messages,p=s.renderBeforeInput,h=s.renderAfterInput,L=s.onFocus,z=s.onBlur,y=s.onInputChange,w=s.onRequestHideOptions,S=B(s,vn),k=this.interaction,D=F(S,Yt.allowedProps),xe=t({...D}),$e=xe.ref,se=B(xe,yn),Ee=typeof y<"u",Be=Ee?{}:{role:fo()?"button":"combobox",title:c,"aria-autocomplete":void 0,"aria-readonly":!0};D.autoComplete&&(Be.autoComplete=D.autoComplete);const K={id:this.id,renderLabel:d,placeholder:u,size:v,width:r,htmlSize:a,messages:l,value:c,inputRef:Di($e,this.handleInputRef),inputContainerRef:this.handleInputContainerRef,interaction:k==="enabled"&&!Ee?"readonly":k,isRequired:m,shouldNotWrap:g,display:x?"inline-block":"block",renderBeforeInput:p,renderAfterInput:h||this.renderIcon(),onChange:typeof y=="function"?y:c?()=>{}:void 0,onFocus:L,onBlur:Di(z,w),...Be};return f(an,Object.assign({},se,i(K)))}render(){const e=this.props,i=e.constrain,t=e.placement,s=e.mountNode,d=e.assistiveText,c=e.isShowingOptions,u=e.styles;this._optionIds=[];const m=this.highlightedOptionId,g=this.selectedOptionId;return f(ao,Object.assign({highlightedOptionId:m,isShowingOptions:c,selectedOptionId:g},this.getEventHandlers()),({getRootProps:v,getInputProps:x,getTriggerProps:r,getListProps:a,getOptionProps:l,getDisabledOptionProps:p,getDescriptionProps:h})=>f("span",Object.assign({},v({css:u==null?void 0:u.select}),{ref:L=>this.ref=L}),this.renderInput({getInputProps:x,getTriggerProps:r}),f("span",Object.assign({},h(),{css:u==null?void 0:u.assistiveText}),d),f(po,{constrain:i,placement:t,mountNode:s,positionTarget:this._inputContainer,isShowingContent:c,shouldReturnFocus:!1,withArrow:!1},this.renderList({getListProps:a,getOptionProps:l,getDisabledOptionProps:p}))))}},ee.displayName="Select",ee.componentId="Select",ee.allowedProps=mn,ee.propTypes=gn,ee.defaultProps={inputValue:"",isShowingOptions:!1,size:"medium",interaction:void 0,isRequired:!1,isInline:!1,visibleOptionsCount:8,placement:"bottom stretch",constrain:"window",shouldNotWrap:!1,scrollToHighlightedOption:!0},ee.Option=T,ee.Group=W,ee))||Ce)||Ce)||Ce);const wn={id:o.string.isRequired,value:o.oneOfType([o.string,o.number]).isRequired,isDisabled:o.bool,renderBeforeLabel:o.oneOfType([o.node,o.func]),renderAfterLabel:o.oneOfType([o.node,o.func]),children:o.string},Sn=["id","value","isDisabled","renderBeforeLabel","renderAfterLabel","children"];class q extends b.Component{render(){return null}}q.displayName="Option";q.componentId="SimpleSelect.Option";q.allowedProps=Sn;q.propTypes=wn;q.defaultProps={isDisabled:!1};const On={renderLabel:o.oneOfType([o.node,o.func]).isRequired,children:X.oneOf([q])},_n=["renderLabel","children"];class Y extends b.Component{render(){return null}}Y.displayName="Group";Y.componentId="SimpleSelect.Group";Y.allowedProps=_n;Y.propTypes=On;Y.defaultProps={};const xn={renderLabel:o.oneOfType([o.node,o.func]).isRequired,value:o.oneOfType([o.string,o.number]),defaultValue:o.string,id:o.string,size:o.oneOf(["small","medium","large"]),assistiveText:o.string,placeholder:o.string,interaction:o.oneOf(["enabled","disabled","readonly"]),isRequired:o.bool,isInline:o.bool,width:o.string,visibleOptionsCount:o.number,optionsMaxHeight:o.string,optionsMaxWidth:o.string,messages:o.arrayOf(_e.message),placement:Ie.placement,constrain:Ie.constrain,mountNode:Ie.mountNode,onChange:o.func,onFocus:o.func,onBlur:o.func,onShowOptions:o.func,onHideOptions:o.func,inputRef:o.func,listRef:o.func,renderEmptyOption:o.oneOfType([o.node,o.func]),renderBeforeInput:o.oneOfType([o.node,o.func]),renderAfterInput:o.oneOfType([o.node,o.func]),children:X.oneOf([Y,q])},$n=["renderLabel","value","defaultValue","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","visibleOptionsCount","optionsMaxHeight","optionsMaxWidth","messages","placement","constrain","mountNode","onChange","onFocus","onBlur","onShowOptions","onHideOptions","inputRef","listRef","renderEmptyOption","renderBeforeInput","renderAfterInput","children"],kn=["id","value","children","renderBeforeLabel","renderAfterLabel"],Rn=["id","renderLabel","children"],Cn=["renderLabel","value","defaultValue","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","optionsMaxWidth","optionsMaxHeight","visibleOptionsCount","messages","placement","constrain","mountNode","inputRef","listRef","renderEmptyOption","renderBeforeInput","renderAfterInput","onFocus","onBlur","onShowOptions","onHideOptions","children"];var yt,wt,Qe,ie;let St=(yt=ni(),wt=xi(),yt(Qe=wt(Qe=(ie=class extends b.Component{constructor(e){super(e),this.ref=null,this._emptyOptionId=void 0,this.getOption=(t,s)=>{const d=b.Children.toArray(this.props.children);let c;for(let u=0;u{this.ref=t},this.handleBlur=t=>{this.setState({highlightedOptionId:void 0}),typeof this.props.onBlur=="function"&&this.props.onBlur(t)},this.handleShowOptions=t=>{this.setState({isShowingOptions:!0}),typeof this.props.onShowOptions=="function"&&this.props.onShowOptions(t)},this.handleHideOptions=t=>{this.setState(s=>{const d=this.getOption("id",s.selectedOptionId);return{isShowingOptions:!1,highlightedOptionId:void 0,inputValue:d?d.props.children:""}}),typeof this.props.onHideOptions=="function"&&this.props.onHideOptions(t)},this.handleHighlightOption=(t,{id:s})=>{if(s===this._emptyOptionId)return;const d=this.getOption("id",s),c=d==null?void 0:d.props.children,u=t.type==="keydown"?c:this.state.inputValue;this.setState({highlightedOptionId:s,inputValue:u})},this.handleSelectOption=(t,{id:s})=>{if(s===this._emptyOptionId){this.setState({isShowingOptions:!1});return}const d=this.getOption("id",s),c=d&&d.props.value;this.isControlled?this.setState({isShowingOptions:!1}):this.setState(u=>({isShowingOptions:!1,selectedOptionId:s,inputValue:d?d.props.children:u.inputValue})),d&&typeof this.props.onChange=="function"&&this.props.onChange(t,{value:c,id:s}),typeof this.props.onHideOptions=="function"&&this.props.onHideOptions(t)};const i=this.getInitialOption(e);this.state={inputValue:i?i.props.children:"",isShowingOptions:!1,highlightedOptionId:void 0,selectedOptionId:i?i.props.id:void 0},this._emptyOptionId=e.deterministicId("Select-EmptyOption")}get _select(){return this.ref}focus(){this.ref&&this.ref.focus()}get focused(){return this.ref?this.ref.focused:!1}get id(){return this.ref?this.ref.id:void 0}get isControlled(){return typeof this.props.value<"u"}get interaction(){return Ne({props:this.props})}componentDidUpdate(e){if(this.props.value!==e.value){let i=this.getOption("value",this.props.value);typeof this.props.value>"u"&&(i=this.getOption("value",e.value)),this.setState({inputValue:i?i.props.children:"",selectedOptionId:i?i.props.id:""})}}getInitialOption(e){const i=e.value,t=e.defaultValue,s=i||t;return typeof s=="string"||typeof s=="number"?this.getOption("value",s):this.getFirstOption()}getOptionLabelById(e){const i=this.getOption("id",e);return i?i.props.children:""}getFirstOption(){const e=b.Children.toArray(this.props.children);let i;for(let t=0;tA(i,[q])?this.renderOption(i):A(i,[Y])?this.renderGroup(i):null).filter(i=>!!i),e.length===0?this.renderEmptyOption():e}renderEmptyOption(){return H.createElement(Je.Option,{id:this._emptyOptionId,isHighlighted:!1,isSelected:!1},te(this.props.renderEmptyOption))}renderOption(e){const i=e.props,t=i.id,s=i.value,d=i.children,c=i.renderBeforeLabel,u=i.renderAfterLabel,m=B(i,kn),g=e.props.isDisabled,v=t===this.state.selectedOptionId,x=t===this.state.highlightedOptionId,r=a=>{var l;return typeof a=="function"&&!(a!=null&&(l=a.prototype)!==null&&l!==void 0&&l.isReactComponent)?a.bind(null,{id:t,isDisabled:g,isSelected:v,isHighlighted:x,children:d}):a};return H.createElement(Je.Option,Object.assign({id:t,value:s,key:e.key||t,isHighlighted:t===this.state.highlightedOptionId,isSelected:t===this.state.selectedOptionId,isDisabled:e.props.isDisabled,renderBeforeLabel:r(c),renderAfterLabel:r(u)},ei(m)),d)}renderGroup(e){const i=e.props,t=i.id,s=i.renderLabel,d=i.children,c=B(i,Rn);return H.createElement(Je.Group,Object.assign({renderLabel:s,key:e.key||t},ei(c)),b.Children.map(d,u=>this.renderOption(u)))}render(){const e=this.props,i=e.renderLabel;e.value,e.defaultValue;const t=e.id,s=e.size,d=e.assistiveText,c=e.placeholder;e.interaction;const u=e.isRequired,m=e.isInline,g=e.width,v=e.optionsMaxWidth,x=e.optionsMaxHeight,r=e.visibleOptionsCount,a=e.messages,l=e.placement,p=e.constrain,h=e.mountNode,L=e.inputRef,z=e.listRef;e.renderEmptyOption;const y=e.renderBeforeInput,w=e.renderAfterInput,S=e.onFocus;e.onBlur,e.onShowOptions,e.onHideOptions,e.children;const k=B(e,Cn);return H.createElement(Je,Object.assign({renderLabel:i,inputValue:this.state.inputValue,isShowingOptions:this.state.isShowingOptions,id:t,size:s,assistiveText:d,placeholder:c,interaction:this.interaction,isRequired:u,isInline:m,width:g,optionsMaxWidth:v,optionsMaxHeight:x,visibleOptionsCount:r,messages:a,placement:l,constrain:p,mountNode:h,ref:this.handleRef,inputRef:L,listRef:z,renderBeforeInput:y,renderAfterInput:w,onFocus:S,onBlur:this.handleBlur,onRequestShowOptions:this.handleShowOptions,onRequestHideOptions:this.handleHideOptions,onRequestHighlightOption:this.handleHighlightOption,onRequestSelectOption:this.handleSelectOption},ei(k)),this.renderChildren())}},ie.displayName="SimpleSelect",ie.componentId="SimpleSelect",ie.Option=q,ie.Group=Y,ie.allowedProps=$n,ie.propTypes=xn,ie.defaultProps={size:"medium",isRequired:!1,isInline:!1,visibleOptionsCount:8,placement:"bottom stretch",constrain:"window",renderEmptyOption:"---"},ie))||Qe)||Qe);const In=(n,e)=>{const i=e.layout;return{table:{label:"table",fontSize:n.fontSize,fontFamily:n.fontFamily,fontWeight:n.fontWeight,color:n.color,background:n.background,display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,...i==="fixed"&&{tableLayout:"fixed"},caption:{textAlign:"start"}}}},An=n=>{const e=n.colors,i=n.typography,t=n.key,s={canvas:{color:n["ic-brand-font-color-dark"]}};return{...{fontSize:i==null?void 0:i.fontSizeMedium,fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest},...s[t]}},Ln=n=>({head:{label:"head",fontSize:n.fontSize,fontFamily:n.fontFamily,fontWeight:n.fontWeight,color:n.color,background:n.background}}),Fn=n=>{const e=n.colors,i=n.typography;return{...{fontSize:i==null?void 0:i.fontSizeMedium,fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest}}},Pn=(n,e)=>{const i=e.hover,t=e.isStacked;return{row:{label:"row",fontSize:n.fontSize,fontFamily:n.fontFamily,fontWeight:n.fontWeight,color:n.color,background:n.background,boxSizing:"border-box",borderBottomStyle:"solid",borderBottomWidth:"0.0625rem",borderBottomColor:n.borderColor,...i&&{borderLeft:"0.1875rem solid transparent",borderRight:"0.1875rem solid transparent","&:hover":{borderLeftColor:n.hoverBorderColor,borderRightColor:n.hoverBorderColor}},...t&&{padding:n.padding}}}},Hn=n=>{const e=n.colors,i=n.typography,t=n.spacing,s=n.key,d={canvas:{hoverBorderColor:n["ic-brand-primary"]}};return{...{fontSize:i==null?void 0:i.fontSizeMedium,fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,hoverBorderColor:e==null?void 0:e.borderBrand,padding:`${t==null?void 0:t.xSmall} 0`},...d[s]}},Mn=(n,e)=>{const i=e.onRequestSort,t=e.textAlign,s={color:n.color,fontSize:n.fontSize,fontFamily:n.fontFamily,fontWeight:"bold",lineHeight:n.lineHeight,padding:n.padding},d={start:{flexDirection:"row"},center:{justifyContent:"center"},end:{flexDirection:"row-reverse"}};return{colHeader:{label:"colHeader",background:n.background,verticalAlign:"middle",boxSizing:"border-box",...!i&&s,textAlign:t},button:{label:"colHeader__button",...s,display:"flex",alignItems:"center",boxSizing:"border-box",border:"none",width:"100%",height:"100%",background:"transparent",cursor:"pointer",outline:"none","&::-moz-focus-inner":{border:0},"&:focus":{outline:`${n.focusOutlineWidth} ${n.focusOutlineStyle} ${n.focusOutlineColor}`},...d[t]},buttonContent:{label:"colHeader__buttonContent",display:"flex",alignItems:"center"}}},zn=n=>{const e=n.typography,i=n.colors,t=n.borders,s=n.spacing;return{...{fontSize:e==null?void 0:e.fontSizeMedium,fontFamily:e==null?void 0:e.fontFamily,color:i==null?void 0:i.textDarkest,background:i==null?void 0:i.backgroundLightest,borderColor:i==null?void 0:i.borderMedium,lineHeight:e==null?void 0:e.lineHeightCondensed,padding:`${s==null?void 0:s.xSmall} ${s==null?void 0:s.small}`,focusOutlineColor:i==null?void 0:i.borderBrand,focusOutlineWidth:t==null?void 0:t.widthMedium,focusOutlineStyle:t==null?void 0:t.style}}},En={id:o.string.isRequired,stackedSortByLabel:o.string,children:o.oneOfType([o.node,o.func]),width:o.oneOfType([o.string,o.number]),textAlign:o.oneOf(["start","center","end"]),sortDirection:o.oneOf(["none","ascending","descending"]),onRequestSort:o.func,scope:o.oneOf(["row","col","rowgroup","colgroup","auto"])},Bn=["id","stackedSortByLabel","children","width","textAlign","sortDirection","onRequestSort","scope"];var Ot,_t,fe,xt,$t;let Ae=(Ot=M(Mn,zn),Ot(_t=(fe=class Xt extends b.Component{constructor(...e){super(...e),this.handleClick=i=>{const t=this.props,s=t.id,d=t.onRequestSort;d&&d(i,{id:s})}}componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}renderSortArrow(){const e=this.props,i=e.sortDirection,t=e.onRequestSort;if(i==="ascending")return xt||(xt=f(ze,null));if(i==="descending")return $t||($t=f(Me,null));if(t)return f(He,{css:{opacity:"30%"}})}render(){const e=this.props,i=e.onRequestSort,t=e.width,s=e.children,d=e.sortDirection,c=e.scope,u=e.styles;return f("th",Object.assign({},F(this.props,Xt.allowedProps),{css:u==null?void 0:u.colHeader,style:{width:t},scope:c,"aria-sort":d}),i&&f("button",{onClick:this.handleClick,css:u==null?void 0:u.button},f("div",{css:u==null?void 0:u.buttonContent},te(s),this.renderSortArrow())),!i&&s,!i&&this.renderSortArrow())}},fe.displayName="ColHeader",fe.componentId="Table.ColHeader",fe.allowedProps=Bn,fe.propTypes=En,fe.defaultProps={textAlign:"start",sortDirection:"none",children:null,scope:"col"},fe))||_t);const Dn=(n,e)=>{const i=e.textAlign;return{rowHeader:{label:"rowHeader",fontSize:n.fontSize,fontFamily:n.fontFamily,fontWeight:"bold",color:n.color,background:n.background,boxSizing:"border-box",verticalAlign:"middle",lineHeight:n.lineHeight,padding:n.padding,...i&&{textAlign:i}}}},Wn=n=>{const e=n.colors,i=n.typography,t=n.spacing;return{...{fontSize:i==null?void 0:i.fontSizeMedium,fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,lineHeight:i==null?void 0:i.lineHeightCondensed,padding:`${t==null?void 0:t.xSmall} ${t==null?void 0:t.small}`}}},Vn={children:o.oneOfType([o.node,o.func]),isStacked:o.bool,textAlign:o.oneOf(["start","center","end"])},Nn=["children","isStacked","textAlign"];var kt,Rt,ge;let ki=(kt=M(Dn,Wn),kt(Rt=(ge=class vi extends b.Component{componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}render(){const e=this.props,i=e.children,t=e.isStacked,s=e.styles;return f(G,Object.assign({},G.omitViewProps(F(this.props,vi.allowedProps),vi),{as:t?"div":"th",css:s==null?void 0:s.rowHeader,scope:"row",role:t?"rowheader":void 0}),te(i))}},ge.displayName="RowHeader",ge.componentId="Table.RowHeader",ge.allowedProps=Nn,ge.propTypes=Vn,ge.defaultProps={textAlign:"start",children:null},ge))||Rt);const Tn=(n,e)=>{const i=e.textAlign;return{cell:{label:"cell",fontSize:n.fontSize,fontFamily:n.fontFamily,fontWeight:n.fontWeight,color:n.color,background:n.background,boxSizing:"border-box",verticalAlign:"middle",lineHeight:n.lineHeight,padding:n.padding,...i&&{textAlign:i}}}},qn=n=>{const e=n.colors,i=n.typography,t=n.spacing;return{...{fontSize:i==null?void 0:i.fontSizeMedium,fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,lineHeight:i==null?void 0:i.lineHeightCondensed,padding:`${t==null?void 0:t.xSmall} ${t==null?void 0:t.small}`}}},Gn={children:o.oneOfType([o.node,o.func]),isStacked:o.bool,header:o.oneOfType([o.node,o.func]),textAlign:o.oneOf(["start","center","end"])},jn=["children","isStacked","header","textAlign"];var Ct,It,me;let Ri=(Ct=M(Tn,qn),Ct(It=(me=class yi extends b.Component{componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}render(){const e=this.props,i=e.children,t=e.styles,s=e.isStacked,d=e.header;return f(G,Object.assign({},G.omitViewProps(F(this.props,yi.allowedProps),yi),{as:s?"div":"td",css:t==null?void 0:t.cell,role:s?"cell":void 0}),d&&te(d),d&&": ",te(i))}},me.displayName="Cell",me.componentId="Table.Cell",me.allowedProps=jn,me.propTypes=Gn,me.defaultProps={textAlign:"start",children:null},me))||It);const Un={children:X.oneOf([Ae,ki,Ri]),hover:o.bool,isStacked:o.bool,headers:o.arrayOf(o.oneOfType([o.node,o.func]))},Zn=["children","hover","isStacked","headers"];var At,Lt,be;let Oe=(At=M(Pn,Hn),At(Lt=(be=class wi extends b.Component{componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}render(){const e=this.props,i=e.children,t=e.styles,s=e.isStacked,d=e.headers;return f(G,Object.assign({},G.omitViewProps(F(this.props,wi.allowedProps),wi),{as:s?"div":"tr",css:t==null?void 0:t.row,role:s?"row":void 0}),b.Children.toArray(i).filter(Boolean).map((c,u)=>A(c,[Ae])?c:A(c,[ki])?Se(c,{key:c.props.name,isStacked:s}):A(c,[Ri])?Se(c,{key:c.props.name,isStacked:s,header:d&&d[u]}):null))}},be.displayName="Row",be.componentId="Table.Row",be.allowedProps=Zn,be.propTypes=Un,be.defaultProps={children:null},be))||Lt);const Yn={children:X.oneOf([Oe]),isStacked:o.bool,renderSortLabel:o.oneOfType([o.node,o.func])},Xn=["children","isStacked","renderSortLabel"];var Ft,Pt,ve,Ht;let ii=(Ft=M(Ln,Fn),Ft(Pt=(ve=class Kt extends b.Component{get isSortable(){const e=b.Children.toArray(this.props.children),i=ti(e,1),t=i[0];let s=!1;return t&&b.Children.forEach(t.props.children,d=>{A(d,[Ae])&&d.props.onRequestSort&&(s=!0)}),s}componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;this.isSortable&&typeof this.props.renderSortLabel>"u"&&Dt(!1,"[Table.Head] The `renderSortLabel` prop should be provided when Table is sortable."),(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}renderSelect(){const e=this.props,i=e.children,t=e.renderSortLabel,s=b.Children.toArray(i),d=ti(s,1),c=d[0];if(!A(c,[Oe]))return null;const u=[],m={};let g,v=0;if(b.Children.forEach(c.props.children,r=>{if(v+=1,A(r,[Ae])){const a=r.props,l=a.id,p=a.stackedSortByLabel,h=a.sortDirection,L=a.onRequestSort,z=p||l;L&&(u.push({id:l,label:z}),m[l]=L,h!=="none"&&(g=l))}}),!u.length)return null;const x=(r,{value:a})=>{a&&typeof m[a]=="function"&&m[a](r,{id:`${a}`})};return f("div",{role:"rowgroup"},f("div",{role:"row"},f("div",{role:"cell","aria-colspan":v},f(St,{renderLabel:t?te(t):Ht||(Ht=f(Le,null)),renderBeforeInput:g&&oe,value:g,onChange:x},u.map(({id:r,label:a})=>f(St.Option,{id:r,key:r,value:r,renderBeforeLabel:r===g?oe:()=>f(oe,{style:{color:"transparent"}})},a))))))}render(){const e=this.props,i=e.children,t=e.isStacked,s=e.styles;return t?this.renderSelect():f("thead",Object.assign({},F(this.props,Kt.allowedProps),{css:s==null?void 0:s.head}),b.Children.map(i,d=>A(d,[Oe])?d:null))}},ve.displayName="Head",ve.componentId="Table.Head",ve.allowedProps=Xn,ve.propTypes=Yn,ve.defaultProps={children:null},ve))||Pt);const Kn=n=>({body:{label:"body",fontSize:n.fontSize,fontFamily:n.fontFamily,fontWeight:n.fontWeight,color:n.color,background:n.background}}),Jn=n=>{const e=n.colors,i=n.typography;return{...{fontSize:i==null?void 0:i.fontSizeMedium,fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest}}},Qn={children:X.oneOf([Oe]),hover:o.bool,isStacked:o.bool,headers:o.arrayOf(o.oneOfType([o.node,o.func]))},es=["children","hover","isStacked","headers"];var Mt,zt,ye;let Si=(Mt=M(Kn,Jn),Mt(zt=(ye=class Oi extends b.Component{componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}render(){const e=this.props,i=e.children,t=e.hover,s=e.isStacked,d=e.headers,c=e.styles;return f(G,Object.assign({},G.omitViewProps(F(this.props,Oi.allowedProps),Oi),{as:s?"div":"tbody",css:c==null?void 0:c.body,role:s?"rowgroup":void 0}),b.Children.map(i,u=>A(u,[Oe])?Se(u,{key:u.props.name,hover:t,isStacked:s,headers:d}):null))}},ye.displayName="Body",ye.componentId="Table.Body",ye.allowedProps=es,ye.propTypes=Qn,ye.defaultProps={children:null},ye))||zt);const is={caption:o.node.isRequired,children:X.oneOf([ii,Si]),margin:so.spacing,elementRef:o.func,hover:o.bool,layout:o.oneOf(["auto","fixed","stacked"])},ts=["caption","children","margin","elementRef","hover","layout"];var Et,Bt,E;let cs=(Et=M(In,An),Et(Bt=(E=class _i extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=i=>{const t=this.props.elementRef;this.ref=i,typeof t=="function"&&t(i)}}componentDidMount(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}componentDidUpdate(){var e,i;(e=(i=this.props).makeStyles)===null||e===void 0||e.call(i)}getHeaders(){const e=this.props.children,i=b.Children.toArray(e),t=ti(i,1),s=t[0];if(A(s,[ii])){const d=b.Children.toArray(s.props.children),c=ti(d,1),u=c[0];if(A(u,[Oe]))return b.Children.map(u.props.children,m=>A(m,[Ae])?m.props.children:void 0)}}render(){const e=this.props,i=e.margin,t=e.layout,s=e.caption,d=e.children,c=e.hover,u=e.styles,m=t==="stacked",g=m?this.getHeaders():void 0;return f(G,Object.assign({},G.omitViewProps(F(this.props,_i.allowedProps),_i),{as:m?"div":"table",margin:i,elementRef:this.handleRef,css:u==null?void 0:u.table,role:m?"table":void 0,"aria-label":m?s:void 0}),!m&&f("caption",null,f(Le,null,s)),b.Children.map(d,v=>A(v,[ii])?Se(v,{key:v.props.name,isStacked:m}):A(v,[Si])?Se(v,{key:v.props.name,isStacked:m,hover:c,headers:g}):null))}},E.displayName="Table",E.componentId="Table",E.allowedProps=ts,E.propTypes=is,E.defaultProps={children:null,hover:!1,layout:"auto"},E.Head=ii,E.Body=Si,E.Row=Oe,E.ColHeader=Ae,E.RowHeader=ki,E.Cell=Ri,E))||Bt);export{rs as F,N as G,Fe as I,St as S,an as T,cs as a,_e as b,nt as c,Je as d,Pe as e,ne as f,Mo as g,Wo as h,oi as i,hi as j,$i as k,oe as l,He as m,Me as n,ze as o}; diff --git a/assets/index-C1tjm6wA.js b/assets/index-D14ZWBB_.js similarity index 95% rename from assets/index-C1tjm6wA.js rename to assets/index-D14ZWBB_.js index 8f66c0b..ca7307d 100644 --- a/assets/index-C1tjm6wA.js +++ b/assets/index-D14ZWBB_.js @@ -1 +1 @@ -import{r as d,R as c,S as i,P as r,T as S,w as L,t as z,h as x,p as E}from"./index-DCzcanBz.js";import{w as j,B as N,S as Z}from"./RenderTopNavBar-CILoEAmM.js";var l;class s extends d.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=o=>{const n=this.props.elementRef;this.ref=o,typeof n=="function"&&n(o)}}render(){return c.createElement(i,Object.assign({},this.props,{name:"IconSearch",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),l||(l=c.createElement("path",{d:"M790.588 1468.235c-373.722 0-677.647-303.924-677.647-677.647 0-373.722 303.925-677.647 677.647-677.647 373.723 0 677.647 303.925 677.647 677.647 0 373.723-303.924 677.647-677.647 677.647Zm596.781-160.715c120.396-138.692 193.807-319.285 193.807-516.932C1581.176 354.748 1226.428 0 790.588 0S0 354.748 0 790.588s354.748 790.588 790.588 790.588c197.647 0 378.24-73.411 516.932-193.807l516.028 516.142 79.963-79.963-516.142-516.028Z",fillRule:"evenodd"})))}}s.glyphName="search";s.variant="Line";s.displayName="IconSearchLine";s.propTypes={...i.propTypes};s.allowedProps=[...i.allowedProps];const q={children:r.oneOfType([r.node,r.func]),renderIcon:r.oneOfType([r.node,r.func]),screenReaderLabel:r.string.isRequired,type:r.oneOf(["button","submit","reset"]),size:r.oneOf(["small","medium","large"]),elementRef:r.func,as:r.elementType,interaction:r.oneOf(["enabled","disabled","readonly"]),color:r.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:r.oneOf(["info","inverse"]),shape:r.oneOf(["rectangle","circle"]),withBackground:r.bool,withBorder:r.bool,margin:S.spacing,cursor:r.string,href:r.string,onClick:r.func},G=["as","children","color","cursor","elementRef","focusColor","href","interaction","margin","renderIcon","screenReaderLabel","shape","size","type","withBackground","withBorder","onClick"],M=["children","renderIcon","screenReaderLabel","type","size","elementRef","as","interaction","color","focusColor","shape","withBackground","withBorder","margin","cursor","href"];var p,h,a,t;let $=(p=L(null,j),h=z(),p(a=h(a=(t=class extends d.Component{constructor(...e){super(...e),this._baseButton=null,this.ref=null,this.handleRef=o=>{const n=this.props.elementRef;this.ref=o,typeof n=="function"&&n(o)}}get focused(){return this._baseButton&&this._baseButton.focused}focus(){this._baseButton&&this._baseButton.focus()}render(){const e=this.props,o=e.children,n=e.renderIcon,f=e.screenReaderLabel,m=e.type,B=e.size;e.elementRef;const g=e.as,y=e.interaction,b=e.color,R=e.focusColor,w=e.shape,I=e.withBackground,_=e.withBorder,C=e.margin,O=e.cursor,T=e.href,v=x(e,M),P=this.props.themeOverride;return c.createElement(N,Object.assign({},E(v),{type:m,size:B,elementRef:this.handleRef,as:g,interaction:y,color:b,focusColor:R,shape:w,withBackground:I,withBorder:_,margin:C,cursor:O,href:T,renderIcon:o||n,themeOverride:P,ref:k=>{this._baseButton=k}}),c.createElement(Z,null,f))}},t.displayName="IconButton",t.componentId="IconButton",t.propTypes=q,t.allowedProps=G,t.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",shape:"rectangle",withBackground:!0,withBorder:!0,margin:"0",cursor:"pointer"},t))||a)||a);export{s as I,$ as a}; +import{r as d,R as c,S as i,P as r,T as S,w as L,t as z,h as x,p as E}from"./index-C3XQCywa.js";import{w as j,B as N,S as Z}from"./RenderTopNavBar-D2dLV4g_.js";var l;class s extends d.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=o=>{const n=this.props.elementRef;this.ref=o,typeof n=="function"&&n(o)}}render(){return c.createElement(i,Object.assign({},this.props,{name:"IconSearch",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),l||(l=c.createElement("path",{d:"M790.588 1468.235c-373.722 0-677.647-303.924-677.647-677.647 0-373.722 303.925-677.647 677.647-677.647 373.723 0 677.647 303.925 677.647 677.647 0 373.723-303.924 677.647-677.647 677.647Zm596.781-160.715c120.396-138.692 193.807-319.285 193.807-516.932C1581.176 354.748 1226.428 0 790.588 0S0 354.748 0 790.588s354.748 790.588 790.588 790.588c197.647 0 378.24-73.411 516.932-193.807l516.028 516.142 79.963-79.963-516.142-516.028Z",fillRule:"evenodd"})))}}s.glyphName="search";s.variant="Line";s.displayName="IconSearchLine";s.propTypes={...i.propTypes};s.allowedProps=[...i.allowedProps];const q={children:r.oneOfType([r.node,r.func]),renderIcon:r.oneOfType([r.node,r.func]),screenReaderLabel:r.string.isRequired,type:r.oneOf(["button","submit","reset"]),size:r.oneOf(["small","medium","large"]),elementRef:r.func,as:r.elementType,interaction:r.oneOf(["enabled","disabled","readonly"]),color:r.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:r.oneOf(["info","inverse"]),shape:r.oneOf(["rectangle","circle"]),withBackground:r.bool,withBorder:r.bool,margin:S.spacing,cursor:r.string,href:r.string,onClick:r.func},G=["as","children","color","cursor","elementRef","focusColor","href","interaction","margin","renderIcon","screenReaderLabel","shape","size","type","withBackground","withBorder","onClick"],M=["children","renderIcon","screenReaderLabel","type","size","elementRef","as","interaction","color","focusColor","shape","withBackground","withBorder","margin","cursor","href"];var p,h,a,t;let $=(p=L(null,j),h=z(),p(a=h(a=(t=class extends d.Component{constructor(...e){super(...e),this._baseButton=null,this.ref=null,this.handleRef=o=>{const n=this.props.elementRef;this.ref=o,typeof n=="function"&&n(o)}}get focused(){return this._baseButton&&this._baseButton.focused}focus(){this._baseButton&&this._baseButton.focus()}render(){const e=this.props,o=e.children,n=e.renderIcon,f=e.screenReaderLabel,m=e.type,B=e.size;e.elementRef;const g=e.as,y=e.interaction,b=e.color,R=e.focusColor,w=e.shape,I=e.withBackground,_=e.withBorder,C=e.margin,O=e.cursor,T=e.href,v=x(e,M),P=this.props.themeOverride;return c.createElement(N,Object.assign({},E(v),{type:m,size:B,elementRef:this.handleRef,as:g,interaction:y,color:b,focusColor:R,shape:w,withBackground:I,withBorder:_,margin:C,cursor:O,href:T,renderIcon:o||n,themeOverride:P,ref:k=>{this._baseButton=k}}),c.createElement(Z,null,f))}},t.displayName="IconButton",t.componentId="IconButton",t.propTypes=q,t.allowedProps=G,t.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",shape:"rectangle",withBackground:!0,withBorder:!0,margin:"0",cursor:"pointer"},t))||a)||a);export{s as I,$ as a}; diff --git a/assets/index-DTxffNH3.js b/assets/index-ZHw2VU9b.js similarity index 50% rename from assets/index-DTxffNH3.js rename to assets/index-ZHw2VU9b.js index 3e532de..273e442 100644 --- a/assets/index-DTxffNH3.js +++ b/assets/index-ZHw2VU9b.js @@ -1,24 +1,24 @@ -import{k as Cu,l as Lu,R as va}from"./index-DCzcanBz.js";var po={exports:{}},ma;function Gt(){return ma||(ma=1,function(Tt,_){(function(x,W){Tt.exports=W()})(Cu,function(){var x=navigator.userAgent,W=navigator.platform,k=/gecko\/\d/i.test(x),y=/MSIE \d/.test(x),C=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(x),q=/Edge\/(\d+)/.exec(x),T=y||C||q,se=T&&(y?document.documentMode||6:+(q||C)[1]),ie=!q&&/WebKit\//.test(x),ve=ie&&/Qt\/\d+\.\d+/.test(x),ee=!q&&/Chrome\/(\d+)/.exec(x),j=ee&&+ee[1],E=/Opera\//.test(x),K=/Apple Computer/.test(navigator.vendor),ce=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(x),ue=/PhantomJS/.test(x),te=K&&(/Mobile\/\w+/.test(x)||navigator.maxTouchPoints>2),Q=/Android/.test(x),fe=te||Q||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(x),De=te||/Mac/.test(W),Ge=/\bCrOS\b/.test(x),nt=/win/i.test(W),Pe=E&&x.match(/Version\/(\d*\.\d*)/);Pe&&(Pe=Number(Pe[1])),Pe&&Pe>=15&&(E=!1,ie=!0);var He=De&&(ve||E&&(Pe==null||Pe<12.11)),pe=k||T&&se>=9;function I(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var We=function(e,t){var i=e.className,r=I(t).exec(i);if(r){var n=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(n?r[1]+n:"")}};function D(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Y(e,t){return D(e).appendChild(t)}function c(e,t,i,r){var n=document.createElement(e);if(i&&(n.className=i),r&&(n.style.cssText=r),typeof t=="string")n.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=a-o,l+=i-l%i,o=a+1}}var he=function(){this.id=null,this.f=null,this.time=0,this.handler=re(this.onTimeout,this)};he.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},he.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i=t)return r+Math.min(l,t-n);if(n+=o-r,n+=i-n%i,r=o+1,n>=t)return r}}var Ke=[""];function ot(e){for(;Ke.length<=e;)Ke.push(ye(Ke)+" ");return Ke[e]}function ye(e){return e[e.length-1]}function Ce(e,t){for(var i=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||Le.test(e))}function Xt(e,t){return t?t.source.indexOf("\\w")>-1&&at(e)?!0:t.test(e):at(e)}function Wi(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Yt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Xe(e){return e.charCodeAt(0)>=768&&Yt.test(e)}function ir(e,t,i){for(;(i<0?t>0:ti?-1:1;;){if(t==i)return t;var n=(t+i)/2,o=r<0?Math.ceil(n):Math.floor(n);if(o==t)return e(o)?t:i;e(o)?i=o:t=o+r}}function nr(e,t,i,r){if(!e)return r(t,i,"ltr",0);for(var n=!1,o=0;ot||t==i&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,i),l.level==1?"rtl":"ltr",o),n=!0)}n||r(t,i,"ltr")}var yr=null;function or(e,t,i){var r;yr=null;for(var n=0;nt)return n;o.to==t&&(o.from!=o.to&&i=="before"?r=n:yr=n),o.from==t&&(o.from!=o.to&&i!="before"?r=n:yr=n)}return r??yr}var mn=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(u,d,g){this.level=u,this.from=d,this.to=g}return function(u,d){var g=d=="ltr"?"L":"R";if(u.length==0||d=="ltr"&&!r.test(u))return!1;for(var b=u.length,m=[],L=0;L-1&&(r[t]=n.slice(0,o).concat(n.slice(o+1)))}}}function Re(e,t){var i=$t(e,t);if(i.length)for(var r=Array.prototype.slice.call(arguments,2),n=0;n0}function Et(e){e.prototype.on=function(t,i){le(this,t,i)},e.prototype.off=function(t,i){st(this,t,i)}}function ut(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Er(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function gt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function lr(e){ut(e),Er(e)}function ni(e){return e.target||e.srcElement}function Nt(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),De&&e.ctrlKey&&t==1&&(t=3),t}var xn=function(){if(T&&se<9)return!1;var e=c("div");return"draggable"in e||"dragDrop"in e}(),Nr;function zi(e){if(Nr==null){var t=c("span","​");Y(e,c("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Nr=t.offsetWidth<=1&&t.offsetHeight>2&&!(T&&se<8))}var i=Nr?c("span","​"):c("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var oi;function ar(e){if(oi!=null)return oi;var t=Y(e,document.createTextNode("AخA")),i=N(t,0,1).getBoundingClientRect(),r=N(t,1,2).getBoundingClientRect();return D(e),!i||i.left==i.right?!1:oi=r.right-i.right<3}var Ft=` +import{k as Tu,l as Du,R as ga}from"./index-C3XQCywa.js";var Ca={exports:{}};(function(Tt,_){(function(x,W){Tt.exports=W()})(Tu,function(){var x=navigator.userAgent,W=navigator.platform,k=/gecko\/\d/i.test(x),y=/MSIE \d/.test(x),C=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(x),q=/Edge\/(\d+)/.exec(x),T=y||C||q,se=T&&(y?document.documentMode||6:+(q||C)[1]),ie=!q&&/WebKit\//.test(x),ve=ie&&/Qt\/\d+\.\d+/.test(x),ee=!q&&/Chrome\/(\d+)/.exec(x),j=ee&&+ee[1],E=/Opera\//.test(x),K=/Apple Computer/.test(navigator.vendor),ce=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(x),ue=/PhantomJS/.test(x),te=K&&(/Mobile\/\w+/.test(x)||navigator.maxTouchPoints>2),Q=/Android/.test(x),fe=te||Q||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(x),De=te||/Mac/.test(W),Ge=/\bCrOS\b/.test(x),nt=/win/i.test(W),Pe=E&&x.match(/Version\/(\d*\.\d*)/);Pe&&(Pe=Number(Pe[1])),Pe&&Pe>=15&&(E=!1,ie=!0);var He=De&&(ve||E&&(Pe==null||Pe<12.11)),pe=k||T&&se>=9;function I(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var We=function(e,t){var i=e.className,r=I(t).exec(i);if(r){var n=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(n?r[1]+n:"")}};function D(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Y(e,t){return D(e).appendChild(t)}function c(e,t,i,r){var n=document.createElement(e);if(i&&(n.className=i),r&&(n.style.cssText=r),typeof t=="string")n.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=a-o,l+=i-l%i,o=a+1}}var he=function(){this.id=null,this.f=null,this.time=0,this.handler=re(this.onTimeout,this)};he.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},he.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i=t)return r+Math.min(l,t-n);if(n+=o-r,n+=i-n%i,r=o+1,n>=t)return r}}var Ke=[""];function ot(e){for(;Ke.length<=e;)Ke.push(ye(Ke)+" ");return Ke[e]}function ye(e){return e[e.length-1]}function Ce(e,t){for(var i=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||Le.test(e))}function Xt(e,t){return t?t.source.indexOf("\\w")>-1&&at(e)?!0:t.test(e):at(e)}function Wi(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Yt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Xe(e){return e.charCodeAt(0)>=768&&Yt.test(e)}function ir(e,t,i){for(;(i<0?t>0:ti?-1:1;;){if(t==i)return t;var n=(t+i)/2,o=r<0?Math.ceil(n):Math.floor(n);if(o==t)return e(o)?t:i;e(o)?i=o:t=o+r}}function nr(e,t,i,r){if(!e)return r(t,i,"ltr",0);for(var n=!1,o=0;ot||t==i&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,i),l.level==1?"rtl":"ltr",o),n=!0)}n||r(t,i,"ltr")}var yr=null;function or(e,t,i){var r;yr=null;for(var n=0;nt)return n;o.to==t&&(o.from!=o.to&&i=="before"?r=n:yr=n),o.from==t&&(o.from!=o.to&&i!="before"?r=n:yr=n)}return r??yr}var mn=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(u,d,g){this.level=u,this.from=d,this.to=g}return function(u,d){var g=d=="ltr"?"L":"R";if(u.length==0||d=="ltr"&&!r.test(u))return!1;for(var b=u.length,m=[],L=0;L-1&&(r[t]=n.slice(0,o).concat(n.slice(o+1)))}}}function Re(e,t){var i=$t(e,t);if(i.length)for(var r=Array.prototype.slice.call(arguments,2),n=0;n0}function Et(e){e.prototype.on=function(t,i){le(this,t,i)},e.prototype.off=function(t,i){st(this,t,i)}}function ut(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Er(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function gt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function lr(e){ut(e),Er(e)}function ni(e){return e.target||e.srcElement}function Nt(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),De&&e.ctrlKey&&t==1&&(t=3),t}var xn=function(){if(T&&se<9)return!1;var e=c("div");return"draggable"in e||"dragDrop"in e}(),Nr;function zi(e){if(Nr==null){var t=c("span","​");Y(e,c("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Nr=t.offsetWidth<=1&&t.offsetHeight>2&&!(T&&se<8))}var i=Nr?c("span","​"):c("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var oi;function ar(e){if(oi!=null)return oi;var t=Y(e,document.createTextNode("AخA")),i=N(t,0,1).getBoundingClientRect(),r=N(t,1,2).getBoundingClientRect();return D(e),!i||i.left==i.right?!1:oi=r.right-i.right<3}var Ft=` b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],r=e.length;t<=r;){var n=e.indexOf(` -`,t);n==-1&&(n=e.length);var o=e.slice(t,e.charAt(n-1)=="\r"?n-1:n),l=o.indexOf("\r");l!=-1?(i.push(o.slice(0,l)),t+=l+1):(i.push(o),t=n+1)}return i}:function(e){return e.split(/\r\n?|\n/)},sr=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Bi=function(){var e=c("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Ot=null;function yn(e){if(Ot!=null)return Ot;var t=Y(e,c("span","x")),i=t.getBoundingClientRect(),r=N(t,0,1).getBoundingClientRect();return Ot=Math.abs(i.left-r.left)>1}var Or={},Pt={};function Ht(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Or[e]=t}function br(e,t){Pt[e]=t}function Pr(e){if(typeof e=="string"&&Pt.hasOwnProperty(e))e=Pt[e];else if(e&&typeof e.name=="string"&&Pt.hasOwnProperty(e.name)){var t=Pt[e.name];typeof t=="string"&&(t={name:t}),e=M(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Pr("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Pr("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Hr(e,t){t=Pr(t);var i=Or[t.name];if(!i)return Hr(e,"text/plain");var r=i(e,t);if(ur.hasOwnProperty(t.name)){var n=ur[t.name];for(var o in n)n.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=n[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var ur={};function Wr(e,t){var i=ur.hasOwnProperty(e)?ur[e]:ur[e]={};ge(t,i)}function _t(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var r in t){var n=t[r];n instanceof Array&&(n=n.concat([])),i[r]=n}return i}function li(e,t){for(var i;e.innerMode&&(i=e.innerMode(t),!(!i||i.mode==e));)t=i.state,e=i.mode;return i||{mode:e,state:t}}function Ir(e,t,i){return e.startState?e.startState(t,i):!0}var qe=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};qe.prototype.eol=function(){return this.pos>=this.string.length},qe.prototype.sol=function(){return this.pos==this.lineStart},qe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qe.prototype.next=function(){if(this.post},qe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},qe.prototype.skipToEnd=function(){this.pos=this.string.length},qe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},qe.prototype.backUp=function(e){this.pos-=e},qe.prototype.column=function(){return this.lastColumnPos0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},qe.prototype.current=function(){return this.string.slice(this.start,this.pos)},qe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},qe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},qe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function V(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var r=0;;++r){var n=i.children[r],o=n.chunkSize();if(t=e.first&&ti?S(i,V(e,i).text.length):La(t,V(e,t.line).text.length)}function La(e,t){var i=e.ch;return i==null||i>t?S(e.line,t):i<0?S(e.line,0):e}function xo(e,t){for(var i=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},qt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},qt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},qt.fromSaved=function(e,t,i){return t instanceof Ri?new qt(e,_t(e.mode,t.state),i,t.lookAhead):new qt(e,_t(e.mode,t),i)},qt.prototype.save=function(e){var t=e!==!1?_t(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ri(t,this.maxLookAhead):t};function yo(e,t,i,r){var n=[e.state.modeGen],o={};Lo(e,t.text,e.doc.mode,i,function(u,d){return n.push(u,d)},o,r);for(var l=i.state,a=function(u){i.baseTokens=n;var d=e.state.overlays[u],g=1,b=0;i.state=!0,Lo(e,t.text,d.mode,i,function(m,L){for(var F=g;bm&&n.splice(g,1,m,n[g+1],H),g+=2,b=Math.min(m,H)}if(L)if(d.opaque)n.splice(F,g-F,m,"overlay "+L),g=F+2;else for(;Fe.options.maxHighlightLength&&_t(e.doc.mode,r.state),o=yo(e,t,r);n&&(r.state=n),t.stateAfter=r.save(!n),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function si(e,t,i){var r=e.doc,n=e.display;if(!r.mode.startState)return new qt(r,!0,t);var o=Ta(e,t,i),l=o>r.first&&V(r,o-1).stateAfter,a=l?qt.fromSaved(r,l,o):new qt(r,Ir(r.mode),o);return r.iter(o,t,function(s){bn(e,s.text,a);var u=a.line;s.stateAfter=u==t-1||u%5==0||u>=n.viewFrom&&ut.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var wo=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function So(e,t,i,r){var n=e.doc,o=n.mode,l;t=me(n,t);var a=V(n,t.line),s=si(e,t.line,i),u=new qe(a.text,e.options.tabSize,s),d;for(r&&(d=[]);(r||u.pose.options.maxHighlightLength?(a=!1,l&&bn(e,t,r,d.pos),d.pos=t.length,g=null):g=Co(kn(i,d,r.state,b),o),b){var m=b[0].name;m&&(g="m-"+(g?m+" "+g:m))}if(!a||u!=g){for(;sl;--a){if(a<=o.first)return o.first;var s=V(o,a-1),u=s.stateAfter;if(u&&(!i||a+(u instanceof Ri?u.lookAhead:0)<=o.modeFrontier))return a;var d=xe(s.text,null,e.options.tabSize);(n==null||r>d)&&(n=a-1,r=d)}return n}function Da(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontieri;r--){var n=V(e,r).stateAfter;if(n&&(!(n instanceof Ri)||r+n.lookAhead=t:o.to>t);(r||(r=[])).push(new _i(l,o.from,s?null:o.to))}}return r}function Oa(e,t,i){var r;if(e)for(var n=0;n=t:o.to>t);if(a||o.from==t&&l.type=="bookmark"&&(!i||o.marker.insertLeft)){var s=o.from==null||(l.inclusiveLeft?o.from<=t:o.from0&&a)for(var $=0;$0)){var d=[s,1],g=G(u.from,a.from),b=G(u.to,a.to);(g<0||!l.inclusiveLeft&&!g)&&d.push({from:u.from,to:a.from}),(b>0||!l.inclusiveRight&&!b)&&d.push({from:a.to,to:u.to}),n.splice.apply(n,d),s+=d.length-3}}return n}function Mo(e){var t=e.markedSpans;if(t){for(var i=0;it)&&(!r||Sn(r,o.marker)<0)&&(r=o.marker)}return r}function No(e,t,i,r,n){var o=V(e,t),l=Jt&&o.markedSpans;if(l)for(var a=0;a=0&&g<=0||d<=0&&g>=0)&&(d<=0&&(s.marker.inclusiveRight&&n.inclusiveLeft?G(u.to,i)>=0:G(u.to,i)>0)||d>=0&&(s.marker.inclusiveRight&&n.inclusiveLeft?G(u.from,r)<=0:G(u.from,r)<0)))return!0}}}function Wt(e){for(var t;t=Eo(e);)e=t.find(-1,!0).line;return e}function Wa(e){for(var t;t=Ki(e);)e=t.find(1,!0).line;return e}function Ia(e){for(var t,i;t=Ki(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function Cn(e,t){var i=V(e,t),r=Wt(i);return i==r?t:f(r)}function Oo(e,t){if(t>e.lastLine())return t;var i=V(e,t),r;if(!fr(e,i))return t;for(;r=Ki(i);)i=r.find(1,!0).line;return f(i)+1}function fr(e,t){var i=Jt&&t.markedSpans;if(i){for(var r=void 0,n=0;nt.maxLineLength&&(t.maxLineLength=n,t.maxLine=r)})}var Br=function(e,t,i){this.text=e,Ao(this,t),this.height=i?i(this):1};Br.prototype.lineNo=function(){return f(this)},Et(Br);function za(e,t,i,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Mo(e),Ao(e,i);var n=r?r(e):1;n!=e.height&&Dt(e,n)}function Ba(e){e.parent=null,Mo(e)}var Ra={},_a={};function Po(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?_a:Ra;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function Ho(e,t){var i=U("span",null,null,ie?"padding-right: .1px":null),r={pre:U("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var n=0;n<=(t.rest?t.rest.length:0);n++){var o=n?t.rest[n-1]:t.line,l=void 0;r.pos=0,r.addToken=ja,ar(e.display.measure)&&(l=Se(o,e.doc.direction))&&(r.addToken=Ua(r.addToken,l)),r.map=[];var a=t!=e.display.externalMeasured&&f(o);Ga(o,r,bo(e,o,a)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=wt(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=wt(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(zi(e.display.measure))),n==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(ie){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Re(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=wt(r.pre.className,r.textClass||"")),r}function qa(e){var t=c("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function ja(e,t,i,r,n,o,l){if(t){var a=e.splitSpaces?Ka(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,d;if(!s.test(t))e.col+=t.length,d=document.createTextNode(a),e.map.push(e.pos,e.pos+t.length,d),T&&se<9&&(u=!0),e.pos+=t.length;else{d=document.createDocumentFragment();for(var g=0;;){s.lastIndex=g;var b=s.exec(t),m=b?b.index-g:t.length-g;if(m){var L=document.createTextNode(a.slice(g,g+m));T&&se<9?d.appendChild(c("span",[L])):d.appendChild(L),e.map.push(e.pos,e.pos+m,L),e.col+=m,e.pos+=m}if(!b)break;g+=m+1;var F=void 0;if(b[0]==" "){var H=e.cm.options.tabSize,B=H-e.col%H;F=d.appendChild(c("span",ot(B),"cm-tab")),F.setAttribute("role","presentation"),F.setAttribute("cm-text"," "),e.col+=B}else b[0]=="\r"||b[0]==` -`?(F=d.appendChild(c("span",b[0]=="\r"?"␍":"␤","cm-invalidchar")),F.setAttribute("cm-text",b[0]),e.col+=1):(F=e.cm.options.specialCharPlaceholder(b[0]),F.setAttribute("cm-text",b[0]),T&&se<9?d.appendChild(c("span",[F])):d.appendChild(F),e.col+=1);e.map.push(e.pos,e.pos+1,F),e.pos++}}if(e.trailingSpace=a.charCodeAt(t.length-1)==32,i||r||n||u||o||l){var X=i||"";r&&(X+=r),n&&(X+=n);var R=c("span",[d],X,o);if(l)for(var $ in l)l.hasOwnProperty($)&&$!="style"&&$!="class"&&R.setAttribute($,l[$]);return e.content.appendChild(R)}e.content.appendChild(d)}}function Ka(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,r="",n=0;nu&&g.from<=u));b++);if(g.to>=d)return e(i,r,n,o,l,a,s);e(i,r.slice(0,g.to-u),n,o,null,a,s),o=null,r=r.slice(g.to-u),u=g.to}}}function Wo(e,t,i,r){var n=!r&&i.widgetNode;n&&e.map.push(e.pos,e.pos+t,n),!r&&e.cm.display.input.needsContentAttribute&&(n||(n=e.content.appendChild(document.createElement("span"))),n.setAttribute("cm-marker",i.id)),n&&(e.cm.display.input.setUneditable(n),e.content.appendChild(n)),e.pos+=t,e.trailingSpace=!1}function Ga(e,t,i){var r=e.markedSpans,n=e.text,o=0;if(!r){for(var l=1;ls||be.collapsed&&ne.to==s&&ne.from==s)){if(ne.to!=null&&ne.to!=s&&m>ne.to&&(m=ne.to,F=""),be.className&&(L+=" "+be.className),be.css&&(b=(b?b+";":"")+be.css),be.startStyle&&ne.from==s&&(H+=" "+be.startStyle),be.endStyle&&ne.to==m&&($||($=[])).push(be.endStyle,ne.to),be.title&&((X||(X={})).title=be.title),be.attributes)for(var Ne in be.attributes)(X||(X={}))[Ne]=be.attributes[Ne];be.collapsed&&(!B||Sn(B.marker,be)<0)&&(B=ne)}else ne.from>s&&m>ne.from&&(m=ne.from)}if($)for(var rt=0;rt<$.length;rt+=2)$[rt+1]==m&&(F+=" "+$[rt]);if(!B||B.from==s)for(var Be=0;Be=a)break;for(var Lt=Math.min(a,m);;){if(d){var yt=s+d.length;if(!B){var Ye=yt>Lt?d.slice(0,Lt-s):d;t.addToken(t,Ye,g?g+L:L,H,s+Ye.length==m?F:"",b,X)}if(yt>=Lt){d=d.slice(Lt-s),s=Lt;break}s=yt,H=""}d=n.slice(o,o=i[u++]),g=Po(i[u++],t.cm.options)}}}function Io(e,t,i){this.line=t,this.rest=Ia(t),this.size=this.rest?f(ye(this.rest))-i+1:1,this.node=this.text=null,this.hidden=fr(e,t)}function Gi(e,t,i){for(var r=[],n,o=t;o2&&o.push((s.bottom+u.top)/2-i.top)}}o.push(i.bottom-i.top)}}function Ko(e,t,i){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;ri)return{map:e.measure.maps[n],cache:e.measure.caches[n],before:!0}}}function is(e,t){t=Wt(t);var i=f(t),r=e.display.externalMeasured=new Io(e.doc,t,i);r.lineN=i;var n=r.built=Ho(e,r);return r.text=n.pre,Y(e.display.lineMeasure,n.pre),r}function Uo(e,t,i,r){return Kt(e,_r(e,t),i,r)}function Fn(e,t){if(t>=e.display.viewFrom&&t=i.lineN&&tt)&&(o=s-a,n=o-1,t>=s&&(l="right")),n!=null){if(r=e[u+2],a==s&&i==(r.insertLeft?"left":"right")&&(l=i),i=="left"&&n==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[(u-=3)+2],l="left";if(i=="right"&&n==s-a)for(;u=0&&(i=e[n]).left==i.right;n--);return i}function os(e,t,i,r){var n=Xo(t.map,i,r),o=n.node,l=n.start,a=n.end,s=n.collapse,u;if(o.nodeType==3){for(var d=0;d<4;d++){for(;l&&Xe(t.line.text.charAt(n.coverStart+l));)--l;for(;n.coverStart+a0&&(s=r="right");var g;e.options.lineWrapping&&(g=o.getClientRects()).length>1?u=g[r=="right"?g.length-1:0]:u=o.getBoundingClientRect()}if(T&&se<9&&!l&&(!u||!u.left&&!u.right)){var b=o.parentNode.getClientRects()[0];b?u={left:b.left,right:b.left+jr(e.display),top:b.top,bottom:b.bottom}:u=Go}for(var m=u.top-t.rect.top,L=u.bottom-t.rect.top,F=(m+L)/2,H=t.view.measure.heights,B=0;B=r.text.length?(s=r.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l(u=="before"?s-1:s,u=="before");function d(L,F,H){var B=a[F],X=B.level==1;return l(H?L-1:L,X!=H)}var g=or(a,s,u),b=yr,m=d(s,g,u=="before");return b!=null&&(m.other=d(s,b,u!="before")),m}function Vo(e,t){var i=0;t=me(e.doc,t),e.options.lineWrapping||(i=jr(e.display)*t.ch);var r=V(e.doc,t.line),n=Qt(r)+Xi(e.display);return{left:i,right:i,top:n,bottom:n+r.height}}function Nn(e,t,i,r,n){var o=S(e,t,i);return o.xRel=n,r&&(o.outside=r),o}function On(e,t,i){var r=e.doc;if(i+=e.display.viewOffset,i<0)return Nn(r.first,0,null,-1,-1);var n=p(r,i),o=r.first+r.size-1;if(n>o)return Nn(r.first+r.size-1,V(r,o).text.length,null,1,1);t<0&&(t=0);for(var l=V(r,n);;){var a=as(e,l,n,t,i),s=Ha(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==n)return u;l=V(r,n=u.line)}}function el(e,t,i,r){r-=En(t);var n=t.text.length,o=Rt(function(l){return Kt(e,i,l-1).bottom<=r},n,0);return n=Rt(function(l){return Kt(e,i,l).top>r},o,n),{begin:o,end:n}}function tl(e,t,i,r){i||(i=_r(e,t));var n=Yi(e,t,Kt(e,i,r),"line").top;return el(e,t,i,n)}function Pn(e,t,i,r){return e.bottom<=i?!1:e.top>i?!0:(r?e.left:e.right)>t}function as(e,t,i,r,n){n-=Qt(t);var o=_r(e,t),l=En(t),a=0,s=t.text.length,u=!0,d=Se(t,e.doc.direction);if(d){var g=(e.options.lineWrapping?us:ss)(e,t,i,o,d,r,n);u=g.level!=1,a=u?g.from:g.to-1,s=u?g.to:g.from-1}var b=null,m=null,L=Rt(function(ae){var ne=Kt(e,o,ae);return ne.top+=l,ne.bottom+=l,Pn(ne,r,n,!1)?(ne.top<=n&&ne.left<=r&&(b=ae,m=ne),!0):!1},a,s),F,H,B=!1;if(m){var X=r-m.left=$.bottom?1:0}return L=ir(t.text,L,1),Nn(i,L,H,B,r-F)}function ss(e,t,i,r,n,o,l){var a=Rt(function(g){var b=n[g],m=b.level!=1;return Pn(It(e,S(i,m?b.to:b.from,m?"before":"after"),"line",t,r),o,l,!0)},0,n.length-1),s=n[a];if(a>0){var u=s.level!=1,d=It(e,S(i,u?s.from:s.to,u?"after":"before"),"line",t,r);Pn(d,o,l,!0)&&d.top>l&&(s=n[a-1])}return s}function us(e,t,i,r,n,o,l){var a=el(e,t,r,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var d=null,g=null,b=0;b=u||m.to<=s)){var L=m.level!=1,F=Kt(e,r,L?Math.min(u,m.to)-1:Math.max(s,m.from)).right,H=FH)&&(d=m,g=H)}}return d||(d=n[n.length-1]),d.fromu&&(d={from:d.from,to:u,level:d.level}),d}var wr;function qr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(wr==null){wr=c("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)wr.appendChild(document.createTextNode("x")),wr.appendChild(c("br"));wr.appendChild(document.createTextNode("x"))}Y(e.measure,wr);var i=wr.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),D(e.measure),i||1}function jr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=c("span","xxxxxxxxxx"),i=c("pre",[t],"CodeMirror-line-like");Y(e.measure,i);var r=t.getBoundingClientRect(),n=(r.right-r.left)/10;return n>2&&(e.cachedCharWidth=n),n||10}function Hn(e){for(var t=e.display,i={},r={},n=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;i[a]=o.offsetLeft+o.clientLeft+n,r[a]=o.clientWidth}return{fixedPos:Wn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Wn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function rl(e){var t=qr(e.display),i=e.options.lineWrapping,r=i&&Math.max(5,e.display.scroller.clientWidth/jr(e.display)-3);return function(n){if(fr(e.doc,n))return 0;var o=0;if(n.widgets)for(var l=0;l0&&(u=V(e.doc,s.line).text).length==s.ch){var d=xe(u,u.length,e.options.tabSize)-u.length;s=S(s.line,Math.max(0,Math.round((o-jo(e.display).left)/jr(e.display))-d))}return s}function Cr(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var i=e.display.view,r=0;rt)&&(n.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=n.viewTo)Jt&&Cn(e.doc,t)n.viewFrom?hr(e):(n.viewFrom+=r,n.viewTo+=r);else if(t<=n.viewFrom&&i>=n.viewTo)hr(e);else if(t<=n.viewFrom){var o=Zi(e,i,i+r,1);o?(n.view=n.view.slice(o.index),n.viewFrom=o.lineN,n.viewTo+=r):hr(e)}else if(i>=n.viewTo){var l=Zi(e,t,t,-1);l?(n.view=n.view.slice(0,l.index),n.viewTo=l.lineN):hr(e)}else{var a=Zi(e,t,t,-1),s=Zi(e,i,i+r,1);a&&s?(n.view=n.view.slice(0,a.index).concat(Gi(e,a.lineN,s.lineN)).concat(n.view.slice(s.index)),n.viewTo+=r):hr(e)}var u=n.externalMeasured;u&&(i=n.lineN&&t=r.viewTo)){var o=r.view[Cr(e,t)];if(o.node!=null){var l=o.changes||(o.changes=[]);J(l,i)==-1&&l.push(i)}}}function hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Zi(e,t,i,r){var n=Cr(e,t),o,l=e.display.view;if(!Jt||i==e.doc.first+e.doc.size)return{index:n,lineN:i};for(var a=e.display.viewFrom,s=0;s0){if(n==l.length-1)return null;o=a+l[n].size-t,n++}else o=a-t;t+=o,i+=o}for(;Cn(e.doc,i)!=i;){if(n==(r<0?0:l.length-1))return null;i+=r*l[n-(r<0?1:0)].size,n+=r}return{index:n,lineN:i}}function fs(e,t,i){var r=e.display,n=r.view;n.length==0||t>=r.viewTo||i<=r.viewFrom?(r.view=Gi(e,t,i),r.viewFrom=t):(r.viewFrom>t?r.view=Gi(e,t,r.viewFrom).concat(r.view):r.viewFromi&&(r.view=r.view.slice(0,Cr(e,i)))),r.viewTo=i}function il(e){for(var t=e.display.view,i=0,r=0;r=e.display.viewTo||s.to().line0?l:e.defaultCharWidth())+"px"}if(r.other){var a=i.appendChild(c("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function Ji(e,t){return e.top-t.top||e.left-t.left}function cs(e,t,i){var r=e.display,n=e.doc,o=document.createDocumentFragment(),l=jo(e.display),a=l.left,s=Math.max(r.sizerWidth,kr(e)-r.sizer.offsetLeft)-l.right,u=n.direction=="ltr";function d(R,$,ae,ne){$<0&&($=0),$=Math.round($),ne=Math.round(ne),o.appendChild(c("div",null,"CodeMirror-selected","position: absolute; left: "+R+`px; +`,t);n==-1&&(n=e.length);var o=e.slice(t,e.charAt(n-1)=="\r"?n-1:n),l=o.indexOf("\r");l!=-1?(i.push(o.slice(0,l)),t+=l+1):(i.push(o),t=n+1)}return i}:function(e){return e.split(/\r\n?|\n/)},sr=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Bi=function(){var e=c("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Ot=null;function yn(e){if(Ot!=null)return Ot;var t=Y(e,c("span","x")),i=t.getBoundingClientRect(),r=N(t,0,1).getBoundingClientRect();return Ot=Math.abs(i.left-r.left)>1}var Or={},Pt={};function Ht(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Or[e]=t}function br(e,t){Pt[e]=t}function Pr(e){if(typeof e=="string"&&Pt.hasOwnProperty(e))e=Pt[e];else if(e&&typeof e.name=="string"&&Pt.hasOwnProperty(e.name)){var t=Pt[e.name];typeof t=="string"&&(t={name:t}),e=M(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Pr("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Pr("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Hr(e,t){t=Pr(t);var i=Or[t.name];if(!i)return Hr(e,"text/plain");var r=i(e,t);if(ur.hasOwnProperty(t.name)){var n=ur[t.name];for(var o in n)n.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=n[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var ur={};function Wr(e,t){var i=ur.hasOwnProperty(e)?ur[e]:ur[e]={};ge(t,i)}function _t(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var r in t){var n=t[r];n instanceof Array&&(n=n.concat([])),i[r]=n}return i}function li(e,t){for(var i;e.innerMode&&(i=e.innerMode(t),!(!i||i.mode==e));)t=i.state,e=i.mode;return i||{mode:e,state:t}}function Ir(e,t,i){return e.startState?e.startState(t,i):!0}var qe=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};qe.prototype.eol=function(){return this.pos>=this.string.length},qe.prototype.sol=function(){return this.pos==this.lineStart},qe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qe.prototype.next=function(){if(this.post},qe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},qe.prototype.skipToEnd=function(){this.pos=this.string.length},qe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},qe.prototype.backUp=function(e){this.pos-=e},qe.prototype.column=function(){return this.lastColumnPos0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},qe.prototype.current=function(){return this.string.slice(this.start,this.pos)},qe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},qe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},qe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function V(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var r=0;;++r){var n=i.children[r],o=n.chunkSize();if(t=e.first&&ti?S(i,V(e,i).text.length):Da(t,V(e,t.line).text.length)}function Da(e,t){var i=e.ch;return i==null||i>t?S(e.line,t):i<0?S(e.line,0):e}function mo(e,t){for(var i=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},qt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},qt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},qt.fromSaved=function(e,t,i){return t instanceof Ri?new qt(e,_t(e.mode,t.state),i,t.lookAhead):new qt(e,_t(e.mode,t),i)},qt.prototype.save=function(e){var t=e!==!1?_t(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ri(t,this.maxLookAhead):t};function xo(e,t,i,r){var n=[e.state.modeGen],o={};Co(e,t.text,e.doc.mode,i,function(u,d){return n.push(u,d)},o,r);for(var l=i.state,a=function(u){i.baseTokens=n;var d=e.state.overlays[u],g=1,b=0;i.state=!0,Co(e,t.text,d.mode,i,function(m,L){for(var F=g;bm&&n.splice(g,1,m,n[g+1],H),g+=2,b=Math.min(m,H)}if(L)if(d.opaque)n.splice(F,g-F,m,"overlay "+L),g=F+2;else for(;Fe.options.maxHighlightLength&&_t(e.doc.mode,r.state),o=xo(e,t,r);n&&(r.state=n),t.stateAfter=r.save(!n),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function si(e,t,i){var r=e.doc,n=e.display;if(!r.mode.startState)return new qt(r,!0,t);var o=Ma(e,t,i),l=o>r.first&&V(r,o-1).stateAfter,a=l?qt.fromSaved(r,l,o):new qt(r,Ir(r.mode),o);return r.iter(o,t,function(s){bn(e,s.text,a);var u=a.line;s.stateAfter=u==t-1||u%5==0||u>=n.viewFrom&&ut.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var ko=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function wo(e,t,i,r){var n=e.doc,o=n.mode,l;t=me(n,t);var a=V(n,t.line),s=si(e,t.line,i),u=new qe(a.text,e.options.tabSize,s),d;for(r&&(d=[]);(r||u.pose.options.maxHighlightLength?(a=!1,l&&bn(e,t,r,d.pos),d.pos=t.length,g=null):g=So(kn(i,d,r.state,b),o),b){var m=b[0].name;m&&(g="m-"+(g?m+" "+g:m))}if(!a||u!=g){for(;sl;--a){if(a<=o.first)return o.first;var s=V(o,a-1),u=s.stateAfter;if(u&&(!i||a+(u instanceof Ri?u.lookAhead:0)<=o.modeFrontier))return a;var d=xe(s.text,null,e.options.tabSize);(n==null||r>d)&&(n=a-1,r=d)}return n}function Aa(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontieri;r--){var n=V(e,r).stateAfter;if(n&&(!(n instanceof Ri)||r+n.lookAhead=t:o.to>t);(r||(r=[])).push(new _i(l,o.from,s?null:o.to))}}return r}function Ha(e,t,i){var r;if(e)for(var n=0;n=t:o.to>t);if(a||o.from==t&&l.type=="bookmark"&&(!i||o.marker.insertLeft)){var s=o.from==null||(l.inclusiveLeft?o.from<=t:o.from0&&a)for(var $=0;$0)){var d=[s,1],g=G(u.from,a.from),b=G(u.to,a.to);(g<0||!l.inclusiveLeft&&!g)&&d.push({from:u.from,to:a.from}),(b>0||!l.inclusiveRight&&!b)&&d.push({from:a.to,to:u.to}),n.splice.apply(n,d),s+=d.length-3}}return n}function Do(e){var t=e.markedSpans;if(t){for(var i=0;it)&&(!r||Sn(r,o.marker)<0)&&(r=o.marker)}return r}function Eo(e,t,i,r,n){var o=V(e,t),l=Jt&&o.markedSpans;if(l)for(var a=0;a=0&&g<=0||d<=0&&g>=0)&&(d<=0&&(s.marker.inclusiveRight&&n.inclusiveLeft?G(u.to,i)>=0:G(u.to,i)>0)||d>=0&&(s.marker.inclusiveRight&&n.inclusiveLeft?G(u.from,r)<=0:G(u.from,r)<0)))return!0}}}function Wt(e){for(var t;t=Fo(e);)e=t.find(-1,!0).line;return e}function za(e){for(var t;t=Ki(e);)e=t.find(1,!0).line;return e}function Ba(e){for(var t,i;t=Ki(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function Cn(e,t){var i=V(e,t),r=Wt(i);return i==r?t:f(r)}function No(e,t){if(t>e.lastLine())return t;var i=V(e,t),r;if(!fr(e,i))return t;for(;r=Ki(i);)i=r.find(1,!0).line;return f(i)+1}function fr(e,t){var i=Jt&&t.markedSpans;if(i){for(var r=void 0,n=0;nt.maxLineLength&&(t.maxLineLength=n,t.maxLine=r)})}var Br=function(e,t,i){this.text=e,Mo(this,t),this.height=i?i(this):1};Br.prototype.lineNo=function(){return f(this)},Et(Br);function Ra(e,t,i,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Do(e),Mo(e,i);var n=r?r(e):1;n!=e.height&&Dt(e,n)}function _a(e){e.parent=null,Do(e)}var qa={},ja={};function Oo(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?ja:qa;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function Po(e,t){var i=U("span",null,null,ie?"padding-right: .1px":null),r={pre:U("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var n=0;n<=(t.rest?t.rest.length:0);n++){var o=n?t.rest[n-1]:t.line,l=void 0;r.pos=0,r.addToken=Ua,ar(e.display.measure)&&(l=Se(o,e.doc.direction))&&(r.addToken=Xa(r.addToken,l)),r.map=[];var a=t!=e.display.externalMeasured&&f(o);Ya(o,r,yo(e,o,a)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=wt(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=wt(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(zi(e.display.measure))),n==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(ie){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Re(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=wt(r.pre.className,r.textClass||"")),r}function Ka(e){var t=c("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ua(e,t,i,r,n,o,l){if(t){var a=e.splitSpaces?Ga(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,d;if(!s.test(t))e.col+=t.length,d=document.createTextNode(a),e.map.push(e.pos,e.pos+t.length,d),T&&se<9&&(u=!0),e.pos+=t.length;else{d=document.createDocumentFragment();for(var g=0;;){s.lastIndex=g;var b=s.exec(t),m=b?b.index-g:t.length-g;if(m){var L=document.createTextNode(a.slice(g,g+m));T&&se<9?d.appendChild(c("span",[L])):d.appendChild(L),e.map.push(e.pos,e.pos+m,L),e.col+=m,e.pos+=m}if(!b)break;g+=m+1;var F=void 0;if(b[0]==" "){var H=e.cm.options.tabSize,B=H-e.col%H;F=d.appendChild(c("span",ot(B),"cm-tab")),F.setAttribute("role","presentation"),F.setAttribute("cm-text"," "),e.col+=B}else b[0]=="\r"||b[0]==` +`?(F=d.appendChild(c("span",b[0]=="\r"?"␍":"␤","cm-invalidchar")),F.setAttribute("cm-text",b[0]),e.col+=1):(F=e.cm.options.specialCharPlaceholder(b[0]),F.setAttribute("cm-text",b[0]),T&&se<9?d.appendChild(c("span",[F])):d.appendChild(F),e.col+=1);e.map.push(e.pos,e.pos+1,F),e.pos++}}if(e.trailingSpace=a.charCodeAt(t.length-1)==32,i||r||n||u||o||l){var X=i||"";r&&(X+=r),n&&(X+=n);var R=c("span",[d],X,o);if(l)for(var $ in l)l.hasOwnProperty($)&&$!="style"&&$!="class"&&R.setAttribute($,l[$]);return e.content.appendChild(R)}e.content.appendChild(d)}}function Ga(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,r="",n=0;nu&&g.from<=u));b++);if(g.to>=d)return e(i,r,n,o,l,a,s);e(i,r.slice(0,g.to-u),n,o,null,a,s),o=null,r=r.slice(g.to-u),u=g.to}}}function Ho(e,t,i,r){var n=!r&&i.widgetNode;n&&e.map.push(e.pos,e.pos+t,n),!r&&e.cm.display.input.needsContentAttribute&&(n||(n=e.content.appendChild(document.createElement("span"))),n.setAttribute("cm-marker",i.id)),n&&(e.cm.display.input.setUneditable(n),e.content.appendChild(n)),e.pos+=t,e.trailingSpace=!1}function Ya(e,t,i){var r=e.markedSpans,n=e.text,o=0;if(!r){for(var l=1;ls||be.collapsed&&ne.to==s&&ne.from==s)){if(ne.to!=null&&ne.to!=s&&m>ne.to&&(m=ne.to,F=""),be.className&&(L+=" "+be.className),be.css&&(b=(b?b+";":"")+be.css),be.startStyle&&ne.from==s&&(H+=" "+be.startStyle),be.endStyle&&ne.to==m&&($||($=[])).push(be.endStyle,ne.to),be.title&&((X||(X={})).title=be.title),be.attributes)for(var Ne in be.attributes)(X||(X={}))[Ne]=be.attributes[Ne];be.collapsed&&(!B||Sn(B.marker,be)<0)&&(B=ne)}else ne.from>s&&m>ne.from&&(m=ne.from)}if($)for(var rt=0;rt<$.length;rt+=2)$[rt+1]==m&&(F+=" "+$[rt]);if(!B||B.from==s)for(var Be=0;Be=a)break;for(var Lt=Math.min(a,m);;){if(d){var yt=s+d.length;if(!B){var Ye=yt>Lt?d.slice(0,Lt-s):d;t.addToken(t,Ye,g?g+L:L,H,s+Ye.length==m?F:"",b,X)}if(yt>=Lt){d=d.slice(Lt-s),s=Lt;break}s=yt,H=""}d=n.slice(o,o=i[u++]),g=Oo(i[u++],t.cm.options)}}}function Wo(e,t,i){this.line=t,this.rest=Ba(t),this.size=this.rest?f(ye(this.rest))-i+1:1,this.node=this.text=null,this.hidden=fr(e,t)}function Gi(e,t,i){for(var r=[],n,o=t;o2&&o.push((s.bottom+u.top)/2-i.top)}}o.push(i.bottom-i.top)}}function jo(e,t,i){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;ri)return{map:e.measure.maps[n],cache:e.measure.caches[n],before:!0}}}function os(e,t){t=Wt(t);var i=f(t),r=e.display.externalMeasured=new Wo(e.doc,t,i);r.lineN=i;var n=r.built=Po(e,r);return r.text=n.pre,Y(e.display.lineMeasure,n.pre),r}function Ko(e,t,i,r){return Kt(e,_r(e,t),i,r)}function Fn(e,t){if(t>=e.display.viewFrom&&t=i.lineN&&tt)&&(o=s-a,n=o-1,t>=s&&(l="right")),n!=null){if(r=e[u+2],a==s&&i==(r.insertLeft?"left":"right")&&(l=i),i=="left"&&n==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[(u-=3)+2],l="left";if(i=="right"&&n==s-a)for(;u=0&&(i=e[n]).left==i.right;n--);return i}function as(e,t,i,r){var n=Go(t.map,i,r),o=n.node,l=n.start,a=n.end,s=n.collapse,u;if(o.nodeType==3){for(var d=0;d<4;d++){for(;l&&Xe(t.line.text.charAt(n.coverStart+l));)--l;for(;n.coverStart+a0&&(s=r="right");var g;e.options.lineWrapping&&(g=o.getClientRects()).length>1?u=g[r=="right"?g.length-1:0]:u=o.getBoundingClientRect()}if(T&&se<9&&!l&&(!u||!u.left&&!u.right)){var b=o.parentNode.getClientRects()[0];b?u={left:b.left,right:b.left+jr(e.display),top:b.top,bottom:b.bottom}:u=Uo}for(var m=u.top-t.rect.top,L=u.bottom-t.rect.top,F=(m+L)/2,H=t.view.measure.heights,B=0;B=r.text.length?(s=r.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l(u=="before"?s-1:s,u=="before");function d(L,F,H){var B=a[F],X=B.level==1;return l(H?L-1:L,X!=H)}var g=or(a,s,u),b=yr,m=d(s,g,u=="before");return b!=null&&(m.other=d(s,b,u!="before")),m}function Qo(e,t){var i=0;t=me(e.doc,t),e.options.lineWrapping||(i=jr(e.display)*t.ch);var r=V(e.doc,t.line),n=Qt(r)+Xi(e.display);return{left:i,right:i,top:n,bottom:n+r.height}}function Nn(e,t,i,r,n){var o=S(e,t,i);return o.xRel=n,r&&(o.outside=r),o}function On(e,t,i){var r=e.doc;if(i+=e.display.viewOffset,i<0)return Nn(r.first,0,null,-1,-1);var n=p(r,i),o=r.first+r.size-1;if(n>o)return Nn(r.first+r.size-1,V(r,o).text.length,null,1,1);t<0&&(t=0);for(var l=V(r,n);;){var a=us(e,l,n,t,i),s=Ia(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==n)return u;l=V(r,n=u.line)}}function Vo(e,t,i,r){r-=En(t);var n=t.text.length,o=Rt(function(l){return Kt(e,i,l-1).bottom<=r},n,0);return n=Rt(function(l){return Kt(e,i,l).top>r},o,n),{begin:o,end:n}}function el(e,t,i,r){i||(i=_r(e,t));var n=Yi(e,t,Kt(e,i,r),"line").top;return Vo(e,t,i,n)}function Pn(e,t,i,r){return e.bottom<=i?!1:e.top>i?!0:(r?e.left:e.right)>t}function us(e,t,i,r,n){n-=Qt(t);var o=_r(e,t),l=En(t),a=0,s=t.text.length,u=!0,d=Se(t,e.doc.direction);if(d){var g=(e.options.lineWrapping?cs:fs)(e,t,i,o,d,r,n);u=g.level!=1,a=u?g.from:g.to-1,s=u?g.to:g.from-1}var b=null,m=null,L=Rt(function(ae){var ne=Kt(e,o,ae);return ne.top+=l,ne.bottom+=l,Pn(ne,r,n,!1)?(ne.top<=n&&ne.left<=r&&(b=ae,m=ne),!0):!1},a,s),F,H,B=!1;if(m){var X=r-m.left=$.bottom?1:0}return L=ir(t.text,L,1),Nn(i,L,H,B,r-F)}function fs(e,t,i,r,n,o,l){var a=Rt(function(g){var b=n[g],m=b.level!=1;return Pn(It(e,S(i,m?b.to:b.from,m?"before":"after"),"line",t,r),o,l,!0)},0,n.length-1),s=n[a];if(a>0){var u=s.level!=1,d=It(e,S(i,u?s.from:s.to,u?"after":"before"),"line",t,r);Pn(d,o,l,!0)&&d.top>l&&(s=n[a-1])}return s}function cs(e,t,i,r,n,o,l){var a=Vo(e,t,r,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var d=null,g=null,b=0;b=u||m.to<=s)){var L=m.level!=1,F=Kt(e,r,L?Math.min(u,m.to)-1:Math.max(s,m.from)).right,H=FH)&&(d=m,g=H)}}return d||(d=n[n.length-1]),d.fromu&&(d={from:d.from,to:u,level:d.level}),d}var wr;function qr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(wr==null){wr=c("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)wr.appendChild(document.createTextNode("x")),wr.appendChild(c("br"));wr.appendChild(document.createTextNode("x"))}Y(e.measure,wr);var i=wr.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),D(e.measure),i||1}function jr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=c("span","xxxxxxxxxx"),i=c("pre",[t],"CodeMirror-line-like");Y(e.measure,i);var r=t.getBoundingClientRect(),n=(r.right-r.left)/10;return n>2&&(e.cachedCharWidth=n),n||10}function Hn(e){for(var t=e.display,i={},r={},n=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;i[a]=o.offsetLeft+o.clientLeft+n,r[a]=o.clientWidth}return{fixedPos:Wn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Wn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function tl(e){var t=qr(e.display),i=e.options.lineWrapping,r=i&&Math.max(5,e.display.scroller.clientWidth/jr(e.display)-3);return function(n){if(fr(e.doc,n))return 0;var o=0;if(n.widgets)for(var l=0;l0&&(u=V(e.doc,s.line).text).length==s.ch){var d=xe(u,u.length,e.options.tabSize)-u.length;s=S(s.line,Math.max(0,Math.round((o-qo(e.display).left)/jr(e.display))-d))}return s}function Cr(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var i=e.display.view,r=0;rt)&&(n.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=n.viewTo)Jt&&Cn(e.doc,t)n.viewFrom?hr(e):(n.viewFrom+=r,n.viewTo+=r);else if(t<=n.viewFrom&&i>=n.viewTo)hr(e);else if(t<=n.viewFrom){var o=Zi(e,i,i+r,1);o?(n.view=n.view.slice(o.index),n.viewFrom=o.lineN,n.viewTo+=r):hr(e)}else if(i>=n.viewTo){var l=Zi(e,t,t,-1);l?(n.view=n.view.slice(0,l.index),n.viewTo=l.lineN):hr(e)}else{var a=Zi(e,t,t,-1),s=Zi(e,i,i+r,1);a&&s?(n.view=n.view.slice(0,a.index).concat(Gi(e,a.lineN,s.lineN)).concat(n.view.slice(s.index)),n.viewTo+=r):hr(e)}var u=n.externalMeasured;u&&(i=n.lineN&&t=r.viewTo)){var o=r.view[Cr(e,t)];if(o.node!=null){var l=o.changes||(o.changes=[]);J(l,i)==-1&&l.push(i)}}}function hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Zi(e,t,i,r){var n=Cr(e,t),o,l=e.display.view;if(!Jt||i==e.doc.first+e.doc.size)return{index:n,lineN:i};for(var a=e.display.viewFrom,s=0;s0){if(n==l.length-1)return null;o=a+l[n].size-t,n++}else o=a-t;t+=o,i+=o}for(;Cn(e.doc,i)!=i;){if(n==(r<0?0:l.length-1))return null;i+=r*l[n-(r<0?1:0)].size,n+=r}return{index:n,lineN:i}}function hs(e,t,i){var r=e.display,n=r.view;n.length==0||t>=r.viewTo||i<=r.viewFrom?(r.view=Gi(e,t,i),r.viewFrom=t):(r.viewFrom>t?r.view=Gi(e,t,r.viewFrom).concat(r.view):r.viewFromi&&(r.view=r.view.slice(0,Cr(e,i)))),r.viewTo=i}function rl(e){for(var t=e.display.view,i=0,r=0;r=e.display.viewTo||s.to().line0?l:e.defaultCharWidth())+"px"}if(r.other){var a=i.appendChild(c("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function Ji(e,t){return e.top-t.top||e.left-t.left}function ds(e,t,i){var r=e.display,n=e.doc,o=document.createDocumentFragment(),l=qo(e.display),a=l.left,s=Math.max(r.sizerWidth,kr(e)-r.sizer.offsetLeft)-l.right,u=n.direction=="ltr";function d(R,$,ae,ne){$<0&&($=0),$=Math.round($),ne=Math.round(ne),o.appendChild(c("div",null,"CodeMirror-selected","position: absolute; left: "+R+`px; top: `+$+"px; width: "+(ae??s-R)+`px; - height: `+(ne-$)+"px"))}function g(R,$,ae){var ne=V(n,R),be=ne.text.length,Ne,rt;function Be(Ye,bt){return $i(e,S(R,Ye),"div",ne,bt)}function Lt(Ye,bt,lt){var Je=tl(e,ne,null,Ye),$e=bt=="ltr"==(lt=="after")?"left":"right",je=lt=="after"?Je.begin:Je.end-(/\s/.test(ne.text.charAt(Je.end-1))?2:1);return Be(je,$e)[$e]}var yt=Se(ne,n.direction);return nr(yt,$||0,ae??be,function(Ye,bt,lt,Je){var $e=lt=="ltr",je=Be(Ye,$e?"left":"right"),kt=Be(bt-1,$e?"right":"left"),ri=$==null&&Ye==0,xr=ae==null&&bt==be,ct=Je==0,Ut=!yt||Je==yt.length-1;if(kt.top-je.top<=3){var it=(u?ri:xr)&&ct,co=(u?xr:ri)&&Ut,rr=it?a:($e?je:kt).left,Ar=co?s:($e?kt:je).right;d(rr,je.top,Ar-rr,je.bottom)}else{var Fr,dt,ii,ho;$e?(Fr=u&&ri&&ct?a:je.left,dt=u?s:Lt(Ye,lt,"before"),ii=u?a:Lt(bt,lt,"after"),ho=u&&xr&&Ut?s:kt.right):(Fr=u?Lt(Ye,lt,"before"):a,dt=!u&&ri&&ct?s:je.right,ii=!u&&xr&&Ut?a:kt.left,ho=u?Lt(bt,lt,"after"):s),d(Fr,je.top,dt-Fr,je.bottom),je.bottom0?t.blinker=setInterval(function(){e.hasFocus()||Kr(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function ol(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||_n(e))}function Rn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Kr(e))},100)}function _n(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Re(e,"focus",e,t),e.state.focused=!0,ze(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),ie&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Bn(e))}function Kr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Re(e,"blur",e,t),e.state.focused=!1,We(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Qi(e){for(var t=e.display,i=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),n=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l.005||m<-.005)&&(ne.display.sizerWidth){var F=Math.ceil(d/jr(e.display));F>e.display.maxLineLength&&(e.display.maxLineLength=F,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function ll(e){if(e.widgets)for(var t=0;t=l&&(o=p(t,Qt(V(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function hs(e,t){if(!_e(e,"scrollCursorIntoView")){var i=e.display,r=i.sizer.getBoundingClientRect(),n=null,o=i.wrapper.ownerDocument;if(t.top+r.top<0?n=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(n=!1),n!=null&&!ue){var l=c("div","​",null,`position: absolute; + height: `+(ne-$)+"px"))}function g(R,$,ae){var ne=V(n,R),be=ne.text.length,Ne,rt;function Be(Ye,bt){return $i(e,S(R,Ye),"div",ne,bt)}function Lt(Ye,bt,lt){var Je=el(e,ne,null,Ye),$e=bt=="ltr"==(lt=="after")?"left":"right",je=lt=="after"?Je.begin:Je.end-(/\s/.test(ne.text.charAt(Je.end-1))?2:1);return Be(je,$e)[$e]}var yt=Se(ne,n.direction);return nr(yt,$||0,ae??be,function(Ye,bt,lt,Je){var $e=lt=="ltr",je=Be(Ye,$e?"left":"right"),kt=Be(bt-1,$e?"right":"left"),ri=$==null&&Ye==0,xr=ae==null&&bt==be,ct=Je==0,Ut=!yt||Je==yt.length-1;if(kt.top-je.top<=3){var it=(u?ri:xr)&&ct,co=(u?xr:ri)&&Ut,rr=it?a:($e?je:kt).left,Ar=co?s:($e?kt:je).right;d(rr,je.top,Ar-rr,je.bottom)}else{var Fr,dt,ii,ho;$e?(Fr=u&&ri&&ct?a:je.left,dt=u?s:Lt(Ye,lt,"before"),ii=u?a:Lt(bt,lt,"after"),ho=u&&xr&&Ut?s:kt.right):(Fr=u?Lt(Ye,lt,"before"):a,dt=!u&&ri&&ct?s:je.right,ii=!u&&xr&&Ut?a:kt.left,ho=u?Lt(bt,lt,"after"):s),d(Fr,je.top,dt-Fr,je.bottom),je.bottom0?t.blinker=setInterval(function(){e.hasFocus()||Kr(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function nl(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||_n(e))}function Rn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Kr(e))},100)}function _n(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Re(e,"focus",e,t),e.state.focused=!0,ze(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),ie&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Bn(e))}function Kr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Re(e,"blur",e,t),e.state.focused=!1,We(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Qi(e){for(var t=e.display,i=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),n=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l.005||m<-.005)&&(ne.display.sizerWidth){var F=Math.ceil(d/jr(e.display));F>e.display.maxLineLength&&(e.display.maxLineLength=F,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function ol(e){if(e.widgets)for(var t=0;t=l&&(o=p(t,Qt(V(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function ps(e,t){if(!_e(e,"scrollCursorIntoView")){var i=e.display,r=i.sizer.getBoundingClientRect(),n=null,o=i.wrapper.ownerDocument;if(t.top+r.top<0?n=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(n=!1),n!=null&&!ue){var l=c("div","​",null,`position: absolute; top: `+(t.top-i.viewOffset-Xi(e.display))+`px; height: `+(t.bottom-t.top+jt(e)+i.barHeight)+`px; - left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(n),e.display.lineSpace.removeChild(l)}}}function ds(e,t,i,r){r==null&&(r=0);var n;!e.options.lineWrapping&&t==i&&(i=t.sticky=="before"?S(t.line,t.ch+1,"before"):t,t=t.ch?S(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=It(e,t),s=!i||i==t?a:It(e,i);n={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r};var u=qn(e,n),d=e.doc.scrollTop,g=e.doc.scrollLeft;if(u.scrollTop!=null&&(vi(e,u.scrollTop),Math.abs(e.doc.scrollTop-d)>1&&(l=!0)),u.scrollLeft!=null&&(Lr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-g)>1&&(l=!0)),!l)break}return n}function ps(e,t){var i=qn(e,t);i.scrollTop!=null&&vi(e,i.scrollTop),i.scrollLeft!=null&&Lr(e,i.scrollLeft)}function qn(e,t){var i=e.display,r=qr(e.display);t.top<0&&(t.top=0);var n=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,o=An(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Mn(i),s=t.topa-r;if(t.topn+o){var d=Math.min(t.top,(u?a:t.bottom)-o);d!=n&&(l.scrollTop=d)}var g=e.options.fixedGutter?0:i.gutters.offsetWidth,b=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-g,m=kr(e)-i.gutters.offsetWidth,L=t.right-t.left>m;return L&&(t.right=t.left+m),t.left<10?l.scrollLeft=0:t.leftm+b-3&&(l.scrollLeft=t.right+(L?0:10)-m),l}function jn(e,t){t!=null&&(en(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Ur(e){en(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function gi(e,t,i){(t!=null||i!=null)&&en(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function gs(e,t){en(e),e.curOp.scrollToPos=t}function en(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=Vo(e,t.from),r=Vo(e,t.to);al(e,i,r,t.margin)}}function al(e,t,i,r){var n=qn(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-r,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+r});gi(e,n.scrollLeft,n.scrollTop)}function vi(e,t){Math.abs(e.doc.scrollTop-t)<2||(k||Un(e,{top:t}),sl(e,t,!0),k&&Un(e),yi(e,100))}function sl(e,t,i){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!i)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Lr(e,t,i,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,dl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function mi(e){var t=e.display,i=t.gutters.offsetWidth,r=Math.round(e.doc.height+Mn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?i:0,docHeight:r,scrollHeight:r+jt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var Tr=function(e,t,i){this.cm=i;var r=this.vert=c("div",[c("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),n=this.horiz=c("div",[c("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=n.tabIndex=-1,e(r),e(n),le(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),le(n,"scroll",function(){n.clientWidth&&t(n.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,T&&se<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Tr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var n=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+n)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=i?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(i?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?r:0,bottom:t?r:0}},Tr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Tr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Tr.prototype.zeroWidthHack=function(){var e=De&&!ce?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new he,this.disableVert=new he},Tr.prototype.enableZeroWidthBar=function(e,t,i){e.style.visibility="";function r(){var n=e.getBoundingClientRect(),o=i=="vert"?document.elementFromPoint(n.right-1,(n.top+n.bottom)/2):document.elementFromPoint((n.right+n.left)/2,n.bottom-1);o!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},Tr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var xi=function(){};xi.prototype.update=function(){return{bottom:0,right:0}},xi.prototype.setScrollLeft=function(){},xi.prototype.setScrollTop=function(){},xi.prototype.clear=function(){};function Gr(e,t){t||(t=mi(e));var i=e.display.barWidth,r=e.display.barHeight;ul(e,t);for(var n=0;n<4&&i!=e.display.barWidth||r!=e.display.barHeight;n++)i!=e.display.barWidth&&e.options.lineWrapping&&Qi(e),ul(e,mi(e)),i=e.display.barWidth,r=e.display.barHeight}function ul(e,t){var i=e.display,r=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=r.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=r.bottom)+"px",i.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=r.bottom+"px",i.scrollbarFiller.style.width=r.right+"px"):i.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=r.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}var fl={native:Tr,null:xi};function cl(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&We(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new fl[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),le(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){i=="horizontal"?Lr(e,t):vi(e,t)},e),e.display.scrollbars.addClass&&ze(e.display.wrapper,e.display.scrollbars.addClass)}var vs=0;function Dr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++vs,markArrays:null},Xa(e.curOp)}function Mr(e){var t=e.curOp;t&&$a(t,function(i){for(var r=0;r=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new tn(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ys(e){e.updatedDisplay=e.mustUpdate&&Kn(e.cm,e.update)}function bs(e){var t=e.cm,i=t.display;e.updatedDisplay&&Qi(t),e.barMeasure=mi(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Uo(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+jt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-kr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function ks(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var i=+new Date+e.options.workTime,r=si(e,t.highlightFrontier),n=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?_t(t.mode,r.state):null,s=yo(e,o,r,!0);a&&(r.state=a),o.styles=s.styles;var u=o.styleClasses,d=s.classes;d?o.styleClasses=d:u&&(o.styleClasses=null);for(var g=!l||l.length!=o.styles.length||u!=d&&(!u||!d||u.bgClass!=d.bgClass||u.textClass!=d.textClass),b=0;!g&&bi)return yi(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),n.length&&Ct(e,function(){for(var o=0;o=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&il(e)==0)return!1;pl(e)&&(hr(e),t.dims=Hn(e));var n=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(n,t.visible.to+e.options.viewportMargin);i.viewFroml&&i.viewTo-l<20&&(l=Math.min(n,i.viewTo)),Jt&&(o=Cn(e.doc,o),l=Oo(e.doc,l));var a=o!=i.viewFrom||l!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;fs(e,o,l),i.viewOffset=Qt(V(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var s=il(e);if(!a&&s==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var u=Ls(e);return s>4&&(i.lineDiv.style.display="none"),Ds(e,i.updateLineNumbers,t.dims),s>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Ts(u),D(i.cursorDiv),D(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,a&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,yi(e,400)),i.updateLineNumbers=null,!0}function hl(e,t){for(var i=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==kr(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+Mn(e.display)-An(e),i.top)}),t.visible=Vi(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=Vi(e.display,e.doc,i));if(!Kn(e,t))break;Qi(e);var n=mi(e);pi(e),Gr(e,n),Xn(e,n),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Un(e,t){var i=new tn(e,t);if(Kn(e,i)){Qi(e),hl(e,i);var r=mi(e);pi(e),Gr(e,r),Xn(e,r),i.finish()}}function Ds(e,t,i){var r=e.display,n=e.options.lineNumbers,o=r.lineDiv,l=o.firstChild;function a(L){var F=L.nextSibling;return ie&&De&&e.display.currentWheelTarget==L?L.style.display="none":L.parentNode.removeChild(L),F}for(var s=r.view,u=r.viewFrom,d=0;d-1&&(m=!1),zo(e,g,u,i)),m&&(D(g.lineNumber),g.lineNumber.appendChild(document.createTextNode(P(e.options,u)))),l=g.node.nextSibling}u+=g.size}for(;l;)l=a(l)}function Gn(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Ve(e,"gutterChanged",e)}function Xn(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+jt(e)+"px"}function dl(e){var t=e.display,i=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Wn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,n=t.gutters.offsetWidth,o=r+"px",l=0;l=105&&(n.wrapper.style.clipPath="inset(0px)"),n.wrapper.setAttribute("translate","no"),T&&se<8&&(n.gutters.style.zIndex=-1,n.scroller.style.paddingRight=0),!ie&&!(k&&fe)&&(n.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(n.wrapper):e(n.wrapper)),n.viewFrom=n.viewTo=t.first,n.reportedViewFrom=n.reportedViewTo=t.first,n.view=[],n.renderedView=null,n.externalMeasured=null,n.viewOffset=0,n.lastWrapHeight=n.lastWrapWidth=0,n.updateLineNumbers=null,n.nativeBarWidth=n.barHeight=n.barWidth=0,n.scrollbarsClipped=!1,n.lineNumWidth=n.lineNumInnerWidth=n.lineNumChars=null,n.alignWidgets=!1,n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.maxLine=null,n.maxLineLength=0,n.maxLineChanged=!1,n.wheelDX=n.wheelDY=n.wheelStartX=n.wheelStartY=null,n.shift=!1,n.selForContextMenu=null,n.activeTouch=null,n.gutterSpecs=Yn(r.gutters,r.lineNumbers),gl(n),i.init(n)}var rn=0,er=null;T?er=-.53:k?er=15:ee?er=-.7:K&&(er=-1/3);function vl(e){var t=e.wheelDeltaX,i=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),i==null&&e.detail&&e.axis==e.VERTICAL_AXIS?i=e.detail:i==null&&(i=e.wheelDelta),{x:t,y:i}}function As(e){var t=vl(e);return t.x*=er,t.y*=er,t}function ml(e,t){ee&&j==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var i=vl(t),r=i.x,n=i.y,o=er;t.deltaMode===0&&(r=t.deltaX,n=t.deltaY,o=1);var l=e.display,a=l.scroller,s=a.scrollWidth>a.clientWidth,u=a.scrollHeight>a.clientHeight;if(r&&s||n&&u){if(n&&De&&ie){e:for(var d=t.target,g=l.view;d!=a;d=d.parentNode)for(var b=0;b=0&&G(e,r.to())<=0)return i}return-1};var Ae=function(e,t){this.anchor=e,this.head=t};Ae.prototype.from=function(){return zr(this.anchor,this.head)},Ae.prototype.to=function(){return vt(this.anchor,this.head)},Ae.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function zt(e,t,i){var r=e&&e.options.selectionsMayTouch,n=t[i];t.sort(function(b,m){return G(b.from(),m.from())}),i=J(t,n);for(var o=1;o0:s>=0){var u=zr(a.from(),l.from()),d=vt(a.to(),l.to()),g=a.empty()?l.from()==l.head:a.from()==a.head;o<=i&&--i,t.splice(--o,2,new Ae(g?d:u,g?u:d))}}return new Mt(t,i)}function dr(e,t){return new Mt([new Ae(e,t||e)],0)}function pr(e){return e.text?S(e.from.line+e.text.length-1,ye(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function xl(e,t){if(G(e,t.from)<0)return e;if(G(e,t.to)<=0)return pr(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=pr(t).ch-t.to.ch),S(i,r)}function $n(e,t){for(var i=[],r=0;r1&&e.remove(a.line+1,L-1),e.insert(a.line+1,B)}Ve(e,"change",e,t)}function gr(e,t,i){function r(n,o,l){if(n.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ye(e.done)}function Cl(e,t,i,r){var n=e.history;n.undone.length=0;var o=+new Date,l,a;if((n.lastOp==r||n.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&n.lastModTime>o-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=Ns(n,n.lastOp==r)))a=ye(l.changes),G(t.from,t.to)==0&&G(t.from,a.to)==0?a.to=pr(t):l.changes.push(Qn(e,t));else{var s=ye(n.done);for((!s||!s.ranges)&&on(e.sel,n.done),l={changes:[Qn(e,t)],generation:n.generation},n.done.push(l);n.done.length>n.undoDepth;)n.done.shift(),n.done[0].ranges||n.done.shift()}n.done.push(i),n.generation=++n.maxGeneration,n.lastModTime=n.lastSelTime=o,n.lastOp=n.lastSelOp=r,n.lastOrigin=n.lastSelOrigin=t.origin,a||Re(e,"historyAdded")}function Os(e,t,i,r){var n=t.charAt(0);return n=="*"||n=="+"&&i.ranges.length==r.ranges.length&&i.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Ps(e,t,i,r){var n=e.history,o=r&&r.origin;i==n.lastSelOp||o&&n.lastSelOrigin==o&&(n.lastModTime==n.lastSelTime&&n.lastOrigin==o||Os(e,o,ye(n.done),t))?n.done[n.done.length-1]=t:on(t,n.done),n.lastSelTime=+new Date,n.lastSelOrigin=o,n.lastSelOp=i,r&&r.clearRedo!==!1&&Sl(n.undone)}function on(e,t){var i=ye(t);i&&i.ranges&&i.equals(e)||t.push(e)}function Ll(e,t,i,r){var n=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,r),function(l){l.markedSpans&&((n||(n=t["spans_"+e.id]={}))[o]=l.markedSpans),++o})}function Hs(e){if(!e)return null;for(var t,i=0;i-1&&(ye(a)[g]=u[g],delete u[g])}}return r}function Vn(e,t,i,r){if(r){var n=e.anchor;if(i){var o=G(t,n)<0;o!=G(i,n)<0?(n=t,t=i):o!=G(t,i)<0&&(t=i)}return new Ae(n,t)}else return new Ae(i||t,t)}function ln(e,t,i,r,n){n==null&&(n=e.cm&&(e.cm.display.shift||e.extend)),ft(e,new Mt([Vn(e.sel.primary(),t,i,n)],0),r)}function Dl(e,t,i){for(var r=[],n=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:a.to>t.ch))){if(n&&(Re(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--l;continue}else break;if(!s.atomic)continue;if(i){var g=s.find(r<0?1:-1),b=void 0;if((r<0?d:u)&&(g=Ol(e,g,-r,g&&g.line==t.line?o:null)),g&&g.line==t.line&&(b=G(g,i))&&(r<0?b<0:b>0))return Yr(e,g,t,r,n)}var m=s.find(r<0?-1:1);return(r<0?u:d)&&(m=Ol(e,m,r,m.line==t.line?o:null)),m?Yr(e,m,t,r,n):null}}return t}function sn(e,t,i,r,n){var o=r||1,l=Yr(e,t,i,o,n)||!n&&Yr(e,t,i,o,!0)||Yr(e,t,i,-o,n)||!n&&Yr(e,t,i,-o,!0);return l||(e.cantEdit=!0,S(e.first,0))}function Ol(e,t,i,r){return i<0&&t.ch==0?t.line>e.first?me(e,S(t.line-1)):null:i>0&&t.ch==(r||V(e,t.line)).text.length?t.line=0;--n)Wl(e,{from:r[n].from,to:r[n].to,text:n?[""]:t.text,origin:t.origin});else Wl(e,t)}}function Wl(e,t){if(!(t.text.length==1&&t.text[0]==""&&G(t.from,t.to)==0)){var i=$n(e,t);Cl(e,t,i,e.cm?e.cm.curOp.id:NaN),wi(e,t,i,wn(e,t));var r=[];gr(e,function(n,o){!o&&J(r,n.history)==-1&&(Rl(n.history,t),r.push(n.history)),wi(n,t,null,wn(n,t))})}}function un(e,t,i){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!i)){for(var n=e.history,o,l=e.sel,a=t=="undo"?n.done:n.undone,s=t=="undo"?n.undone:n.done,u=0;u=0;--m){var L=b(m);if(L)return L.v}}}}function Il(e,t){if(t!=0&&(e.first+=t,e.sel=new Mt(Ce(e.sel.ranges,function(n){return new Ae(S(n.anchor.line+t,n.anchor.ch),S(n.head.line+t,n.head.ch))}),e.sel.primIndex),e.cm)){mt(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,r=i.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:S(o,V(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Zt(e,t.from,t.to),i||(i=$n(e,t)),e.cm?zs(e.cm,t,r):Jn(e,t,r),an(e,i,Ze),e.cantEdit&&sn(e,S(e.firstLine(),0))&&(e.cantEdit=!1)}}function zs(e,t,i){var r=e.doc,n=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=f(Wt(V(r,o.line))),r.iter(s,l.line+1,function(m){if(m==n.maxLine)return a=!0,!0})),r.sel.contains(t.from,t.to)>-1&&At(e),Jn(r,t,i,rl(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(m){var L=Ui(m);L>n.maxLineLength&&(n.maxLine=m,n.maxLineLength=L,n.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),Da(r,o.line),yi(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?mt(e):o.line==l.line&&t.text.length==1&&!bl(e.doc,t)?cr(e,o.line,"text"):mt(e,o.line,l.line+1,u);var d=St(e,"changes"),g=St(e,"change");if(g||d){var b={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};g&&Ve(e,"change",e,b),d&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(b)}e.display.selForContextMenu=null}function Zr(e,t,i,r,n){var o;r||(r=i),G(r,i)<0&&(o=[r,i],i=o[0],r=o[1]),typeof t=="string"&&(t=e.splitLines(t)),$r(e,{from:i,to:r,text:t,origin:n})}function zl(e,t,i,r){i1||!(this.children[0]instanceof Ci))){var a=[];this.collapse(a),this.children=[new Ci(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=n.lines.length%25+25,a=l;a10);e.parent.maybeSpill()}},iterN:function(e,t,i){for(var r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=d,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&mt(e,r,n+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&El(e.doc)),e&&Ve(e,"markerCleared",e,this,r,n),t&&Mr(e),this.parent&&this.parent.clear()}},vr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var i,r,n=0;n0||l==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=U("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(No(e,t.line,t,i,o)||t.line!=i.line&&No(e,i.line,t,i,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Aa()}o.addToHistory&&Cl(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var a=t.line,s=e.cm,u;if(e.iter(a,i.line+1,function(g){s&&o.collapsed&&!s.options.lineWrapping&&Wt(g)==s.display.maxLine&&(u=!0),o.collapsed&&a!=t.line&&Dt(g,0),Ea(g,new _i(o,a==t.line?t.ch:null,a==i.line?i.ch:null),e.cm&&e.cm.curOp),++a}),o.collapsed&&e.iter(t.line,i.line+1,function(g){fr(e,g)&&Dt(g,0)}),o.clearOnEnter&&le(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Ma(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ql,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)mt(s,t.line,i.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var d=t.line;d<=i.line;d++)cr(s,d,"text");o.atomic&&El(s.doc),Ve(s,"markerAdded",s,o)}return o}var Di=function(e,t){this.markers=e,this.primary=t;for(var i=0;i=0;s--)$r(this,r[s]);a?Al(this,a):this.cm&&Ur(this.cm)}),undo:tt(function(){un(this,"undo")}),redo:tt(function(){un(this,"redo")}),undoSelection:tt(function(){un(this,"undo",!0)}),redoSelection:tt(function(){un(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,r=0;r=e.ch)&&t.push(n.marker.parent||n.marker)}return t},findMarks:function(e,t,i){e=me(this,e),t=me(this,t);var r=[],n=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var a=0;a=s.to||s.from==null&&n!=e.line||s.from!=null&&n==t.line&&s.from>=t.ch)&&(!i||i(s.marker))&&r.push(s.marker.parent||s.marker)}++n}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var r=0;re)return t=e,!0;e-=o,++i}),me(this,S(i,t))},indexFromPos:function(e){e=me(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var d=e.dataTransfer.getData("Text");if(d){var g;if(t.state.draggingText&&!t.state.draggingText.copy&&(g=t.listSelections()),an(t.doc,dr(i,i)),g)for(var b=0;b=0;a--)Zr(e.doc,"",r[a].from,r[a].to,"+delete");Ur(e)})}function to(e,t,i){var r=ir(e.text,t+i,i);return r<0||r>e.text.length?null:r}function ro(e,t,i){var r=to(e,t.ch,i);return r==null?null:new S(t.line,r,i<0?"after":"before")}function io(e,t,i,r,n){if(e){t.doc.direction=="rtl"&&(n=-n);var o=Se(i,t.doc.direction);if(o){var l=n<0?ye(o):o[0],a=n<0==(l.level==1),s=a?"after":"before",u;if(l.level>0||t.doc.direction=="rtl"){var d=_r(t,i);u=n<0?i.text.length-1:0;var g=Kt(t,d,u).top;u=Rt(function(b){return Kt(t,d,b).top==g},n<0==(l.level==1)?l.from:l.to-1,u),s=="before"&&(u=to(i,u,1))}else u=n<0?l.to:l.from;return new S(r,u,s)}}return new S(r,n<0?i.text.length:0,n<0?"before":"after")}function Qs(e,t,i,r){var n=Se(t,e.doc.direction);if(!n)return ro(t,i,r);i.ch>=t.text.length?(i.ch=t.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var o=or(n,i.ch,i.sticky),l=n[o];if(e.doc.direction=="ltr"&&l.level%2==0&&(r>0?l.to>i.ch:l.from=l.from&&b>=d.begin)){var m=g?"before":"after";return new S(i.line,b,m)}}var L=function(B,X,R){for(var $=function(Ne,rt){return rt?new S(i.line,a(Ne,1),"before"):new S(i.line,Ne,"after")};B>=0&&B0==(ae.level!=1),be=ne?R.begin:a(R.end,-1);if(ae.from<=be&&be0?d.end:a(d.begin,-1);return H!=null&&!(r>0&&H==t.text.length)&&(F=L(r>0?0:n.length-1,r,u(H)),F)?F:null}var Fi={selectAll:Pl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ze)},killLine:function(e){return Vr(e,function(t){if(t.empty()){var i=V(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line0)n=new S(n.line,n.ch+1),e.replaceRange(o.charAt(n.ch-1)+o.charAt(n.ch-2),S(n.line,n.ch-2),n,"+transpose");else if(n.line>e.doc.first){var l=V(e.doc,n.line-1).text;l&&(n=new S(n.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),S(n.line-1,l.length-1),n,"+transpose"))}}i.push(new Ae(n,n))}e.setSelections(i)})},newlineAndIndent:function(e){return Ct(e,function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].head,"+input");t=e.listSelections();for(var r=0;re&&G(t,this.pos)==0&&i==this.button};var Ni,Oi;function ou(e,t){var i=+new Date;return Oi&&Oi.compare(i,e,t)?(Ni=Oi=null,"triple"):Ni&&Ni.compare(i,e,t)?(Oi=new oo(i,e,t),Ni=null,"double"):(Ni=new oo(i,e,t),Oi=null,"single")}function na(e){var t=this,i=t.display;if(!(_e(t,e)||i.activeTouch&&i.input.supportsTouch())){if(i.input.ensurePolled(),i.shift=e.shiftKey,Vt(i,e)){ie||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(!lo(t,e)){var r=Sr(t,e),n=Nt(e),o=r?ou(r,n):"single";z(t).focus(),n==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&lu(t,n,r,o,e))&&(n==1?r?su(t,r,o,e):ni(e)==i.scroller&&ut(e):n==2?(r&&ln(t.doc,r),setTimeout(function(){return i.input.focus()},20)):n==3&&(pe?t.display.input.onContextMenu(e):Rn(t)))}}}function lu(e,t,i,r,n){var o="Click";return r=="double"?o="Double"+o:r=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,Ei(e,$l(o,n),n,function(l){if(typeof l=="string"&&(l=Fi[l]),!l)return!1;var a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),a=l(e,i)!=Oe}finally{e.state.suppressEdits=!1}return a})}function au(e,t,i){var r=e.getOption("configureMouse"),n=r?r(e,t,i):{};if(n.unit==null){var o=Ge?i.shiftKey&&i.metaKey:i.altKey;n.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(n.extend==null||e.doc.extend)&&(n.extend=e.doc.extend||i.shiftKey),n.addNew==null&&(n.addNew=De?i.metaKey:i.ctrlKey),n.moveOnDrag==null&&(n.moveOnDrag=!(De?i.altKey:i.ctrlKey)),n}function su(e,t,i,r){T?setTimeout(re(ol,e),0):e.curOp.focus=Te(Z(e));var n=au(e,i,r),o=e.doc.sel,l;e.options.dragDrop&&xn&&!e.isReadOnly()&&i=="single"&&(l=o.contains(t))>-1&&(G((l=o.ranges[l]).from(),t)<0||t.xRel>0)&&(G(l.to(),t)>0||t.xRel<0)?uu(e,r,t,n):fu(e,r,t,n)}function uu(e,t,i,r){var n=e.display,o=!1,l=et(e,function(u){ie&&(n.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Rn(e)),st(n.wrapper.ownerDocument,"mouseup",l),st(n.wrapper.ownerDocument,"mousemove",a),st(n.scroller,"dragstart",s),st(n.scroller,"drop",l),o||(ut(u),r.addNew||ln(e.doc,i,null,null,r.extend),ie&&!K||T&&se==9?setTimeout(function(){n.wrapper.ownerDocument.body.focus({preventScroll:!0}),n.input.focus()},20):n.input.focus())}),a=function(u){o=o||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},s=function(){return o=!0};ie&&(n.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,le(n.wrapper.ownerDocument,"mouseup",l),le(n.wrapper.ownerDocument,"mousemove",a),le(n.scroller,"dragstart",s),le(n.scroller,"drop",l),e.state.delayingBlurEvent=!0,setTimeout(function(){return n.input.focus()},20),n.scroller.dragDrop&&n.scroller.dragDrop()}function oa(e,t,i){if(i=="char")return new Ae(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new Ae(S(t.line,0),me(e.doc,S(t.line+1,0)));var r=i(e,t);return new Ae(r.from,r.to)}function fu(e,t,i,r){T&&Rn(e);var n=e.display,o=e.doc;ut(t);var l,a,s=o.sel,u=s.ranges;if(r.addNew&&!r.extend?(a=o.sel.contains(i),a>-1?l=u[a]:l=new Ae(i,i)):(l=o.sel.primary(),a=o.sel.primIndex),r.unit=="rectangle")r.addNew||(l=new Ae(i,i)),i=Sr(e,t,!0,!0),a=-1;else{var d=oa(e,i,r.unit);r.extend?l=Vn(l,d.anchor,d.head,r.extend):l=d}r.addNew?a==-1?(a=u.length,ft(o,zt(e,u.concat([l]),a),{scroll:!1,origin:"*mouse"})):u.length>1&&u[a].empty()&&r.unit=="char"&&!r.extend?(ft(o,zt(e,u.slice(0,a).concat(u.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):eo(o,a,l,pt):(a=0,ft(o,new Mt([l],0),pt),s=o.sel);var g=i;function b(R){if(G(g,R)!=0)if(g=R,r.unit=="rectangle"){for(var $=[],ae=e.options.tabSize,ne=xe(V(o,i.line).text,i.ch,ae),be=xe(V(o,R.line).text,R.ch,ae),Ne=Math.min(ne,be),rt=Math.max(ne,be),Be=Math.min(i.line,R.line),Lt=Math.min(e.lastLine(),Math.max(i.line,R.line));Be<=Lt;Be++){var yt=V(o,Be).text,Ye=Ee(yt,Ne,ae);Ne==rt?$.push(new Ae(S(Be,Ye),S(Be,Ye))):yt.length>Ye&&$.push(new Ae(S(Be,Ye),S(Be,Ee(yt,rt,ae))))}$.length||$.push(new Ae(i,i)),ft(o,zt(e,s.ranges.slice(0,a).concat($),a),{origin:"*mouse",scroll:!1}),e.scrollIntoView(R)}else{var bt=l,lt=oa(e,R,r.unit),Je=bt.anchor,$e;G(lt.anchor,Je)>0?($e=lt.head,Je=zr(bt.from(),lt.anchor)):($e=lt.anchor,Je=vt(bt.to(),lt.head));var je=s.ranges.slice(0);je[a]=cu(e,new Ae(me(o,Je),$e)),ft(o,zt(e,je,a),pt)}}var m=n.wrapper.getBoundingClientRect(),L=0;function F(R){var $=++L,ae=Sr(e,R,!0,r.unit=="rectangle");if(ae)if(G(ae,g)!=0){e.curOp.focus=Te(Z(e)),b(ae);var ne=Vi(n,o);(ae.line>=ne.to||ae.linem.bottom?20:0;be&&setTimeout(et(e,function(){L==$&&(n.scroller.scrollTop+=be,F(R))}),50)}}function H(R){e.state.selectingText=!1,L=1/0,R&&(ut(R),n.input.focus()),st(n.wrapper.ownerDocument,"mousemove",B),st(n.wrapper.ownerDocument,"mouseup",X),o.history.lastSelOrigin=null}var B=et(e,function(R){R.buttons===0||!Nt(R)?H(R):F(R)}),X=et(e,H);e.state.selectingText=X,le(n.wrapper.ownerDocument,"mousemove",B),le(n.wrapper.ownerDocument,"mouseup",X)}function cu(e,t){var i=t.anchor,r=t.head,n=V(e.doc,i.line);if(G(i,r)==0&&i.sticky==r.sticky)return t;var o=Se(n);if(!o)return t;var l=or(o,i.ch,i.sticky),a=o[l];if(a.from!=i.ch&&a.to!=i.ch)return t;var s=l+(a.from==i.ch==(a.level!=1)?0:1);if(s==0||s==o.length)return t;var u;if(r.line!=i.line)u=(r.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var d=or(o,r.ch,r.sticky),g=d-l||(r.ch-i.ch)*(a.level==1?-1:1);d==s-1||d==s?u=g<0:u=g>0}var b=o[s+(u?-1:0)],m=u==(b.level==1),L=m?b.from:b.to,F=m?"after":"before";return i.ch==L&&i.sticky==F?t:new Ae(new S(i.line,L,F),r)}function la(e,t,i,r){var n,o;if(t.touches)n=t.touches[0].clientX,o=t.touches[0].clientY;else try{n=t.clientX,o=t.clientY}catch{return!1}if(n>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ut(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!St(e,i))return gt(t);o-=a.top-l.viewOffset;for(var s=0;s=n){var d=p(e.doc,o),g=e.display.gutterSpecs[s];return Re(e,i,e,d,g.className,t),gt(t)}}}function lo(e,t){return la(e,t,"gutterClick",!0)}function aa(e,t){Vt(e.display,t)||hu(e,t)||_e(e,t,"contextmenu")||pe||e.display.input.onContextMenu(t)}function hu(e,t){return St(e,"gutterContextMenu")?la(e,t,"gutterContextMenu",!1):!1}function sa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),di(e)}var ei={toString:function(){return"CodeMirror.Init"}},ua={},dn={};function du(e){var t=e.optionHandlers;function i(r,n,o,l){e.defaults[r]=n,o&&(t[r]=l?function(a,s,u){u!=ei&&o(a,s,u)}:o)}e.defineOption=i,e.Init=ei,i("value","",function(r,n){return r.setValue(n)},!0),i("mode",null,function(r,n){r.doc.modeOption=n,Zn(r)},!0),i("indentUnit",2,Zn,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(r){ki(r),di(r),mt(r)},!0),i("lineSeparator",null,function(r,n){if(r.doc.lineSep=n,!!n){var o=[],l=r.doc.first;r.doc.iter(function(s){for(var u=0;;){var d=s.text.indexOf(n,u);if(d==-1)break;u=d+n.length,o.push(S(l,d))}l++});for(var a=o.length-1;a>=0;a--)Zr(r.doc,n,o[a],S(o[a].line,o[a].ch+n.length))}}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(r,n,o){r.state.specialChars=new RegExp(n.source+(n.test(" ")?"":"| "),"g"),o!=ei&&r.refresh()}),i("specialCharPlaceholder",qa,function(r){return r.refresh()},!0),i("electricChars",!0),i("inputStyle",fe?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(r,n){return r.getInputField().spellcheck=n},!0),i("autocorrect",!1,function(r,n){return r.getInputField().autocorrect=n},!0),i("autocapitalize",!1,function(r,n){return r.getInputField().autocapitalize=n},!0),i("rtlMoveVisually",!nt),i("wholeLineUpdateBefore",!0),i("theme","default",function(r){sa(r),bi(r)},!0),i("keyMap","default",function(r,n,o){var l=cn(n),a=o!=ei&&cn(o);a&&a.detach&&a.detach(r,l),l.attach&&l.attach(r,a||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,gu,!0),i("gutters",[],function(r,n){r.display.gutterSpecs=Yn(n,r.options.lineNumbers),bi(r)},!0),i("fixedGutter",!0,function(r,n){r.display.gutters.style.left=n?Wn(r.display)+"px":"0",r.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(r){return Gr(r)},!0),i("scrollbarStyle","native",function(r){cl(r),Gr(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),i("lineNumbers",!1,function(r,n){r.display.gutterSpecs=Yn(r.options.gutters,n),bi(r)},!0),i("firstLineNumber",1,bi,!0),i("lineNumberFormatter",function(r){return r},bi,!0),i("showCursorWhenSelecting",!1,pi,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(r,n){n=="nocursor"&&(Kr(r),r.display.input.blur()),r.display.input.readOnlyChanged(n)}),i("screenReaderLabel",null,function(r,n){n=n===""?null:n,r.display.input.screenReaderLabelChanged(n)}),i("disableInput",!1,function(r,n){n||r.display.input.reset()},!0),i("dragDrop",!0,pu),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,pi,!0),i("singleCursorHeightPerLine",!0,pi,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,ki,!0),i("addModeClass",!1,ki,!0),i("pollInterval",100),i("undoDepth",200,function(r,n){return r.doc.history.undoDepth=n}),i("historyEventDelay",1250),i("viewportMargin",10,function(r){return r.refresh()},!0),i("maxHighlightLength",1e4,ki,!0),i("moveInputWithCursor",!0,function(r,n){n||r.display.input.resetPosition()}),i("tabindex",null,function(r,n){return r.display.input.getField().tabIndex=n||""}),i("autofocus",null),i("direction","ltr",function(r,n){return r.doc.setDirection(n)},!0),i("phrases",null)}function pu(e,t,i){var r=i&&i!=ei;if(!t!=!r){var n=e.display.dragFunctions,o=t?le:st;o(e.display.scroller,"dragstart",n.start),o(e.display.scroller,"dragenter",n.enter),o(e.display.scroller,"dragover",n.over),o(e.display.scroller,"dragleave",n.leave),o(e.display.scroller,"drop",n.drop)}}function gu(e){e.options.lineWrapping?(ze(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(We(e.display.wrapper,"CodeMirror-wrap"),Tn(e)),In(e),mt(e),di(e),setTimeout(function(){return Gr(e)},100)}function Ie(e,t){var i=this;if(!(this instanceof Ie))return new Ie(e,t);this.options=t=t?ge(t):{},ge(ua,t,!1);var r=t.value;typeof r=="string"?r=new xt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var n=new Ie.inputStyles[t.inputStyle](this),o=this.display=new Ms(e,r,n,t);o.wrapper.CodeMirror=this,sa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),cl(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new he,keySeq:null,specialChars:null},t.autofocus&&!fe&&o.input.focus(),T&&se<11&&setTimeout(function(){return i.display.input.reset(!0)},20),vu(this),Xs(),Dr(this),this.curOp.forceUpdate=!0,kl(this,r),t.autofocus&&!fe||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&_n(i)},20):Kr(this);for(var l in dn)dn.hasOwnProperty(l)&&dn[l](this,t[l],ei);pl(this),t.finishInit&&t.finishInit(this);for(var a=0;a20*20}le(t.scroller,"touchstart",function(s){if(!_e(e,s)&&!o(s)&&!lo(e,s)){t.input.ensurePolled(),clearTimeout(i);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-r.end<=300?r:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),le(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),le(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!Vt(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var d=e.coordsChar(t.activeTouch,"page"),g;!u.prev||l(u,u.prev)?g=new Ae(d,d):!u.prev.prev||l(u,u.prev.prev)?g=e.findWordAt(d):g=new Ae(S(d.line,0),me(e.doc,S(d.line+1,0))),e.setSelection(g.anchor,g.head),e.focus(),ut(s)}n()}),le(t.scroller,"touchcancel",n),le(t.scroller,"scroll",function(){t.scroller.clientHeight&&(vi(e,t.scroller.scrollTop),Lr(e,t.scroller.scrollLeft,!0),Re(e,"scroll",e))}),le(t.scroller,"mousewheel",function(s){return ml(e,s)}),le(t.scroller,"DOMMouseScroll",function(s){return ml(e,s)}),le(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){_e(e,s)||lr(s)},over:function(s){_e(e,s)||(Gs(e,s),lr(s))},start:function(s){return Us(e,s)},drop:et(e,Ks),leave:function(s){_e(e,s)||Ul(e)}};var a=t.input.getField();le(a,"keyup",function(s){return ra.call(e,s)}),le(a,"keydown",et(e,ta)),le(a,"keypress",et(e,ia)),le(a,"focus",function(s){return _n(e,s)}),le(a,"blur",function(s){return Kr(e,s)})}var ao=[];Ie.defineInitHook=function(e){return ao.push(e)};function Pi(e,t,i,r){var n=e.doc,o;i==null&&(i="add"),i=="smart"&&(n.mode.indent?o=si(e,t).state:i="prev");var l=e.options.tabSize,a=V(n,t),s=xe(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u=a.text.match(/^\s*/)[0],d;if(!r&&!/\S/.test(a.text))d=0,i="not";else if(i=="smart"&&(d=n.mode.indent(o,a.text.slice(u.length),a.text),d==Oe||d>150)){if(!r)return;i="prev"}i=="prev"?t>n.first?d=xe(V(n,t-1).text,null,l):d=0:i=="add"?d=s+e.options.indentUnit:i=="subtract"?d=s-e.options.indentUnit:typeof i=="number"&&(d=s+i),d=Math.max(0,d);var g="",b=0;if(e.options.indentWithTabs)for(var m=Math.floor(d/l);m;--m)b+=l,g+=" ";if(bl,s=Ft(t),u=null;if(a&&r.ranges.length>1)if(Bt&&Bt.text.join(` + left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(n),e.display.lineSpace.removeChild(l)}}}function gs(e,t,i,r){r==null&&(r=0);var n;!e.options.lineWrapping&&t==i&&(i=t.sticky=="before"?S(t.line,t.ch+1,"before"):t,t=t.ch?S(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=It(e,t),s=!i||i==t?a:It(e,i);n={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r};var u=qn(e,n),d=e.doc.scrollTop,g=e.doc.scrollLeft;if(u.scrollTop!=null&&(vi(e,u.scrollTop),Math.abs(e.doc.scrollTop-d)>1&&(l=!0)),u.scrollLeft!=null&&(Lr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-g)>1&&(l=!0)),!l)break}return n}function vs(e,t){var i=qn(e,t);i.scrollTop!=null&&vi(e,i.scrollTop),i.scrollLeft!=null&&Lr(e,i.scrollLeft)}function qn(e,t){var i=e.display,r=qr(e.display);t.top<0&&(t.top=0);var n=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,o=An(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Mn(i),s=t.topa-r;if(t.topn+o){var d=Math.min(t.top,(u?a:t.bottom)-o);d!=n&&(l.scrollTop=d)}var g=e.options.fixedGutter?0:i.gutters.offsetWidth,b=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-g,m=kr(e)-i.gutters.offsetWidth,L=t.right-t.left>m;return L&&(t.right=t.left+m),t.left<10?l.scrollLeft=0:t.leftm+b-3&&(l.scrollLeft=t.right+(L?0:10)-m),l}function jn(e,t){t!=null&&(en(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Ur(e){en(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function gi(e,t,i){(t!=null||i!=null)&&en(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function ms(e,t){en(e),e.curOp.scrollToPos=t}function en(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=Qo(e,t.from),r=Qo(e,t.to);ll(e,i,r,t.margin)}}function ll(e,t,i,r){var n=qn(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-r,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+r});gi(e,n.scrollLeft,n.scrollTop)}function vi(e,t){Math.abs(e.doc.scrollTop-t)<2||(k||Un(e,{top:t}),al(e,t,!0),k&&Un(e),yi(e,100))}function al(e,t,i){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!i)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Lr(e,t,i,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,hl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function mi(e){var t=e.display,i=t.gutters.offsetWidth,r=Math.round(e.doc.height+Mn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?i:0,docHeight:r,scrollHeight:r+jt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var Tr=function(e,t,i){this.cm=i;var r=this.vert=c("div",[c("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),n=this.horiz=c("div",[c("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=n.tabIndex=-1,e(r),e(n),le(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),le(n,"scroll",function(){n.clientWidth&&t(n.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,T&&se<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Tr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var n=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+n)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=i?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(i?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?r:0,bottom:t?r:0}},Tr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Tr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Tr.prototype.zeroWidthHack=function(){var e=De&&!ce?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new he,this.disableVert=new he},Tr.prototype.enableZeroWidthBar=function(e,t,i){e.style.visibility="";function r(){var n=e.getBoundingClientRect(),o=i=="vert"?document.elementFromPoint(n.right-1,(n.top+n.bottom)/2):document.elementFromPoint((n.right+n.left)/2,n.bottom-1);o!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},Tr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var xi=function(){};xi.prototype.update=function(){return{bottom:0,right:0}},xi.prototype.setScrollLeft=function(){},xi.prototype.setScrollTop=function(){},xi.prototype.clear=function(){};function Gr(e,t){t||(t=mi(e));var i=e.display.barWidth,r=e.display.barHeight;sl(e,t);for(var n=0;n<4&&i!=e.display.barWidth||r!=e.display.barHeight;n++)i!=e.display.barWidth&&e.options.lineWrapping&&Qi(e),sl(e,mi(e)),i=e.display.barWidth,r=e.display.barHeight}function sl(e,t){var i=e.display,r=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=r.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=r.bottom)+"px",i.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=r.bottom+"px",i.scrollbarFiller.style.width=r.right+"px"):i.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=r.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}var ul={native:Tr,null:xi};function fl(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&We(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ul[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),le(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){i=="horizontal"?Lr(e,t):vi(e,t)},e),e.display.scrollbars.addClass&&ze(e.display.wrapper,e.display.scrollbars.addClass)}var xs=0;function Dr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++xs,markArrays:null},$a(e.curOp)}function Mr(e){var t=e.curOp;t&&Ja(t,function(i){for(var r=0;r=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new tn(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ks(e){e.updatedDisplay=e.mustUpdate&&Kn(e.cm,e.update)}function ws(e){var t=e.cm,i=t.display;e.updatedDisplay&&Qi(t),e.barMeasure=mi(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ko(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+jt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-kr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function Ss(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var i=+new Date+e.options.workTime,r=si(e,t.highlightFrontier),n=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?_t(t.mode,r.state):null,s=xo(e,o,r,!0);a&&(r.state=a),o.styles=s.styles;var u=o.styleClasses,d=s.classes;d?o.styleClasses=d:u&&(o.styleClasses=null);for(var g=!l||l.length!=o.styles.length||u!=d&&(!u||!d||u.bgClass!=d.bgClass||u.textClass!=d.textClass),b=0;!g&&bi)return yi(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),n.length&&Ct(e,function(){for(var o=0;o=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&rl(e)==0)return!1;dl(e)&&(hr(e),t.dims=Hn(e));var n=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(n,t.visible.to+e.options.viewportMargin);i.viewFroml&&i.viewTo-l<20&&(l=Math.min(n,i.viewTo)),Jt&&(o=Cn(e.doc,o),l=No(e.doc,l));var a=o!=i.viewFrom||l!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;hs(e,o,l),i.viewOffset=Qt(V(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var s=rl(e);if(!a&&s==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var u=Ds(e);return s>4&&(i.lineDiv.style.display="none"),As(e,i.updateLineNumbers,t.dims),s>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Ms(u),D(i.cursorDiv),D(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,a&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,yi(e,400)),i.updateLineNumbers=null,!0}function cl(e,t){for(var i=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==kr(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+Mn(e.display)-An(e),i.top)}),t.visible=Vi(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=Vi(e.display,e.doc,i));if(!Kn(e,t))break;Qi(e);var n=mi(e);pi(e),Gr(e,n),Xn(e,n),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Un(e,t){var i=new tn(e,t);if(Kn(e,i)){Qi(e),cl(e,i);var r=mi(e);pi(e),Gr(e,r),Xn(e,r),i.finish()}}function As(e,t,i){var r=e.display,n=e.options.lineNumbers,o=r.lineDiv,l=o.firstChild;function a(L){var F=L.nextSibling;return ie&&De&&e.display.currentWheelTarget==L?L.style.display="none":L.parentNode.removeChild(L),F}for(var s=r.view,u=r.viewFrom,d=0;d-1&&(m=!1),Io(e,g,u,i)),m&&(D(g.lineNumber),g.lineNumber.appendChild(document.createTextNode(P(e.options,u)))),l=g.node.nextSibling}u+=g.size}for(;l;)l=a(l)}function Gn(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Ve(e,"gutterChanged",e)}function Xn(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+jt(e)+"px"}function hl(e){var t=e.display,i=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Wn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,n=t.gutters.offsetWidth,o=r+"px",l=0;l=105&&(n.wrapper.style.clipPath="inset(0px)"),n.wrapper.setAttribute("translate","no"),T&&se<8&&(n.gutters.style.zIndex=-1,n.scroller.style.paddingRight=0),!ie&&!(k&&fe)&&(n.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(n.wrapper):e(n.wrapper)),n.viewFrom=n.viewTo=t.first,n.reportedViewFrom=n.reportedViewTo=t.first,n.view=[],n.renderedView=null,n.externalMeasured=null,n.viewOffset=0,n.lastWrapHeight=n.lastWrapWidth=0,n.updateLineNumbers=null,n.nativeBarWidth=n.barHeight=n.barWidth=0,n.scrollbarsClipped=!1,n.lineNumWidth=n.lineNumInnerWidth=n.lineNumChars=null,n.alignWidgets=!1,n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.maxLine=null,n.maxLineLength=0,n.maxLineChanged=!1,n.wheelDX=n.wheelDY=n.wheelStartX=n.wheelStartY=null,n.shift=!1,n.selForContextMenu=null,n.activeTouch=null,n.gutterSpecs=Yn(r.gutters,r.lineNumbers),pl(n),i.init(n)}var rn=0,er=null;T?er=-.53:k?er=15:ee?er=-.7:K&&(er=-1/3);function gl(e){var t=e.wheelDeltaX,i=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),i==null&&e.detail&&e.axis==e.VERTICAL_AXIS?i=e.detail:i==null&&(i=e.wheelDelta),{x:t,y:i}}function Es(e){var t=gl(e);return t.x*=er,t.y*=er,t}function vl(e,t){ee&&j==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var i=gl(t),r=i.x,n=i.y,o=er;t.deltaMode===0&&(r=t.deltaX,n=t.deltaY,o=1);var l=e.display,a=l.scroller,s=a.scrollWidth>a.clientWidth,u=a.scrollHeight>a.clientHeight;if(r&&s||n&&u){if(n&&De&&ie){e:for(var d=t.target,g=l.view;d!=a;d=d.parentNode)for(var b=0;b=0&&G(e,r.to())<=0)return i}return-1};var Ae=function(e,t){this.anchor=e,this.head=t};Ae.prototype.from=function(){return zr(this.anchor,this.head)},Ae.prototype.to=function(){return vt(this.anchor,this.head)},Ae.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function zt(e,t,i){var r=e&&e.options.selectionsMayTouch,n=t[i];t.sort(function(b,m){return G(b.from(),m.from())}),i=J(t,n);for(var o=1;o0:s>=0){var u=zr(a.from(),l.from()),d=vt(a.to(),l.to()),g=a.empty()?l.from()==l.head:a.from()==a.head;o<=i&&--i,t.splice(--o,2,new Ae(g?d:u,g?u:d))}}return new Mt(t,i)}function dr(e,t){return new Mt([new Ae(e,t||e)],0)}function pr(e){return e.text?S(e.from.line+e.text.length-1,ye(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function ml(e,t){if(G(e,t.from)<0)return e;if(G(e,t.to)<=0)return pr(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=pr(t).ch-t.to.ch),S(i,r)}function $n(e,t){for(var i=[],r=0;r1&&e.remove(a.line+1,L-1),e.insert(a.line+1,B)}Ve(e,"change",e,t)}function gr(e,t,i){function r(n,o,l){if(n.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ye(e.done)}function Sl(e,t,i,r){var n=e.history;n.undone.length=0;var o=+new Date,l,a;if((n.lastOp==r||n.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&n.lastModTime>o-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=Ps(n,n.lastOp==r)))a=ye(l.changes),G(t.from,t.to)==0&&G(t.from,a.to)==0?a.to=pr(t):l.changes.push(Qn(e,t));else{var s=ye(n.done);for((!s||!s.ranges)&&on(e.sel,n.done),l={changes:[Qn(e,t)],generation:n.generation},n.done.push(l);n.done.length>n.undoDepth;)n.done.shift(),n.done[0].ranges||n.done.shift()}n.done.push(i),n.generation=++n.maxGeneration,n.lastModTime=n.lastSelTime=o,n.lastOp=n.lastSelOp=r,n.lastOrigin=n.lastSelOrigin=t.origin,a||Re(e,"historyAdded")}function Hs(e,t,i,r){var n=t.charAt(0);return n=="*"||n=="+"&&i.ranges.length==r.ranges.length&&i.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Ws(e,t,i,r){var n=e.history,o=r&&r.origin;i==n.lastSelOp||o&&n.lastSelOrigin==o&&(n.lastModTime==n.lastSelTime&&n.lastOrigin==o||Hs(e,o,ye(n.done),t))?n.done[n.done.length-1]=t:on(t,n.done),n.lastSelTime=+new Date,n.lastSelOrigin=o,n.lastSelOp=i,r&&r.clearRedo!==!1&&wl(n.undone)}function on(e,t){var i=ye(t);i&&i.ranges&&i.equals(e)||t.push(e)}function Cl(e,t,i,r){var n=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,r),function(l){l.markedSpans&&((n||(n=t["spans_"+e.id]={}))[o]=l.markedSpans),++o})}function Is(e){if(!e)return null;for(var t,i=0;i-1&&(ye(a)[g]=u[g],delete u[g])}}return r}function Vn(e,t,i,r){if(r){var n=e.anchor;if(i){var o=G(t,n)<0;o!=G(i,n)<0?(n=t,t=i):o!=G(t,i)<0&&(t=i)}return new Ae(n,t)}else return new Ae(i||t,t)}function ln(e,t,i,r,n){n==null&&(n=e.cm&&(e.cm.display.shift||e.extend)),ft(e,new Mt([Vn(e.sel.primary(),t,i,n)],0),r)}function Tl(e,t,i){for(var r=[],n=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:a.to>t.ch))){if(n&&(Re(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--l;continue}else break;if(!s.atomic)continue;if(i){var g=s.find(r<0?1:-1),b=void 0;if((r<0?d:u)&&(g=Nl(e,g,-r,g&&g.line==t.line?o:null)),g&&g.line==t.line&&(b=G(g,i))&&(r<0?b<0:b>0))return Yr(e,g,t,r,n)}var m=s.find(r<0?-1:1);return(r<0?u:d)&&(m=Nl(e,m,r,m.line==t.line?o:null)),m?Yr(e,m,t,r,n):null}}return t}function sn(e,t,i,r,n){var o=r||1,l=Yr(e,t,i,o,n)||!n&&Yr(e,t,i,o,!0)||Yr(e,t,i,-o,n)||!n&&Yr(e,t,i,-o,!0);return l||(e.cantEdit=!0,S(e.first,0))}function Nl(e,t,i,r){return i<0&&t.ch==0?t.line>e.first?me(e,S(t.line-1)):null:i>0&&t.ch==(r||V(e,t.line)).text.length?t.line=0;--n)Hl(e,{from:r[n].from,to:r[n].to,text:n?[""]:t.text,origin:t.origin});else Hl(e,t)}}function Hl(e,t){if(!(t.text.length==1&&t.text[0]==""&&G(t.from,t.to)==0)){var i=$n(e,t);Sl(e,t,i,e.cm?e.cm.curOp.id:NaN),wi(e,t,i,wn(e,t));var r=[];gr(e,function(n,o){!o&&J(r,n.history)==-1&&(Bl(n.history,t),r.push(n.history)),wi(n,t,null,wn(n,t))})}}function un(e,t,i){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!i)){for(var n=e.history,o,l=e.sel,a=t=="undo"?n.done:n.undone,s=t=="undo"?n.undone:n.done,u=0;u=0;--m){var L=b(m);if(L)return L.v}}}}function Wl(e,t){if(t!=0&&(e.first+=t,e.sel=new Mt(Ce(e.sel.ranges,function(n){return new Ae(S(n.anchor.line+t,n.anchor.ch),S(n.head.line+t,n.head.ch))}),e.sel.primIndex),e.cm)){mt(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,r=i.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:S(o,V(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Zt(e,t.from,t.to),i||(i=$n(e,t)),e.cm?Rs(e.cm,t,r):Jn(e,t,r),an(e,i,Ze),e.cantEdit&&sn(e,S(e.firstLine(),0))&&(e.cantEdit=!1)}}function Rs(e,t,i){var r=e.doc,n=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=f(Wt(V(r,o.line))),r.iter(s,l.line+1,function(m){if(m==n.maxLine)return a=!0,!0})),r.sel.contains(t.from,t.to)>-1&&At(e),Jn(r,t,i,tl(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(m){var L=Ui(m);L>n.maxLineLength&&(n.maxLine=m,n.maxLineLength=L,n.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),Aa(r,o.line),yi(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?mt(e):o.line==l.line&&t.text.length==1&&!yl(e.doc,t)?cr(e,o.line,"text"):mt(e,o.line,l.line+1,u);var d=St(e,"changes"),g=St(e,"change");if(g||d){var b={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};g&&Ve(e,"change",e,b),d&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(b)}e.display.selForContextMenu=null}function Zr(e,t,i,r,n){var o;r||(r=i),G(r,i)<0&&(o=[r,i],i=o[0],r=o[1]),typeof t=="string"&&(t=e.splitLines(t)),$r(e,{from:i,to:r,text:t,origin:n})}function Il(e,t,i,r){i1||!(this.children[0]instanceof Ci))){var a=[];this.collapse(a),this.children=[new Ci(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=n.lines.length%25+25,a=l;a10);e.parent.maybeSpill()}},iterN:function(e,t,i){for(var r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=d,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&mt(e,r,n+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Fl(e.doc)),e&&Ve(e,"markerCleared",e,this,r,n),t&&Mr(e),this.parent&&this.parent.clear()}},vr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var i,r,n=0;n0||l==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=U("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Eo(e,t.line,t,i,o)||t.line!=i.line&&Eo(e,i.line,t,i,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ea()}o.addToHistory&&Sl(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var a=t.line,s=e.cm,u;if(e.iter(a,i.line+1,function(g){s&&o.collapsed&&!s.options.lineWrapping&&Wt(g)==s.display.maxLine&&(u=!0),o.collapsed&&a!=t.line&&Dt(g,0),Oa(g,new _i(o,a==t.line?t.ch:null,a==i.line?i.ch:null),e.cm&&e.cm.curOp),++a}),o.collapsed&&e.iter(t.line,i.line+1,function(g){fr(e,g)&&Dt(g,0)}),o.clearOnEnter&&le(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Fa(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++_l,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)mt(s,t.line,i.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var d=t.line;d<=i.line;d++)cr(s,d,"text");o.atomic&&Fl(s.doc),Ve(s,"markerAdded",s,o)}return o}var Di=function(e,t){this.markers=e,this.primary=t;for(var i=0;i=0;s--)$r(this,r[s]);a?Ml(this,a):this.cm&&Ur(this.cm)}),undo:tt(function(){un(this,"undo")}),redo:tt(function(){un(this,"redo")}),undoSelection:tt(function(){un(this,"undo",!0)}),redoSelection:tt(function(){un(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,r=0;r=e.ch)&&t.push(n.marker.parent||n.marker)}return t},findMarks:function(e,t,i){e=me(this,e),t=me(this,t);var r=[],n=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var a=0;a=s.to||s.from==null&&n!=e.line||s.from!=null&&n==t.line&&s.from>=t.ch)&&(!i||i(s.marker))&&r.push(s.marker.parent||s.marker)}++n}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var r=0;re)return t=e,!0;e-=o,++i}),me(this,S(i,t))},indexFromPos:function(e){e=me(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var d=e.dataTransfer.getData("Text");if(d){var g;if(t.state.draggingText&&!t.state.draggingText.copy&&(g=t.listSelections()),an(t.doc,dr(i,i)),g)for(var b=0;b=0;a--)Zr(e.doc,"",r[a].from,r[a].to,"+delete");Ur(e)})}function to(e,t,i){var r=ir(e.text,t+i,i);return r<0||r>e.text.length?null:r}function ro(e,t,i){var r=to(e,t.ch,i);return r==null?null:new S(t.line,r,i<0?"after":"before")}function io(e,t,i,r,n){if(e){t.doc.direction=="rtl"&&(n=-n);var o=Se(i,t.doc.direction);if(o){var l=n<0?ye(o):o[0],a=n<0==(l.level==1),s=a?"after":"before",u;if(l.level>0||t.doc.direction=="rtl"){var d=_r(t,i);u=n<0?i.text.length-1:0;var g=Kt(t,d,u).top;u=Rt(function(b){return Kt(t,d,b).top==g},n<0==(l.level==1)?l.from:l.to-1,u),s=="before"&&(u=to(i,u,1))}else u=n<0?l.to:l.from;return new S(r,u,s)}}return new S(r,n<0?i.text.length:0,n<0?"before":"after")}function eu(e,t,i,r){var n=Se(t,e.doc.direction);if(!n)return ro(t,i,r);i.ch>=t.text.length?(i.ch=t.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var o=or(n,i.ch,i.sticky),l=n[o];if(e.doc.direction=="ltr"&&l.level%2==0&&(r>0?l.to>i.ch:l.from=l.from&&b>=d.begin)){var m=g?"before":"after";return new S(i.line,b,m)}}var L=function(B,X,R){for(var $=function(Ne,rt){return rt?new S(i.line,a(Ne,1),"before"):new S(i.line,Ne,"after")};B>=0&&B0==(ae.level!=1),be=ne?R.begin:a(R.end,-1);if(ae.from<=be&&be0?d.end:a(d.begin,-1);return H!=null&&!(r>0&&H==t.text.length)&&(F=L(r>0?0:n.length-1,r,u(H)),F)?F:null}var Fi={selectAll:Ol,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ze)},killLine:function(e){return Vr(e,function(t){if(t.empty()){var i=V(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line0)n=new S(n.line,n.ch+1),e.replaceRange(o.charAt(n.ch-1)+o.charAt(n.ch-2),S(n.line,n.ch-2),n,"+transpose");else if(n.line>e.doc.first){var l=V(e.doc,n.line-1).text;l&&(n=new S(n.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),S(n.line-1,l.length-1),n,"+transpose"))}}i.push(new Ae(n,n))}e.setSelections(i)})},newlineAndIndent:function(e){return Ct(e,function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].head,"+input");t=e.listSelections();for(var r=0;re&&G(t,this.pos)==0&&i==this.button};var Ni,Oi;function au(e,t){var i=+new Date;return Oi&&Oi.compare(i,e,t)?(Ni=Oi=null,"triple"):Ni&&Ni.compare(i,e,t)?(Oi=new oo(i,e,t),Ni=null,"double"):(Ni=new oo(i,e,t),Oi=null,"single")}function ia(e){var t=this,i=t.display;if(!(_e(t,e)||i.activeTouch&&i.input.supportsTouch())){if(i.input.ensurePolled(),i.shift=e.shiftKey,Vt(i,e)){ie||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(!lo(t,e)){var r=Sr(t,e),n=Nt(e),o=r?au(r,n):"single";z(t).focus(),n==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&su(t,n,r,o,e))&&(n==1?r?fu(t,r,o,e):ni(e)==i.scroller&&ut(e):n==2?(r&&ln(t.doc,r),setTimeout(function(){return i.input.focus()},20)):n==3&&(pe?t.display.input.onContextMenu(e):Rn(t)))}}}function su(e,t,i,r,n){var o="Click";return r=="double"?o="Double"+o:r=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,Ei(e,Yl(o,n),n,function(l){if(typeof l=="string"&&(l=Fi[l]),!l)return!1;var a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),a=l(e,i)!=Oe}finally{e.state.suppressEdits=!1}return a})}function uu(e,t,i){var r=e.getOption("configureMouse"),n=r?r(e,t,i):{};if(n.unit==null){var o=Ge?i.shiftKey&&i.metaKey:i.altKey;n.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(n.extend==null||e.doc.extend)&&(n.extend=e.doc.extend||i.shiftKey),n.addNew==null&&(n.addNew=De?i.metaKey:i.ctrlKey),n.moveOnDrag==null&&(n.moveOnDrag=!(De?i.altKey:i.ctrlKey)),n}function fu(e,t,i,r){T?setTimeout(re(nl,e),0):e.curOp.focus=Te(Z(e));var n=uu(e,i,r),o=e.doc.sel,l;e.options.dragDrop&&xn&&!e.isReadOnly()&&i=="single"&&(l=o.contains(t))>-1&&(G((l=o.ranges[l]).from(),t)<0||t.xRel>0)&&(G(l.to(),t)>0||t.xRel<0)?cu(e,r,t,n):hu(e,r,t,n)}function cu(e,t,i,r){var n=e.display,o=!1,l=et(e,function(u){ie&&(n.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Rn(e)),st(n.wrapper.ownerDocument,"mouseup",l),st(n.wrapper.ownerDocument,"mousemove",a),st(n.scroller,"dragstart",s),st(n.scroller,"drop",l),o||(ut(u),r.addNew||ln(e.doc,i,null,null,r.extend),ie&&!K||T&&se==9?setTimeout(function(){n.wrapper.ownerDocument.body.focus({preventScroll:!0}),n.input.focus()},20):n.input.focus())}),a=function(u){o=o||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},s=function(){return o=!0};ie&&(n.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,le(n.wrapper.ownerDocument,"mouseup",l),le(n.wrapper.ownerDocument,"mousemove",a),le(n.scroller,"dragstart",s),le(n.scroller,"drop",l),e.state.delayingBlurEvent=!0,setTimeout(function(){return n.input.focus()},20),n.scroller.dragDrop&&n.scroller.dragDrop()}function na(e,t,i){if(i=="char")return new Ae(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new Ae(S(t.line,0),me(e.doc,S(t.line+1,0)));var r=i(e,t);return new Ae(r.from,r.to)}function hu(e,t,i,r){T&&Rn(e);var n=e.display,o=e.doc;ut(t);var l,a,s=o.sel,u=s.ranges;if(r.addNew&&!r.extend?(a=o.sel.contains(i),a>-1?l=u[a]:l=new Ae(i,i)):(l=o.sel.primary(),a=o.sel.primIndex),r.unit=="rectangle")r.addNew||(l=new Ae(i,i)),i=Sr(e,t,!0,!0),a=-1;else{var d=na(e,i,r.unit);r.extend?l=Vn(l,d.anchor,d.head,r.extend):l=d}r.addNew?a==-1?(a=u.length,ft(o,zt(e,u.concat([l]),a),{scroll:!1,origin:"*mouse"})):u.length>1&&u[a].empty()&&r.unit=="char"&&!r.extend?(ft(o,zt(e,u.slice(0,a).concat(u.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):eo(o,a,l,pt):(a=0,ft(o,new Mt([l],0),pt),s=o.sel);var g=i;function b(R){if(G(g,R)!=0)if(g=R,r.unit=="rectangle"){for(var $=[],ae=e.options.tabSize,ne=xe(V(o,i.line).text,i.ch,ae),be=xe(V(o,R.line).text,R.ch,ae),Ne=Math.min(ne,be),rt=Math.max(ne,be),Be=Math.min(i.line,R.line),Lt=Math.min(e.lastLine(),Math.max(i.line,R.line));Be<=Lt;Be++){var yt=V(o,Be).text,Ye=Ee(yt,Ne,ae);Ne==rt?$.push(new Ae(S(Be,Ye),S(Be,Ye))):yt.length>Ye&&$.push(new Ae(S(Be,Ye),S(Be,Ee(yt,rt,ae))))}$.length||$.push(new Ae(i,i)),ft(o,zt(e,s.ranges.slice(0,a).concat($),a),{origin:"*mouse",scroll:!1}),e.scrollIntoView(R)}else{var bt=l,lt=na(e,R,r.unit),Je=bt.anchor,$e;G(lt.anchor,Je)>0?($e=lt.head,Je=zr(bt.from(),lt.anchor)):($e=lt.anchor,Je=vt(bt.to(),lt.head));var je=s.ranges.slice(0);je[a]=du(e,new Ae(me(o,Je),$e)),ft(o,zt(e,je,a),pt)}}var m=n.wrapper.getBoundingClientRect(),L=0;function F(R){var $=++L,ae=Sr(e,R,!0,r.unit=="rectangle");if(ae)if(G(ae,g)!=0){e.curOp.focus=Te(Z(e)),b(ae);var ne=Vi(n,o);(ae.line>=ne.to||ae.linem.bottom?20:0;be&&setTimeout(et(e,function(){L==$&&(n.scroller.scrollTop+=be,F(R))}),50)}}function H(R){e.state.selectingText=!1,L=1/0,R&&(ut(R),n.input.focus()),st(n.wrapper.ownerDocument,"mousemove",B),st(n.wrapper.ownerDocument,"mouseup",X),o.history.lastSelOrigin=null}var B=et(e,function(R){R.buttons===0||!Nt(R)?H(R):F(R)}),X=et(e,H);e.state.selectingText=X,le(n.wrapper.ownerDocument,"mousemove",B),le(n.wrapper.ownerDocument,"mouseup",X)}function du(e,t){var i=t.anchor,r=t.head,n=V(e.doc,i.line);if(G(i,r)==0&&i.sticky==r.sticky)return t;var o=Se(n);if(!o)return t;var l=or(o,i.ch,i.sticky),a=o[l];if(a.from!=i.ch&&a.to!=i.ch)return t;var s=l+(a.from==i.ch==(a.level!=1)?0:1);if(s==0||s==o.length)return t;var u;if(r.line!=i.line)u=(r.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var d=or(o,r.ch,r.sticky),g=d-l||(r.ch-i.ch)*(a.level==1?-1:1);d==s-1||d==s?u=g<0:u=g>0}var b=o[s+(u?-1:0)],m=u==(b.level==1),L=m?b.from:b.to,F=m?"after":"before";return i.ch==L&&i.sticky==F?t:new Ae(new S(i.line,L,F),r)}function oa(e,t,i,r){var n,o;if(t.touches)n=t.touches[0].clientX,o=t.touches[0].clientY;else try{n=t.clientX,o=t.clientY}catch{return!1}if(n>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ut(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!St(e,i))return gt(t);o-=a.top-l.viewOffset;for(var s=0;s=n){var d=p(e.doc,o),g=e.display.gutterSpecs[s];return Re(e,i,e,d,g.className,t),gt(t)}}}function lo(e,t){return oa(e,t,"gutterClick",!0)}function la(e,t){Vt(e.display,t)||pu(e,t)||_e(e,t,"contextmenu")||pe||e.display.input.onContextMenu(t)}function pu(e,t){return St(e,"gutterContextMenu")?oa(e,t,"gutterContextMenu",!1):!1}function aa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),di(e)}var ei={toString:function(){return"CodeMirror.Init"}},sa={},dn={};function gu(e){var t=e.optionHandlers;function i(r,n,o,l){e.defaults[r]=n,o&&(t[r]=l?function(a,s,u){u!=ei&&o(a,s,u)}:o)}e.defineOption=i,e.Init=ei,i("value","",function(r,n){return r.setValue(n)},!0),i("mode",null,function(r,n){r.doc.modeOption=n,Zn(r)},!0),i("indentUnit",2,Zn,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(r){ki(r),di(r),mt(r)},!0),i("lineSeparator",null,function(r,n){if(r.doc.lineSep=n,!!n){var o=[],l=r.doc.first;r.doc.iter(function(s){for(var u=0;;){var d=s.text.indexOf(n,u);if(d==-1)break;u=d+n.length,o.push(S(l,d))}l++});for(var a=o.length-1;a>=0;a--)Zr(r.doc,n,o[a],S(o[a].line,o[a].ch+n.length))}}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(r,n,o){r.state.specialChars=new RegExp(n.source+(n.test(" ")?"":"| "),"g"),o!=ei&&r.refresh()}),i("specialCharPlaceholder",Ka,function(r){return r.refresh()},!0),i("electricChars",!0),i("inputStyle",fe?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(r,n){return r.getInputField().spellcheck=n},!0),i("autocorrect",!1,function(r,n){return r.getInputField().autocorrect=n},!0),i("autocapitalize",!1,function(r,n){return r.getInputField().autocapitalize=n},!0),i("rtlMoveVisually",!nt),i("wholeLineUpdateBefore",!0),i("theme","default",function(r){aa(r),bi(r)},!0),i("keyMap","default",function(r,n,o){var l=cn(n),a=o!=ei&&cn(o);a&&a.detach&&a.detach(r,l),l.attach&&l.attach(r,a||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,mu,!0),i("gutters",[],function(r,n){r.display.gutterSpecs=Yn(n,r.options.lineNumbers),bi(r)},!0),i("fixedGutter",!0,function(r,n){r.display.gutters.style.left=n?Wn(r.display)+"px":"0",r.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(r){return Gr(r)},!0),i("scrollbarStyle","native",function(r){fl(r),Gr(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),i("lineNumbers",!1,function(r,n){r.display.gutterSpecs=Yn(r.options.gutters,n),bi(r)},!0),i("firstLineNumber",1,bi,!0),i("lineNumberFormatter",function(r){return r},bi,!0),i("showCursorWhenSelecting",!1,pi,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(r,n){n=="nocursor"&&(Kr(r),r.display.input.blur()),r.display.input.readOnlyChanged(n)}),i("screenReaderLabel",null,function(r,n){n=n===""?null:n,r.display.input.screenReaderLabelChanged(n)}),i("disableInput",!1,function(r,n){n||r.display.input.reset()},!0),i("dragDrop",!0,vu),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,pi,!0),i("singleCursorHeightPerLine",!0,pi,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,ki,!0),i("addModeClass",!1,ki,!0),i("pollInterval",100),i("undoDepth",200,function(r,n){return r.doc.history.undoDepth=n}),i("historyEventDelay",1250),i("viewportMargin",10,function(r){return r.refresh()},!0),i("maxHighlightLength",1e4,ki,!0),i("moveInputWithCursor",!0,function(r,n){n||r.display.input.resetPosition()}),i("tabindex",null,function(r,n){return r.display.input.getField().tabIndex=n||""}),i("autofocus",null),i("direction","ltr",function(r,n){return r.doc.setDirection(n)},!0),i("phrases",null)}function vu(e,t,i){var r=i&&i!=ei;if(!t!=!r){var n=e.display.dragFunctions,o=t?le:st;o(e.display.scroller,"dragstart",n.start),o(e.display.scroller,"dragenter",n.enter),o(e.display.scroller,"dragover",n.over),o(e.display.scroller,"dragleave",n.leave),o(e.display.scroller,"drop",n.drop)}}function mu(e){e.options.lineWrapping?(ze(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(We(e.display.wrapper,"CodeMirror-wrap"),Tn(e)),In(e),mt(e),di(e),setTimeout(function(){return Gr(e)},100)}function Ie(e,t){var i=this;if(!(this instanceof Ie))return new Ie(e,t);this.options=t=t?ge(t):{},ge(sa,t,!1);var r=t.value;typeof r=="string"?r=new xt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var n=new Ie.inputStyles[t.inputStyle](this),o=this.display=new Fs(e,r,n,t);o.wrapper.CodeMirror=this,aa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),fl(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new he,keySeq:null,specialChars:null},t.autofocus&&!fe&&o.input.focus(),T&&se<11&&setTimeout(function(){return i.display.input.reset(!0)},20),xu(this),$s(),Dr(this),this.curOp.forceUpdate=!0,bl(this,r),t.autofocus&&!fe||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&_n(i)},20):Kr(this);for(var l in dn)dn.hasOwnProperty(l)&&dn[l](this,t[l],ei);dl(this),t.finishInit&&t.finishInit(this);for(var a=0;a20*20}le(t.scroller,"touchstart",function(s){if(!_e(e,s)&&!o(s)&&!lo(e,s)){t.input.ensurePolled(),clearTimeout(i);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-r.end<=300?r:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),le(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),le(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!Vt(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var d=e.coordsChar(t.activeTouch,"page"),g;!u.prev||l(u,u.prev)?g=new Ae(d,d):!u.prev.prev||l(u,u.prev.prev)?g=e.findWordAt(d):g=new Ae(S(d.line,0),me(e.doc,S(d.line+1,0))),e.setSelection(g.anchor,g.head),e.focus(),ut(s)}n()}),le(t.scroller,"touchcancel",n),le(t.scroller,"scroll",function(){t.scroller.clientHeight&&(vi(e,t.scroller.scrollTop),Lr(e,t.scroller.scrollLeft,!0),Re(e,"scroll",e))}),le(t.scroller,"mousewheel",function(s){return vl(e,s)}),le(t.scroller,"DOMMouseScroll",function(s){return vl(e,s)}),le(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){_e(e,s)||lr(s)},over:function(s){_e(e,s)||(Ys(e,s),lr(s))},start:function(s){return Xs(e,s)},drop:et(e,Gs),leave:function(s){_e(e,s)||Kl(e)}};var a=t.input.getField();le(a,"keyup",function(s){return ta.call(e,s)}),le(a,"keydown",et(e,ea)),le(a,"keypress",et(e,ra)),le(a,"focus",function(s){return _n(e,s)}),le(a,"blur",function(s){return Kr(e,s)})}var ao=[];Ie.defineInitHook=function(e){return ao.push(e)};function Pi(e,t,i,r){var n=e.doc,o;i==null&&(i="add"),i=="smart"&&(n.mode.indent?o=si(e,t).state:i="prev");var l=e.options.tabSize,a=V(n,t),s=xe(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u=a.text.match(/^\s*/)[0],d;if(!r&&!/\S/.test(a.text))d=0,i="not";else if(i=="smart"&&(d=n.mode.indent(o,a.text.slice(u.length),a.text),d==Oe||d>150)){if(!r)return;i="prev"}i=="prev"?t>n.first?d=xe(V(n,t-1).text,null,l):d=0:i=="add"?d=s+e.options.indentUnit:i=="subtract"?d=s-e.options.indentUnit:typeof i=="number"&&(d=s+i),d=Math.max(0,d);var g="",b=0;if(e.options.indentWithTabs)for(var m=Math.floor(d/l);m;--m)b+=l,g+=" ";if(bl,s=Ft(t),u=null;if(a&&r.ranges.length>1)if(Bt&&Bt.text.join(` `)==t){if(r.ranges.length%Bt.text.length==0){u=[];for(var d=0;d=0;b--){var m=r.ranges[b],L=m.from(),F=m.to();m.empty()&&(i&&i>0?L=S(L.line,L.ch-i):e.state.overwrite&&!a?F=S(F.line,Math.min(V(o,F.line).text.length,F.ch+ye(s).length)):a&&Bt&&Bt.lineWise&&Bt.text.join(` `)==s.join(` -`)&&(L=F=S(L.line,0)));var H={from:L,to:F,text:u?u[b%u.length]:s,origin:n||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};$r(e.doc,H),Ve(e,"inputRead",e,H)}t&&!a&&ca(e,t),Ur(e),e.curOp.updateInput<2&&(e.curOp.updateInput=g),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function fa(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Ct(t,function(){return so(t,i,0,null,"paste")}),!0}function ca(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var i=e.doc.sel,r=i.ranges.length-1;r>=0;r--){var n=i.ranges[r];if(!(n.head.ch>100||r&&i.ranges[r-1].head.line==n.head.line)){var o=e.getModeAt(n.head),l=!1;if(o.electricChars){for(var a=0;a-1){l=Pi(e,n.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(V(e.doc,n.head.line).text.slice(0,n.head.ch))&&(l=Pi(e,n.head.line,"smart"));l&&Ve(e,"electricInput",e,n.head.line)}}}function ha(e){for(var t=[],i=[],r=0;ro&&(Pi(this,a.head.line,r,!0),o=a.head.line,l==this.doc.sel.primIndex&&Ur(this));else{var s=a.from(),u=a.to(),d=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var g=d;g0&&eo(this.doc,l,new Ae(s,b[l].to()),Ze)}}}),getTokenAt:function(r,n){return So(this,r,n)},getLineTokens:function(r,n){return So(this,S(r),n,!0)},getTokenTypeAt:function(r){r=me(this.doc,r);var n=bo(this,V(this.doc,r.line)),o=0,l=(n.length-1)/2,a=r.ch,s;if(a==0)s=n[2];else for(;;){var u=o+l>>1;if((u?n[u*2-1]:0)>=a)l=u;else if(n[u*2+1]s&&(r=s,l=!0),a=V(this.doc,r)}else a=r;return Yi(this,a,{top:0,left:0},n||"page",o||l).top+(l?this.doc.height-Qt(a):0)},defaultTextHeight:function(){return qr(this.display)},defaultCharWidth:function(){return jr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,n,o,l,a){var s=this.display;r=It(this,me(this.doc,r));var u=r.bottom,d=r.left;if(n.style.position="absolute",n.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(n),s.sizer.appendChild(n),l=="over")u=r.top;else if(l=="above"||l=="near"){var g=Math.max(s.wrapper.clientHeight,this.doc.height),b=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(l=="above"||r.bottom+n.offsetHeight>g)&&r.top>n.offsetHeight?u=r.top-n.offsetHeight:r.bottom+n.offsetHeight<=g&&(u=r.bottom),d+n.offsetWidth>b&&(d=b-n.offsetWidth)}n.style.top=u+"px",n.style.left=n.style.right="",a=="right"?(d=s.sizer.clientWidth-n.offsetWidth,n.style.right="0px"):(a=="left"?d=0:a=="middle"&&(d=(s.sizer.clientWidth-n.offsetWidth)/2),n.style.left=d+"px"),o&&ps(this,{left:d,top:u,right:d+n.offsetWidth,bottom:u+n.offsetHeight})},triggerOnKeyDown:ht(ta),triggerOnKeyPress:ht(ia),triggerOnKeyUp:ra,triggerOnMouseDown:ht(na),execCommand:function(r){if(Fi.hasOwnProperty(r))return Fi[r].call(null,this)},triggerElectric:ht(function(r){ca(this,r)}),findPosH:function(r,n,o,l){var a=1;n<0&&(a=-1,n=-n);for(var s=me(this.doc,r),u=0;u0&&d(o.charAt(l-1));)--l;for(;a.5||this.options.lineWrapping)&&In(this),Re(this,"refresh",this)}),swapDoc:ht(function(r){var n=this.doc;return n.cm=null,this.state.selectingText&&this.state.selectingText(),kl(this,r),di(this),this.display.input.reset(),gi(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,Ve(this,"swapDoc",this,n),n}),phrase:function(r){var n=this.options.phrases;return n&&Object.prototype.hasOwnProperty.call(n,r)?n[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Et(e),e.registerHelper=function(r,n,o){i.hasOwnProperty(r)||(i[r]=e[r]={_global:[]}),i[r][n]=o},e.registerGlobalHelper=function(r,n,o,l){e.registerHelper(r,n,l),i[r]._global.push({pred:o,val:l})}}function fo(e,t,i,r,n){var o=t,l=i,a=V(e,t.line),s=n&&e.direction=="rtl"?-i:i;function u(){var X=t.line+s;return X=e.first+e.size?!1:(t=new S(X,t.ch,t.sticky),a=V(e,X))}function d(X){var R;if(r=="codepoint"){var $=a.text.charCodeAt(t.ch+(i>0?0:-1));if(isNaN($))R=null;else{var ae=i>0?$>=55296&&$<56320:$>=56320&&$<57343;R=new S(t.line,Math.max(0,Math.min(a.text.length,t.ch+i*(ae?2:1))),-i)}}else n?R=Qs(e.cm,a,t,i):R=ro(a,t,i);if(R==null)if(!X&&u())t=io(n,e.cm,a,t.line,s);else return!1;else t=R;return!0}if(r=="char"||r=="codepoint")d();else if(r=="column")d(!0);else if(r=="word"||r=="group")for(var g=null,b=r=="group",m=e.cm&&e.cm.getHelper(t,"wordChars"),L=!0;!(i<0&&!d(!L));L=!1){var F=a.text.charAt(t.ch)||` +`)&&(L=F=S(L.line,0)));var H={from:L,to:F,text:u?u[b%u.length]:s,origin:n||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};$r(e.doc,H),Ve(e,"inputRead",e,H)}t&&!a&&fa(e,t),Ur(e),e.curOp.updateInput<2&&(e.curOp.updateInput=g),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function ua(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Ct(t,function(){return so(t,i,0,null,"paste")}),!0}function fa(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var i=e.doc.sel,r=i.ranges.length-1;r>=0;r--){var n=i.ranges[r];if(!(n.head.ch>100||r&&i.ranges[r-1].head.line==n.head.line)){var o=e.getModeAt(n.head),l=!1;if(o.electricChars){for(var a=0;a-1){l=Pi(e,n.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(V(e.doc,n.head.line).text.slice(0,n.head.ch))&&(l=Pi(e,n.head.line,"smart"));l&&Ve(e,"electricInput",e,n.head.line)}}}function ca(e){for(var t=[],i=[],r=0;ro&&(Pi(this,a.head.line,r,!0),o=a.head.line,l==this.doc.sel.primIndex&&Ur(this));else{var s=a.from(),u=a.to(),d=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var g=d;g0&&eo(this.doc,l,new Ae(s,b[l].to()),Ze)}}}),getTokenAt:function(r,n){return wo(this,r,n)},getLineTokens:function(r,n){return wo(this,S(r),n,!0)},getTokenTypeAt:function(r){r=me(this.doc,r);var n=yo(this,V(this.doc,r.line)),o=0,l=(n.length-1)/2,a=r.ch,s;if(a==0)s=n[2];else for(;;){var u=o+l>>1;if((u?n[u*2-1]:0)>=a)l=u;else if(n[u*2+1]s&&(r=s,l=!0),a=V(this.doc,r)}else a=r;return Yi(this,a,{top:0,left:0},n||"page",o||l).top+(l?this.doc.height-Qt(a):0)},defaultTextHeight:function(){return qr(this.display)},defaultCharWidth:function(){return jr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,n,o,l,a){var s=this.display;r=It(this,me(this.doc,r));var u=r.bottom,d=r.left;if(n.style.position="absolute",n.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(n),s.sizer.appendChild(n),l=="over")u=r.top;else if(l=="above"||l=="near"){var g=Math.max(s.wrapper.clientHeight,this.doc.height),b=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(l=="above"||r.bottom+n.offsetHeight>g)&&r.top>n.offsetHeight?u=r.top-n.offsetHeight:r.bottom+n.offsetHeight<=g&&(u=r.bottom),d+n.offsetWidth>b&&(d=b-n.offsetWidth)}n.style.top=u+"px",n.style.left=n.style.right="",a=="right"?(d=s.sizer.clientWidth-n.offsetWidth,n.style.right="0px"):(a=="left"?d=0:a=="middle"&&(d=(s.sizer.clientWidth-n.offsetWidth)/2),n.style.left=d+"px"),o&&vs(this,{left:d,top:u,right:d+n.offsetWidth,bottom:u+n.offsetHeight})},triggerOnKeyDown:ht(ea),triggerOnKeyPress:ht(ra),triggerOnKeyUp:ta,triggerOnMouseDown:ht(ia),execCommand:function(r){if(Fi.hasOwnProperty(r))return Fi[r].call(null,this)},triggerElectric:ht(function(r){fa(this,r)}),findPosH:function(r,n,o,l){var a=1;n<0&&(a=-1,n=-n);for(var s=me(this.doc,r),u=0;u0&&d(o.charAt(l-1));)--l;for(;a.5||this.options.lineWrapping)&&In(this),Re(this,"refresh",this)}),swapDoc:ht(function(r){var n=this.doc;return n.cm=null,this.state.selectingText&&this.state.selectingText(),bl(this,r),di(this),this.display.input.reset(),gi(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,Ve(this,"swapDoc",this,n),n}),phrase:function(r){var n=this.options.phrases;return n&&Object.prototype.hasOwnProperty.call(n,r)?n[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Et(e),e.registerHelper=function(r,n,o){i.hasOwnProperty(r)||(i[r]=e[r]={_global:[]}),i[r][n]=o},e.registerGlobalHelper=function(r,n,o,l){e.registerHelper(r,n,l),i[r]._global.push({pred:o,val:l})}}function fo(e,t,i,r,n){var o=t,l=i,a=V(e,t.line),s=n&&e.direction=="rtl"?-i:i;function u(){var X=t.line+s;return X=e.first+e.size?!1:(t=new S(X,t.ch,t.sticky),a=V(e,X))}function d(X){var R;if(r=="codepoint"){var $=a.text.charCodeAt(t.ch+(i>0?0:-1));if(isNaN($))R=null;else{var ae=i>0?$>=55296&&$<56320:$>=56320&&$<57343;R=new S(t.line,Math.max(0,Math.min(a.text.length,t.ch+i*(ae?2:1))),-i)}}else n?R=eu(e.cm,a,t,i):R=ro(a,t,i);if(R==null)if(!X&&u())t=io(n,e.cm,a,t.line,s);else return!1;else t=R;return!0}if(r=="char"||r=="codepoint")d();else if(r=="column")d(!0);else if(r=="word"||r=="group")for(var g=null,b=r=="group",m=e.cm&&e.cm.getHelper(t,"wordChars"),L=!0;!(i<0&&!d(!L));L=!1){var F=a.text.charAt(t.ch)||` `,H=Xt(F,m)?"w":b&&F==` -`?"n":!b||/\s/.test(F)?null:"p";if(b&&!L&&!H&&(H="s"),g&&g!=H){i<0&&(i=1,d(),t.sticky="after");break}if(H&&(g=H),i>0&&!d(!L))break}var B=sn(e,t,o,l,!0);return Me(o,B)&&(B.hitSide=!0),B}function pa(e,t,i,r){var n=e.doc,o=t.left,l;if(r=="page"){var a=Math.min(e.display.wrapper.clientHeight,z(e).innerHeight||n(e).documentElement.clientHeight),s=Math.max(a-.5*qr(e.display),3);l=(i>0?t.bottom:t.top)+i*s}else r=="line"&&(l=i>0?t.bottom+3:t.top-3);for(var u;u=On(e,o,l),!!u.outside;){if(i<0?l<=0:l>=n.height){u.hitSide=!0;break}l+=i*5}return u}var Fe=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new he,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Fe.prototype.init=function(e){var t=this,i=this,r=i.cm,n=i.div=e.lineDiv;n.contentEditable=!0,uo(n,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(a){for(var s=a.target;s;s=s.parentNode){if(s==n)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}le(n,"paste",function(a){!o(a)||_e(r,a)||fa(a,r)||se<=11&&setTimeout(et(r,function(){return t.updateFromDOM()}),20)}),le(n,"compositionstart",function(a){t.composing={data:a.data,done:!1}}),le(n,"compositionupdate",function(a){t.composing||(t.composing={data:a.data,done:!1})}),le(n,"compositionend",function(a){t.composing&&(a.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),le(n,"touchstart",function(){return i.forceCompositionEnd()}),le(n,"input",function(){t.composing||t.readFromDOMSoon()});function l(a){if(!(!o(a)||_e(r,a))){if(r.somethingSelected())pn({lineWise:!1,text:r.getSelections()}),a.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=ha(r);pn({lineWise:!0,text:s.text}),a.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,Ze),r.replaceSelection("",null,"cut")})}else return;if(a.clipboardData){a.clipboardData.clearData();var u=Bt.text.join(` -`);if(a.clipboardData.setData("Text",u),a.clipboardData.getData("Text")==u){a.preventDefault();return}}var d=da(),g=d.firstChild;uo(g),r.display.lineSpace.insertBefore(d,r.display.lineSpace.firstChild),g.value=Bt.text.join(` -`);var b=Te(de(n));v(g),setTimeout(function(){r.display.lineSpace.removeChild(d),b.focus(),b==n&&i.showPrimarySelection()},50)}}le(n,"copy",l),le(n,"cut",l)},Fe.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Fe.prototype.prepareSelection=function(){var e=nl(this.cm,!1);return e.focus=Te(de(this.div))==this.div,e},Fe.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Fe.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Fe.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),r=i.from(),n=i.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||n.line=t.display.viewFrom&&ga(t,r)||{node:a[0].measure.map[2],offset:0},u=n.linee.firstLine()&&(r=S(r.line-1,V(e.doc,r.line-1).length)),n.ch==V(e.doc,n.line).text.length&&n.linet.viewTo-1)return!1;var o,l,a;r.line==t.viewFrom||(o=Cr(e,r.line))==0?(l=f(t.view[0].line),a=t.view[0].node):(l=f(t.view[o].line),a=t.view[o-1].node.nextSibling);var s=Cr(e,n.line),u,d;if(s==t.view.length-1?(u=t.viewTo-1,d=t.lineDiv.lastChild):(u=f(t.view[s+1].line)-1,d=t.view[s+1].node.previousSibling),!a)return!1;for(var g=e.doc.splitLines(yu(e,a,d,l,u)),b=Zt(e.doc,S(l,0),S(u,V(e.doc,u).text.length));g.length>1&&b.length>1;)if(ye(g)==ye(b))g.pop(),b.pop(),u--;else if(g[0]==b[0])g.shift(),b.shift(),l++;else break;for(var m=0,L=0,F=g[0],H=b[0],B=Math.min(F.length,H.length);mr.ch&&X.charCodeAt(X.length-L-1)==R.charCodeAt(R.length-L-1);)m--,L++;g[g.length-1]=X.slice(0,X.length-L).replace(/^\u200b+/,""),g[0]=g[0].slice(m).replace(/\u200b+$/,"");var ae=S(l,m),ne=S(u,b.length?ye(b).length-L:0);if(g.length>1||g[0]||G(ae,ne))return Zr(e.doc,g,ae,ne,"+input"),!0},Fe.prototype.ensurePolled=function(){this.forceCompositionEnd()},Fe.prototype.reset=function(){this.forceCompositionEnd()},Fe.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Fe.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},Fe.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ct(this.cm,function(){return mt(e.cm)})},Fe.prototype.setUneditable=function(e){e.contentEditable="false"},Fe.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||et(this.cm,so)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Fe.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Fe.prototype.onContextMenu=function(){},Fe.prototype.resetPosition=function(){},Fe.prototype.needsContentAttribute=!0;function ga(e,t){var i=Fn(e,t.line);if(!i||i.hidden)return null;var r=V(e.doc,t.line),n=Ko(i,r,t.line),o=Se(r,e.doc.direction),l="left";if(o){var a=or(o,t.ch);l=a%2?"right":"left"}var s=Xo(n.map,t.ch,l);return s.offset=s.collapse=="right"?s.end:s.start,s}function xu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ti(e,t){return t&&(e.bad=!0),e}function yu(e,t,i,r,n){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(m){return function(L){return L.id==m}}function d(){l&&(o+=a,s&&(o+=a),l=s=!1)}function g(m){m&&(d(),o+=m)}function b(m){if(m.nodeType==1){var L=m.getAttribute("cm-text");if(L){g(L);return}var F=m.getAttribute("cm-marker"),H;if(F){var B=e.findMarks(S(r,0),S(n+1,0),u(+F));B.length&&(H=B[0].find(0))&&g(Zt(e.doc,H.from,H.to).join(a));return}if(m.getAttribute("contenteditable")=="false")return;var X=/^(pre|div|p|li|table|br)$/i.test(m.nodeName);if(!/^br$/i.test(m.nodeName)&&m.textContent.length==0)return;X&&d();for(var R=0;R=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),le(n,"paste",function(l){_e(r,l)||fa(l,r)||(r.state.pasteIncoming=+new Date,i.fastPoll())});function o(l){if(!_e(r,l)){if(r.somethingSelected())pn({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var a=ha(r);pn({lineWise:!0,text:a.text}),l.type=="cut"?r.setSelections(a.ranges,null,Ze):(i.prevInput="",n.value=a.text.join(` -`),v(n))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}le(n,"cut",o),le(n,"copy",o),le(e.scroller,"paste",function(l){if(!(Vt(e,l)||_e(r,l))){if(!n.dispatchEvent){r.state.pasteIncoming=+new Date,i.focus();return}var a=new Event("paste");a.clipboardData=l.clipboardData,n.dispatchEvent(a)}}),le(e.lineSpace,"selectstart",function(l){Vt(e,l)||ut(l)}),le(n,"compositionstart",function(){var l=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),le(n,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Ue.prototype.createField=function(e){this.wrapper=da(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;uo(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},Ue.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ue.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,r=nl(e);if(e.options.moveInputWithCursor){var n=It(e,i.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,n.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,n.left+l.left-o.left))}return r},Ue.prototype.showSelection=function(e){var t=this.cm,i=t.display;Y(i.cursorDiv,e.cursors),Y(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ue.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&v(this.textarea),T&&se>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",T&&se>=9&&(this.hasSelection=null));this.resetting=!1}},Ue.prototype.getField=function(){return this.textarea},Ue.prototype.supportsTouch=function(){return!1},Ue.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!fe||Te(de(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},Ue.prototype.blur=function(){this.textarea.blur()},Ue.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ue.prototype.receivedFocus=function(){this.slowPoll()},Ue.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ue.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,i)},Ue.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||sr(i)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var n=i.value;if(n==r&&!t.somethingSelected())return!1;if(T&&se>=9&&this.hasSelection===n||De&&/[\uf700-\uf7ff]/.test(n))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=n.charCodeAt(0);if(o==8203&&!r&&(r="​"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,a=Math.min(r.length,n.length);l1e3||n.indexOf(` +`?"n":!b||/\s/.test(F)?null:"p";if(b&&!L&&!H&&(H="s"),g&&g!=H){i<0&&(i=1,d(),t.sticky="after");break}if(H&&(g=H),i>0&&!d(!L))break}var B=sn(e,t,o,l,!0);return Me(o,B)&&(B.hitSide=!0),B}function da(e,t,i,r){var n=e.doc,o=t.left,l;if(r=="page"){var a=Math.min(e.display.wrapper.clientHeight,z(e).innerHeight||n(e).documentElement.clientHeight),s=Math.max(a-.5*qr(e.display),3);l=(i>0?t.bottom:t.top)+i*s}else r=="line"&&(l=i>0?t.bottom+3:t.top-3);for(var u;u=On(e,o,l),!!u.outside;){if(i<0?l<=0:l>=n.height){u.hitSide=!0;break}l+=i*5}return u}var Fe=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new he,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Fe.prototype.init=function(e){var t=this,i=this,r=i.cm,n=i.div=e.lineDiv;n.contentEditable=!0,uo(n,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(a){for(var s=a.target;s;s=s.parentNode){if(s==n)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}le(n,"paste",function(a){!o(a)||_e(r,a)||ua(a,r)||se<=11&&setTimeout(et(r,function(){return t.updateFromDOM()}),20)}),le(n,"compositionstart",function(a){t.composing={data:a.data,done:!1}}),le(n,"compositionupdate",function(a){t.composing||(t.composing={data:a.data,done:!1})}),le(n,"compositionend",function(a){t.composing&&(a.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),le(n,"touchstart",function(){return i.forceCompositionEnd()}),le(n,"input",function(){t.composing||t.readFromDOMSoon()});function l(a){if(!(!o(a)||_e(r,a))){if(r.somethingSelected())pn({lineWise:!1,text:r.getSelections()}),a.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=ca(r);pn({lineWise:!0,text:s.text}),a.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,Ze),r.replaceSelection("",null,"cut")})}else return;if(a.clipboardData){a.clipboardData.clearData();var u=Bt.text.join(` +`);if(a.clipboardData.setData("Text",u),a.clipboardData.getData("Text")==u){a.preventDefault();return}}var d=ha(),g=d.firstChild;uo(g),r.display.lineSpace.insertBefore(d,r.display.lineSpace.firstChild),g.value=Bt.text.join(` +`);var b=Te(de(n));v(g),setTimeout(function(){r.display.lineSpace.removeChild(d),b.focus(),b==n&&i.showPrimarySelection()},50)}}le(n,"copy",l),le(n,"cut",l)},Fe.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Fe.prototype.prepareSelection=function(){var e=il(this.cm,!1);return e.focus=Te(de(this.div))==this.div,e},Fe.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Fe.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Fe.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),r=i.from(),n=i.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||n.line=t.display.viewFrom&&pa(t,r)||{node:a[0].measure.map[2],offset:0},u=n.linee.firstLine()&&(r=S(r.line-1,V(e.doc,r.line-1).length)),n.ch==V(e.doc,n.line).text.length&&n.linet.viewTo-1)return!1;var o,l,a;r.line==t.viewFrom||(o=Cr(e,r.line))==0?(l=f(t.view[0].line),a=t.view[0].node):(l=f(t.view[o].line),a=t.view[o-1].node.nextSibling);var s=Cr(e,n.line),u,d;if(s==t.view.length-1?(u=t.viewTo-1,d=t.lineDiv.lastChild):(u=f(t.view[s+1].line)-1,d=t.view[s+1].node.previousSibling),!a)return!1;for(var g=e.doc.splitLines(ku(e,a,d,l,u)),b=Zt(e.doc,S(l,0),S(u,V(e.doc,u).text.length));g.length>1&&b.length>1;)if(ye(g)==ye(b))g.pop(),b.pop(),u--;else if(g[0]==b[0])g.shift(),b.shift(),l++;else break;for(var m=0,L=0,F=g[0],H=b[0],B=Math.min(F.length,H.length);mr.ch&&X.charCodeAt(X.length-L-1)==R.charCodeAt(R.length-L-1);)m--,L++;g[g.length-1]=X.slice(0,X.length-L).replace(/^\u200b+/,""),g[0]=g[0].slice(m).replace(/\u200b+$/,"");var ae=S(l,m),ne=S(u,b.length?ye(b).length-L:0);if(g.length>1||g[0]||G(ae,ne))return Zr(e.doc,g,ae,ne,"+input"),!0},Fe.prototype.ensurePolled=function(){this.forceCompositionEnd()},Fe.prototype.reset=function(){this.forceCompositionEnd()},Fe.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Fe.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},Fe.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ct(this.cm,function(){return mt(e.cm)})},Fe.prototype.setUneditable=function(e){e.contentEditable="false"},Fe.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||et(this.cm,so)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Fe.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Fe.prototype.onContextMenu=function(){},Fe.prototype.resetPosition=function(){},Fe.prototype.needsContentAttribute=!0;function pa(e,t){var i=Fn(e,t.line);if(!i||i.hidden)return null;var r=V(e.doc,t.line),n=jo(i,r,t.line),o=Se(r,e.doc.direction),l="left";if(o){var a=or(o,t.ch);l=a%2?"right":"left"}var s=Go(n.map,t.ch,l);return s.offset=s.collapse=="right"?s.end:s.start,s}function bu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ti(e,t){return t&&(e.bad=!0),e}function ku(e,t,i,r,n){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(m){return function(L){return L.id==m}}function d(){l&&(o+=a,s&&(o+=a),l=s=!1)}function g(m){m&&(d(),o+=m)}function b(m){if(m.nodeType==1){var L=m.getAttribute("cm-text");if(L){g(L);return}var F=m.getAttribute("cm-marker"),H;if(F){var B=e.findMarks(S(r,0),S(n+1,0),u(+F));B.length&&(H=B[0].find(0))&&g(Zt(e.doc,H.from,H.to).join(a));return}if(m.getAttribute("contenteditable")=="false")return;var X=/^(pre|div|p|li|table|br)$/i.test(m.nodeName);if(!/^br$/i.test(m.nodeName)&&m.textContent.length==0)return;X&&d();for(var R=0;R=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),le(n,"paste",function(l){_e(r,l)||ua(l,r)||(r.state.pasteIncoming=+new Date,i.fastPoll())});function o(l){if(!_e(r,l)){if(r.somethingSelected())pn({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var a=ca(r);pn({lineWise:!0,text:a.text}),l.type=="cut"?r.setSelections(a.ranges,null,Ze):(i.prevInput="",n.value=a.text.join(` +`),v(n))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}le(n,"cut",o),le(n,"copy",o),le(e.scroller,"paste",function(l){if(!(Vt(e,l)||_e(r,l))){if(!n.dispatchEvent){r.state.pasteIncoming=+new Date,i.focus();return}var a=new Event("paste");a.clipboardData=l.clipboardData,n.dispatchEvent(a)}}),le(e.lineSpace,"selectstart",function(l){Vt(e,l)||ut(l)}),le(n,"compositionstart",function(){var l=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),le(n,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Ue.prototype.createField=function(e){this.wrapper=ha(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;uo(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},Ue.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ue.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,r=il(e);if(e.options.moveInputWithCursor){var n=It(e,i.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,n.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,n.left+l.left-o.left))}return r},Ue.prototype.showSelection=function(e){var t=this.cm,i=t.display;Y(i.cursorDiv,e.cursors),Y(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ue.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&v(this.textarea),T&&se>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",T&&se>=9&&(this.hasSelection=null));this.resetting=!1}},Ue.prototype.getField=function(){return this.textarea},Ue.prototype.supportsTouch=function(){return!1},Ue.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!fe||Te(de(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},Ue.prototype.blur=function(){this.textarea.blur()},Ue.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ue.prototype.receivedFocus=function(){this.slowPoll()},Ue.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ue.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,i)},Ue.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||sr(i)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var n=i.value;if(n==r&&!t.somethingSelected())return!1;if(T&&se>=9&&this.hasSelection===n||De&&/[\uf700-\uf7ff]/.test(n))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=n.charCodeAt(0);if(o==8203&&!r&&(r="​"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,a=Math.min(r.length,n.length);l1e3||n.indexOf(` `)>-1?i.value=e.prevInput="":e.prevInput=n,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ue.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ue.prototype.onKeyPress=function(){T&&se>=9&&(this.hasSelection=null),this.fastPoll()},Ue.prototype.onContextMenu=function(e){var t=this,i=t.cm,r=i.display,n=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Sr(i,e),l=r.scroller.scrollTop;if(!o||E)return;var a=i.options.resetSelectionOnContextMenu;a&&i.doc.sel.contains(o)==-1&&et(i,ft)(i.doc,dr(o),Ze);var s=n.style.cssText,u=t.wrapper.style.cssText,d=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",n.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-d.top-5)+"px; left: "+(e.clientX-d.left-5)+`px; z-index: 1000; background: `+(T?"rgba(255, 255, 255, .05)":"transparent")+`; - outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var g;ie&&(g=n.ownerDocument.defaultView.scrollY),r.input.focus(),ie&&n.ownerDocument.defaultView.scrollTo(null,g),r.input.reset(),i.somethingSelected()||(n.value=t.prevInput=" "),t.contextMenuPending=m,r.selForContextMenu=i.doc.sel,clearTimeout(r.detectingSelectAll);function b(){if(n.selectionStart!=null){var F=i.somethingSelected(),H="​"+(F?n.value:"");n.value="⇚",n.value=H,t.prevInput=F?"":"​",n.selectionStart=1,n.selectionEnd=H.length,r.selForContextMenu=i.doc.sel}}function m(){if(t.contextMenuPending==m&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,n.style.cssText=s,T&&se<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),n.selectionStart!=null)){(!T||T&&se<9)&&b();var F=0,H=function(){r.selForContextMenu==i.doc.sel&&n.selectionStart==0&&n.selectionEnd>0&&t.prevInput=="​"?et(i,Pl)(i):F++<10?r.detectingSelectAll=setTimeout(H,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(H,200)}}if(T&&se>=9&&b(),pe){lr(e);var L=function(){st(window,"mouseup",L),setTimeout(m,20)};le(window,"mouseup",L)}else setTimeout(m,50)},Ue.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Ue.prototype.setUneditable=function(){},Ue.prototype.needsContentAttribute=!1;function ku(e,t){if(t=t?ge(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var i=Te(de(e));t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function r(){e.value=a.getValue()}var n;if(e.form&&(le(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;n=o.submit;try{var l=o.submit=function(){r(),o.submit=n,o.submit(),o.submit=l}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(st(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=n))}},e.style.display="none";var a=Ie(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return a}function wu(e){e.off=st,e.on=le,e.wheelEventPixels=As,e.Doc=xt,e.splitLines=Ft,e.countColumn=xe,e.findColumn=Ee,e.isWordChar=at,e.Pass=Oe,e.signal=Re,e.Line=Br,e.changeEnd=pr,e.scrollbarModel=fl,e.Pos=S,e.cmpPos=G,e.modes=Or,e.mimeModes=Pt,e.resolveMode=Pr,e.getMode=Hr,e.modeExtensions=ur,e.extendMode=Wr,e.copyState=_t,e.startState=Ir,e.innerMode=li,e.commands=Fi,e.keyMap=tr,e.keyName=Zl,e.isModifierKey=Yl,e.lookupKey=Qr,e.normalizeKeyMap=Js,e.StringStream=qe,e.SharedTextMarker=Di,e.TextMarker=vr,e.LineWidget=Ti,e.e_preventDefault=ut,e.e_stopPropagation=Er,e.e_stop=lr,e.addClass=ze,e.contains=oe,e.rmClass=We,e.keyNames=mr}du(Ie),mu(Ie);var Su="iter insert remove copy getEditor constructor".split(" ");for(var vn in xt.prototype)xt.prototype.hasOwnProperty(vn)&&J(Su,vn)<0&&(Ie.prototype[vn]=function(e){return function(){return e.apply(this.doc,arguments)}}(xt.prototype[vn]));return Et(xt),Ie.inputStyles={textarea:Ue,contenteditable:Fe},Ie.defineMode=function(e){!Ie.defaults.mode&&e!="null"&&(Ie.defaults.mode=e),Ht.apply(this,arguments)},Ie.defineMIME=br,Ie.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ie.defineMIME("text/plain","null"),Ie.defineExtension=function(e,t){Ie.prototype[e]=t},Ie.defineDocExtension=function(e,t){xt.prototype[e]=t},Ie.fromTextArea=ku,wu(Ie),Ie.version="5.65.16",Ie})}(po)),po.exports}var Tu=Gt();const Hi=Lu(Tu);var xa={exports:{}},ya;function vo(){return ya||(ya=1,function(Tt,_){(function(x){x(Gt())})(function(x){var W={autoSelfClosers:{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},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{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}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},k={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};x.defineMode("xml",function(y,C){var q=y.indentUnit,T={},se=C.htmlMode?W:k;for(var ie in se)T[ie]=se[ie];for(var ie in C)T[ie]=C[ie];var ve,ee;function j(c,U){function N(ze){return U.tokenize=ze,ze(c,U)}var oe=c.next();if(oe=="<")return c.eat("!")?c.eat("[")?c.match("CDATA[")?N(ce("atom","]]>")):null:c.match("--")?N(ce("comment","-->")):c.match("DOCTYPE",!0,!0)?(c.eatWhile(/[\w\._\-]/),N(ue(1))):null:c.eat("?")?(c.eatWhile(/[\w\._\-]/),U.tokenize=ce("meta","?>"),"meta"):(ve=c.eat("/")?"closeTag":"openTag",U.tokenize=E,"tag bracket");if(oe=="&"){var Te;return c.eat("#")?c.eat("x")?Te=c.eatWhile(/[a-fA-F\d]/)&&c.eat(";"):Te=c.eatWhile(/[\d]/)&&c.eat(";"):Te=c.eatWhile(/[\w\.\-:]/)&&c.eat(";"),Te?"atom":"error"}else return c.eatWhile(/[^&<]/),null}j.isInText=!0;function E(c,U){var N=c.next();if(N==">"||N=="/"&&c.eat(">"))return U.tokenize=j,ve=N==">"?"endTag":"selfcloseTag","tag bracket";if(N=="=")return ve="equals",null;if(N=="<"){U.tokenize=j,U.state=Ge,U.tagName=U.tagStart=null;var oe=U.tokenize(c,U);return oe?oe+" tag error":"tag error"}else return/[\'\"]/.test(N)?(U.tokenize=K(N),U.stringStartCol=c.column(),U.tokenize(c,U)):(c.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function K(c){var U=function(N,oe){for(;!N.eol();)if(N.next()==c){oe.tokenize=E;break}return"string"};return U.isInAttribute=!0,U}function ce(c,U){return function(N,oe){for(;!N.eol();){if(N.match(U)){oe.tokenize=j;break}N.next()}return c}}function ue(c){return function(U,N){for(var oe;(oe=U.next())!=null;){if(oe=="<")return N.tokenize=ue(c+1),N.tokenize(U,N);if(oe==">")if(c==1){N.tokenize=j;break}else return N.tokenize=ue(c-1),N.tokenize(U,N)}return"meta"}}function te(c){return c&&c.toLowerCase()}function Q(c,U,N){this.prev=c.context,this.tagName=U||"",this.indent=c.indented,this.startOfLine=N,(T.doNotIndent.hasOwnProperty(U)||c.context&&c.context.noIndent)&&(this.noIndent=!0)}function fe(c){c.context&&(c.context=c.context.prev)}function De(c,U){for(var N;;){if(!c.context||(N=c.context.tagName,!T.contextGrabbers.hasOwnProperty(te(N))||!T.contextGrabbers[te(N)].hasOwnProperty(te(U))))return;fe(c)}}function Ge(c,U,N){return c=="openTag"?(N.tagStart=U.column(),nt):c=="closeTag"?Pe:Ge}function nt(c,U,N){return c=="word"?(N.tagName=U.current(),ee="tag",I):T.allowMissingTagName&&c=="endTag"?(ee="tag bracket",I(c,U,N)):(ee="error",nt)}function Pe(c,U,N){if(c=="word"){var oe=U.current();return N.context&&N.context.tagName!=oe&&T.implicitlyClosed.hasOwnProperty(te(N.context.tagName))&&fe(N),N.context&&N.context.tagName==oe||T.matchClosing===!1?(ee="tag",He):(ee="tag error",pe)}else return T.allowMissingTagName&&c=="endTag"?(ee="tag bracket",He(c,U,N)):(ee="error",pe)}function He(c,U,N){return c!="endTag"?(ee="error",He):(fe(N),Ge)}function pe(c,U,N){return ee="error",He(c,U,N)}function I(c,U,N){if(c=="word")return ee="attribute",We;if(c=="endTag"||c=="selfcloseTag"){var oe=N.tagName,Te=N.tagStart;return N.tagName=N.tagStart=null,c=="selfcloseTag"||T.autoSelfClosers.hasOwnProperty(te(oe))?De(N,oe):(De(N,oe),N.context=new Q(N,oe,Te==N.indented)),Ge}return ee="error",I}function We(c,U,N){return c=="equals"?D:(T.allowMissing||(ee="error"),I(c,U,N))}function D(c,U,N){return c=="string"?Y:c=="word"&&T.allowUnquoted?(ee="string",I):(ee="error",I(c,U,N))}function Y(c,U,N){return c=="string"?Y:I(c,U,N)}return{startState:function(c){var U={tokenize:j,state:Ge,indented:c||0,tagName:null,tagStart:null,context:null};return c!=null&&(U.baseIndent=c),U},token:function(c,U){if(!U.tagName&&c.sol()&&(U.indented=c.indentation()),c.eatSpace())return null;ve=null;var N=U.tokenize(c,U);return(N||ve)&&N!="comment"&&(ee=null,U.state=U.state(ve||N,c,U),ee&&(N=ee=="error"?N+" error":ee)),N},indent:function(c,U,N){var oe=c.context;if(c.tokenize.isInAttribute)return c.tagStart==c.indented?c.stringStartCol+1:c.indented+q;if(oe&&oe.noIndent)return x.Pass;if(c.tokenize!=E&&c.tokenize!=j)return N?N.match(/^(\s*)/)[0].length:0;if(c.tagName)return T.multilineTagIndentPastTag!==!1?c.tagStart+c.tagName.length+2:c.tagStart+q*(T.multilineTagIndentFactor||1);if(T.alignCDATA&&/$/,blockCommentStart:"",configuration:T.htmlMode?"html":"xml",helperType:T.htmlMode?"html":"xml",skipAttribute:function(c){c.state==D&&(c.state=I)},xmlCurrentTag:function(c){return c.tagName?{name:c.tagName,close:c.type=="closeTag"}:null},xmlCurrentContext:function(c){for(var U=[],N=c.context;N;N=N.prev)U.push(N.tagName);return U.reverse()}}}),x.defineMIME("text/xml","xml"),x.defineMIME("application/xml","xml"),x.mimeModes.hasOwnProperty("text/html")||x.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),xa.exports}var ba={exports:{}},ka;function Ca(){return ka||(ka=1,function(Tt,_){(function(x){x(Gt())})(function(x){x.defineMode("javascript",function(W,k){var y=W.indentUnit,C=k.statementIndent,q=k.jsonld,T=k.json||q,se=k.trackScope!==!1,ie=k.typescript,ve=k.wordCharacters||/[\w$\xa1-\uffff]/,ee=function(){function f(Qe){return{type:Qe,style:"keyword"}}var p=f("keyword a"),A=f("keyword b"),P=f("keyword c"),S=f("keyword d"),G=f("operator"),Me={type:"atom",style:"atom"};return{if:f("if"),while:p,with:p,else:A,do:A,try:A,finally:A,return:S,break:S,continue:S,new:f("new"),delete:P,void:P,throw:P,debugger:f("debugger"),var:f("var"),const:f("var"),let:f("var"),function:f("function"),catch:f("catch"),for:f("for"),switch:f("switch"),case:f("case"),default:f("default"),in:G,typeof:G,instanceof:G,true:Me,false:Me,null:Me,undefined:Me,NaN:Me,Infinity:Me,this:f("this"),class:f("class"),super:f("atom"),yield:P,export:f("export"),import:f("import"),extends:P,await:P}}(),j=/[+\-*&%=<>!?|~^@]/,E=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function K(f){for(var p=!1,A,P=!1;(A=f.next())!=null;){if(!p){if(A=="/"&&!P)return;A=="["?P=!0:P&&A=="]"&&(P=!1)}p=!p&&A=="\\"}}var ce,ue;function te(f,p,A){return ce=f,ue=A,p}function Q(f,p){var A=f.next();if(A=='"'||A=="'")return p.tokenize=fe(A),p.tokenize(f,p);if(A=="."&&f.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return te("number","number");if(A=="."&&f.match(".."))return te("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(A))return te(A);if(A=="="&&f.eat(">"))return te("=>","operator");if(A=="0"&&f.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return te("number","number");if(/\d/.test(A))return f.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),te("number","number");if(A=="/")return f.eat("*")?(p.tokenize=De,De(f,p)):f.eat("/")?(f.skipToEnd(),te("comment","comment")):Dt(f,p,1)?(K(f),f.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),te("regexp","string-2")):(f.eat("="),te("operator","operator",f.current()));if(A=="`")return p.tokenize=Ge,Ge(f,p);if(A=="#"&&f.peek()=="!")return f.skipToEnd(),te("meta","meta");if(A=="#"&&f.eatWhile(ve))return te("variable","property");if(A=="<"&&f.match("!--")||A=="-"&&f.match("->")&&!/\S/.test(f.string.slice(0,f.start)))return f.skipToEnd(),te("comment","comment");if(j.test(A))return(A!=">"||!p.lexical||p.lexical.type!=">")&&(f.eat("=")?(A=="!"||A=="=")&&f.eat("="):/[<>*+\-|&?]/.test(A)&&(f.eat(A),A==">"&&f.eat(A))),A=="?"&&f.eat(".")?te("."):te("operator","operator",f.current());if(ve.test(A)){f.eatWhile(ve);var P=f.current();if(p.lastType!="."){if(ee.propertyIsEnumerable(P)){var S=ee[P];return te(S.type,S.style,P)}if(P=="async"&&f.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return te("async","keyword",P)}return te("variable","variable",P)}}function fe(f){return function(p,A){var P=!1,S;if(q&&p.peek()=="@"&&p.match(E))return A.tokenize=Q,te("jsonld-keyword","meta");for(;(S=p.next())!=null&&!(S==f&&!P);)P=!P&&S=="\\";return P||(A.tokenize=Q),te("string","string")}}function De(f,p){for(var A=!1,P;P=f.next();){if(P=="/"&&A){p.tokenize=Q;break}A=P=="*"}return te("comment","comment")}function Ge(f,p){for(var A=!1,P;(P=f.next())!=null;){if(!A&&(P=="`"||P=="$"&&f.eat("{"))){p.tokenize=Q;break}A=!A&&P=="\\"}return te("quasi","string-2",f.current())}var nt="([{}])";function Pe(f,p){p.fatArrowAt&&(p.fatArrowAt=null);var A=f.string.indexOf("=>",f.start);if(!(A<0)){if(ie){var P=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(f.string.slice(f.start,A));P&&(A=P.index)}for(var S=0,G=!1,Me=A-1;Me>=0;--Me){var Qe=f.string.charAt(Me),vt=nt.indexOf(Qe);if(vt>=0&&vt<3){if(!S){++Me;break}if(--S==0){Qe=="("&&(G=!0);break}}else if(vt>=3&&vt<6)++S;else if(ve.test(Qe))G=!0;else if(/["'\/`]/.test(Qe))for(;;--Me){if(Me==0)return;var zr=f.string.charAt(Me-1);if(zr==Qe&&f.string.charAt(Me-2)!="\\"){Me--;break}}else if(G&&!S){++Me;break}}G&&!S&&(p.fatArrowAt=Me)}}var He={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function pe(f,p,A,P,S,G){this.indented=f,this.column=p,this.type=A,this.prev=S,this.info=G,P!=null&&(this.align=P)}function I(f,p){if(!se)return!1;for(var A=f.localVars;A;A=A.next)if(A.name==p)return!0;for(var P=f.context;P;P=P.prev)for(var A=P.vars;A;A=A.next)if(A.name==p)return!0}function We(f,p,A,P,S){var G=f.cc;for(D.state=f,D.stream=S,D.marked=null,D.cc=G,D.style=p,f.lexical.hasOwnProperty("align")||(f.lexical.align=!0);;){var Me=G.length?G.pop():T?J:xe;if(Me(A,P)){for(;G.length&&G[G.length-1].lex;)G.pop()();return D.marked?D.marked:A=="variable"&&I(f,P)?"variable-2":p}}}var D={state:null,column:null,marked:null,cc:null};function Y(){for(var f=arguments.length-1;f>=0;f--)D.cc.push(arguments[f])}function c(){return Y.apply(null,arguments),!0}function U(f,p){for(var A=p;A;A=A.next)if(A.name==f)return!0;return!1}function N(f){var p=D.state;if(D.marked="def",!!se){if(p.context){if(p.lexical.info=="var"&&p.context&&p.context.block){var A=oe(f,p.context);if(A!=null){p.context=A;return}}else if(!U(f,p.localVars)){p.localVars=new wt(f,p.localVars);return}}k.globalVars&&!U(f,p.globalVars)&&(p.globalVars=new wt(f,p.globalVars))}}function oe(f,p){if(p)if(p.block){var A=oe(f,p.prev);return A?A==p.prev?p:new ze(A,p.vars,!0):null}else return U(f,p.vars)?p:new ze(p.prev,new wt(f,p.vars),!1);else return null}function Te(f){return f=="public"||f=="private"||f=="protected"||f=="abstract"||f=="readonly"}function ze(f,p,A){this.prev=f,this.vars=p,this.block=A}function wt(f,p){this.name=f,this.next=p}var v=new wt("this",new wt("arguments",null));function h(){D.state.context=new ze(D.state.context,D.state.localVars,!1),D.state.localVars=v}function Z(){D.state.context=new ze(D.state.context,D.state.localVars,!0),D.state.localVars=null}h.lex=Z.lex=!0;function de(){D.state.localVars=D.state.context.vars,D.state.context=D.state.context.prev}de.lex=!0;function z(f,p){var A=function(){var P=D.state,S=P.indented;if(P.lexical.type=="stat")S=P.lexical.indented;else for(var G=P.lexical;G&&G.type==")"&&G.align;G=G.prev)S=G.indented;P.lexical=new pe(S,D.stream.column(),f,null,P.lexical,p)};return A.lex=!0,A}function re(){var f=D.state;f.lexical.prev&&(f.lexical.type==")"&&(f.indented=f.lexical.indented),f.lexical=f.lexical.prev)}re.lex=!0;function ge(f){function p(A){return A==f?c():f==";"||A=="}"||A==")"||A=="]"?Y():c(p)}return p}function xe(f,p){return f=="var"?c(z("vardef",p),Er,ge(";"),re):f=="keyword a"?c(z("form"),Oe,xe,re):f=="keyword b"?c(z("form"),xe,re):f=="keyword d"?D.stream.match(/^\s*$/,!1)?c():c(z("stat"),pt,ge(";"),re):f=="debugger"?c(ge(";")):f=="{"?c(z("}"),Z,Rt,re,de):f==";"?c():f=="if"?(D.state.lexical.info=="else"&&D.state.cc[D.state.cc.length-1]==re&&D.state.cc.pop()(),c(z("form"),Oe,xe,re,Nr)):f=="function"?c(Ft):f=="for"?c(z("form"),Z,zi,xe,de,re):f=="class"||ie&&p=="interface"?(D.marked="keyword",c(z("form",f=="class"?f:p),Or,re)):f=="variable"?ie&&p=="declare"?(D.marked="keyword",c(xe)):ie&&(p=="module"||p=="enum"||p=="type")&&D.stream.match(/^\s*\w/,!1)?(D.marked="keyword",p=="enum"?c(V):p=="type"?c(Bi,ge("operator"),Se,ge(";")):c(z("form"),gt,ge("{"),z("}"),Rt,re,re)):ie&&p=="namespace"?(D.marked="keyword",c(z("form"),J,xe,re)):ie&&p=="abstract"?(D.marked="keyword",c(xe)):c(z("stat"),Le):f=="switch"?c(z("form"),Oe,ge("{"),z("}","switch"),Z,Rt,re,re,de):f=="case"?c(J,ge(":")):f=="default"?c(ge(":")):f=="catch"?c(z("form"),h,he,xe,re,de):f=="export"?c(z("stat"),Pr,re):f=="import"?c(z("stat"),ur,re):f=="async"?c(xe):p=="@"?c(J,xe):Y(z("stat"),J,ge(";"),re)}function he(f){if(f=="(")return c(Ot,ge(")"))}function J(f,p){return Ze(f,p,!1)}function ke(f,p){return Ze(f,p,!0)}function Oe(f){return f!="("?Y():c(z(")"),pt,ge(")"),re)}function Ze(f,p,A){if(D.state.fatArrowAt==D.stream.start){var P=A?Ce:ye;if(f=="(")return c(h,z(")"),Xe(Ot,")"),re,ge("=>"),P,de);if(f=="variable")return Y(h,gt,ge("=>"),P,de)}var S=A?Ee:we;return He.hasOwnProperty(f)?c(S):f=="function"?c(Ft,S):f=="class"||ie&&p=="interface"?(D.marked="keyword",c(z("form"),yn,re)):f=="keyword c"||f=="async"?c(A?ke:J):f=="("?c(z(")"),pt,ge(")"),re,S):f=="operator"||f=="spread"?c(A?ke:J):f=="["?c(z("]"),qe,re,S):f=="{"?ir(Xt,"}",null,S):f=="quasi"?Y(Ke,S):f=="new"?c(w(A)):c()}function pt(f){return f.match(/[;\}\)\],]/)?Y():Y(J)}function we(f,p){return f==","?c(pt):Ee(f,p,!1)}function Ee(f,p,A){var P=A==!1?we:Ee,S=A==!1?J:ke;if(f=="=>")return c(h,A?Ce:ye,de);if(f=="operator")return/\+\+|--/.test(p)||ie&&p=="!"?c(P):ie&&p=="<"&&D.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?c(z(">"),Xe(Se,">"),re,P):p=="?"?c(J,ge(":"),S):c(S);if(f=="quasi")return Y(Ke,P);if(f!=";"){if(f=="(")return ir(ke,")","call",P);if(f==".")return c(at,P);if(f=="[")return c(z("]"),pt,ge("]"),re,P);if(ie&&p=="as")return D.marked="keyword",c(Se,P);if(f=="regexp")return D.state.lastType=D.marked="operator",D.stream.backUp(D.stream.pos-D.stream.start-1),c(S)}}function Ke(f,p){return f!="quasi"?Y():p.slice(p.length-2)!="${"?c(Ke):c(pt,ot)}function ot(f){if(f=="}")return D.marked="string-2",D.state.tokenize=Ge,c(Ke)}function ye(f){return Pe(D.stream,D.state),Y(f=="{"?xe:J)}function Ce(f){return Pe(D.stream,D.state),Y(f=="{"?xe:ke)}function w(f){return function(p){return p=="."?c(f?M:O):p=="variable"&&ie?c(St,f?Ee:we):Y(f?ke:J)}}function O(f,p){if(p=="target")return D.marked="keyword",c(we)}function M(f,p){if(p=="target")return D.marked="keyword",c(Ee)}function Le(f){return f==":"?c(re,xe):Y(we,ge(";"),re)}function at(f){if(f=="variable")return D.marked="property",c()}function Xt(f,p){if(f=="async")return D.marked="property",c(Xt);if(f=="variable"||D.style=="keyword"){if(D.marked="property",p=="get"||p=="set")return c(Wi);var A;return ie&&D.state.fatArrowAt==D.stream.start&&(A=D.stream.match(/^\s*:\s*/,!1))&&(D.state.fatArrowAt=D.stream.pos+A[0].length),c(Yt)}else{if(f=="number"||f=="string")return D.marked=q?"property":D.style+" property",c(Yt);if(f=="jsonld-keyword")return c(Yt);if(ie&&Te(p))return D.marked="keyword",c(Xt);if(f=="[")return c(J,nr,ge("]"),Yt);if(f=="spread")return c(ke,Yt);if(p=="*")return D.marked="keyword",c(Xt);if(f==":")return Y(Yt)}}function Wi(f){return f!="variable"?Y(Yt):(D.marked="property",c(Ft))}function Yt(f){if(f==":")return c(ke);if(f=="(")return Y(Ft)}function Xe(f,p,A){function P(S,G){if(A?A.indexOf(S)>-1:S==","){var Me=D.state.lexical;return Me.info=="call"&&(Me.pos=(Me.pos||0)+1),c(function(Qe,vt){return Qe==p||vt==p?Y():Y(f)},P)}return S==p||G==p?c():A&&A.indexOf(";")>-1?Y(f):c(ge(p))}return function(S,G){return S==p||G==p?c():Y(f,P)}}function ir(f,p,A){for(var P=3;P"),Se);if(f=="quasi")return Y(st,At)}function Ii(f){if(f=="=>")return c(Se)}function le(f){return f.match(/[\}\)\]]/)?c():f==","||f==";"?c(le):Y($t,le)}function $t(f,p){if(f=="variable"||D.style=="keyword")return D.marked="property",c($t);if(p=="?"||f=="number"||f=="string")return c($t);if(f==":")return c(Se);if(f=="[")return c(ge("variable"),yr,ge("]"),$t);if(f=="(")return Y(sr,$t);if(!f.match(/[;\}\)\],]/))return c()}function st(f,p){return f!="quasi"?Y():p.slice(p.length-2)!="${"?c(st):c(Se,Re)}function Re(f){if(f=="}")return D.marked="string-2",D.state.tokenize=Ge,c(st)}function _e(f,p){return f=="variable"&&D.stream.match(/^\s*[?:]/,!1)||p=="?"?c(_e):f==":"?c(Se):f=="spread"?c(_e):Y(Se)}function At(f,p){if(p=="<")return c(z(">"),Xe(Se,">"),re,At);if(p=="|"||f=="."||p=="&")return c(Se);if(f=="[")return c(Se,ge("]"),At);if(p=="extends"||p=="implements")return D.marked="keyword",c(Se);if(p=="?")return c(Se,ge(":"),Se)}function St(f,p){if(p=="<")return c(z(">"),Xe(Se,">"),re,At)}function Et(){return Y(Se,ut)}function ut(f,p){if(p=="=")return c(Se)}function Er(f,p){return p=="enum"?(D.marked="keyword",c(V)):Y(gt,nr,Nt,xn)}function gt(f,p){if(ie&&Te(p))return D.marked="keyword",c(gt);if(f=="variable")return N(p),c();if(f=="spread")return c(gt);if(f=="[")return ir(ni,"]");if(f=="{")return ir(lr,"}")}function lr(f,p){return f=="variable"&&!D.stream.match(/^\s*:/,!1)?(N(p),c(Nt)):(f=="variable"&&(D.marked="property"),f=="spread"?c(gt):f=="}"?Y():f=="["?c(J,ge("]"),ge(":"),lr):c(ge(":"),gt,Nt))}function ni(){return Y(gt,Nt)}function Nt(f,p){if(p=="=")return c(ke)}function xn(f){if(f==",")return c(Er)}function Nr(f,p){if(f=="keyword b"&&p=="else")return c(z("form","else"),xe,re)}function zi(f,p){if(p=="await")return c(zi);if(f=="(")return c(z(")"),oi,re)}function oi(f){return f=="var"?c(Er,ar):f=="variable"?c(ar):Y(ar)}function ar(f,p){return f==")"?c():f==";"?c(ar):p=="in"||p=="of"?(D.marked="keyword",c(J,ar)):Y(J,ar)}function Ft(f,p){if(p=="*")return D.marked="keyword",c(Ft);if(f=="variable")return N(p),c(Ft);if(f=="(")return c(h,z(")"),Xe(Ot,")"),re,or,xe,de);if(ie&&p=="<")return c(z(">"),Xe(Et,">"),re,Ft)}function sr(f,p){if(p=="*")return D.marked="keyword",c(sr);if(f=="variable")return N(p),c(sr);if(f=="(")return c(h,z(")"),Xe(Ot,")"),re,or,de);if(ie&&p=="<")return c(z(">"),Xe(Et,">"),re,sr)}function Bi(f,p){if(f=="keyword"||f=="variable")return D.marked="type",c(Bi);if(p=="<")return c(z(">"),Xe(Et,">"),re)}function Ot(f,p){return p=="@"&&c(J,Ot),f=="spread"?c(Ot):ie&&Te(p)?(D.marked="keyword",c(Ot)):ie&&f=="this"?c(nr,Nt):Y(gt,nr,Nt)}function yn(f,p){return f=="variable"?Or(f,p):Pt(f,p)}function Or(f,p){if(f=="variable")return N(p),c(Pt)}function Pt(f,p){if(p=="<")return c(z(">"),Xe(Et,">"),re,Pt);if(p=="extends"||p=="implements"||ie&&f==",")return p=="implements"&&(D.marked="keyword"),c(ie?Se:J,Pt);if(f=="{")return c(z("}"),Ht,re)}function Ht(f,p){if(f=="async"||f=="variable"&&(p=="static"||p=="get"||p=="set"||ie&&Te(p))&&D.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return D.marked="keyword",c(Ht);if(f=="variable"||D.style=="keyword")return D.marked="property",c(br,Ht);if(f=="number"||f=="string")return c(br,Ht);if(f=="[")return c(J,nr,ge("]"),br,Ht);if(p=="*")return D.marked="keyword",c(Ht);if(ie&&f=="(")return Y(sr,Ht);if(f==";"||f==",")return c(Ht);if(f=="}")return c();if(p=="@")return c(J,Ht)}function br(f,p){if(p=="!"||p=="?")return c(br);if(f==":")return c(Se,Nt);if(p=="=")return c(ke);var A=D.state.lexical.prev,P=A&&A.info=="interface";return Y(P?sr:Ft)}function Pr(f,p){return p=="*"?(D.marked="keyword",c(Ir,ge(";"))):p=="default"?(D.marked="keyword",c(J,ge(";"))):f=="{"?c(Xe(Hr,"}"),Ir,ge(";")):Y(xe)}function Hr(f,p){if(p=="as")return D.marked="keyword",c(ge("variable"));if(f=="variable")return Y(ke,Hr)}function ur(f){return f=="string"?c():f=="("?Y(J):f=="."?Y(we):Y(Wr,_t,Ir)}function Wr(f,p){return f=="{"?ir(Wr,"}"):(f=="variable"&&N(p),p=="*"&&(D.marked="keyword"),c(li))}function _t(f){if(f==",")return c(Wr,_t)}function li(f,p){if(p=="as")return D.marked="keyword",c(Wr)}function Ir(f,p){if(p=="from")return D.marked="keyword",c(J)}function qe(f){return f=="]"?c():Y(Xe(ke,"]"))}function V(){return Y(z("form"),gt,ge("{"),z("}"),Xe(Zt,"}"),re,re)}function Zt(){return Y(gt,Nt)}function ai(f,p){return f.lastType=="operator"||f.lastType==","||j.test(p.charAt(0))||/[,.]/.test(p.charAt(0))}function Dt(f,p,A){return p.tokenize==Q&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(p.lastType)||p.lastType=="quasi"&&/\{\s*$/.test(f.string.slice(0,f.pos-(A||0)))}return{startState:function(f){var p={tokenize:Q,lastType:"sof",cc:[],lexical:new pe((f||0)-y,0,"block",!1),localVars:k.localVars,context:k.localVars&&new ze(null,null,!1),indented:f||0};return k.globalVars&&typeof k.globalVars=="object"&&(p.globalVars=k.globalVars),p},token:function(f,p){if(f.sol()&&(p.lexical.hasOwnProperty("align")||(p.lexical.align=!1),p.indented=f.indentation(),Pe(f,p)),p.tokenize!=De&&f.eatSpace())return null;var A=p.tokenize(f,p);return ce=="comment"?A:(p.lastType=ce=="operator"&&(ue=="++"||ue=="--")?"incdec":ce,We(p,A,ce,ue,f))},indent:function(f,p){if(f.tokenize==De||f.tokenize==Ge)return x.Pass;if(f.tokenize!=Q)return 0;var A=p&&p.charAt(0),P=f.lexical,S;if(!/^\s*else\b/.test(p))for(var G=f.cc.length-1;G>=0;--G){var Me=f.cc[G];if(Me==re)P=P.prev;else if(Me!=Nr&&Me!=de)break}for(;(P.type=="stat"||P.type=="form")&&(A=="}"||(S=f.cc[f.cc.length-1])&&(S==we||S==Ee)&&!/^[,\.=+\-*:?[\(]/.test(p));)P=P.prev;C&&P.type==")"&&P.prev.type=="stat"&&(P=P.prev);var Qe=P.type,vt=A==Qe;return Qe=="vardef"?P.indented+(f.lastType=="operator"||f.lastType==","?P.info.length+1:0):Qe=="form"&&A=="{"?P.indented:Qe=="form"?P.indented+y:Qe=="stat"?P.indented+(ai(f,p)?C||y:0):P.info=="switch"&&!vt&&k.doubleIndentSwitch!=!1?P.indented+(/^(?:case|default)\b/.test(p)?y:2*y):P.align?P.column+(vt?0:1):P.indented+(vt?0:y)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:T?null:"/*",blockCommentEnd:T?null:"*/",blockCommentContinue:T?null:" * ",lineComment:T?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:T?"json":"javascript",jsonldMode:q,jsonMode:T,expressionAllowed:Dt,skipExpression:function(f){We(f,"atom","atom","true",new x.StringStream("",2,null))}}}),x.registerHelper("wordChars","javascript",/[\w$]/),x.defineMIME("text/javascript","javascript"),x.defineMIME("text/ecmascript","javascript"),x.defineMIME("application/javascript","javascript"),x.defineMIME("application/x-javascript","javascript"),x.defineMIME("application/ecmascript","javascript"),x.defineMIME("application/json",{name:"javascript",json:!0}),x.defineMIME("application/x-json",{name:"javascript",json:!0}),x.defineMIME("application/manifest+json",{name:"javascript",json:!0}),x.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),x.defineMIME("text/typescript",{name:"javascript",typescript:!0}),x.defineMIME("application/typescript",{name:"javascript",typescript:!0})})}()),ba.exports}(function(Tt,_){(function(x){x(Gt(),vo(),Ca())})(function(x){function W(y,C,q,T){this.state=y,this.mode=C,this.depth=q,this.prev=T}function k(y){return new W(x.copyState(y.mode,y.state),y.mode,y.depth,y.prev&&k(y.prev))}x.defineMode("jsx",function(y,C){var q=x.getMode(y,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),T=x.getMode(y,C&&C.base||"javascript");function se(j){var E=j.tagName;j.tagName=null;var K=q.indent(j,"","");return j.tagName=E,K}function ie(j,E){return E.context.mode==q?ve(j,E,E.context):ee(j,E,E.context)}function ve(j,E,K){if(K.depth==2)return j.match(/^.*?\*\//)?K.depth=1:j.skipToEnd(),"comment";if(j.peek()=="{"){q.skipAttribute(K.state);var ce=se(K.state),ue=K.state.context;if(ue&&j.match(/^[^>]*>\s*$/,!1)){for(;ue.prev&&!ue.startOfLine;)ue=ue.prev;ue.startOfLine?ce-=y.indentUnit:K.prev.state.lexical&&(ce=K.prev.state.lexical.indented)}else K.depth==1&&(ce+=y.indentUnit);return E.context=new W(x.startState(T,ce),T,0,E.context),null}if(K.depth==1){if(j.peek()=="<")return q.skipAttribute(K.state),E.context=new W(x.startState(q,se(K.state)),q,0,E.context),null;if(j.match("//"))return j.skipToEnd(),"comment";if(j.match("/*"))return K.depth=2,ie(j,E)}var te=q.token(j,K.state),Q=j.current(),fe;return/\btag\b/.test(te)?/>$/.test(Q)?K.state.context?K.depth=0:E.context=E.context.prev:/^-1&&j.backUp(Q.length-fe),te}function ee(j,E,K){if(j.peek()=="<"&&!j.match(/^<([^<>]|<[^>]*>)+,\s*>/,!1)&&T.expressionAllowed(j,K.state))return E.context=new W(x.startState(q,T.indent(K.state,"","")),q,0,E.context),T.skipExpression(K.state),null;var ce=T.token(j,K.state);if(!ce&&K.depth!=null){var ue=j.current();ue=="{"?K.depth++:ue=="}"&&--K.depth==0&&(E.context=E.context.prev)}return ce}return{startState:function(){return{context:new W(x.startState(T),T)}},copyState:function(j){return{context:k(j.context)}},token:ie,indent:function(j,E,K){return j.context.mode.indent(j.context.state,E,K)},innerMode:function(j){return j.context}}},"xml","javascript"),x.defineMIME("text/jsx","jsx"),x.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})})})();(function(Tt,_){(function(x){x(Gt())})(function(x){x.defineMode("shell",function(){var W={};function k(E,K){for(var ce=0;ce1&&E.eat("$");var ce=E.next();return/['"({]/.test(ce)?(K.tokens[0]=se(ce,ce=="("?"quote":ce=="{"?"def":"string"),j(E,K)):(/\d/.test(ce)||E.eatWhile(/\w/),K.tokens.shift(),"def")};function ee(E){return function(K,ce){return K.sol()&&K.string==E&&ce.tokens.shift(),K.skipToEnd(),"string-2"}}function j(E,K){return(K.tokens[0]||T)(E,K)}return{startState:function(){return{tokens:[]}},token:function(E,K){return j(E,K)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),x.defineMIME("text/x-sh","shell"),x.defineMIME("application/x-sh","shell")})})();var Du={exports:{}};(function(Tt,_){(function(x){x(Gt())})(function(x){x.defineMode("css",function(pe,I){var We=I.inline;I.propertyKeywords||(I=x.resolveMode("text/css"));var D=pe.indentUnit,Y=I.tokenHooks,c=I.documentTypes||{},U=I.mediaTypes||{},N=I.mediaFeatures||{},oe=I.mediaValueKeywords||{},Te=I.propertyKeywords||{},ze=I.nonStandardPropertyKeywords||{},wt=I.fontProperties||{},v=I.counterDescriptors||{},h=I.colorKeywords||{},Z=I.valueKeywords||{},de=I.allowNested,z=I.lineComment,re=I.supportsAtComponent===!0,ge=pe.highlightNonStandardPropertyKeywords!==!1,xe,he;function J(w,O){return xe=O,w}function ke(w,O){var M=w.next();if(Y[M]){var Le=Y[M](w,O);if(Le!==!1)return Le}if(M=="@")return w.eatWhile(/[\w\\\-]/),J("def",w.current());if(M=="="||(M=="~"||M=="|")&&w.eat("="))return J(null,"compare");if(M=='"'||M=="'")return O.tokenize=Oe(M),O.tokenize(w,O);if(M=="#")return w.eatWhile(/[\w\\\-]/),J("atom","hash");if(M=="!")return w.match(/^\s*\w*/),J("keyword","important");if(/\d/.test(M)||M=="."&&w.eat(/\d/))return w.eatWhile(/[\w.%]/),J("number","unit");if(M==="-"){if(/[\d.]/.test(w.peek()))return w.eatWhile(/[\w.%]/),J("number","unit");if(w.match(/^-[\w\\\-]*/))return w.eatWhile(/[\w\\\-]/),w.match(/^\s*:/,!1)?J("variable-2","variable-definition"):J("variable-2","variable");if(w.match(/^\w+-/))return J("meta","meta")}else return/[,+>*\/]/.test(M)?J(null,"select-op"):M=="."&&w.match(/^-?[_a-z][_a-z0-9-]*/i)?J("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(M)?J(null,M):w.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(w.current())&&(O.tokenize=Ze),J("variable callee","variable")):/[\w\\\-]/.test(M)?(w.eatWhile(/[\w\\\-]/),J("property","word")):J(null,null)}function Oe(w){return function(O,M){for(var Le=!1,at;(at=O.next())!=null;){if(at==w&&!Le){w==")"&&O.backUp(1);break}Le=!Le&&at=="\\"}return(at==w||!Le&&w!=")")&&(M.tokenize=null),J("string","string")}}function Ze(w,O){return w.next(),w.match(/^\s*[\"\')]/,!1)?O.tokenize=null:O.tokenize=Oe(")"),J(null,"(")}function pt(w,O,M){this.type=w,this.indent=O,this.prev=M}function we(w,O,M,Le){return w.context=new pt(M,O.indentation()+(Le===!1?0:D),w.context),M}function Ee(w){return w.context.prev&&(w.context=w.context.prev),w.context.type}function Ke(w,O,M){return Ce[M.context.type](w,O,M)}function ot(w,O,M,Le){for(var at=Le||1;at>0;at--)M.context=M.context.prev;return Ke(w,O,M)}function ye(w){var O=w.current().toLowerCase();Z.hasOwnProperty(O)?he="atom":h.hasOwnProperty(O)?he="keyword":he="variable"}var Ce={};return Ce.top=function(w,O,M){if(w=="{")return we(M,O,"block");if(w=="}"&&M.context.prev)return Ee(M);if(re&&/@component/i.test(w))return we(M,O,"atComponentBlock");if(/^@(-moz-)?document$/i.test(w))return we(M,O,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(w))return we(M,O,"atBlock");if(/^@(font-face|counter-style)/i.test(w))return M.stateArg=w,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(w))return"keyframes";if(w&&w.charAt(0)=="@")return we(M,O,"at");if(w=="hash")he="builtin";else if(w=="word")he="tag";else{if(w=="variable-definition")return"maybeprop";if(w=="interpolation")return we(M,O,"interpolation");if(w==":")return"pseudo";if(de&&w=="(")return we(M,O,"parens")}return M.context.type},Ce.block=function(w,O,M){if(w=="word"){var Le=O.current().toLowerCase();return Te.hasOwnProperty(Le)?(he="property","maybeprop"):ze.hasOwnProperty(Le)?(he=ge?"string-2":"property","maybeprop"):de?(he=O.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(he+=" error","maybeprop")}else return w=="meta"?"block":!de&&(w=="hash"||w=="qualifier")?(he="error","block"):Ce.top(w,O,M)},Ce.maybeprop=function(w,O,M){return w==":"?we(M,O,"prop"):Ke(w,O,M)},Ce.prop=function(w,O,M){if(w==";")return Ee(M);if(w=="{"&&de)return we(M,O,"propBlock");if(w=="}"||w=="{")return ot(w,O,M);if(w=="(")return we(M,O,"parens");if(w=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(O.current()))he+=" error";else if(w=="word")ye(O);else if(w=="interpolation")return we(M,O,"interpolation");return"prop"},Ce.propBlock=function(w,O,M){return w=="}"?Ee(M):w=="word"?(he="property","maybeprop"):M.context.type},Ce.parens=function(w,O,M){return w=="{"||w=="}"?ot(w,O,M):w==")"?Ee(M):w=="("?we(M,O,"parens"):w=="interpolation"?we(M,O,"interpolation"):(w=="word"&&ye(O),"parens")},Ce.pseudo=function(w,O,M){return w=="meta"?"pseudo":w=="word"?(he="variable-3",M.context.type):Ke(w,O,M)},Ce.documentTypes=function(w,O,M){return w=="word"&&c.hasOwnProperty(O.current())?(he="tag",M.context.type):Ce.atBlock(w,O,M)},Ce.atBlock=function(w,O,M){if(w=="(")return we(M,O,"atBlock_parens");if(w=="}"||w==";")return ot(w,O,M);if(w=="{")return Ee(M)&&we(M,O,de?"block":"top");if(w=="interpolation")return we(M,O,"interpolation");if(w=="word"){var Le=O.current().toLowerCase();Le=="only"||Le=="not"||Le=="and"||Le=="or"?he="keyword":U.hasOwnProperty(Le)?he="attribute":N.hasOwnProperty(Le)?he="property":oe.hasOwnProperty(Le)?he="keyword":Te.hasOwnProperty(Le)?he="property":ze.hasOwnProperty(Le)?he=ge?"string-2":"property":Z.hasOwnProperty(Le)?he="atom":h.hasOwnProperty(Le)?he="keyword":he="error"}return M.context.type},Ce.atComponentBlock=function(w,O,M){return w=="}"?ot(w,O,M):w=="{"?Ee(M)&&we(M,O,de?"block":"top",!1):(w=="word"&&(he="error"),M.context.type)},Ce.atBlock_parens=function(w,O,M){return w==")"?Ee(M):w=="{"||w=="}"?ot(w,O,M,2):Ce.atBlock(w,O,M)},Ce.restricted_atBlock_before=function(w,O,M){return w=="{"?we(M,O,"restricted_atBlock"):w=="word"&&M.stateArg=="@counter-style"?(he="variable","restricted_atBlock_before"):Ke(w,O,M)},Ce.restricted_atBlock=function(w,O,M){return w=="}"?(M.stateArg=null,Ee(M)):w=="word"?(M.stateArg=="@font-face"&&!wt.hasOwnProperty(O.current().toLowerCase())||M.stateArg=="@counter-style"&&!v.hasOwnProperty(O.current().toLowerCase())?he="error":he="property","maybeprop"):"restricted_atBlock"},Ce.keyframes=function(w,O,M){return w=="word"?(he="variable","keyframes"):w=="{"?we(M,O,"top"):Ke(w,O,M)},Ce.at=function(w,O,M){return w==";"?Ee(M):w=="{"||w=="}"?ot(w,O,M):(w=="word"?he="tag":w=="hash"&&(he="builtin"),"at")},Ce.interpolation=function(w,O,M){return w=="}"?Ee(M):w=="{"||w==";"?ot(w,O,M):(w=="word"?he="variable":w!="variable"&&w!="("&&w!=")"&&(he="error"),"interpolation")},{startState:function(w){return{tokenize:null,state:We?"block":"top",stateArg:null,context:new pt(We?"block":"top",w||0,null)}},token:function(w,O){if(!O.tokenize&&w.eatSpace())return null;var M=(O.tokenize||ke)(w,O);return M&&typeof M=="object"&&(xe=M[1],M=M[0]),he=M,xe!="comment"&&(O.state=Ce[O.state](xe,w,O)),he},indent:function(w,O){var M=w.context,Le=O&&O.charAt(0),at=M.indent;return M.type=="prop"&&(Le=="}"||Le==")")&&(M=M.prev),M.prev&&(Le=="}"&&(M.type=="block"||M.type=="top"||M.type=="interpolation"||M.type=="restricted_atBlock")?(M=M.prev,at=M.indent):(Le==")"&&(M.type=="parens"||M.type=="atBlock_parens")||Le=="{"&&(M.type=="at"||M.type=="atBlock"))&&(at=Math.max(0,M.indent-D))),at},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:z,fold:"brace"}});function W(pe){for(var I={},We=0;We-1?ve.backUp(E.length-K):E.match(/<\/?$/)&&(ve.backUp(E.length),ve.match(ee,!1)||ve.match(E)),j}var y={};function C(ve){var ee=y[ve];return ee||(y[ve]=new RegExp("\\s+"+ve+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function q(ve,ee){var j=ve.match(C(ee));return j?/^\s*(.*?)\s*$/.exec(j[2])[1]:""}function T(ve,ee){return new RegExp((ee?"^":"")+"","i")}function se(ve,ee){for(var j in ve)for(var E=ee[j]||(ee[j]=[]),K=ve[j],ce=K.length-1;ce>=0;ce--)E.unshift(K[ce])}function ie(ve,ee){for(var j=0;j=0;ue--)E.script.unshift(["type",ce[ue].matches,ce[ue].mode]);function te(Q,fe){var De=j.token(Q,fe.htmlState),Ge=/\btag\b/.test(De),nt;if(Ge&&!/[<>\s\/]/.test(Q.current())&&(nt=fe.htmlState.tagName&&fe.htmlState.tagName.toLowerCase())&&E.hasOwnProperty(nt))fe.inTag=nt+" ";else if(fe.inTag&&Ge&&/>$/.test(Q.current())){var Pe=/^([\S]+) (.*)/.exec(fe.inTag);fe.inTag=null;var He=Q.current()==">"&&ie(E[Pe[1]],Pe[2]),pe=x.getMode(ve,He),I=T(Pe[1],!0),We=T(Pe[1],!1);fe.token=function(D,Y){return D.match(I,!1)?(Y.token=te,Y.localState=Y.localMode=null,null):k(D,We,Y.localMode.token(D,Y.localState))},fe.localMode=pe,fe.localState=x.startState(pe,j.indent(fe.htmlState,"",""))}else fe.inTag&&(fe.inTag+=Q.current(),Q.eol()&&(fe.inTag+=" "));return De}return{startState:function(){var Q=x.startState(j);return{token:te,inTag:null,localMode:null,localState:null,htmlState:Q}},copyState:function(Q){var fe;return Q.localState&&(fe=x.copyState(Q.localMode,Q.localState)),{token:Q.token,inTag:Q.inTag,localMode:Q.localMode,localState:fe,htmlState:x.copyState(j,Q.htmlState)}},token:function(Q,fe){return fe.token(Q,fe)},indent:function(Q,fe,De){return!Q.localMode||/^\s*<\//.test(fe)?j.indent(Q.htmlState,fe,De):Q.localMode.indent?Q.localMode.indent(Q.localState,fe,De):x.Pass},innerMode:function(Q){return{state:Q.localState||Q.htmlState,mode:Q.localMode||j}}}},"xml","javascript","css"),x.defineMIME("text/html","htmlmixed")})})();var wa={exports:{}},Sa;function Au(){return Sa||(Sa=1,function(Tt,_){(function(x){x(Gt())})(function(x){x.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var W=0;W-1&&y.substring(T+1,y.length);if(se)return x.findModeByExtension(se)},x.findModeByName=function(y){y=y.toLowerCase();for(var C=0;C` "'(~:]+/,ce=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ue=/^\s*\[[^\]]+?\]:.*$/,te=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,Q=" ";function fe(v,h,Z){return h.f=h.inline=Z,Z(v,h)}function De(v,h,Z){return h.f=h.block=Z,Z(v,h)}function Ge(v){return!v||!/\S/.test(v.string)}function nt(v){if(v.linkTitle=!1,v.linkHref=!1,v.linkText=!1,v.em=!1,v.strong=!1,v.strikethrough=!1,v.quote=0,v.indentedCode=!1,v.f==He){var h=C;if(!h){var Z=x.innerMode(y,v.htmlState);h=Z.mode.name=="xml"&&Z.state.tagStart===null&&!Z.state.context&&Z.state.tokenize.isInText}h&&(v.f=D,v.block=Pe,v.htmlState=null)}return v.trailingSpace=0,v.trailingSpaceNewLine=!1,v.prevLine=v.thisLine,v.thisLine={stream:null},null}function Pe(v,h){var Z=v.column()===h.indentation,de=Ge(h.prevLine.stream),z=h.indentedCode,re=h.prevLine.hr,ge=h.list!==!1,xe=(h.listStack[h.listStack.length-1]||0)+3;h.indentedCode=!1;var he=h.indentation;if(h.indentationDiff===null&&(h.indentationDiff=h.indentation,ge)){for(h.list=null;he=4&&(z||h.prevLine.fencedCodeEnd||h.prevLine.header||de))return v.skipToEnd(),h.indentedCode=!0,T.code;if(v.eatSpace())return null;if(Z&&h.indentation<=xe&&(Oe=v.match(j))&&Oe[1].length<=6)return h.quote=0,h.header=Oe[1].length,h.thisLine.header=!0,k.highlightFormatting&&(h.formatting="header"),h.f=h.inline,I(h);if(h.indentation<=xe&&v.eat(">"))return h.quote=Z?1:h.quote+1,k.highlightFormatting&&(h.formatting="quote"),v.eatSpace(),I(h);if(!ke&&!h.setext&&Z&&h.indentation<=xe&&(Oe=v.match(ve))){var Ze=Oe[1]?"ol":"ul";return h.indentation=he+v.current().length,h.list=!0,h.quote=0,h.listStack.push(h.indentation),h.em=!1,h.strong=!1,h.code=!1,h.strikethrough=!1,k.taskLists&&v.match(ee,!1)&&(h.taskList=!0),h.f=h.inline,k.highlightFormatting&&(h.formatting=["list","list-"+Ze]),I(h)}else{if(Z&&h.indentation<=xe&&(Oe=v.match(ce,!0)))return h.quote=0,h.fencedEndRE=new RegExp(Oe[1]+"+ *$"),h.localMode=k.fencedCodeBlockHighlighting&&q(Oe[2]||k.fencedCodeBlockDefaultMode),h.localMode&&(h.localState=x.startState(h.localMode)),h.f=h.block=pe,k.highlightFormatting&&(h.formatting="code-block"),h.code=-1,I(h);if(h.setext||(!J||!ge)&&!h.quote&&h.list===!1&&!h.code&&!ke&&!ue.test(v.string)&&(Oe=v.lookAhead(1))&&(Oe=Oe.match(E)))return h.setext?(h.header=h.setext,h.setext=0,v.skipToEnd(),k.highlightFormatting&&(h.formatting="header")):(h.header=Oe[0].charAt(0)=="="?1:2,h.setext=h.header),h.thisLine.header=!0,h.f=h.inline,I(h);if(ke)return v.skipToEnd(),h.hr=!0,h.thisLine.hr=!0,T.hr;if(v.peek()==="[")return fe(v,h,oe)}return fe(v,h,h.inline)}function He(v,h){var Z=y.token(v,h.htmlState);if(!C){var de=x.innerMode(y,h.htmlState);(de.mode.name=="xml"&&de.state.tagStart===null&&!de.state.context&&de.state.tokenize.isInText||h.md_inside&&v.current().indexOf(">")>-1)&&(h.f=D,h.block=Pe,h.htmlState=null)}return Z}function pe(v,h){var Z=h.listStack[h.listStack.length-1]||0,de=h.indentation=v.quote?h.push(T.formatting+"-"+v.formatting[Z]+"-"+v.quote):h.push("error"))}if(v.taskOpen)return h.push("meta"),h.length?h.join(" "):null;if(v.taskClosed)return h.push("property"),h.length?h.join(" "):null;if(v.linkHref?h.push(T.linkHref,"url"):(v.strong&&h.push(T.strong),v.em&&h.push(T.em),v.strikethrough&&h.push(T.strikethrough),v.emoji&&h.push(T.emoji),v.linkText&&h.push(T.linkText),v.code&&h.push(T.code),v.image&&h.push(T.image),v.imageAltText&&h.push(T.imageAltText,"link"),v.imageMarker&&h.push(T.imageMarker)),v.header&&h.push(T.header,T.header+"-"+v.header),v.quote&&(h.push(T.quote),!k.maxBlockquoteDepth||k.maxBlockquoteDepth>=v.quote?h.push(T.quote+"-"+v.quote):h.push(T.quote+"-"+k.maxBlockquoteDepth)),v.list!==!1){var de=(v.listStack.length-1)%3;de?de===1?h.push(T.list2):h.push(T.list3):h.push(T.list1)}return v.trailingSpaceNewLine?h.push("trailing-space-new-line"):v.trailingSpace&&h.push("trailing-space-"+(v.trailingSpace%2?"a":"b")),h.length?h.join(" "):null}function We(v,h){if(v.match(K,!0))return I(h)}function D(v,h){var Z=h.text(v,h);if(typeof Z<"u")return Z;if(h.list)return h.list=null,I(h);if(h.taskList){var de=v.match(ee,!0)[1]===" ";return de?h.taskOpen=!0:h.taskClosed=!0,k.highlightFormatting&&(h.formatting="task"),h.taskList=!1,I(h)}if(h.taskOpen=!1,h.taskClosed=!1,h.header&&v.match(/^#+$/,!0))return k.highlightFormatting&&(h.formatting="header"),I(h);var z=v.next();if(h.linkTitle){h.linkTitle=!1;var re=z;z==="("&&(re=")"),re=(re+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ge="^\\s*(?:[^"+re+"\\\\]+|\\\\\\\\|\\\\.)"+re;if(v.match(new RegExp(ge),!0))return T.linkHref}if(z==="`"){var xe=h.formatting;k.highlightFormatting&&(h.formatting="code"),v.eatWhile("`");var he=v.current().length;if(h.code==0&&(!h.quote||he==1))return h.code=he,I(h);if(he==h.code){var J=I(h);return h.code=0,J}else return h.formatting=xe,I(h)}else if(h.code)return I(h);if(z==="\\"&&(v.next(),k.highlightFormatting)){var ke=I(h),Oe=T.formatting+"-escape";return ke?ke+" "+Oe:Oe}if(z==="!"&&v.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return h.imageMarker=!0,h.image=!0,k.highlightFormatting&&(h.formatting="image"),I(h);if(z==="["&&h.imageMarker&&v.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return h.imageMarker=!1,h.imageAltText=!0,k.highlightFormatting&&(h.formatting="image"),I(h);if(z==="]"&&h.imageAltText){k.highlightFormatting&&(h.formatting="image");var ke=I(h);return h.imageAltText=!1,h.image=!1,h.inline=h.f=c,ke}if(z==="["&&!h.image)return h.linkText&&v.match(/^.*?\]/)||(h.linkText=!0,k.highlightFormatting&&(h.formatting="link")),I(h);if(z==="]"&&h.linkText){k.highlightFormatting&&(h.formatting="link");var ke=I(h);return h.linkText=!1,h.inline=h.f=v.match(/\(.*?\)| ?\[.*?\]/,!1)?c:D,ke}if(z==="<"&&v.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){h.f=h.inline=Y,k.highlightFormatting&&(h.formatting="link");var ke=I(h);return ke?ke+=" ":ke="",ke+T.linkInline}if(z==="<"&&v.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){h.f=h.inline=Y,k.highlightFormatting&&(h.formatting="link");var ke=I(h);return ke?ke+=" ":ke="",ke+T.linkEmail}if(k.xml&&z==="<"&&v.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ze=v.string.indexOf(">",v.pos);if(Ze!=-1){var pt=v.string.substring(v.start,Ze);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(pt)&&(h.md_inside=!0)}return v.backUp(1),h.htmlState=x.startState(y),De(v,h,He)}if(k.xml&&z==="<"&&v.match(/^\/\w*?>/))return h.md_inside=!1,"tag";if(z==="*"||z==="_"){for(var we=1,Ee=v.pos==1?" ":v.string.charAt(v.pos-2);we<3&&v.eat(z);)we++;var Ke=v.peek()||" ",ot=!/\s/.test(Ke)&&(!te.test(Ke)||/\s/.test(Ee)||te.test(Ee)),ye=!/\s/.test(Ee)&&(!te.test(Ee)||/\s/.test(Ke)||te.test(Ke)),Ce=null,w=null;if(we%2&&(!h.em&&ot&&(z==="*"||!ye||te.test(Ee))?Ce=!0:h.em==z&&ye&&(z==="*"||!ot||te.test(Ke))&&(Ce=!1)),we>1&&(!h.strong&&ot&&(z==="*"||!ye||te.test(Ee))?w=!0:h.strong==z&&ye&&(z==="*"||!ot||te.test(Ke))&&(w=!1)),w!=null||Ce!=null){k.highlightFormatting&&(h.formatting=Ce==null?"strong":w==null?"em":"strong em"),Ce===!0&&(h.em=z),w===!0&&(h.strong=z);var J=I(h);return Ce===!1&&(h.em=!1),w===!1&&(h.strong=!1),J}}else if(z===" "&&(v.eat("*")||v.eat("_"))){if(v.peek()===" ")return I(h);v.backUp(1)}if(k.strikethrough){if(z==="~"&&v.eatWhile(z)){if(h.strikethrough){k.highlightFormatting&&(h.formatting="strikethrough");var J=I(h);return h.strikethrough=!1,J}else if(v.match(/^[^\s]/,!1))return h.strikethrough=!0,k.highlightFormatting&&(h.formatting="strikethrough"),I(h)}else if(z===" "&&v.match("~~",!0)){if(v.peek()===" ")return I(h);v.backUp(2)}}if(k.emoji&&z===":"&&v.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){h.emoji=!0,k.highlightFormatting&&(h.formatting="emoji");var O=I(h);return h.emoji=!1,O}return z===" "&&(v.match(/^ +$/,!1)?h.trailingSpace++:h.trailingSpace&&(h.trailingSpaceNewLine=!0)),I(h)}function Y(v,h){var Z=v.next();if(Z===">"){h.f=h.inline=D,k.highlightFormatting&&(h.formatting="link");var de=I(h);return de?de+=" ":de="",de+T.linkInline}return v.match(/^[^>]+/,!0),T.linkInline}function c(v,h){if(v.eatSpace())return null;var Z=v.next();return Z==="("||Z==="["?(h.f=h.inline=N(Z==="("?")":"]"),k.highlightFormatting&&(h.formatting="link-string"),h.linkHref=!0,I(h)):"error"}var U={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function N(v){return function(h,Z){var de=h.next();if(de===v){Z.f=Z.inline=D,k.highlightFormatting&&(Z.formatting="link-string");var z=I(Z);return Z.linkHref=!1,z}return h.match(U[v]),Z.linkHref=!0,I(Z)}}function oe(v,h){return v.match(/^([^\]\\]|\\.)*\]:/,!1)?(h.f=Te,v.next(),k.highlightFormatting&&(h.formatting="link"),h.linkText=!0,I(h)):fe(v,h,D)}function Te(v,h){if(v.match("]:",!0)){h.f=h.inline=ze,k.highlightFormatting&&(h.formatting="link");var Z=I(h);return h.linkText=!1,Z}return v.match(/^([^\]\\]|\\.)+/,!0),T.linkText}function ze(v,h){return v.eatSpace()?null:(v.match(/^[^\s]+/,!0),v.peek()===void 0?h.linkTitle=!0:v.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),h.f=h.inline=D,T.linkHref+" url")}var wt={startState:function(){return{f:Pe,prevLine:{stream:null},thisLine:{stream:null},block:Pe,htmlState:null,indentation:0,inline:D,text:We,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(v){return{f:v.f,prevLine:v.prevLine,thisLine:v.thisLine,block:v.block,htmlState:v.htmlState&&x.copyState(y,v.htmlState),indentation:v.indentation,localMode:v.localMode,localState:v.localMode?x.copyState(v.localMode,v.localState):null,inline:v.inline,text:v.text,formatting:!1,linkText:v.linkText,linkTitle:v.linkTitle,linkHref:v.linkHref,code:v.code,em:v.em,strong:v.strong,strikethrough:v.strikethrough,emoji:v.emoji,header:v.header,setext:v.setext,hr:v.hr,taskList:v.taskList,list:v.list,listStack:v.listStack.slice(0),quote:v.quote,indentedCode:v.indentedCode,trailingSpace:v.trailingSpace,trailingSpaceNewLine:v.trailingSpaceNewLine,md_inside:v.md_inside,fencedEndRE:v.fencedEndRE}},token:function(v,h){if(h.formatting=!1,v!=h.thisLine.stream){if(h.header=0,h.hr=!1,v.match(/^\s*$/,!0))return nt(h),null;if(h.prevLine=h.thisLine,h.thisLine={stream:v},h.taskList=!1,h.trailingSpace=0,h.trailingSpaceNewLine=!1,!h.localState&&(h.f=h.block,h.f!=He)){var Z=v.match(/^\s*/,!0)[0].replace(/\t/g,Q).length;if(h.indentation=Z,h.indentationDiff=null,Z>0)return null}}return h.f(v,h)},innerMode:function(v){return v.block==He?{state:v.htmlState,mode:y}:v.localState?{state:v.localState,mode:v.localMode}:{state:v,mode:wt}},indent:function(v,h,Z){return v.block==He&&y.indent?y.indent(v.htmlState,h,Z):v.localState&&v.localMode.indent?v.localMode.indent(v.localState,h,Z):x.Pass},blankLine:nt,getType:I,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return wt},"xml"),x.defineMIME("text/markdown","markdown"),x.defineMIME("text/x-markdown","markdown")})})();(function(Tt,_){(function(x){x(Gt())})(function(x){x.defineMode("yaml",function(){var W=["true","false","on","off","yes","no"],k=new RegExp("\\b(("+W.join(")|(")+"))$","i");return{token:function(y,C){var q=y.peek(),T=C.escaped;if(C.escaped=!1,q=="#"&&(y.pos==0||/\s/.test(y.string.charAt(y.pos-1))))return y.skipToEnd(),"comment";if(y.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(C.literal&&y.indentation()>C.keyCol)return y.skipToEnd(),"string";if(C.literal&&(C.literal=!1),y.sol()){if(C.keyCol=0,C.pair=!1,C.pairStart=!1,y.match("---")||y.match("..."))return"def";if(y.match(/\s*-\s+/))return"meta"}if(y.match(/^(\{|\}|\[|\])/))return q=="{"?C.inlinePairs++:q=="}"?C.inlinePairs--:q=="["?C.inlineList++:C.inlineList--,"meta";if(C.inlineList>0&&!T&&q==",")return y.next(),"meta";if(C.inlinePairs>0&&!T&&q==",")return C.keyCol=0,C.pair=!1,C.pairStart=!1,y.next(),"meta";if(C.pairStart){if(y.match(/^\s*(\||\>)\s*/))return C.literal=!0,"meta";if(y.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(C.inlinePairs==0&&y.match(/^\s*-?[0-9\.\,]+\s?$/)||C.inlinePairs>0&&y.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(y.match(k))return"keyword"}return!C.pair&&y.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^\s,\[\]{}#&*!|>'"%@`])[^#:]*(?=:($|\s))/)?(C.pair=!0,C.keyCol=y.indentation(),"atom"):C.pair&&y.match(/^:\s*/)?(C.pairStart=!0,"meta"):(C.pairStart=!1,C.escaped=q=="\\",y.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),x.defineMIME("text/x-yaml","yaml"),x.defineMIME("text/yaml","yaml")})})();class Fu extends va.Component{constructor(_){super(_),this.appliedNext=void 0,this.deferred=void 0,this.editor=void 0,this.emulating=void 0,this.hydrated=void 0,this.initCb=void 0,this.mirror=void 0,this.mounted=void 0,this.ref=void 0,this.shared=void 0,this.appliedNext=!1,this.deferred=null,this.emulating=!1,this.hydrated=!1,this.initCb=()=>{this.props.editorDidConfigure&&this.props.editorDidConfigure(this.editor)},this.mounted=!1}hydrate(_){const x=_&&_.options?_.options:{},W=Object.assign({},Hi.defaults,this.editor.options,x);Object.keys(W).some(y=>this.editor.getOption(y)!==W[y])&&Object.keys(W).forEach(y=>{x.hasOwnProperty(y)&&this.editor.getOption(y)!==W[y]&&(this.editor.setOption(y,W[y]),this.mirror.setOption(y,W[y]))}),this.hydrated||(this.deferred?this.resolveChange(_.value):this.initChange(_.value||"")),this.hydrated=!0}initChange(_){this.emulating=!0;const x=this.editor.getDoc(),W=x.lastLine(),k=x.getLine(x.lastLine()).length;x.replaceRange(_||"",{line:0,ch:0},{line:W,ch:k}),this.mirror.setValue(_),x.clearHistory(),this.mirror.clearHistory(),this.emulating=!1}resolveChange(_){this.emulating=!0;const x=this.editor.getDoc();if(this.deferred.origin==="undo"?x.undo():this.deferred.origin==="redo"?x.redo():x.replaceRange(this.deferred.text,this.deferred.from,this.deferred.to,this.deferred.origin),_&&_!==x.getValue()){const W=x.getCursor();x.setValue(_),x.setCursor(W)}this.emulating=!1,this.deferred=null}mirrorChange(_){const x=this.editor.getDoc();return _.origin==="undo"?(x.setHistory(this.mirror.getHistory()),this.mirror.undo()):_.origin==="redo"?(x.setHistory(this.mirror.getHistory()),this.mirror.redo()):this.mirror.replaceRange(_.text,_.from,_.to,_.origin),this.mirror.getValue()}componentDidMount(){this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&Hi.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=Hi(this.ref,this.props.options),this.shared=new Eu(this.editor,this.props),this.mirror=Hi(()=>{},this.props.options),this.editor.on("electricInput",()=>{this.mirror.setHistory(this.editor.getDoc().getHistory())}),this.editor.on("cursorActivity",()=>{this.mirror.setCursor(this.editor.getDoc().getCursor())}),this.editor.on("beforeChange",(_,x)=>{if(this.emulating)return;x.cancel(),this.deferred=x;let W=this.mirrorChange(this.deferred);this.props.onBeforeChange&&this.props.onBeforeChange(this.editor,this.deferred,W)}),this.editor.on("change",(_,x)=>{this.mounted&&this.props.onChange&&this.props.onChange(this.editor,x,this.editor.getValue())}),this.hydrate(this.props),this.shared.apply(this.props),this.mounted=!0,this.shared.wire(this.props),this.editor.getOption("autofocus")&&this.editor.focus(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb)}componentDidUpdate(_){let x={cursor:void 0};this.props.value!==_.value&&(this.hydrated=!1),!this.props.autoCursor&&this.props.autoCursor!==void 0&&(x.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.appliedNext||(this.shared.applyNext(_,this.props,x),this.appliedNext=!0),this.shared.applyUserDefined(_,x)}componentWillUnmount(){this.props.editorWillUnmount&&this.props.editorWillUnmount(Hi)}shouldComponentUpdate(){return!0}render(){let _=this.props.className?`react-codemirror2 ${this.props.className}`:"react-codemirror2";return va.createElement("div",{className:_,ref:x=>this.ref=x})}}Fu.displayName="Controlled";class go{static equals(_,x){const W=Object.keys,k=typeof _;return _&&x&&k==="object"&&k===typeof x?W(_).length===W(x).length&&W(_).every(C=>this.equals(_[C],x[C])):_===x}}class Eu{constructor(_,x){this.editor=void 0,this.props=void 0,this.editor=_,this.props=x}delegateCursor(_,x,W){const k=this.editor.getDoc();W&&this.editor.focus(),x?k.setCursor(_):k.setCursor(_,void 0,{scroll:!1})}delegateScroll(_){this.editor.scrollTo(_.x,_.y)}delegateSelection(_,x){this.editor.getDoc().setSelections(_),x&&this.editor.focus()}apply(_){_&&_.selection&&_.selection.ranges&&this.delegateSelection(_.selection.ranges,_.selection.focus||!1),_&&_.cursor&&this.delegateCursor(_.cursor,_.autoScroll||!1,this.editor.getOption("autofocus")||!1),_&&_.scroll&&this.delegateScroll(_.scroll)}applyNext(_,x,W){_&&_.selection&&_.selection.ranges&&x&&x.selection&&x.selection.ranges&&!go.equals(_.selection.ranges,x.selection.ranges)&&this.delegateSelection(x.selection.ranges,x.selection.focus||!1),_&&_.cursor&&x&&x.cursor&&!go.equals(_.cursor,x.cursor)&&this.delegateCursor(W.cursor||x.cursor,x.autoScroll||!1,x.autoCursor||!1),_&&_.scroll&&x&&x.scroll&&!go.equals(_.scroll,x.scroll)&&this.delegateScroll(x.scroll)}applyUserDefined(_,x){x&&x.cursor&&this.delegateCursor(x.cursor,_.autoScroll||!1,this.editor.getOption("autofocus")||!1)}wire(_){Object.keys(_||{}).filter(x=>/^on/.test(x)).forEach(x=>{switch(x){case"onBlur":this.editor.on("blur",(W,k)=>{var y,C;(y=(C=this.props).onBlur)===null||y===void 0||y.call(C,this.editor,k)});break;case"onContextMenu":{this.editor.on("contextmenu",(W,k)=>{var y,C;(y=(C=this.props).onContextMenu)===null||y===void 0||y.call(C,this.editor,k)});break}case"onCopy":{this.editor.on("copy",(W,k)=>{var y,C;(y=(C=this.props).onCopy)===null||y===void 0||y.call(C,this.editor,k)});break}case"onCursor":this.editor.on("cursorActivity",()=>{var W,k;(W=(k=this.props).onCursor)===null||W===void 0||W.call(k,this.editor,this.editor.getDoc().getCursor())});break;case"onCursorActivity":this.editor.on("cursorActivity",()=>{var W,k;(W=(k=this.props).onCursorActivity)===null||W===void 0||W.call(k,this.editor)});break;case"onCut":{this.editor.on("cut",(W,k)=>{var y,C;(y=(C=this.props).onCut)===null||y===void 0||y.call(C,this.editor,k)});break}case"onDblClick":{this.editor.on("dblclick",(W,k)=>{var y,C;(y=(C=this.props).onDblClick)===null||y===void 0||y.call(C,this.editor,k)});break}case"onDragEnter":this.editor.on("dragenter",(W,k)=>{var y,C;(y=(C=this.props).onDragEnter)===null||y===void 0||y.call(C,this.editor,k)});break;case"onDragLeave":{this.editor.on("dragleave",(W,k)=>{var y,C;(y=(C=this.props).onDragLeave)===null||y===void 0||y.call(C,this.editor,k)});break}case"onDragOver":this.editor.on("dragover",(W,k)=>{var y,C;(y=(C=this.props).onDragOver)===null||y===void 0||y.call(C,this.editor,k)});break;case"onDragStart":{this.editor.on("dragstart",(W,k)=>{var y,C;(y=(C=this.props).onDragStart)===null||y===void 0||y.call(C,this.editor,k)});break}case"onDrop":this.editor.on("drop",(W,k)=>{var y,C;(y=(C=this.props).onDrop)===null||y===void 0||y.call(C,this.editor,k)});break;case"onFocus":this.editor.on("focus",(W,k)=>{var y,C;(y=(C=this.props).onFocus)===null||y===void 0||y.call(C,this.editor,k)});break;case"onGutterClick":this.editor.on("gutterClick",(W,k,y,C)=>{var q,T;(q=(T=this.props).onGutterClick)===null||q===void 0||q.call(T,this.editor,k,y,C)});break;case"onInputRead":this.editor.on("inputRead",(W,k)=>{var y,C;(y=(C=this.props).onInputRead)===null||y===void 0||y.call(C,this.editor,k)});break;case"onKeyDown":this.editor.on("keydown",(W,k)=>{var y,C;(y=(C=this.props).onKeyDown)===null||y===void 0||y.call(C,this.editor,k)});break;case"onKeyHandled":this.editor.on("keyHandled",(W,k,y)=>{var C,q;(C=(q=this.props).onKeyHandled)===null||C===void 0||C.call(q,this.editor,k,y)});break;case"onKeyPress":this.editor.on("keypress",(W,k)=>{var y,C;(y=(C=this.props).onKeyPress)===null||y===void 0||y.call(C,this.editor,k)});break;case"onKeyUp":this.editor.on("keyup",(W,k)=>{var y,C;(y=(C=this.props).onKeyUp)===null||y===void 0||y.call(C,this.editor,k)});break;case"onMouseDown":{this.editor.on("mousedown",(W,k)=>{var y,C;(y=(C=this.props).onMouseDown)===null||y===void 0||y.call(C,this.editor,k)});break}case"onPaste":{this.editor.on("paste",(W,k)=>{var y,C;(y=(C=this.props).onPaste)===null||y===void 0||y.call(C,this.editor,k)});break}case"onRenderLine":{this.editor.on("renderLine",(W,k,y)=>{var C,q;(C=(q=this.props).onRenderLine)===null||C===void 0||C.call(q,this.editor,k,y)});break}case"onScroll":this.editor.on("scroll",W=>{var k,y;(k=(y=this.props).onScroll)===null||k===void 0||k.call(y,this.editor,this.editor.getScrollInfo())});break;case"onSelection":this.editor.on("beforeSelectionChange",(W,k)=>{var y,C;(y=(C=this.props).onSelection)===null||y===void 0||y.call(C,this.editor,k)});break;case"onTouchStart":{this.editor.on("touchstart",(W,k)=>{var y,C;(y=(C=this.props).onTouchStart)===null||y===void 0||y.call(C,this.editor,k)});break}case"onUpdate":this.editor.on("update",W=>{var k,y;(k=(y=this.props).onUpdate)===null||k===void 0||k.call(y,this.editor)});break;case"onViewportChange":this.editor.on("viewportChange",(W,k,y)=>{var C,q;(C=(q=this.props).onViewportChange)===null||C===void 0||C.call(q,this.editor,k,y)});break}})}}export{Eu as Shared,Fu as default}; + outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var g;ie&&(g=n.ownerDocument.defaultView.scrollY),r.input.focus(),ie&&n.ownerDocument.defaultView.scrollTo(null,g),r.input.reset(),i.somethingSelected()||(n.value=t.prevInput=" "),t.contextMenuPending=m,r.selForContextMenu=i.doc.sel,clearTimeout(r.detectingSelectAll);function b(){if(n.selectionStart!=null){var F=i.somethingSelected(),H="​"+(F?n.value:"");n.value="⇚",n.value=H,t.prevInput=F?"":"​",n.selectionStart=1,n.selectionEnd=H.length,r.selForContextMenu=i.doc.sel}}function m(){if(t.contextMenuPending==m&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,n.style.cssText=s,T&&se<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),n.selectionStart!=null)){(!T||T&&se<9)&&b();var F=0,H=function(){r.selForContextMenu==i.doc.sel&&n.selectionStart==0&&n.selectionEnd>0&&t.prevInput=="​"?et(i,Ol)(i):F++<10?r.detectingSelectAll=setTimeout(H,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(H,200)}}if(T&&se>=9&&b(),pe){lr(e);var L=function(){st(window,"mouseup",L),setTimeout(m,20)};le(window,"mouseup",L)}else setTimeout(m,50)},Ue.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Ue.prototype.setUneditable=function(){},Ue.prototype.needsContentAttribute=!1;function Su(e,t){if(t=t?ge(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var i=Te(de(e));t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function r(){e.value=a.getValue()}var n;if(e.form&&(le(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;n=o.submit;try{var l=o.submit=function(){r(),o.submit=n,o.submit(),o.submit=l}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(st(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=n))}},e.style.display="none";var a=Ie(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return a}function Cu(e){e.off=st,e.on=le,e.wheelEventPixels=Es,e.Doc=xt,e.splitLines=Ft,e.countColumn=xe,e.findColumn=Ee,e.isWordChar=at,e.Pass=Oe,e.signal=Re,e.Line=Br,e.changeEnd=pr,e.scrollbarModel=ul,e.Pos=S,e.cmpPos=G,e.modes=Or,e.mimeModes=Pt,e.resolveMode=Pr,e.getMode=Hr,e.modeExtensions=ur,e.extendMode=Wr,e.copyState=_t,e.startState=Ir,e.innerMode=li,e.commands=Fi,e.keyMap=tr,e.keyName=$l,e.isModifierKey=Xl,e.lookupKey=Qr,e.normalizeKeyMap=Vs,e.StringStream=qe,e.SharedTextMarker=Di,e.TextMarker=vr,e.LineWidget=Ti,e.e_preventDefault=ut,e.e_stopPropagation=Er,e.e_stop=lr,e.addClass=ze,e.contains=oe,e.rmClass=We,e.keyNames=mr}gu(Ie),yu(Ie);var Lu="iter insert remove copy getEditor constructor".split(" ");for(var vn in xt.prototype)xt.prototype.hasOwnProperty(vn)&&J(Lu,vn)<0&&(Ie.prototype[vn]=function(e){return function(){return e.apply(this.doc,arguments)}}(xt.prototype[vn]));return Et(xt),Ie.inputStyles={textarea:Ue,contenteditable:Fe},Ie.defineMode=function(e){!Ie.defaults.mode&&e!="null"&&(Ie.defaults.mode=e),Ht.apply(this,arguments)},Ie.defineMIME=br,Ie.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ie.defineMIME("text/plain","null"),Ie.defineExtension=function(e,t){Ie.prototype[e]=t},Ie.defineDocExtension=function(e,t){xt.prototype[e]=t},Ie.fromTextArea=Su,Cu(Ie),Ie.version="5.65.16",Ie})})(Ca);var Gt=Ca.exports;const Hi=Du(Gt);var va={exports:{}},ma;function go(){return ma||(ma=1,function(Tt,_){(function(x){x(Gt)})(function(x){var W={autoSelfClosers:{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},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{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}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},k={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};x.defineMode("xml",function(y,C){var q=y.indentUnit,T={},se=C.htmlMode?W:k;for(var ie in se)T[ie]=se[ie];for(var ie in C)T[ie]=C[ie];var ve,ee;function j(c,U){function N(ze){return U.tokenize=ze,ze(c,U)}var oe=c.next();if(oe=="<")return c.eat("!")?c.eat("[")?c.match("CDATA[")?N(ce("atom","]]>")):null:c.match("--")?N(ce("comment","-->")):c.match("DOCTYPE",!0,!0)?(c.eatWhile(/[\w\._\-]/),N(ue(1))):null:c.eat("?")?(c.eatWhile(/[\w\._\-]/),U.tokenize=ce("meta","?>"),"meta"):(ve=c.eat("/")?"closeTag":"openTag",U.tokenize=E,"tag bracket");if(oe=="&"){var Te;return c.eat("#")?c.eat("x")?Te=c.eatWhile(/[a-fA-F\d]/)&&c.eat(";"):Te=c.eatWhile(/[\d]/)&&c.eat(";"):Te=c.eatWhile(/[\w\.\-:]/)&&c.eat(";"),Te?"atom":"error"}else return c.eatWhile(/[^&<]/),null}j.isInText=!0;function E(c,U){var N=c.next();if(N==">"||N=="/"&&c.eat(">"))return U.tokenize=j,ve=N==">"?"endTag":"selfcloseTag","tag bracket";if(N=="=")return ve="equals",null;if(N=="<"){U.tokenize=j,U.state=Ge,U.tagName=U.tagStart=null;var oe=U.tokenize(c,U);return oe?oe+" tag error":"tag error"}else return/[\'\"]/.test(N)?(U.tokenize=K(N),U.stringStartCol=c.column(),U.tokenize(c,U)):(c.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function K(c){var U=function(N,oe){for(;!N.eol();)if(N.next()==c){oe.tokenize=E;break}return"string"};return U.isInAttribute=!0,U}function ce(c,U){return function(N,oe){for(;!N.eol();){if(N.match(U)){oe.tokenize=j;break}N.next()}return c}}function ue(c){return function(U,N){for(var oe;(oe=U.next())!=null;){if(oe=="<")return N.tokenize=ue(c+1),N.tokenize(U,N);if(oe==">")if(c==1){N.tokenize=j;break}else return N.tokenize=ue(c-1),N.tokenize(U,N)}return"meta"}}function te(c){return c&&c.toLowerCase()}function Q(c,U,N){this.prev=c.context,this.tagName=U||"",this.indent=c.indented,this.startOfLine=N,(T.doNotIndent.hasOwnProperty(U)||c.context&&c.context.noIndent)&&(this.noIndent=!0)}function fe(c){c.context&&(c.context=c.context.prev)}function De(c,U){for(var N;;){if(!c.context||(N=c.context.tagName,!T.contextGrabbers.hasOwnProperty(te(N))||!T.contextGrabbers[te(N)].hasOwnProperty(te(U))))return;fe(c)}}function Ge(c,U,N){return c=="openTag"?(N.tagStart=U.column(),nt):c=="closeTag"?Pe:Ge}function nt(c,U,N){return c=="word"?(N.tagName=U.current(),ee="tag",I):T.allowMissingTagName&&c=="endTag"?(ee="tag bracket",I(c,U,N)):(ee="error",nt)}function Pe(c,U,N){if(c=="word"){var oe=U.current();return N.context&&N.context.tagName!=oe&&T.implicitlyClosed.hasOwnProperty(te(N.context.tagName))&&fe(N),N.context&&N.context.tagName==oe||T.matchClosing===!1?(ee="tag",He):(ee="tag error",pe)}else return T.allowMissingTagName&&c=="endTag"?(ee="tag bracket",He(c,U,N)):(ee="error",pe)}function He(c,U,N){return c!="endTag"?(ee="error",He):(fe(N),Ge)}function pe(c,U,N){return ee="error",He(c,U,N)}function I(c,U,N){if(c=="word")return ee="attribute",We;if(c=="endTag"||c=="selfcloseTag"){var oe=N.tagName,Te=N.tagStart;return N.tagName=N.tagStart=null,c=="selfcloseTag"||T.autoSelfClosers.hasOwnProperty(te(oe))?De(N,oe):(De(N,oe),N.context=new Q(N,oe,Te==N.indented)),Ge}return ee="error",I}function We(c,U,N){return c=="equals"?D:(T.allowMissing||(ee="error"),I(c,U,N))}function D(c,U,N){return c=="string"?Y:c=="word"&&T.allowUnquoted?(ee="string",I):(ee="error",I(c,U,N))}function Y(c,U,N){return c=="string"?Y:I(c,U,N)}return{startState:function(c){var U={tokenize:j,state:Ge,indented:c||0,tagName:null,tagStart:null,context:null};return c!=null&&(U.baseIndent=c),U},token:function(c,U){if(!U.tagName&&c.sol()&&(U.indented=c.indentation()),c.eatSpace())return null;ve=null;var N=U.tokenize(c,U);return(N||ve)&&N!="comment"&&(ee=null,U.state=U.state(ve||N,c,U),ee&&(N=ee=="error"?N+" error":ee)),N},indent:function(c,U,N){var oe=c.context;if(c.tokenize.isInAttribute)return c.tagStart==c.indented?c.stringStartCol+1:c.indented+q;if(oe&&oe.noIndent)return x.Pass;if(c.tokenize!=E&&c.tokenize!=j)return N?N.match(/^(\s*)/)[0].length:0;if(c.tagName)return T.multilineTagIndentPastTag!==!1?c.tagStart+c.tagName.length+2:c.tagStart+q*(T.multilineTagIndentFactor||1);if(T.alignCDATA&&/$/,blockCommentStart:"",configuration:T.htmlMode?"html":"xml",helperType:T.htmlMode?"html":"xml",skipAttribute:function(c){c.state==D&&(c.state=I)},xmlCurrentTag:function(c){return c.tagName?{name:c.tagName,close:c.type=="closeTag"}:null},xmlCurrentContext:function(c){for(var U=[],N=c.context;N;N=N.prev)U.push(N.tagName);return U.reverse()}}}),x.defineMIME("text/xml","xml"),x.defineMIME("application/xml","xml"),x.mimeModes.hasOwnProperty("text/html")||x.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),va.exports}var xa={exports:{}},ya;function La(){return ya||(ya=1,function(Tt,_){(function(x){x(Gt)})(function(x){x.defineMode("javascript",function(W,k){var y=W.indentUnit,C=k.statementIndent,q=k.jsonld,T=k.json||q,se=k.trackScope!==!1,ie=k.typescript,ve=k.wordCharacters||/[\w$\xa1-\uffff]/,ee=function(){function f(Qe){return{type:Qe,style:"keyword"}}var p=f("keyword a"),A=f("keyword b"),P=f("keyword c"),S=f("keyword d"),G=f("operator"),Me={type:"atom",style:"atom"};return{if:f("if"),while:p,with:p,else:A,do:A,try:A,finally:A,return:S,break:S,continue:S,new:f("new"),delete:P,void:P,throw:P,debugger:f("debugger"),var:f("var"),const:f("var"),let:f("var"),function:f("function"),catch:f("catch"),for:f("for"),switch:f("switch"),case:f("case"),default:f("default"),in:G,typeof:G,instanceof:G,true:Me,false:Me,null:Me,undefined:Me,NaN:Me,Infinity:Me,this:f("this"),class:f("class"),super:f("atom"),yield:P,export:f("export"),import:f("import"),extends:P,await:P}}(),j=/[+\-*&%=<>!?|~^@]/,E=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function K(f){for(var p=!1,A,P=!1;(A=f.next())!=null;){if(!p){if(A=="/"&&!P)return;A=="["?P=!0:P&&A=="]"&&(P=!1)}p=!p&&A=="\\"}}var ce,ue;function te(f,p,A){return ce=f,ue=A,p}function Q(f,p){var A=f.next();if(A=='"'||A=="'")return p.tokenize=fe(A),p.tokenize(f,p);if(A=="."&&f.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return te("number","number");if(A=="."&&f.match(".."))return te("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(A))return te(A);if(A=="="&&f.eat(">"))return te("=>","operator");if(A=="0"&&f.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return te("number","number");if(/\d/.test(A))return f.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),te("number","number");if(A=="/")return f.eat("*")?(p.tokenize=De,De(f,p)):f.eat("/")?(f.skipToEnd(),te("comment","comment")):Dt(f,p,1)?(K(f),f.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),te("regexp","string-2")):(f.eat("="),te("operator","operator",f.current()));if(A=="`")return p.tokenize=Ge,Ge(f,p);if(A=="#"&&f.peek()=="!")return f.skipToEnd(),te("meta","meta");if(A=="#"&&f.eatWhile(ve))return te("variable","property");if(A=="<"&&f.match("!--")||A=="-"&&f.match("->")&&!/\S/.test(f.string.slice(0,f.start)))return f.skipToEnd(),te("comment","comment");if(j.test(A))return(A!=">"||!p.lexical||p.lexical.type!=">")&&(f.eat("=")?(A=="!"||A=="=")&&f.eat("="):/[<>*+\-|&?]/.test(A)&&(f.eat(A),A==">"&&f.eat(A))),A=="?"&&f.eat(".")?te("."):te("operator","operator",f.current());if(ve.test(A)){f.eatWhile(ve);var P=f.current();if(p.lastType!="."){if(ee.propertyIsEnumerable(P)){var S=ee[P];return te(S.type,S.style,P)}if(P=="async"&&f.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return te("async","keyword",P)}return te("variable","variable",P)}}function fe(f){return function(p,A){var P=!1,S;if(q&&p.peek()=="@"&&p.match(E))return A.tokenize=Q,te("jsonld-keyword","meta");for(;(S=p.next())!=null&&!(S==f&&!P);)P=!P&&S=="\\";return P||(A.tokenize=Q),te("string","string")}}function De(f,p){for(var A=!1,P;P=f.next();){if(P=="/"&&A){p.tokenize=Q;break}A=P=="*"}return te("comment","comment")}function Ge(f,p){for(var A=!1,P;(P=f.next())!=null;){if(!A&&(P=="`"||P=="$"&&f.eat("{"))){p.tokenize=Q;break}A=!A&&P=="\\"}return te("quasi","string-2",f.current())}var nt="([{}])";function Pe(f,p){p.fatArrowAt&&(p.fatArrowAt=null);var A=f.string.indexOf("=>",f.start);if(!(A<0)){if(ie){var P=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(f.string.slice(f.start,A));P&&(A=P.index)}for(var S=0,G=!1,Me=A-1;Me>=0;--Me){var Qe=f.string.charAt(Me),vt=nt.indexOf(Qe);if(vt>=0&&vt<3){if(!S){++Me;break}if(--S==0){Qe=="("&&(G=!0);break}}else if(vt>=3&&vt<6)++S;else if(ve.test(Qe))G=!0;else if(/["'\/`]/.test(Qe))for(;;--Me){if(Me==0)return;var zr=f.string.charAt(Me-1);if(zr==Qe&&f.string.charAt(Me-2)!="\\"){Me--;break}}else if(G&&!S){++Me;break}}G&&!S&&(p.fatArrowAt=Me)}}var He={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function pe(f,p,A,P,S,G){this.indented=f,this.column=p,this.type=A,this.prev=S,this.info=G,P!=null&&(this.align=P)}function I(f,p){if(!se)return!1;for(var A=f.localVars;A;A=A.next)if(A.name==p)return!0;for(var P=f.context;P;P=P.prev)for(var A=P.vars;A;A=A.next)if(A.name==p)return!0}function We(f,p,A,P,S){var G=f.cc;for(D.state=f,D.stream=S,D.marked=null,D.cc=G,D.style=p,f.lexical.hasOwnProperty("align")||(f.lexical.align=!0);;){var Me=G.length?G.pop():T?J:xe;if(Me(A,P)){for(;G.length&&G[G.length-1].lex;)G.pop()();return D.marked?D.marked:A=="variable"&&I(f,P)?"variable-2":p}}}var D={state:null,column:null,marked:null,cc:null};function Y(){for(var f=arguments.length-1;f>=0;f--)D.cc.push(arguments[f])}function c(){return Y.apply(null,arguments),!0}function U(f,p){for(var A=p;A;A=A.next)if(A.name==f)return!0;return!1}function N(f){var p=D.state;if(D.marked="def",!!se){if(p.context){if(p.lexical.info=="var"&&p.context&&p.context.block){var A=oe(f,p.context);if(A!=null){p.context=A;return}}else if(!U(f,p.localVars)){p.localVars=new wt(f,p.localVars);return}}k.globalVars&&!U(f,p.globalVars)&&(p.globalVars=new wt(f,p.globalVars))}}function oe(f,p){if(p)if(p.block){var A=oe(f,p.prev);return A?A==p.prev?p:new ze(A,p.vars,!0):null}else return U(f,p.vars)?p:new ze(p.prev,new wt(f,p.vars),!1);else return null}function Te(f){return f=="public"||f=="private"||f=="protected"||f=="abstract"||f=="readonly"}function ze(f,p,A){this.prev=f,this.vars=p,this.block=A}function wt(f,p){this.name=f,this.next=p}var v=new wt("this",new wt("arguments",null));function h(){D.state.context=new ze(D.state.context,D.state.localVars,!1),D.state.localVars=v}function Z(){D.state.context=new ze(D.state.context,D.state.localVars,!0),D.state.localVars=null}h.lex=Z.lex=!0;function de(){D.state.localVars=D.state.context.vars,D.state.context=D.state.context.prev}de.lex=!0;function z(f,p){var A=function(){var P=D.state,S=P.indented;if(P.lexical.type=="stat")S=P.lexical.indented;else for(var G=P.lexical;G&&G.type==")"&&G.align;G=G.prev)S=G.indented;P.lexical=new pe(S,D.stream.column(),f,null,P.lexical,p)};return A.lex=!0,A}function re(){var f=D.state;f.lexical.prev&&(f.lexical.type==")"&&(f.indented=f.lexical.indented),f.lexical=f.lexical.prev)}re.lex=!0;function ge(f){function p(A){return A==f?c():f==";"||A=="}"||A==")"||A=="]"?Y():c(p)}return p}function xe(f,p){return f=="var"?c(z("vardef",p),Er,ge(";"),re):f=="keyword a"?c(z("form"),Oe,xe,re):f=="keyword b"?c(z("form"),xe,re):f=="keyword d"?D.stream.match(/^\s*$/,!1)?c():c(z("stat"),pt,ge(";"),re):f=="debugger"?c(ge(";")):f=="{"?c(z("}"),Z,Rt,re,de):f==";"?c():f=="if"?(D.state.lexical.info=="else"&&D.state.cc[D.state.cc.length-1]==re&&D.state.cc.pop()(),c(z("form"),Oe,xe,re,Nr)):f=="function"?c(Ft):f=="for"?c(z("form"),Z,zi,xe,de,re):f=="class"||ie&&p=="interface"?(D.marked="keyword",c(z("form",f=="class"?f:p),Or,re)):f=="variable"?ie&&p=="declare"?(D.marked="keyword",c(xe)):ie&&(p=="module"||p=="enum"||p=="type")&&D.stream.match(/^\s*\w/,!1)?(D.marked="keyword",p=="enum"?c(V):p=="type"?c(Bi,ge("operator"),Se,ge(";")):c(z("form"),gt,ge("{"),z("}"),Rt,re,re)):ie&&p=="namespace"?(D.marked="keyword",c(z("form"),J,xe,re)):ie&&p=="abstract"?(D.marked="keyword",c(xe)):c(z("stat"),Le):f=="switch"?c(z("form"),Oe,ge("{"),z("}","switch"),Z,Rt,re,re,de):f=="case"?c(J,ge(":")):f=="default"?c(ge(":")):f=="catch"?c(z("form"),h,he,xe,re,de):f=="export"?c(z("stat"),Pr,re):f=="import"?c(z("stat"),ur,re):f=="async"?c(xe):p=="@"?c(J,xe):Y(z("stat"),J,ge(";"),re)}function he(f){if(f=="(")return c(Ot,ge(")"))}function J(f,p){return Ze(f,p,!1)}function ke(f,p){return Ze(f,p,!0)}function Oe(f){return f!="("?Y():c(z(")"),pt,ge(")"),re)}function Ze(f,p,A){if(D.state.fatArrowAt==D.stream.start){var P=A?Ce:ye;if(f=="(")return c(h,z(")"),Xe(Ot,")"),re,ge("=>"),P,de);if(f=="variable")return Y(h,gt,ge("=>"),P,de)}var S=A?Ee:we;return He.hasOwnProperty(f)?c(S):f=="function"?c(Ft,S):f=="class"||ie&&p=="interface"?(D.marked="keyword",c(z("form"),yn,re)):f=="keyword c"||f=="async"?c(A?ke:J):f=="("?c(z(")"),pt,ge(")"),re,S):f=="operator"||f=="spread"?c(A?ke:J):f=="["?c(z("]"),qe,re,S):f=="{"?ir(Xt,"}",null,S):f=="quasi"?Y(Ke,S):f=="new"?c(w(A)):c()}function pt(f){return f.match(/[;\}\)\],]/)?Y():Y(J)}function we(f,p){return f==","?c(pt):Ee(f,p,!1)}function Ee(f,p,A){var P=A==!1?we:Ee,S=A==!1?J:ke;if(f=="=>")return c(h,A?Ce:ye,de);if(f=="operator")return/\+\+|--/.test(p)||ie&&p=="!"?c(P):ie&&p=="<"&&D.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?c(z(">"),Xe(Se,">"),re,P):p=="?"?c(J,ge(":"),S):c(S);if(f=="quasi")return Y(Ke,P);if(f!=";"){if(f=="(")return ir(ke,")","call",P);if(f==".")return c(at,P);if(f=="[")return c(z("]"),pt,ge("]"),re,P);if(ie&&p=="as")return D.marked="keyword",c(Se,P);if(f=="regexp")return D.state.lastType=D.marked="operator",D.stream.backUp(D.stream.pos-D.stream.start-1),c(S)}}function Ke(f,p){return f!="quasi"?Y():p.slice(p.length-2)!="${"?c(Ke):c(pt,ot)}function ot(f){if(f=="}")return D.marked="string-2",D.state.tokenize=Ge,c(Ke)}function ye(f){return Pe(D.stream,D.state),Y(f=="{"?xe:J)}function Ce(f){return Pe(D.stream,D.state),Y(f=="{"?xe:ke)}function w(f){return function(p){return p=="."?c(f?M:O):p=="variable"&&ie?c(St,f?Ee:we):Y(f?ke:J)}}function O(f,p){if(p=="target")return D.marked="keyword",c(we)}function M(f,p){if(p=="target")return D.marked="keyword",c(Ee)}function Le(f){return f==":"?c(re,xe):Y(we,ge(";"),re)}function at(f){if(f=="variable")return D.marked="property",c()}function Xt(f,p){if(f=="async")return D.marked="property",c(Xt);if(f=="variable"||D.style=="keyword"){if(D.marked="property",p=="get"||p=="set")return c(Wi);var A;return ie&&D.state.fatArrowAt==D.stream.start&&(A=D.stream.match(/^\s*:\s*/,!1))&&(D.state.fatArrowAt=D.stream.pos+A[0].length),c(Yt)}else{if(f=="number"||f=="string")return D.marked=q?"property":D.style+" property",c(Yt);if(f=="jsonld-keyword")return c(Yt);if(ie&&Te(p))return D.marked="keyword",c(Xt);if(f=="[")return c(J,nr,ge("]"),Yt);if(f=="spread")return c(ke,Yt);if(p=="*")return D.marked="keyword",c(Xt);if(f==":")return Y(Yt)}}function Wi(f){return f!="variable"?Y(Yt):(D.marked="property",c(Ft))}function Yt(f){if(f==":")return c(ke);if(f=="(")return Y(Ft)}function Xe(f,p,A){function P(S,G){if(A?A.indexOf(S)>-1:S==","){var Me=D.state.lexical;return Me.info=="call"&&(Me.pos=(Me.pos||0)+1),c(function(Qe,vt){return Qe==p||vt==p?Y():Y(f)},P)}return S==p||G==p?c():A&&A.indexOf(";")>-1?Y(f):c(ge(p))}return function(S,G){return S==p||G==p?c():Y(f,P)}}function ir(f,p,A){for(var P=3;P"),Se);if(f=="quasi")return Y(st,At)}function Ii(f){if(f=="=>")return c(Se)}function le(f){return f.match(/[\}\)\]]/)?c():f==","||f==";"?c(le):Y($t,le)}function $t(f,p){if(f=="variable"||D.style=="keyword")return D.marked="property",c($t);if(p=="?"||f=="number"||f=="string")return c($t);if(f==":")return c(Se);if(f=="[")return c(ge("variable"),yr,ge("]"),$t);if(f=="(")return Y(sr,$t);if(!f.match(/[;\}\)\],]/))return c()}function st(f,p){return f!="quasi"?Y():p.slice(p.length-2)!="${"?c(st):c(Se,Re)}function Re(f){if(f=="}")return D.marked="string-2",D.state.tokenize=Ge,c(st)}function _e(f,p){return f=="variable"&&D.stream.match(/^\s*[?:]/,!1)||p=="?"?c(_e):f==":"?c(Se):f=="spread"?c(_e):Y(Se)}function At(f,p){if(p=="<")return c(z(">"),Xe(Se,">"),re,At);if(p=="|"||f=="."||p=="&")return c(Se);if(f=="[")return c(Se,ge("]"),At);if(p=="extends"||p=="implements")return D.marked="keyword",c(Se);if(p=="?")return c(Se,ge(":"),Se)}function St(f,p){if(p=="<")return c(z(">"),Xe(Se,">"),re,At)}function Et(){return Y(Se,ut)}function ut(f,p){if(p=="=")return c(Se)}function Er(f,p){return p=="enum"?(D.marked="keyword",c(V)):Y(gt,nr,Nt,xn)}function gt(f,p){if(ie&&Te(p))return D.marked="keyword",c(gt);if(f=="variable")return N(p),c();if(f=="spread")return c(gt);if(f=="[")return ir(ni,"]");if(f=="{")return ir(lr,"}")}function lr(f,p){return f=="variable"&&!D.stream.match(/^\s*:/,!1)?(N(p),c(Nt)):(f=="variable"&&(D.marked="property"),f=="spread"?c(gt):f=="}"?Y():f=="["?c(J,ge("]"),ge(":"),lr):c(ge(":"),gt,Nt))}function ni(){return Y(gt,Nt)}function Nt(f,p){if(p=="=")return c(ke)}function xn(f){if(f==",")return c(Er)}function Nr(f,p){if(f=="keyword b"&&p=="else")return c(z("form","else"),xe,re)}function zi(f,p){if(p=="await")return c(zi);if(f=="(")return c(z(")"),oi,re)}function oi(f){return f=="var"?c(Er,ar):f=="variable"?c(ar):Y(ar)}function ar(f,p){return f==")"?c():f==";"?c(ar):p=="in"||p=="of"?(D.marked="keyword",c(J,ar)):Y(J,ar)}function Ft(f,p){if(p=="*")return D.marked="keyword",c(Ft);if(f=="variable")return N(p),c(Ft);if(f=="(")return c(h,z(")"),Xe(Ot,")"),re,or,xe,de);if(ie&&p=="<")return c(z(">"),Xe(Et,">"),re,Ft)}function sr(f,p){if(p=="*")return D.marked="keyword",c(sr);if(f=="variable")return N(p),c(sr);if(f=="(")return c(h,z(")"),Xe(Ot,")"),re,or,de);if(ie&&p=="<")return c(z(">"),Xe(Et,">"),re,sr)}function Bi(f,p){if(f=="keyword"||f=="variable")return D.marked="type",c(Bi);if(p=="<")return c(z(">"),Xe(Et,">"),re)}function Ot(f,p){return p=="@"&&c(J,Ot),f=="spread"?c(Ot):ie&&Te(p)?(D.marked="keyword",c(Ot)):ie&&f=="this"?c(nr,Nt):Y(gt,nr,Nt)}function yn(f,p){return f=="variable"?Or(f,p):Pt(f,p)}function Or(f,p){if(f=="variable")return N(p),c(Pt)}function Pt(f,p){if(p=="<")return c(z(">"),Xe(Et,">"),re,Pt);if(p=="extends"||p=="implements"||ie&&f==",")return p=="implements"&&(D.marked="keyword"),c(ie?Se:J,Pt);if(f=="{")return c(z("}"),Ht,re)}function Ht(f,p){if(f=="async"||f=="variable"&&(p=="static"||p=="get"||p=="set"||ie&&Te(p))&&D.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return D.marked="keyword",c(Ht);if(f=="variable"||D.style=="keyword")return D.marked="property",c(br,Ht);if(f=="number"||f=="string")return c(br,Ht);if(f=="[")return c(J,nr,ge("]"),br,Ht);if(p=="*")return D.marked="keyword",c(Ht);if(ie&&f=="(")return Y(sr,Ht);if(f==";"||f==",")return c(Ht);if(f=="}")return c();if(p=="@")return c(J,Ht)}function br(f,p){if(p=="!"||p=="?")return c(br);if(f==":")return c(Se,Nt);if(p=="=")return c(ke);var A=D.state.lexical.prev,P=A&&A.info=="interface";return Y(P?sr:Ft)}function Pr(f,p){return p=="*"?(D.marked="keyword",c(Ir,ge(";"))):p=="default"?(D.marked="keyword",c(J,ge(";"))):f=="{"?c(Xe(Hr,"}"),Ir,ge(";")):Y(xe)}function Hr(f,p){if(p=="as")return D.marked="keyword",c(ge("variable"));if(f=="variable")return Y(ke,Hr)}function ur(f){return f=="string"?c():f=="("?Y(J):f=="."?Y(we):Y(Wr,_t,Ir)}function Wr(f,p){return f=="{"?ir(Wr,"}"):(f=="variable"&&N(p),p=="*"&&(D.marked="keyword"),c(li))}function _t(f){if(f==",")return c(Wr,_t)}function li(f,p){if(p=="as")return D.marked="keyword",c(Wr)}function Ir(f,p){if(p=="from")return D.marked="keyword",c(J)}function qe(f){return f=="]"?c():Y(Xe(ke,"]"))}function V(){return Y(z("form"),gt,ge("{"),z("}"),Xe(Zt,"}"),re,re)}function Zt(){return Y(gt,Nt)}function ai(f,p){return f.lastType=="operator"||f.lastType==","||j.test(p.charAt(0))||/[,.]/.test(p.charAt(0))}function Dt(f,p,A){return p.tokenize==Q&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(p.lastType)||p.lastType=="quasi"&&/\{\s*$/.test(f.string.slice(0,f.pos-(A||0)))}return{startState:function(f){var p={tokenize:Q,lastType:"sof",cc:[],lexical:new pe((f||0)-y,0,"block",!1),localVars:k.localVars,context:k.localVars&&new ze(null,null,!1),indented:f||0};return k.globalVars&&typeof k.globalVars=="object"&&(p.globalVars=k.globalVars),p},token:function(f,p){if(f.sol()&&(p.lexical.hasOwnProperty("align")||(p.lexical.align=!1),p.indented=f.indentation(),Pe(f,p)),p.tokenize!=De&&f.eatSpace())return null;var A=p.tokenize(f,p);return ce=="comment"?A:(p.lastType=ce=="operator"&&(ue=="++"||ue=="--")?"incdec":ce,We(p,A,ce,ue,f))},indent:function(f,p){if(f.tokenize==De||f.tokenize==Ge)return x.Pass;if(f.tokenize!=Q)return 0;var A=p&&p.charAt(0),P=f.lexical,S;if(!/^\s*else\b/.test(p))for(var G=f.cc.length-1;G>=0;--G){var Me=f.cc[G];if(Me==re)P=P.prev;else if(Me!=Nr&&Me!=de)break}for(;(P.type=="stat"||P.type=="form")&&(A=="}"||(S=f.cc[f.cc.length-1])&&(S==we||S==Ee)&&!/^[,\.=+\-*:?[\(]/.test(p));)P=P.prev;C&&P.type==")"&&P.prev.type=="stat"&&(P=P.prev);var Qe=P.type,vt=A==Qe;return Qe=="vardef"?P.indented+(f.lastType=="operator"||f.lastType==","?P.info.length+1:0):Qe=="form"&&A=="{"?P.indented:Qe=="form"?P.indented+y:Qe=="stat"?P.indented+(ai(f,p)?C||y:0):P.info=="switch"&&!vt&&k.doubleIndentSwitch!=!1?P.indented+(/^(?:case|default)\b/.test(p)?y:2*y):P.align?P.column+(vt?0:1):P.indented+(vt?0:y)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:T?null:"/*",blockCommentEnd:T?null:"*/",blockCommentContinue:T?null:" * ",lineComment:T?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:T?"json":"javascript",jsonldMode:q,jsonMode:T,expressionAllowed:Dt,skipExpression:function(f){We(f,"atom","atom","true",new x.StringStream("",2,null))}}}),x.registerHelper("wordChars","javascript",/[\w$]/),x.defineMIME("text/javascript","javascript"),x.defineMIME("text/ecmascript","javascript"),x.defineMIME("application/javascript","javascript"),x.defineMIME("application/x-javascript","javascript"),x.defineMIME("application/ecmascript","javascript"),x.defineMIME("application/json",{name:"javascript",json:!0}),x.defineMIME("application/x-json",{name:"javascript",json:!0}),x.defineMIME("application/manifest+json",{name:"javascript",json:!0}),x.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),x.defineMIME("text/typescript",{name:"javascript",typescript:!0}),x.defineMIME("application/typescript",{name:"javascript",typescript:!0})})}()),xa.exports}(function(Tt,_){(function(x){x(Gt,go(),La())})(function(x){function W(y,C,q,T){this.state=y,this.mode=C,this.depth=q,this.prev=T}function k(y){return new W(x.copyState(y.mode,y.state),y.mode,y.depth,y.prev&&k(y.prev))}x.defineMode("jsx",function(y,C){var q=x.getMode(y,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),T=x.getMode(y,C&&C.base||"javascript");function se(j){var E=j.tagName;j.tagName=null;var K=q.indent(j,"","");return j.tagName=E,K}function ie(j,E){return E.context.mode==q?ve(j,E,E.context):ee(j,E,E.context)}function ve(j,E,K){if(K.depth==2)return j.match(/^.*?\*\//)?K.depth=1:j.skipToEnd(),"comment";if(j.peek()=="{"){q.skipAttribute(K.state);var ce=se(K.state),ue=K.state.context;if(ue&&j.match(/^[^>]*>\s*$/,!1)){for(;ue.prev&&!ue.startOfLine;)ue=ue.prev;ue.startOfLine?ce-=y.indentUnit:K.prev.state.lexical&&(ce=K.prev.state.lexical.indented)}else K.depth==1&&(ce+=y.indentUnit);return E.context=new W(x.startState(T,ce),T,0,E.context),null}if(K.depth==1){if(j.peek()=="<")return q.skipAttribute(K.state),E.context=new W(x.startState(q,se(K.state)),q,0,E.context),null;if(j.match("//"))return j.skipToEnd(),"comment";if(j.match("/*"))return K.depth=2,ie(j,E)}var te=q.token(j,K.state),Q=j.current(),fe;return/\btag\b/.test(te)?/>$/.test(Q)?K.state.context?K.depth=0:E.context=E.context.prev:/^-1&&j.backUp(Q.length-fe),te}function ee(j,E,K){if(j.peek()=="<"&&!j.match(/^<([^<>]|<[^>]*>)+,\s*>/,!1)&&T.expressionAllowed(j,K.state))return E.context=new W(x.startState(q,T.indent(K.state,"","")),q,0,E.context),T.skipExpression(K.state),null;var ce=T.token(j,K.state);if(!ce&&K.depth!=null){var ue=j.current();ue=="{"?K.depth++:ue=="}"&&--K.depth==0&&(E.context=E.context.prev)}return ce}return{startState:function(){return{context:new W(x.startState(T),T)}},copyState:function(j){return{context:k(j.context)}},token:ie,indent:function(j,E,K){return j.context.mode.indent(j.context.state,E,K)},innerMode:function(j){return j.context}}},"xml","javascript"),x.defineMIME("text/jsx","jsx"),x.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})})})();(function(Tt,_){(function(x){x(Gt)})(function(x){x.defineMode("shell",function(){var W={};function k(E,K){for(var ce=0;ce1&&E.eat("$");var ce=E.next();return/['"({]/.test(ce)?(K.tokens[0]=se(ce,ce=="("?"quote":ce=="{"?"def":"string"),j(E,K)):(/\d/.test(ce)||E.eatWhile(/\w/),K.tokens.shift(),"def")};function ee(E){return function(K,ce){return K.sol()&&K.string==E&&ce.tokens.shift(),K.skipToEnd(),"string-2"}}function j(E,K){return(K.tokens[0]||T)(E,K)}return{startState:function(){return{tokens:[]}},token:function(E,K){return j(E,K)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),x.defineMIME("text/x-sh","shell"),x.defineMIME("application/x-sh","shell")})})();var ba={exports:{}},ka;function Ta(){return ka||(ka=1,function(Tt,_){(function(x){x(Gt)})(function(x){x.defineMode("css",function(pe,I){var We=I.inline;I.propertyKeywords||(I=x.resolveMode("text/css"));var D=pe.indentUnit,Y=I.tokenHooks,c=I.documentTypes||{},U=I.mediaTypes||{},N=I.mediaFeatures||{},oe=I.mediaValueKeywords||{},Te=I.propertyKeywords||{},ze=I.nonStandardPropertyKeywords||{},wt=I.fontProperties||{},v=I.counterDescriptors||{},h=I.colorKeywords||{},Z=I.valueKeywords||{},de=I.allowNested,z=I.lineComment,re=I.supportsAtComponent===!0,ge=pe.highlightNonStandardPropertyKeywords!==!1,xe,he;function J(w,O){return xe=O,w}function ke(w,O){var M=w.next();if(Y[M]){var Le=Y[M](w,O);if(Le!==!1)return Le}if(M=="@")return w.eatWhile(/[\w\\\-]/),J("def",w.current());if(M=="="||(M=="~"||M=="|")&&w.eat("="))return J(null,"compare");if(M=='"'||M=="'")return O.tokenize=Oe(M),O.tokenize(w,O);if(M=="#")return w.eatWhile(/[\w\\\-]/),J("atom","hash");if(M=="!")return w.match(/^\s*\w*/),J("keyword","important");if(/\d/.test(M)||M=="."&&w.eat(/\d/))return w.eatWhile(/[\w.%]/),J("number","unit");if(M==="-"){if(/[\d.]/.test(w.peek()))return w.eatWhile(/[\w.%]/),J("number","unit");if(w.match(/^-[\w\\\-]*/))return w.eatWhile(/[\w\\\-]/),w.match(/^\s*:/,!1)?J("variable-2","variable-definition"):J("variable-2","variable");if(w.match(/^\w+-/))return J("meta","meta")}else return/[,+>*\/]/.test(M)?J(null,"select-op"):M=="."&&w.match(/^-?[_a-z][_a-z0-9-]*/i)?J("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(M)?J(null,M):w.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(w.current())&&(O.tokenize=Ze),J("variable callee","variable")):/[\w\\\-]/.test(M)?(w.eatWhile(/[\w\\\-]/),J("property","word")):J(null,null)}function Oe(w){return function(O,M){for(var Le=!1,at;(at=O.next())!=null;){if(at==w&&!Le){w==")"&&O.backUp(1);break}Le=!Le&&at=="\\"}return(at==w||!Le&&w!=")")&&(M.tokenize=null),J("string","string")}}function Ze(w,O){return w.next(),w.match(/^\s*[\"\')]/,!1)?O.tokenize=null:O.tokenize=Oe(")"),J(null,"(")}function pt(w,O,M){this.type=w,this.indent=O,this.prev=M}function we(w,O,M,Le){return w.context=new pt(M,O.indentation()+(Le===!1?0:D),w.context),M}function Ee(w){return w.context.prev&&(w.context=w.context.prev),w.context.type}function Ke(w,O,M){return Ce[M.context.type](w,O,M)}function ot(w,O,M,Le){for(var at=Le||1;at>0;at--)M.context=M.context.prev;return Ke(w,O,M)}function ye(w){var O=w.current().toLowerCase();Z.hasOwnProperty(O)?he="atom":h.hasOwnProperty(O)?he="keyword":he="variable"}var Ce={};return Ce.top=function(w,O,M){if(w=="{")return we(M,O,"block");if(w=="}"&&M.context.prev)return Ee(M);if(re&&/@component/i.test(w))return we(M,O,"atComponentBlock");if(/^@(-moz-)?document$/i.test(w))return we(M,O,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(w))return we(M,O,"atBlock");if(/^@(font-face|counter-style)/i.test(w))return M.stateArg=w,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(w))return"keyframes";if(w&&w.charAt(0)=="@")return we(M,O,"at");if(w=="hash")he="builtin";else if(w=="word")he="tag";else{if(w=="variable-definition")return"maybeprop";if(w=="interpolation")return we(M,O,"interpolation");if(w==":")return"pseudo";if(de&&w=="(")return we(M,O,"parens")}return M.context.type},Ce.block=function(w,O,M){if(w=="word"){var Le=O.current().toLowerCase();return Te.hasOwnProperty(Le)?(he="property","maybeprop"):ze.hasOwnProperty(Le)?(he=ge?"string-2":"property","maybeprop"):de?(he=O.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(he+=" error","maybeprop")}else return w=="meta"?"block":!de&&(w=="hash"||w=="qualifier")?(he="error","block"):Ce.top(w,O,M)},Ce.maybeprop=function(w,O,M){return w==":"?we(M,O,"prop"):Ke(w,O,M)},Ce.prop=function(w,O,M){if(w==";")return Ee(M);if(w=="{"&&de)return we(M,O,"propBlock");if(w=="}"||w=="{")return ot(w,O,M);if(w=="(")return we(M,O,"parens");if(w=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(O.current()))he+=" error";else if(w=="word")ye(O);else if(w=="interpolation")return we(M,O,"interpolation");return"prop"},Ce.propBlock=function(w,O,M){return w=="}"?Ee(M):w=="word"?(he="property","maybeprop"):M.context.type},Ce.parens=function(w,O,M){return w=="{"||w=="}"?ot(w,O,M):w==")"?Ee(M):w=="("?we(M,O,"parens"):w=="interpolation"?we(M,O,"interpolation"):(w=="word"&&ye(O),"parens")},Ce.pseudo=function(w,O,M){return w=="meta"?"pseudo":w=="word"?(he="variable-3",M.context.type):Ke(w,O,M)},Ce.documentTypes=function(w,O,M){return w=="word"&&c.hasOwnProperty(O.current())?(he="tag",M.context.type):Ce.atBlock(w,O,M)},Ce.atBlock=function(w,O,M){if(w=="(")return we(M,O,"atBlock_parens");if(w=="}"||w==";")return ot(w,O,M);if(w=="{")return Ee(M)&&we(M,O,de?"block":"top");if(w=="interpolation")return we(M,O,"interpolation");if(w=="word"){var Le=O.current().toLowerCase();Le=="only"||Le=="not"||Le=="and"||Le=="or"?he="keyword":U.hasOwnProperty(Le)?he="attribute":N.hasOwnProperty(Le)?he="property":oe.hasOwnProperty(Le)?he="keyword":Te.hasOwnProperty(Le)?he="property":ze.hasOwnProperty(Le)?he=ge?"string-2":"property":Z.hasOwnProperty(Le)?he="atom":h.hasOwnProperty(Le)?he="keyword":he="error"}return M.context.type},Ce.atComponentBlock=function(w,O,M){return w=="}"?ot(w,O,M):w=="{"?Ee(M)&&we(M,O,de?"block":"top",!1):(w=="word"&&(he="error"),M.context.type)},Ce.atBlock_parens=function(w,O,M){return w==")"?Ee(M):w=="{"||w=="}"?ot(w,O,M,2):Ce.atBlock(w,O,M)},Ce.restricted_atBlock_before=function(w,O,M){return w=="{"?we(M,O,"restricted_atBlock"):w=="word"&&M.stateArg=="@counter-style"?(he="variable","restricted_atBlock_before"):Ke(w,O,M)},Ce.restricted_atBlock=function(w,O,M){return w=="}"?(M.stateArg=null,Ee(M)):w=="word"?(M.stateArg=="@font-face"&&!wt.hasOwnProperty(O.current().toLowerCase())||M.stateArg=="@counter-style"&&!v.hasOwnProperty(O.current().toLowerCase())?he="error":he="property","maybeprop"):"restricted_atBlock"},Ce.keyframes=function(w,O,M){return w=="word"?(he="variable","keyframes"):w=="{"?we(M,O,"top"):Ke(w,O,M)},Ce.at=function(w,O,M){return w==";"?Ee(M):w=="{"||w=="}"?ot(w,O,M):(w=="word"?he="tag":w=="hash"&&(he="builtin"),"at")},Ce.interpolation=function(w,O,M){return w=="}"?Ee(M):w=="{"||w==";"?ot(w,O,M):(w=="word"?he="variable":w!="variable"&&w!="("&&w!=")"&&(he="error"),"interpolation")},{startState:function(w){return{tokenize:null,state:We?"block":"top",stateArg:null,context:new pt(We?"block":"top",w||0,null)}},token:function(w,O){if(!O.tokenize&&w.eatSpace())return null;var M=(O.tokenize||ke)(w,O);return M&&typeof M=="object"&&(xe=M[1],M=M[0]),he=M,xe!="comment"&&(O.state=Ce[O.state](xe,w,O)),he},indent:function(w,O){var M=w.context,Le=O&&O.charAt(0),at=M.indent;return M.type=="prop"&&(Le=="}"||Le==")")&&(M=M.prev),M.prev&&(Le=="}"&&(M.type=="block"||M.type=="top"||M.type=="interpolation"||M.type=="restricted_atBlock")?(M=M.prev,at=M.indent):(Le==")"&&(M.type=="parens"||M.type=="atBlock_parens")||Le=="{"&&(M.type=="at"||M.type=="atBlock"))&&(at=Math.max(0,M.indent-D))),at},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:z,fold:"brace"}});function W(pe){for(var I={},We=0;We-1?ve.backUp(E.length-K):E.match(/<\/?$/)&&(ve.backUp(E.length),ve.match(ee,!1)||ve.match(E)),j}var y={};function C(ve){var ee=y[ve];return ee||(y[ve]=new RegExp("\\s+"+ve+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function q(ve,ee){var j=ve.match(C(ee));return j?/^\s*(.*?)\s*$/.exec(j[2])[1]:""}function T(ve,ee){return new RegExp((ee?"^":"")+"","i")}function se(ve,ee){for(var j in ve)for(var E=ee[j]||(ee[j]=[]),K=ve[j],ce=K.length-1;ce>=0;ce--)E.unshift(K[ce])}function ie(ve,ee){for(var j=0;j=0;ue--)E.script.unshift(["type",ce[ue].matches,ce[ue].mode]);function te(Q,fe){var De=j.token(Q,fe.htmlState),Ge=/\btag\b/.test(De),nt;if(Ge&&!/[<>\s\/]/.test(Q.current())&&(nt=fe.htmlState.tagName&&fe.htmlState.tagName.toLowerCase())&&E.hasOwnProperty(nt))fe.inTag=nt+" ";else if(fe.inTag&&Ge&&/>$/.test(Q.current())){var Pe=/^([\S]+) (.*)/.exec(fe.inTag);fe.inTag=null;var He=Q.current()==">"&&ie(E[Pe[1]],Pe[2]),pe=x.getMode(ve,He),I=T(Pe[1],!0),We=T(Pe[1],!1);fe.token=function(D,Y){return D.match(I,!1)?(Y.token=te,Y.localState=Y.localMode=null,null):k(D,We,Y.localMode.token(D,Y.localState))},fe.localMode=pe,fe.localState=x.startState(pe,j.indent(fe.htmlState,"",""))}else fe.inTag&&(fe.inTag+=Q.current(),Q.eol()&&(fe.inTag+=" "));return De}return{startState:function(){var Q=x.startState(j);return{token:te,inTag:null,localMode:null,localState:null,htmlState:Q}},copyState:function(Q){var fe;return Q.localState&&(fe=x.copyState(Q.localMode,Q.localState)),{token:Q.token,inTag:Q.inTag,localMode:Q.localMode,localState:fe,htmlState:x.copyState(j,Q.htmlState)}},token:function(Q,fe){return fe.token(Q,fe)},indent:function(Q,fe,De){return!Q.localMode||/^\s*<\//.test(fe)?j.indent(Q.htmlState,fe,De):Q.localMode.indent?Q.localMode.indent(Q.localState,fe,De):x.Pass},innerMode:function(Q){return{state:Q.localState||Q.htmlState,mode:Q.localMode||j}}}},"xml","javascript","css"),x.defineMIME("text/html","htmlmixed")})})();var wa={exports:{}},Sa;function Mu(){return Sa||(Sa=1,function(Tt,_){(function(x){x(Gt)})(function(x){x.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var W=0;W-1&&y.substring(T+1,y.length);if(se)return x.findModeByExtension(se)},x.findModeByName=function(y){y=y.toLowerCase();for(var C=0;C` "'(~:]+/,ce=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ue=/^\s*\[[^\]]+?\]:.*$/,te=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,Q=" ";function fe(v,h,Z){return h.f=h.inline=Z,Z(v,h)}function De(v,h,Z){return h.f=h.block=Z,Z(v,h)}function Ge(v){return!v||!/\S/.test(v.string)}function nt(v){if(v.linkTitle=!1,v.linkHref=!1,v.linkText=!1,v.em=!1,v.strong=!1,v.strikethrough=!1,v.quote=0,v.indentedCode=!1,v.f==He){var h=C;if(!h){var Z=x.innerMode(y,v.htmlState);h=Z.mode.name=="xml"&&Z.state.tagStart===null&&!Z.state.context&&Z.state.tokenize.isInText}h&&(v.f=D,v.block=Pe,v.htmlState=null)}return v.trailingSpace=0,v.trailingSpaceNewLine=!1,v.prevLine=v.thisLine,v.thisLine={stream:null},null}function Pe(v,h){var Z=v.column()===h.indentation,de=Ge(h.prevLine.stream),z=h.indentedCode,re=h.prevLine.hr,ge=h.list!==!1,xe=(h.listStack[h.listStack.length-1]||0)+3;h.indentedCode=!1;var he=h.indentation;if(h.indentationDiff===null&&(h.indentationDiff=h.indentation,ge)){for(h.list=null;he=4&&(z||h.prevLine.fencedCodeEnd||h.prevLine.header||de))return v.skipToEnd(),h.indentedCode=!0,T.code;if(v.eatSpace())return null;if(Z&&h.indentation<=xe&&(Oe=v.match(j))&&Oe[1].length<=6)return h.quote=0,h.header=Oe[1].length,h.thisLine.header=!0,k.highlightFormatting&&(h.formatting="header"),h.f=h.inline,I(h);if(h.indentation<=xe&&v.eat(">"))return h.quote=Z?1:h.quote+1,k.highlightFormatting&&(h.formatting="quote"),v.eatSpace(),I(h);if(!ke&&!h.setext&&Z&&h.indentation<=xe&&(Oe=v.match(ve))){var Ze=Oe[1]?"ol":"ul";return h.indentation=he+v.current().length,h.list=!0,h.quote=0,h.listStack.push(h.indentation),h.em=!1,h.strong=!1,h.code=!1,h.strikethrough=!1,k.taskLists&&v.match(ee,!1)&&(h.taskList=!0),h.f=h.inline,k.highlightFormatting&&(h.formatting=["list","list-"+Ze]),I(h)}else{if(Z&&h.indentation<=xe&&(Oe=v.match(ce,!0)))return h.quote=0,h.fencedEndRE=new RegExp(Oe[1]+"+ *$"),h.localMode=k.fencedCodeBlockHighlighting&&q(Oe[2]||k.fencedCodeBlockDefaultMode),h.localMode&&(h.localState=x.startState(h.localMode)),h.f=h.block=pe,k.highlightFormatting&&(h.formatting="code-block"),h.code=-1,I(h);if(h.setext||(!J||!ge)&&!h.quote&&h.list===!1&&!h.code&&!ke&&!ue.test(v.string)&&(Oe=v.lookAhead(1))&&(Oe=Oe.match(E)))return h.setext?(h.header=h.setext,h.setext=0,v.skipToEnd(),k.highlightFormatting&&(h.formatting="header")):(h.header=Oe[0].charAt(0)=="="?1:2,h.setext=h.header),h.thisLine.header=!0,h.f=h.inline,I(h);if(ke)return v.skipToEnd(),h.hr=!0,h.thisLine.hr=!0,T.hr;if(v.peek()==="[")return fe(v,h,oe)}return fe(v,h,h.inline)}function He(v,h){var Z=y.token(v,h.htmlState);if(!C){var de=x.innerMode(y,h.htmlState);(de.mode.name=="xml"&&de.state.tagStart===null&&!de.state.context&&de.state.tokenize.isInText||h.md_inside&&v.current().indexOf(">")>-1)&&(h.f=D,h.block=Pe,h.htmlState=null)}return Z}function pe(v,h){var Z=h.listStack[h.listStack.length-1]||0,de=h.indentation=v.quote?h.push(T.formatting+"-"+v.formatting[Z]+"-"+v.quote):h.push("error"))}if(v.taskOpen)return h.push("meta"),h.length?h.join(" "):null;if(v.taskClosed)return h.push("property"),h.length?h.join(" "):null;if(v.linkHref?h.push(T.linkHref,"url"):(v.strong&&h.push(T.strong),v.em&&h.push(T.em),v.strikethrough&&h.push(T.strikethrough),v.emoji&&h.push(T.emoji),v.linkText&&h.push(T.linkText),v.code&&h.push(T.code),v.image&&h.push(T.image),v.imageAltText&&h.push(T.imageAltText,"link"),v.imageMarker&&h.push(T.imageMarker)),v.header&&h.push(T.header,T.header+"-"+v.header),v.quote&&(h.push(T.quote),!k.maxBlockquoteDepth||k.maxBlockquoteDepth>=v.quote?h.push(T.quote+"-"+v.quote):h.push(T.quote+"-"+k.maxBlockquoteDepth)),v.list!==!1){var de=(v.listStack.length-1)%3;de?de===1?h.push(T.list2):h.push(T.list3):h.push(T.list1)}return v.trailingSpaceNewLine?h.push("trailing-space-new-line"):v.trailingSpace&&h.push("trailing-space-"+(v.trailingSpace%2?"a":"b")),h.length?h.join(" "):null}function We(v,h){if(v.match(K,!0))return I(h)}function D(v,h){var Z=h.text(v,h);if(typeof Z<"u")return Z;if(h.list)return h.list=null,I(h);if(h.taskList){var de=v.match(ee,!0)[1]===" ";return de?h.taskOpen=!0:h.taskClosed=!0,k.highlightFormatting&&(h.formatting="task"),h.taskList=!1,I(h)}if(h.taskOpen=!1,h.taskClosed=!1,h.header&&v.match(/^#+$/,!0))return k.highlightFormatting&&(h.formatting="header"),I(h);var z=v.next();if(h.linkTitle){h.linkTitle=!1;var re=z;z==="("&&(re=")"),re=(re+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ge="^\\s*(?:[^"+re+"\\\\]+|\\\\\\\\|\\\\.)"+re;if(v.match(new RegExp(ge),!0))return T.linkHref}if(z==="`"){var xe=h.formatting;k.highlightFormatting&&(h.formatting="code"),v.eatWhile("`");var he=v.current().length;if(h.code==0&&(!h.quote||he==1))return h.code=he,I(h);if(he==h.code){var J=I(h);return h.code=0,J}else return h.formatting=xe,I(h)}else if(h.code)return I(h);if(z==="\\"&&(v.next(),k.highlightFormatting)){var ke=I(h),Oe=T.formatting+"-escape";return ke?ke+" "+Oe:Oe}if(z==="!"&&v.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return h.imageMarker=!0,h.image=!0,k.highlightFormatting&&(h.formatting="image"),I(h);if(z==="["&&h.imageMarker&&v.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return h.imageMarker=!1,h.imageAltText=!0,k.highlightFormatting&&(h.formatting="image"),I(h);if(z==="]"&&h.imageAltText){k.highlightFormatting&&(h.formatting="image");var ke=I(h);return h.imageAltText=!1,h.image=!1,h.inline=h.f=c,ke}if(z==="["&&!h.image)return h.linkText&&v.match(/^.*?\]/)||(h.linkText=!0,k.highlightFormatting&&(h.formatting="link")),I(h);if(z==="]"&&h.linkText){k.highlightFormatting&&(h.formatting="link");var ke=I(h);return h.linkText=!1,h.inline=h.f=v.match(/\(.*?\)| ?\[.*?\]/,!1)?c:D,ke}if(z==="<"&&v.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){h.f=h.inline=Y,k.highlightFormatting&&(h.formatting="link");var ke=I(h);return ke?ke+=" ":ke="",ke+T.linkInline}if(z==="<"&&v.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){h.f=h.inline=Y,k.highlightFormatting&&(h.formatting="link");var ke=I(h);return ke?ke+=" ":ke="",ke+T.linkEmail}if(k.xml&&z==="<"&&v.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ze=v.string.indexOf(">",v.pos);if(Ze!=-1){var pt=v.string.substring(v.start,Ze);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(pt)&&(h.md_inside=!0)}return v.backUp(1),h.htmlState=x.startState(y),De(v,h,He)}if(k.xml&&z==="<"&&v.match(/^\/\w*?>/))return h.md_inside=!1,"tag";if(z==="*"||z==="_"){for(var we=1,Ee=v.pos==1?" ":v.string.charAt(v.pos-2);we<3&&v.eat(z);)we++;var Ke=v.peek()||" ",ot=!/\s/.test(Ke)&&(!te.test(Ke)||/\s/.test(Ee)||te.test(Ee)),ye=!/\s/.test(Ee)&&(!te.test(Ee)||/\s/.test(Ke)||te.test(Ke)),Ce=null,w=null;if(we%2&&(!h.em&&ot&&(z==="*"||!ye||te.test(Ee))?Ce=!0:h.em==z&&ye&&(z==="*"||!ot||te.test(Ke))&&(Ce=!1)),we>1&&(!h.strong&&ot&&(z==="*"||!ye||te.test(Ee))?w=!0:h.strong==z&&ye&&(z==="*"||!ot||te.test(Ke))&&(w=!1)),w!=null||Ce!=null){k.highlightFormatting&&(h.formatting=Ce==null?"strong":w==null?"em":"strong em"),Ce===!0&&(h.em=z),w===!0&&(h.strong=z);var J=I(h);return Ce===!1&&(h.em=!1),w===!1&&(h.strong=!1),J}}else if(z===" "&&(v.eat("*")||v.eat("_"))){if(v.peek()===" ")return I(h);v.backUp(1)}if(k.strikethrough){if(z==="~"&&v.eatWhile(z)){if(h.strikethrough){k.highlightFormatting&&(h.formatting="strikethrough");var J=I(h);return h.strikethrough=!1,J}else if(v.match(/^[^\s]/,!1))return h.strikethrough=!0,k.highlightFormatting&&(h.formatting="strikethrough"),I(h)}else if(z===" "&&v.match("~~",!0)){if(v.peek()===" ")return I(h);v.backUp(2)}}if(k.emoji&&z===":"&&v.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){h.emoji=!0,k.highlightFormatting&&(h.formatting="emoji");var O=I(h);return h.emoji=!1,O}return z===" "&&(v.match(/^ +$/,!1)?h.trailingSpace++:h.trailingSpace&&(h.trailingSpaceNewLine=!0)),I(h)}function Y(v,h){var Z=v.next();if(Z===">"){h.f=h.inline=D,k.highlightFormatting&&(h.formatting="link");var de=I(h);return de?de+=" ":de="",de+T.linkInline}return v.match(/^[^>]+/,!0),T.linkInline}function c(v,h){if(v.eatSpace())return null;var Z=v.next();return Z==="("||Z==="["?(h.f=h.inline=N(Z==="("?")":"]"),k.highlightFormatting&&(h.formatting="link-string"),h.linkHref=!0,I(h)):"error"}var U={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function N(v){return function(h,Z){var de=h.next();if(de===v){Z.f=Z.inline=D,k.highlightFormatting&&(Z.formatting="link-string");var z=I(Z);return Z.linkHref=!1,z}return h.match(U[v]),Z.linkHref=!0,I(Z)}}function oe(v,h){return v.match(/^([^\]\\]|\\.)*\]:/,!1)?(h.f=Te,v.next(),k.highlightFormatting&&(h.formatting="link"),h.linkText=!0,I(h)):fe(v,h,D)}function Te(v,h){if(v.match("]:",!0)){h.f=h.inline=ze,k.highlightFormatting&&(h.formatting="link");var Z=I(h);return h.linkText=!1,Z}return v.match(/^([^\]\\]|\\.)+/,!0),T.linkText}function ze(v,h){return v.eatSpace()?null:(v.match(/^[^\s]+/,!0),v.peek()===void 0?h.linkTitle=!0:v.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),h.f=h.inline=D,T.linkHref+" url")}var wt={startState:function(){return{f:Pe,prevLine:{stream:null},thisLine:{stream:null},block:Pe,htmlState:null,indentation:0,inline:D,text:We,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(v){return{f:v.f,prevLine:v.prevLine,thisLine:v.thisLine,block:v.block,htmlState:v.htmlState&&x.copyState(y,v.htmlState),indentation:v.indentation,localMode:v.localMode,localState:v.localMode?x.copyState(v.localMode,v.localState):null,inline:v.inline,text:v.text,formatting:!1,linkText:v.linkText,linkTitle:v.linkTitle,linkHref:v.linkHref,code:v.code,em:v.em,strong:v.strong,strikethrough:v.strikethrough,emoji:v.emoji,header:v.header,setext:v.setext,hr:v.hr,taskList:v.taskList,list:v.list,listStack:v.listStack.slice(0),quote:v.quote,indentedCode:v.indentedCode,trailingSpace:v.trailingSpace,trailingSpaceNewLine:v.trailingSpaceNewLine,md_inside:v.md_inside,fencedEndRE:v.fencedEndRE}},token:function(v,h){if(h.formatting=!1,v!=h.thisLine.stream){if(h.header=0,h.hr=!1,v.match(/^\s*$/,!0))return nt(h),null;if(h.prevLine=h.thisLine,h.thisLine={stream:v},h.taskList=!1,h.trailingSpace=0,h.trailingSpaceNewLine=!1,!h.localState&&(h.f=h.block,h.f!=He)){var Z=v.match(/^\s*/,!0)[0].replace(/\t/g,Q).length;if(h.indentation=Z,h.indentationDiff=null,Z>0)return null}}return h.f(v,h)},innerMode:function(v){return v.block==He?{state:v.htmlState,mode:y}:v.localState?{state:v.localState,mode:v.localMode}:{state:v,mode:wt}},indent:function(v,h,Z){return v.block==He&&y.indent?y.indent(v.htmlState,h,Z):v.localState&&v.localMode.indent?v.localMode.indent(v.localState,h,Z):x.Pass},blankLine:nt,getType:I,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return wt},"xml"),x.defineMIME("text/markdown","markdown"),x.defineMIME("text/x-markdown","markdown")})})();(function(Tt,_){(function(x){x(Gt)})(function(x){x.defineMode("yaml",function(){var W=["true","false","on","off","yes","no"],k=new RegExp("\\b(("+W.join(")|(")+"))$","i");return{token:function(y,C){var q=y.peek(),T=C.escaped;if(C.escaped=!1,q=="#"&&(y.pos==0||/\s/.test(y.string.charAt(y.pos-1))))return y.skipToEnd(),"comment";if(y.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(C.literal&&y.indentation()>C.keyCol)return y.skipToEnd(),"string";if(C.literal&&(C.literal=!1),y.sol()){if(C.keyCol=0,C.pair=!1,C.pairStart=!1,y.match("---")||y.match("..."))return"def";if(y.match(/\s*-\s+/))return"meta"}if(y.match(/^(\{|\}|\[|\])/))return q=="{"?C.inlinePairs++:q=="}"?C.inlinePairs--:q=="["?C.inlineList++:C.inlineList--,"meta";if(C.inlineList>0&&!T&&q==",")return y.next(),"meta";if(C.inlinePairs>0&&!T&&q==",")return C.keyCol=0,C.pair=!1,C.pairStart=!1,y.next(),"meta";if(C.pairStart){if(y.match(/^\s*(\||\>)\s*/))return C.literal=!0,"meta";if(y.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(C.inlinePairs==0&&y.match(/^\s*-?[0-9\.\,]+\s?$/)||C.inlinePairs>0&&y.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(y.match(k))return"keyword"}return!C.pair&&y.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^\s,\[\]{}#&*!|>'"%@`])[^#:]*(?=:($|\s))/)?(C.pair=!0,C.keyCol=y.indentation(),"atom"):C.pair&&y.match(/^:\s*/)?(C.pairStart=!0,"meta"):(C.pairStart=!1,C.escaped=q=="\\",y.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),x.defineMIME("text/x-yaml","yaml"),x.defineMIME("text/yaml","yaml")})})();class Au extends ga.Component{constructor(_){super(_),this.appliedNext=void 0,this.deferred=void 0,this.editor=void 0,this.emulating=void 0,this.hydrated=void 0,this.initCb=void 0,this.mirror=void 0,this.mounted=void 0,this.ref=void 0,this.shared=void 0,this.appliedNext=!1,this.deferred=null,this.emulating=!1,this.hydrated=!1,this.initCb=()=>{this.props.editorDidConfigure&&this.props.editorDidConfigure(this.editor)},this.mounted=!1}hydrate(_){const x=_&&_.options?_.options:{},W=Object.assign({},Hi.defaults,this.editor.options,x);Object.keys(W).some(y=>this.editor.getOption(y)!==W[y])&&Object.keys(W).forEach(y=>{x.hasOwnProperty(y)&&this.editor.getOption(y)!==W[y]&&(this.editor.setOption(y,W[y]),this.mirror.setOption(y,W[y]))}),this.hydrated||(this.deferred?this.resolveChange(_.value):this.initChange(_.value||"")),this.hydrated=!0}initChange(_){this.emulating=!0;const x=this.editor.getDoc(),W=x.lastLine(),k=x.getLine(x.lastLine()).length;x.replaceRange(_||"",{line:0,ch:0},{line:W,ch:k}),this.mirror.setValue(_),x.clearHistory(),this.mirror.clearHistory(),this.emulating=!1}resolveChange(_){this.emulating=!0;const x=this.editor.getDoc();if(this.deferred.origin==="undo"?x.undo():this.deferred.origin==="redo"?x.redo():x.replaceRange(this.deferred.text,this.deferred.from,this.deferred.to,this.deferred.origin),_&&_!==x.getValue()){const W=x.getCursor();x.setValue(_),x.setCursor(W)}this.emulating=!1,this.deferred=null}mirrorChange(_){const x=this.editor.getDoc();return _.origin==="undo"?(x.setHistory(this.mirror.getHistory()),this.mirror.undo()):_.origin==="redo"?(x.setHistory(this.mirror.getHistory()),this.mirror.redo()):this.mirror.replaceRange(_.text,_.from,_.to,_.origin),this.mirror.getValue()}componentDidMount(){this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&Hi.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=Hi(this.ref,this.props.options),this.shared=new Fu(this.editor,this.props),this.mirror=Hi(()=>{},this.props.options),this.editor.on("electricInput",()=>{this.mirror.setHistory(this.editor.getDoc().getHistory())}),this.editor.on("cursorActivity",()=>{this.mirror.setCursor(this.editor.getDoc().getCursor())}),this.editor.on("beforeChange",(_,x)=>{if(this.emulating)return;x.cancel(),this.deferred=x;let W=this.mirrorChange(this.deferred);this.props.onBeforeChange&&this.props.onBeforeChange(this.editor,this.deferred,W)}),this.editor.on("change",(_,x)=>{this.mounted&&this.props.onChange&&this.props.onChange(this.editor,x,this.editor.getValue())}),this.hydrate(this.props),this.shared.apply(this.props),this.mounted=!0,this.shared.wire(this.props),this.editor.getOption("autofocus")&&this.editor.focus(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb)}componentDidUpdate(_){let x={cursor:void 0};this.props.value!==_.value&&(this.hydrated=!1),!this.props.autoCursor&&this.props.autoCursor!==void 0&&(x.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.appliedNext||(this.shared.applyNext(_,this.props,x),this.appliedNext=!0),this.shared.applyUserDefined(_,x)}componentWillUnmount(){this.props.editorWillUnmount&&this.props.editorWillUnmount(Hi)}shouldComponentUpdate(){return!0}render(){let _=this.props.className?`react-codemirror2 ${this.props.className}`:"react-codemirror2";return ga.createElement("div",{className:_,ref:x=>this.ref=x})}}Au.displayName="Controlled";class po{static equals(_,x){const W=Object.keys,k=typeof _;return _&&x&&k==="object"&&k===typeof x?W(_).length===W(x).length&&W(_).every(C=>this.equals(_[C],x[C])):_===x}}class Fu{constructor(_,x){this.editor=void 0,this.props=void 0,this.editor=_,this.props=x}delegateCursor(_,x,W){const k=this.editor.getDoc();W&&this.editor.focus(),x?k.setCursor(_):k.setCursor(_,void 0,{scroll:!1})}delegateScroll(_){this.editor.scrollTo(_.x,_.y)}delegateSelection(_,x){this.editor.getDoc().setSelections(_),x&&this.editor.focus()}apply(_){_&&_.selection&&_.selection.ranges&&this.delegateSelection(_.selection.ranges,_.selection.focus||!1),_&&_.cursor&&this.delegateCursor(_.cursor,_.autoScroll||!1,this.editor.getOption("autofocus")||!1),_&&_.scroll&&this.delegateScroll(_.scroll)}applyNext(_,x,W){_&&_.selection&&_.selection.ranges&&x&&x.selection&&x.selection.ranges&&!po.equals(_.selection.ranges,x.selection.ranges)&&this.delegateSelection(x.selection.ranges,x.selection.focus||!1),_&&_.cursor&&x&&x.cursor&&!po.equals(_.cursor,x.cursor)&&this.delegateCursor(W.cursor||x.cursor,x.autoScroll||!1,x.autoCursor||!1),_&&_.scroll&&x&&x.scroll&&!po.equals(_.scroll,x.scroll)&&this.delegateScroll(x.scroll)}applyUserDefined(_,x){x&&x.cursor&&this.delegateCursor(x.cursor,_.autoScroll||!1,this.editor.getOption("autofocus")||!1)}wire(_){Object.keys(_||{}).filter(x=>/^on/.test(x)).forEach(x=>{switch(x){case"onBlur":this.editor.on("blur",(W,k)=>{var y,C;(y=(C=this.props).onBlur)===null||y===void 0||y.call(C,this.editor,k)});break;case"onContextMenu":{this.editor.on("contextmenu",(W,k)=>{var y,C;(y=(C=this.props).onContextMenu)===null||y===void 0||y.call(C,this.editor,k)});break}case"onCopy":{this.editor.on("copy",(W,k)=>{var y,C;(y=(C=this.props).onCopy)===null||y===void 0||y.call(C,this.editor,k)});break}case"onCursor":this.editor.on("cursorActivity",()=>{var W,k;(W=(k=this.props).onCursor)===null||W===void 0||W.call(k,this.editor,this.editor.getDoc().getCursor())});break;case"onCursorActivity":this.editor.on("cursorActivity",()=>{var W,k;(W=(k=this.props).onCursorActivity)===null||W===void 0||W.call(k,this.editor)});break;case"onCut":{this.editor.on("cut",(W,k)=>{var y,C;(y=(C=this.props).onCut)===null||y===void 0||y.call(C,this.editor,k)});break}case"onDblClick":{this.editor.on("dblclick",(W,k)=>{var y,C;(y=(C=this.props).onDblClick)===null||y===void 0||y.call(C,this.editor,k)});break}case"onDragEnter":this.editor.on("dragenter",(W,k)=>{var y,C;(y=(C=this.props).onDragEnter)===null||y===void 0||y.call(C,this.editor,k)});break;case"onDragLeave":{this.editor.on("dragleave",(W,k)=>{var y,C;(y=(C=this.props).onDragLeave)===null||y===void 0||y.call(C,this.editor,k)});break}case"onDragOver":this.editor.on("dragover",(W,k)=>{var y,C;(y=(C=this.props).onDragOver)===null||y===void 0||y.call(C,this.editor,k)});break;case"onDragStart":{this.editor.on("dragstart",(W,k)=>{var y,C;(y=(C=this.props).onDragStart)===null||y===void 0||y.call(C,this.editor,k)});break}case"onDrop":this.editor.on("drop",(W,k)=>{var y,C;(y=(C=this.props).onDrop)===null||y===void 0||y.call(C,this.editor,k)});break;case"onFocus":this.editor.on("focus",(W,k)=>{var y,C;(y=(C=this.props).onFocus)===null||y===void 0||y.call(C,this.editor,k)});break;case"onGutterClick":this.editor.on("gutterClick",(W,k,y,C)=>{var q,T;(q=(T=this.props).onGutterClick)===null||q===void 0||q.call(T,this.editor,k,y,C)});break;case"onInputRead":this.editor.on("inputRead",(W,k)=>{var y,C;(y=(C=this.props).onInputRead)===null||y===void 0||y.call(C,this.editor,k)});break;case"onKeyDown":this.editor.on("keydown",(W,k)=>{var y,C;(y=(C=this.props).onKeyDown)===null||y===void 0||y.call(C,this.editor,k)});break;case"onKeyHandled":this.editor.on("keyHandled",(W,k,y)=>{var C,q;(C=(q=this.props).onKeyHandled)===null||C===void 0||C.call(q,this.editor,k,y)});break;case"onKeyPress":this.editor.on("keypress",(W,k)=>{var y,C;(y=(C=this.props).onKeyPress)===null||y===void 0||y.call(C,this.editor,k)});break;case"onKeyUp":this.editor.on("keyup",(W,k)=>{var y,C;(y=(C=this.props).onKeyUp)===null||y===void 0||y.call(C,this.editor,k)});break;case"onMouseDown":{this.editor.on("mousedown",(W,k)=>{var y,C;(y=(C=this.props).onMouseDown)===null||y===void 0||y.call(C,this.editor,k)});break}case"onPaste":{this.editor.on("paste",(W,k)=>{var y,C;(y=(C=this.props).onPaste)===null||y===void 0||y.call(C,this.editor,k)});break}case"onRenderLine":{this.editor.on("renderLine",(W,k,y)=>{var C,q;(C=(q=this.props).onRenderLine)===null||C===void 0||C.call(q,this.editor,k,y)});break}case"onScroll":this.editor.on("scroll",W=>{var k,y;(k=(y=this.props).onScroll)===null||k===void 0||k.call(y,this.editor,this.editor.getScrollInfo())});break;case"onSelection":this.editor.on("beforeSelectionChange",(W,k)=>{var y,C;(y=(C=this.props).onSelection)===null||y===void 0||y.call(C,this.editor,k)});break;case"onTouchStart":{this.editor.on("touchstart",(W,k)=>{var y,C;(y=(C=this.props).onTouchStart)===null||y===void 0||y.call(C,this.editor,k)});break}case"onUpdate":this.editor.on("update",W=>{var k,y;(k=(y=this.props).onUpdate)===null||k===void 0||k.call(y,this.editor)});break;case"onViewportChange":this.editor.on("viewportChange",(W,k,y)=>{var C,q;(C=(q=this.props).onViewportChange)===null||C===void 0||C.call(q,this.editor,k,y)});break}})}}export{Fu as Shared,Au as default}; diff --git a/assets/index-Bj2M0RvR.js b/assets/index-fv86SrDU.js similarity index 99% rename from assets/index-Bj2M0RvR.js rename to assets/index-fv86SrDU.js index e8f2a77..a513a9b 100644 --- a/assets/index-Bj2M0RvR.js +++ b/assets/index-fv86SrDU.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.node-evW1ZN7C.js","assets/index-DCzcanBz.js","assets/index-dyNilIOc.css","assets/index-DTxffNH3.js"])))=>i.map(i=>d[i]); -import{S as kb,b as n1,c as hy,F as TM,T as ie,d as RM,I as AN,e as uN,f as w2}from"./index-C5yFM9ST.js";import{g as xk,i as Tk,h as Pk,G as Ek,k as _k,j as Xk,l as kk,m as Hk,n as $k,o as Vk,a as Zk}from"./index-C5yFM9ST.js";import{A as fy,r as l,R as r,O as qN,k as mN,l as Ay,Q as uy,U as qy,W as my,P as s,h as Y,q as _2,p as p0,S as n,T as G,w as L,t as N,i as b,s as z0,f as t0,V as w,F as RN,X as X2,o as V,n as Q0,H as vN,_ as Hb,m as T2,E as de,G as WN,Y as gN,Z as yN,v as LN,z as Pc,C as NN}from"./index-DCzcanBz.js";import{a2 as Fk,a3 as jk,a4 as Uk,a5 as Gk,a6 as Yk,a0 as Kk,I as Qk,$ as Jk,a1 as eH}from"./index-DCzcanBz.js";import{j as r0,t as Ry,u as BN,S as m0,v as Oe,k as to,B as sb,w as CN,P as S0,e as fe,n as D,x as k,y as L1,s as i0,C as h0,z as vy,I as ab,A as po,p as c0,D as Wy,i as u0,l as no,m as M0,E as le,F as J0,T as PM,r as tM,G as Zl,q as SN,o as C2,J as lb,K as I2,M as gy,N as Zc,Q as Dc,U as cb,V as Fc,W as wN,h as Mb,X as yy,Y as IN,Z as bb,_ as xN,$ as $b,a0 as TN,a1 as PN,a2 as EN}from"./RenderTopNavBar-CILoEAmM.js";import{a3 as tH,a4 as pH,H as nH,ab as rH,ah as iH,ac as sH,ad as aH,ae as lH,af as cH,ag as MH,a5 as bH,L as zH,O as dH,a6 as OH,a7 as hH,a8 as fH,a9 as AH,aa as uH}from"./RenderTopNavBar-CILoEAmM.js";import{b as Ly,B as jc,E as Vb}from"./index-CTDsjRCP.js";import{I as mH,a as RH,R as vH,T as WH}from"./index-CTDsjRCP.js";import{B as yH}from"./index-De3kK20J.js";import{a as t1}from"./index-C1tjm6wA.js";import{I as NH}from"./index-C1tjm6wA.js";import{L as CH,e as SH}from"./Mdtoui-B81NOHR9.js";import{S as IH}from"./index-2_RebUFS.js";import{I as TH}from"./IconRssLine-BqBzMn_a.js";const Ny=(()=>{{const p=function(){return e=>e};return p.deprecatePropValues=()=>()=>null,p.warnDeprecatedProps=()=>{},p.warnDeprecatedComponent=()=>{},p.changedPackageWarning=()=>"",p}})(),ro={keyboard:"keyboard",pointer:"pointer"};let q0=[],B2=[],io=ro.keyboard,vM=0;const Uc={},Z0=p=>{p.target.nodeName.toLowerCase()!=="html"&&(zb(io,ro.pointer),q0.forEach(e=>e.remove()))},zb=(p,e)=>{p!==e&&(io=e,Object.keys(Uc).forEach(o=>Uc[o](p,e)))},_N=()=>{zb(io,ro.keyboard)},WM=()=>{zb(io,ro.pointer)},XN=()=>{q0.length===0&&(q0.push(r0(document,"mousemove",Z0,!0)),q0.push(r0(document,"mousedown",Z0,!0)),q0.push(r0(document,"mouseup",Z0,!0)),q0.push(r0(document,"pointermove",Z0,!0)),q0.push(r0(document,"pointerdown",Z0,!0)),q0.push(r0(document,"pointerup",Z0,!0)),q0.push(r0(document,"touchmove",Z0,!0)),q0.push(r0(document,"touchstart",Z0,!0)),q0.push(r0(document,"touchend",Z0,!0)))},kN=()=>{B2.length===0&&(B2.push(r0(document,"keydown",_N,!0)),B2.push(r0(document,"mousedown",WM,!0)),B2.push(r0(document,"pointerdown",WM,!0)),B2.push(r0(document,"touchstart",WM,!0)))},HN=()=>{q0.forEach(p=>p.remove()),q0=[],B2.forEach(p=>p.remove()),B2=[]},$N=p=>{const e=p.onInputModeChange,o=vM++;return typeof e=="function"&&(Uc[o]=e),fy&&(kN(),XN()),{isKeyboardMode:()=>io===ro.keyboard,remove:()=>{vM===1&&HN(),delete Uc[o],vM--}}},pM=l.createContext({locale:void 0,timezone:void 0}),VN=({children:p,locale:e,timezone:o})=>r.createElement(pM.Provider,{value:{locale:e,timezone:o}},Ry(p));VN.defaultProps={locale:void 0,timezone:void 0,children:void 0};var By={exports:{}},Cy={exports:{}};//! moment.js +const __vite__fileDeps=["assets/index.node-BLPoF182.js","assets/index-C3XQCywa.js","assets/index-dyNilIOc.css","assets/index-ZHw2VU9b.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +import{S as kb,b as n1,c as hy,F as TM,T as ie,d as RM,I as AN,e as uN,f as w2}from"./index-CuKaSjpf.js";import{g as xk,i as Tk,h as Pk,G as Ek,k as _k,j as Xk,l as kk,m as Hk,n as $k,o as Vk,a as Zk}from"./index-CuKaSjpf.js";import{A as fy,r as l,R as r,O as qN,k as mN,l as Ay,Q as uy,U as qy,W as my,P as s,h as Y,q as _2,p as p0,S as n,T as G,w as L,t as N,i as b,s as z0,f as t0,V as w,F as RN,X as X2,o as V,n as Q0,H as vN,_ as Hb,m as T2,E as de,G as WN,Y as gN,Z as yN,v as LN,z as Pc,C as NN}from"./index-C3XQCywa.js";import{a2 as Fk,a3 as jk,a4 as Uk,a5 as Gk,a6 as Yk,a0 as Kk,I as Qk,$ as Jk,a1 as eH}from"./index-C3XQCywa.js";import{j as r0,t as Ry,u as BN,S as m0,v as Oe,k as to,B as sb,w as CN,P as S0,e as fe,n as D,x as k,y as L1,s as i0,C as h0,z as vy,I as ab,A as po,p as c0,D as Wy,i as u0,l as no,m as M0,E as le,F as J0,T as PM,r as tM,G as Zl,q as SN,o as C2,J as lb,K as I2,M as gy,N as Zc,Q as Dc,U as cb,V as Fc,W as wN,h as Mb,X as yy,Y as IN,Z as bb,_ as xN,$ as $b,a0 as TN,a1 as PN,a2 as EN}from"./RenderTopNavBar-D2dLV4g_.js";import{a3 as tH,a4 as pH,H as nH,ab as rH,ah as iH,ac as sH,ad as aH,ae as lH,af as cH,ag as MH,a5 as bH,L as zH,O as dH,a6 as OH,a7 as hH,a8 as fH,a9 as AH,aa as uH}from"./RenderTopNavBar-D2dLV4g_.js";import{b as Ly,B as jc,E as Vb}from"./index-ykr1wfg1.js";import{I as mH,a as RH,R as vH,T as WH}from"./index-ykr1wfg1.js";import{B as yH}from"./index-BfwAAv1n.js";import{a as t1}from"./index-D14ZWBB_.js";import{I as NH}from"./index-D14ZWBB_.js";import{L as CH,e as SH}from"./Mdtoui-yQNCxW-t.js";import{S as IH}from"./index-B7tEZKBe.js";import{I as TH}from"./IconRssLine-Cd1K2zy4.js";const Ny=(()=>{{const p=function(){return e=>e};return p.deprecatePropValues=()=>()=>null,p.warnDeprecatedProps=()=>{},p.warnDeprecatedComponent=()=>{},p.changedPackageWarning=()=>"",p}})(),ro={keyboard:"keyboard",pointer:"pointer"};let q0=[],B2=[],io=ro.keyboard,vM=0;const Uc={},Z0=p=>{p.target.nodeName.toLowerCase()!=="html"&&(zb(io,ro.pointer),q0.forEach(e=>e.remove()))},zb=(p,e)=>{p!==e&&(io=e,Object.keys(Uc).forEach(o=>Uc[o](p,e)))},_N=()=>{zb(io,ro.keyboard)},WM=()=>{zb(io,ro.pointer)},XN=()=>{q0.length===0&&(q0.push(r0(document,"mousemove",Z0,!0)),q0.push(r0(document,"mousedown",Z0,!0)),q0.push(r0(document,"mouseup",Z0,!0)),q0.push(r0(document,"pointermove",Z0,!0)),q0.push(r0(document,"pointerdown",Z0,!0)),q0.push(r0(document,"pointerup",Z0,!0)),q0.push(r0(document,"touchmove",Z0,!0)),q0.push(r0(document,"touchstart",Z0,!0)),q0.push(r0(document,"touchend",Z0,!0)))},kN=()=>{B2.length===0&&(B2.push(r0(document,"keydown",_N,!0)),B2.push(r0(document,"mousedown",WM,!0)),B2.push(r0(document,"pointerdown",WM,!0)),B2.push(r0(document,"touchstart",WM,!0)))},HN=()=>{q0.forEach(p=>p.remove()),q0=[],B2.forEach(p=>p.remove()),B2=[]},$N=p=>{const e=p.onInputModeChange,o=vM++;return typeof e=="function"&&(Uc[o]=e),fy&&(kN(),XN()),{isKeyboardMode:()=>io===ro.keyboard,remove:()=>{vM===1&&HN(),delete Uc[o],vM--}}},pM=l.createContext({locale:void 0,timezone:void 0}),VN=({children:p,locale:e,timezone:o})=>r.createElement(pM.Provider,{value:{locale:e,timezone:o}},Ry(p));VN.defaultProps={locale:void 0,timezone:void 0,children:void 0};var By={exports:{}},Cy={exports:{}};//! moment.js //! version : 2.30.1 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT @@ -22,7 +22,7 @@ g.version="2.30.1";ZN(J);g.fn=v;g.min=wC;g.max=IC;g.now=xC;g.utc=$0;g.unix=aw;g. }`,XI=(p,e)=>{const o=e.type,t=e.variant,i=e.placement,a=i===void 0?"":i,c=e.standalone,M=e.pulse,z=a.indexOf("top")>-1,d=a.indexOf("bottom")>-1,O=a.indexOf("start")>-1,f=a.indexOf("end")>-1,A=a.indexOf("center")>-1,u={danger:{badge:{color:p.color,backgroundColor:p.colorDanger},pulseBorder:{borderColor:p.colorDanger}},success:{badge:{color:p.color,backgroundColor:p.colorSuccess},pulseBorder:{borderColor:p.colorSuccess}},primary:{badge:{color:p.color,backgroundColor:p.colorPrimary},pulseBorder:{borderColor:p.colorPrimary}},inverse:{badge:{color:p.colorInverse,backgroundColor:p.color},pulseBorder:{borderColor:p.color}}},R={...z&&{top:`calc(-1 * ${p.countOffset})`},...d&&{bottom:`calc(-1 * ${p.countOffset})`},...O&&{insetInlineStart:`calc(-1 * ${p.countOffset})`,insetInlineEnd:"auto"},...f&&{insetInlineEnd:`calc(-1 * ${p.countOffset})`,insetInlineStart:"auto"},...A&&{...(f||O)&&{top:`calc(50% - (${p.size} / 2))`},...O&&{insetInlineStart:"auto",insetInlineEnd:`calc(100% - ${p.countOffset})`},...f&&{insetInlineEnd:"auto",insetInlineStart:`calc(100% - ${p.countOffset})`}}},B={...z&&{top:p.notificationOffset},...d&&{bottom:p.notificationOffset},...O&&{insetInlineStart:p.notificationOffset,insetInlineEnd:"auto"},...f&&{insetInlineEnd:p.notificationOffset,insetInlineStart:"auto"},...A&&{...(f||O)&&{top:`calc(50% - (${p.sizeNotification} / 2))`},...O&&{insetInlineStart:`calc(-1 * ${p.sizeNotification} / 2)`,insetInlineEnd:"auto"},...f&&{insetInlineEnd:`calc(-1 * ${p.sizeNotification} / 2)`,insetInlineStart:"auto"}}},I={count:R,notification:B},S={count:{lineHeight:p.size,minWidth:p.size,paddingInlineStart:p.padding,paddingInlineEnd:p.padding},notification:{width:p.sizeNotification,height:p.sizeNotification}};return{badge:{label:"badge",fontFamily:p.fontFamily,fontWeight:p.fontWeight,boxSizing:"border-box",pointerEvents:"none",textAlign:"center",fontSize:p.fontSize,whiteSpace:"nowrap",borderRadius:p.borderRadius,...u[t].badge,...M&&{position:"relative","&::before":{content:'""',width:"calc(100% + 0.5rem)",height:"calc(100% + 0.5rem)",borderRadius:p.borderRadius,position:"absolute",top:"-0.25rem",insetInlineEnd:"auto",insetInlineStart:"-0.25rem",boxSizing:"border-box",border:`${p.pulseBorderThickness} solid`,opacity:0,transform:"scale(0.75)",animationName:_I,animationDuration:"1s",animationIterationCount:"4",animationDirection:"alternate",...u[t].pulseBorder}},...S[o],...!c&&{position:"absolute",zIndex:p.notificationZIndex,...I[o]}},wrapper:{label:"badge__wrapper",position:"relative",boxSizing:"border-box",svg:{display:"block"}}}},kI=p=>{const e=p.borders,o=p.colors,t=p.spacing,i=p.typography,a=p.stacking,c=p.key,M={canvas:{colorPrimary:p["ic-brand-primary"]}};return{...{fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,color:o==null?void 0:o.textLightest,fontSize:i==null?void 0:i.fontSizeXSmall,colorDanger:o==null?void 0:o.textDanger,colorSuccess:o==null?void 0:o.textSuccess,colorPrimary:o==null?void 0:o.textBrand,colorInverse:o==null?void 0:o.textDarkest,size:"1.25rem",countOffset:"0.5rem",notificationOffset:"0.125rem",notificationZIndex:a==null?void 0:a.above,sizeNotification:t==null?void 0:t.small,borderRadius:"999rem",padding:t==null?void 0:t.xxSmall,pulseBorderThickness:e==null?void 0:e.widthMedium},...M[c]}},HI={count:s.number,countUntil:s.number,children:s.element,type:s.oneOf(["count","notification"]),standalone:s.bool,pulse:s.bool,variant:s.oneOf(["primary","success","danger","inverse"]),placement:S0.placement,display:s.oneOf(["inline-block","block"]),margin:G.spacing,elementRef:s.func,formatOverflowText:s.func,formatOutput:s.func,as:s.elementType},$I=["count","countUntil","children","type","standalone","pulse","variant","placement","display","margin","elementRef","formatOverflowText","formatOutput","as"];var tv,pv,nv,V2,E1;let yX=(tv=z0(),pv=L(XI,kI),nv=N(),tv(V2=pv(V2=nv(V2=(E1=class extends l.Component{constructor(e){super(e),this._defaultId=void 0,this.ref=null,this.handleRef=o=>{const t=this.props.elementRef;this.ref=o,typeof t=="function"&&t(o)},this._defaultId=this.props.deterministicId()}componentDidMount(){var e,o;(e=(o=this.props).makeStyles)===null||e===void 0||e.call(o)}componentDidUpdate(){var e,o;(e=(o=this.props).makeStyles)===null||e===void 0||e.call(o)}countOverflow(){const e=this.props,o=e.count,t=e.countUntil;return t&&o&&t>1&&o>=t}renderOutput(){const e=this.props,o=e.count,t=e.countUntil,i=e.formatOverflowText,a=e.formatOutput,c=e.type;let M=(o||"").toString();return o&&t&&i&&c==="count"&&this.countOverflow()&&(M=i(o,t)),typeof a=="function"?a(M):c==="count"?M:null}renderBadge(){const e=this.props,o=e.count,t=e.margin,i=e.standalone,a=e.type,c=e.styles;return b(w,Object.assign({margin:i?t:"none",css:c==null?void 0:c.badge,title:a==="count"&&this.countOverflow()?o==null?void 0:o.toString():"",id:i?void 0:this._defaultId,display:i?"inline-block":"block"},i&&{elementRef:this.handleRef}),this.renderOutput())}renderChildren(){return l.Children.map(this.props.children,e=>i0(e,{"aria-describedby":this._defaultId}))}render(){const e=this.props,o=e.margin,t=e.standalone,i=e.display,a=e.as,c=e.styles;return t?this.renderBadge():b(w,{as:a,margin:o,elementRef:this.handleRef,css:c==null?void 0:c.wrapper,display:i},this.renderChildren(),this.renderBadge())}},E1.displayName="Badge",E1.componentId="Badge",E1.propTypes=HI,E1.allowedProps=$I,E1.defaultProps={standalone:!1,type:"count",variant:"primary",display:"inline-block",pulse:!1,placement:"top end",elementRef:()=>{},formatOverflowText:(p,e)=>`${e-1} +`},E1))||V2)||V2)||V2);const VI=(p,e)=>{const o=e.alignContent,t=e.size,i={top:{alignItems:"flex-start"},center:{alignItems:"center"}},a={display:"flex",background:p.background,margin:0,padding:0,fontFamily:p.fontFamily,...i[o]},c={color:p.color,margin:0,padding:0};return{byline:{label:"byline",...a,"&:is(figure)":a,"&:-webkit-any(figure)":a},figure:{label:"byline__figure",marginInlineStart:0,marginInlineEnd:p.figureMargin},caption:{label:"byline__caption",...c,"&:is(figcaption)":c,"&:-webkit-any(figcaption)":c},title:{label:"byline__title",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",display:"block",margin:p.titleMargin,fontSize:p.titleFontSize,fontWeight:p.titleFontWeight,lineHeight:p.titleLineHeight},description:{label:"byline__description",fontSize:p.descriptionFontSize,lineHeight:p.descriptionLineHeight,fontWeight:p.descriptionFontWeight},maxWidth:t&&p[t]}},ZI=p=>{const e=p.colors,o=p.spacing,t=p.typography,i=p.breakpoints,a=p.key,c={canvas:{color:p["ic-brand-font-color-dark"]}};return{...{fontFamily:t==null?void 0:t.fontFamily,background:e==null?void 0:e.backgroundLightest,color:e==null?void 0:e.textDarkest,figureMargin:o==null?void 0:o.small,titleMargin:`0 0 ${o==null?void 0:o.xSmall} 0`,titleFontSize:t==null?void 0:t.fontSizeLarge,titleFontWeight:t==null?void 0:t.fontWeightNormal,titleLineHeight:t==null?void 0:t.lineHeightFit,descriptionFontSize:t==null?void 0:t.fontSizeMedium,descriptionFontWeight:t==null?void 0:t.fontWeightNormal,descriptionLineHeight:t==null?void 0:t.lineHeightCondensed,small:i==null?void 0:i.small,medium:i==null?void 0:i.medium,large:i==null?void 0:i.large},...c[a]}},DI={children:s.node.isRequired,title:s.node,description:s.oneOfType([s.string,s.node]),alignContent:s.oneOf(["top","center"]),margin:G.spacing,size:s.oneOf(["small","medium","large"]),elementRef:s.func},FI=["alignContent","children","description","elementRef","margin","size","title"];var rv,iv,_1;let NX=(rv=L(VI,ZI),rv(iv=(_1=class FM extends l.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=o=>{const t=this.props.elementRef;this.ref=o,typeof t=="function"&&t(o)}}componentDidMount(){var e,o;(e=(o=this.props).makeStyles)===null||e===void 0||e.call(o)}componentDidUpdate(){var e,o;(e=(o=this.props).makeStyles)===null||e===void 0||e.call(o)}render(){var e,o,t,i,a,c;const M=w.omitViewProps(V(this.props,FM.allowedProps),FM);return b(w,Object.assign({},M,{elementRef:this.handleRef,css:(e=this.props.styles)===null||e===void 0?void 0:e.byline,as:"figure",margin:this.props.margin,maxWidth:(o=this.props.styles)===null||o===void 0?void 0:o.maxWidth}),b("div",{css:(t=this.props.styles)===null||t===void 0?void 0:t.figure},this.props.children),b("figcaption",{css:(i=this.props.styles)===null||i===void 0?void 0:i.caption},this.props.title&&b("span",{css:(a=this.props.styles)===null||a===void 0?void 0:a.title},this.props.title),this.props.description&&b("div",{css:(c=this.props.styles)===null||c===void 0?void 0:c.description},this.props.description)))}},_1.displayName="Byline",_1.componentId="Byline",_1.propTypes=DI,_1.allowedProps=FI,_1.defaultProps={alignContent:"center"},_1))||iv);const jI=(p,e)=>{const o=e.withYearPicker;return{navigation:{label:"calendar__navigation",textAlign:"center",color:p.color,background:p.background,fontFamily:p.fontFamily,fontSize:p.fontSize,fontWeight:p.fontWeight,marginBottom:o?p.navWithYearMargin:p.navMargin},navigationWithButtons:{label:"calendar__navigation--withButtons",display:"flex",alignItems:"center",justifyContent:"space-between"},weekdayHeader:{label:"calendar__weekdayHeader",textAlign:"center",maxWidth:p.maxHeaderWidth},yearPicker:{display:"flex",justifyContent:"center",alignItems:"center",marginBottom:p.yearPickerMargin}}},UI=p=>{const e=p.colors,o=p.typography,t=p.spacing,i=p.key,a={canvas:{color:p["ic-brand-font-color-dark"]}};return{...{fontSize:o==null?void 0:o.fontSizeMedium,fontFamily:o==null?void 0:o.fontFamily,fontWeight:o==null?void 0:o.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,navMargin:t==null?void 0:t.small,navWithYearMargin:t==null?void 0:t.xSmall,yearPickerMargin:t==null?void 0:t.mediumSmall,maxHeaderWidth:t==null?void 0:t.medium},...a[i]}},GI=(p,e,o)=>{const t=e.isOutsideMonth,i=e.isSelected,a=e.isToday,c=o.isDisabled;return{calendarDay:{label:"calendarDay",padding:0},day:{label:"calendarDay__day",display:"flex",alignItems:"center",justifyContent:"center",background:p.background,color:p.color,fontSize:p.fontSize,textDecoration:"none",lineHeight:1,height:p.height,minWidth:p.minWidth,border:"none",margin:0,...t&&{color:p.outsideMonthColor},...i&&{background:p.selectedBackground,borderRadius:p.selectedBorderRadius,color:p.selectedColor},...a&&!i&&{background:p.todayBackground,borderRadius:p.todayBorderRadius,color:p.todayColor},...c&&{opacity:.5}}}},YI=p=>{const e=p.borders,o=p.colors,t=p.typography,i=p.spacing,a=p.forms,c=p.key,M={canvas:{color:p["ic-brand-font-color-dark"],todayBackground:p["ic-brand-primary"]}};return{...{color:o==null?void 0:o.textDarkest,background:o==null?void 0:o.backgroundLightest,fontSize:t==null?void 0:t.fontSizeMedium,padding:i==null?void 0:i.xxSmall,height:a==null?void 0:a.inputHeightSmall,minWidth:a==null?void 0:a.inputHeightSmall,outsideMonthColor:o==null?void 0:o.textDark,selectedBackground:o==null?void 0:o.backgroundSuccess,selectedColor:o==null?void 0:o.textLightest,selectedBorderRadius:e==null?void 0:e.radiusMedium,todayBackground:o==null?void 0:o.backgroundBrand,todayColor:o==null?void 0:o.textLightest,todayBorderRadius:a==null?void 0:a.inputHeightSmall},...M[c]}},KI={children:s.oneOfType([s.node,s.func]),date:eo.iso8601.isRequired,label:s.string.isRequired,interaction:s.oneOf(["enabled","disabled"]),isSelected:s.bool,isToday:s.bool,isOutsideMonth:s.bool,onClick:s.func,onKeyDown:s.func,elementRef:s.func,as:s.elementType},QI=["children","date","label","interaction","isSelected","isToday","isOutsideMonth","onClick","onKeyDown","elementRef","as"],JI=["children","label","interaction","isOutsideMonth","isSelected","isToday","onClick","onKeyDown","as","styles"];var sv,av,Yl,X1;let NL=(sv=L(GI,YI),av=N(),sv(Yl=av(Yl=(X1=class kc extends l.Component{constructor(...e){super(...e),this.ref=null,this.handleClick=o=>{const t=this.props,i=t.onClick,a=t.date;typeof i=="function"&&i(o,{date:a})},this.handleKeyDown=o=>{const t=this.props,i=t.onKeyDown,a=t.date;typeof i=="function"&&i(o,{date:a})},this.handleElementRef=o=>{const t=this.props.elementRef;this.ref=o,typeof t=="function"&&t(o)}}componentDidMount(){var e,o;(e=(o=this.props).makeStyles)===null||e===void 0||e.call(o,this.makeStylesVariables)}componentDidUpdate(){var e,o;(e=(o=this.props).makeStyles)===null||e===void 0||e.call(o,this.makeStylesVariables)}get makeStylesVariables(){return{isDisabled:this.isDisabled}}get isDisabled(){return this.props.interaction==="disabled"}get elementType(){return this.props.as||_2(kc,this.props)}shouldApplyAriaSelected(){const e=this.props.role;return!!e&&["option","gridcell"].indexOf(e)>-1}render(){const e=this.props,o=e.children,t=e.label;e.interaction,e.isOutsideMonth;const i=e.isSelected,a=e.isToday,c=e.onClick,M=e.onKeyDown;e.as;const z=e.styles,d=Y(e,JI),O=this.elementType,f=this.isDisabled,A=w.omitViewProps(V(d,kc.allowedProps),kc);return b(w,Object.assign({},A,{as:O,css:z==null?void 0:z.calendarDay,display:"inline-block",margin:"xxx-small",borderWidth:"none",borderColor:"transparent",background:"transparent",cursor:O==="button"||O==="a"?f?"not-allowed":"pointer":"auto",disabled:f,"aria-current":a?"date":void 0,"aria-selected":this.shouldApplyAriaSelected()?i?"true":"false":void 0,onClick:c&&this.handleClick,onKeyDown:M&&this.handleKeyDown,elementRef:this.handleElementRef}),b("span",{css:z==null?void 0:z.day},b(a0,{alt:t},D(o))))}},X1.displayName="Day",X1.componentId="Calendar.Day",X1.propTypes=KI,X1.allowedProps=QI,X1.defaultProps={interaction:"enabled",isSelected:!1,isToday:!1,isOutsideMonth:!1},X1))||Yl)||Yl);const ex={as:s.elementType,children:h0.oneOf([NL]),currentDate:s.string,disabledDates:s.oneOfType([s.array,s.func]),locale:s.string,onDateSelected:s.func,onRequestRenderNextMonth:s.func,onRequestRenderPrevMonth:s.func,renderNavigationLabel:s.oneOfType([s.node,s.func]),renderNextMonthButton:s.oneOfType([s.node,s.func]),renderPrevMonthButton:s.oneOfType([s.node,s.func]),renderWeekdayLabels:s.arrayOf(s.oneOfType([s.node,s.func])),role:s.oneOf(["table","listbox"]),selectedDate:s.string,timezone:s.string,visibleMonth:s.string,withYearPicker:s.object},ox=["as","children","currentDate","disabledDates","locale","onDateSelected","onRequestRenderNextMonth","onRequestRenderPrevMonth","renderNavigationLabel","renderNextMonthButton","renderPrevMonthButton","renderWeekdayLabels","role","selectedDate","timezone","visibleMonth"];var lv,cv,Kl,P0,Mv,bv;let eM=(lv=L(jI,UI),cv=N(),lv(Kl=cv(Kl=(P0=class N2 extends l.Component{constructor(e){super(e),this.ref=null,this._weekdayHeaderIds=(this.props.renderWeekdayLabels||this.defaultWeekdays).reduce((o,t,i)=>({...o,[i]:vy(`weekday-header-${i}`)}),{}),this.handleRef=o=>{this.ref=o},this.calculateState=(o,t,i)=>{const a=this.props.visibleMonth||i;return{visibleMonth:a?T.parse(a,o,t):T.now(o,t),today:i?T.parse(i,o,t):T.now(o,t)}},this.renderMonthNavigationButtons=()=>{const o=this.props,t=o.renderNextMonthButton,i=o.renderPrevMonthButton;return{prevButton:i?D(i):Mv||(Mv=b(t1,{size:"small",withBackground:!1,withBorder:!1,renderIcon:b(ab,{color:"primary"}),screenReaderLabel:"Previous month"})),nextButton:t?D(t):bv||(bv=b(t1,{size:"small",withBackground:!1,withBorder:!1,renderIcon:b(po,{color:"primary"}),screenReaderLabel:"Next month"}))}},this.handleMonthChange=o=>t=>{const i=this.props,a=i.onRequestRenderNextMonth,c=i.onRequestRenderPrevMonth,z=this.state.visibleMonth.clone();if(o==="prev"){if(!this.hasPrevMonth)return;if(c){c(t,z.subtract({months:1}).format("YYYY-MM"));return}z.subtract({months:1})}else{if(!this.hasNextMonth)return;if(a){a(t,z.add({months:1}).format("YYYY-MM"));return}z.add({months:1})}this.setState({visibleMonth:z})},this.handleYearChange=(o,t)=>{const i=this.props.withYearPicker,c=this.state.visibleMonth.clone();if(i!=null&&i.onRequestYearChange){i.onRequestYearChange(o,t);return}c.year(t),this.setState({visibleMonth:c})},this.handleDayClick=(o,{date:t})=>{if(this.props.onDateSelected){const i=T.parse(t,this.locale(),this.timezone());this.props.onDateSelected(i.toISOString(),i,o)}},this.state=this.calculateState(this.locale(),this.timezone(),e.currentDate)}componentDidMount(){var e,o;(e=(o=this.props).makeStyles)===null||e===void 0||e.call(o)}componentDidUpdate(e){var o,t;(o=(t=this.props).makeStyles)===null||o===void 0||o.call(t),(e.locale!==this.props.locale||e.timezone!==this.props.timezone||e.visibleMonth!==this.props.visibleMonth)&&this.setState(()=>({...this.calculateState(this.locale(),this.timezone(),this.props.currentDate)}))}get role(){return this.props.role==="listbox"?this.props.role:void 0}get hasPrevMonth(){return!this.props.withYearPicker||this.props.withYearPicker&&Number(this.state.visibleMonth.clone().subtract({months:1}).format("YYYY"))>=this.props.withYearPicker.startYear}get hasNextMonth(){return!this.props.withYearPicker||this.props.withYearPicker&&Number(this.state.visibleMonth.clone().add({months:1}).format("YYYY"))<=this.props.withYearPicker.endYear}renderHeader(){const e=this.props,o=e.renderNavigationLabel,t=e.styles,i=e.withYearPicker,a=this.state.visibleMonth,c=this.renderMonthNavigationButtons(),M=c.prevButton,z=c.nextButton,d=(A,u)=>i0(A,{onClick:c0(A.props.onClick,u)}),O=[t==null?void 0:t.navigation,...M||z?[t==null?void 0:t.navigationWithButtons]:[]],f=[];if(i){const A=i.startYear,u=i.endYear;for(let R=u;R>=A;R--)f.push(R)}return b("div",null,b("div",{css:O},M&&d(M,this.handleMonthChange("prev")),o?D(o):b("span",null,b("div",null,a.format("MMMM")),i?null:b("div",null,a.format("YYYY"))),z&&d(z,this.handleMonthChange("next"))),i?b("div",{css:t==null?void 0:t.yearPicker},b(kb,{width:"90px",renderLabel:"",assistiveText:i.screenReaderLabel,value:Number(a.format("YYYY")),onChange:(A,{value:u})=>this.handleYearChange(A,Number(u))},f.map(A=>b(kb.Option,{key:A,id:`opt-${A}`,value:A},`${A}`)))):null)}renderBody(){return b("table",{role:this.role},b("thead",null,this.renderWeekdayHeaders()),b("tbody",null,this.renderDays()))}renderWeekdayHeaders(){const e=this.props.styles,o=this.props.renderWeekdayLabels||this.defaultWeekdays,t=o.length;return t0(t===7,`[Calendar] \`renderWeekdayLabels\` should be an array with 7 labels (one for each weekday). ${t} provided.`),b("tr",null,o.map((i,a)=>b("th",{key:a,scope:"col",css:e==null?void 0:e.weekdayHeader,id:this._weekdayHeaderIds[a]},D(i))))}get defaultWeekdays(){const e=T.getLocalDayNamesOfTheWeek(this.locale(),"short"),o=T.getLocalDayNamesOfTheWeek(this.locale(),"long");return[b(a0,{key:1,alt:o[0]},e[0]),b(a0,{key:2,alt:o[1]},e[1]),b(a0,{key:3,alt:o[2]},e[2]),b(a0,{key:4,alt:o[3]},e[3]),b(a0,{key:5,alt:o[4]},e[4]),b(a0,{key:6,alt:o[5]},e[5]),b(a0,{key:7,alt:o[6]},e[6])]}renderDays(){const e=this.props.children,o=l.Children.toArray(e||this.renderDefaultdays()),t=o.length,i=this.role==="listbox"?"presentation":void 0;return t0(t===N2.DAY_COUNT,`[Calendar] should have exactly ${N2.DAY_COUNT} children. ${t} provided.`),o.reduce((a,c,M)=>{const z=Math.floor(M/7);return a[z]||a.push([]),a[z].push(c),a},[]).map(a=>b("tr",{key:`row${a[0].props.date}`,role:i},a.map((c,M)=>b("td",{key:c.props.date,role:i},i==="presentation"?i0(c,{"aria-describedby":this._weekdayHeaderIds[M]}):c))))}locale(){return this.props.locale?this.props.locale:this.context&&this.context.locale?this.context.locale:OM.browserLocale()}timezone(){return this.props.timezone?this.props.timezone:this.context&&this.context.timezone?this.context.timezone:T.browserTimeZone()}isDisabledDate(e){const o=this.props.disabledDates;if(!o)return!1;if(Array.isArray(o)){for(const t of o)if(e.isSame(t,"day"))return!0;return!1}return o(e.toISOString())}renderDefaultdays(){const e=this.props.selectedDate,o=this.state,t=o.visibleMonth,i=o.today,a=T.getFirstDayOfWeek(t.clone().startOf("month")),c=[];for(let M=0;M{const z=M.toISOString();return b(N2.Day,{key:z,date:z,isSelected:e?M.isSame(e,"day"):!1,isToday:M.isSame(i,"day"),isOutsideMonth:!M.isSame(t,"month"),label:M.format("D MMMM YYYY"),onClick:this.handleDayClick,interaction:this.isDisabledDate(M)?"disabled":"enabled"},M.format("DD"))})}render(){const e=w.omitViewProps(V(this.props,N2.allowedProps),N2);return b(w,Object.assign({},e,{as:this.props.as,display:"inline-block",padding:"small",background:"primary",elementRef:this.handleRef}),this.renderHeader(),this.renderBody())}},P0.displayName="Calendar",P0.componentId="Calendar",P0.contextType=pM,P0.Day=NL,P0.DAY_COUNT=42,P0.propTypes=ex,P0.allowedProps=ox,P0.defaultProps={as:"span",role:"table"},P0))||Kl)||Kl);const tx=(p,e)=>{const o=e.size,t=e.checked,i=e.focused,a=e.hovered,c=e.indeterminate,M=t||c,z={small:{label:{fontSize:p.labelFontSizeSmall},facade:{fontSize:p.iconSizeSmall,width:p.facadeSizeSmall,height:p.facadeSizeSmall}},medium:{label:{fontSize:p.labelFontSizeMedium},facade:{fontSize:p.iconSizeMedium,width:p.facadeSizeMedium,height:p.facadeSizeMedium}},large:{label:{fontSize:p.labelFontSizeLarge},facade:{fontSize:p.iconSizeLarge,width:p.facadeSizeLarge,height:p.facadeSizeLarge}}};return{checkboxFacade:{label:"checkboxFacade",display:"flex",alignItems:"flex-start"},facade:{label:"checkboxFacade__facade",color:p.color,background:p.background,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",flexShrink:0,transition:"all 0.2s",border:`${p.borderWidth} solid ${p.borderColor}`,borderRadius:p.borderRadius,marginInlineEnd:p.marginRight,marginInlineStart:"0",padding:p.padding,...z[o].facade,"&::before":{content:'""',position:"absolute",top:"-0.3125rem",bottom:"-0.3125rem",left:"-0.3125rem",right:"-0.3125rem",boxSizing:"border-box",borderRadius:`calc(${p.borderRadius} * 1.5)`,border:`${p.focusBorderWidth} ${p.focusBorderStyle} ${p.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none",...i&&{transform:"scale(1)",opacity:1}},...M&&{background:p.checkedBackground,borderColor:p.checkedBorderColor},...a&&{borderColor:p.hoverBorderColor}},label:{label:"checkboxFacade__label",flex:"1 1 auto",minWidth:"0.0625rem",color:p.labelColor,fontFamily:p.labelFontFamily,fontWeight:p.labelFontWeight,lineHeight:p.labelLineHeight,...z[o].label,...M&&{color:p.checkedLabelColor}}}},px=p=>{const e=p.colors,o=p.borders,t=p.spacing,i=p.typography,a=p.key,c={canvas:{focusBorderColor:p["ic-brand-primary"],labelColor:p["ic-brand-font-color-dark"],checkedLabelColor:p["ic-brand-font-color-dark"],checkedBackground:p["ic-brand-font-color-dark"],checkedBorderColor:p["ic-brand-font-color-dark"],hoverBorderColor:p["ic-brand-font-color-dark"]}};return{...{color:e==null?void 0:e.textLightest,borderWidth:o==null?void 0:o.widthSmall,borderColor:e==null?void 0:e.borderMedium,borderRadius:o==null?void 0:o.radiusMedium,background:e==null?void 0:e.backgroundLightest,marginRight:t==null?void 0:t.xSmall,padding:t==null?void 0:t.xxxSmall,checkedBackground:e==null?void 0:e.backgroundDarkest,checkedBorderColor:e==null?void 0:e.borderDarkest,hoverBorderColor:e==null?void 0:e.borderDarkest,focusBorderColor:e==null?void 0:e.borderBrand,focusBorderWidth:o==null?void 0:o.widthMedium,focusBorderStyle:o==null?void 0:o.style,labelColor:e==null?void 0:e.textDarkest,checkedLabelColor:e==null?void 0:e.textDarkest,labelFontFamily:i==null?void 0:i.fontFamily,labelFontWeight:i==null?void 0:i.fontWeightNormal,labelLineHeight:i==null?void 0:i.lineHeightCondensed,facadeSizeSmall:"1rem",facadeSizeMedium:"1.25rem",facadeSizeLarge:"1.75rem",labelFontSizeSmall:i==null?void 0:i.fontSizeSmall,labelFontSizeMedium:i==null?void 0:i.fontSizeMedium,labelFontSizeLarge:i==null?void 0:i.fontSizeLarge,iconSizeSmall:"0.625rem",iconSizeMedium:"0.75rem",iconSizeLarge:"1rem"},...c[a]}},nx={children:s.node.isRequired,checked:s.bool,focused:s.bool,hovered:s.bool,size:s.oneOf(["small","medium","large"]),indeterminate:s.bool},rx=["children","checked","focused","hovered","size","indeterminate"];var zv,dv,k1,Ov,hv;let ix=(zv=L(tx,px),zv(dv=(k1=class extends l.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=o=>{this.ref=o}}componentDidMount(){var e,o;(e=(o=this.props).makeStyles)===null||e===void 0||e.call(o)}componentDidUpdate(){var e,o;(e=(o=this.props).makeStyles)===null||e===void 0||e.call(o)}renderIcon(){return this.props.indeterminate?Ov||(Ov=b(n,{viewBox:"0 0 1920 1920",inline:!1},b("rect",{x:"140",y:"820",width:"1640",height:"280"}))):this.props.checked?hv||(hv=b(H2,{inline:!1})):null}render(){const e=this.props,o=e.children,t=e.styles;return b("span",{css:t==null?void 0:t.checkboxFacade,ref:this.handleRef},b("span",{css:t==null?void 0:t.facade,"aria-hidden":"true"},this.renderIcon()),b("span",{css:t==null?void 0:t.label},o))}},k1.displayName="CheckboxFacade",k1.componentId="CheckboxFacade",k1.propTypes=nx,k1.allowedProps=rx,k1.defaultProps={checked:!1,focused:!1,hovered:!1,size:"medium",indeterminate:!1},k1))||dv);const sx=(p,e)=>{const o=e.size,t=e.checked,i=e.focused,a=e.labelPlacement,c={start:{facade:{marginInlineEnd:"0",marginInlineStart:p.marginStart},label:{textAlign:"end"}},end:{facade:{marginInlineEnd:p.marginEnd,marginInlineStart:"0"},label:{}},top:{facade:{marginTop:p.marginVertical},label:{display:"block"}}},M={small:{fontSize:p.labelFontSizeSmall},medium:{fontSize:p.labelFontSizeMedium},large:{fontSize:p.labelFontSizeLarge}};return{toggleFacade:{label:"toggleFacade",display:"flex",alignItems:"center",...a==="top"&&{display:"block"}},facade:{label:"toggleFacade__facade",background:p.background,borderColor:p.borderColor,cursor:"pointer",display:"inline-block",userSelect:"none",position:"relative",borderRadius:"3rem",verticalAlign:"middle",boxShadow:`inset 0 0 0 ${p.borderWidth} ${p.borderColor}`,height:p.toggleSize,width:`calc(${p.toggleSize} * 1.5)`,...c[a].facade,...t&&{background:p.checkedBackground,boxShadow:"none"},"&::before":{content:'""',position:"absolute",top:"-0.25rem",left:"-0.25rem",width:"calc(100% + 0.5rem)",height:"calc(100% + 0.5rem)",boxSizing:"border-box",borderRadius:p.borderRadius,border:`${p.focusBorderWidth} ${p.focusBorderStyle} ${p.focusOutlineColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none",...i&&{transform:"scale(1)",opacity:1}}},icon:{label:"toggleFacade__icon",display:"block",textAlign:"center",position:"absolute",top:"0",insetInlineStart:"0",insetInlineEnd:"auto",transition:"all 0.2s",transform:"translate3d(0, 0, 0)",fontSize:"0.875rem",height:p.toggleSize,width:p.toggleSize,...t&&{transform:"translate3d(50%, 0, 0)",'[dir="rtl"] &':{transform:"translate3d(-50%, 0, 0)"}}},iconToggle:{label:"toggleFacade__iconToggle",position:"relative",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center","&::before":{content:'""',position:"absolute",top:p.borderWidth,left:p.borderWidth,height:`calc(100% - (${p.borderWidth} * 2))`,width:`calc(100% - (${p.borderWidth} * 2))`,background:p.toggleBackground,boxShadow:p.toggleShadow,borderRadius:"100%"}},iconSVG:{label:"toggleFacade__iconSVG",display:"block",color:p.uncheckedIconColor,position:"relative",zIndex:1,...t&&{color:p.checkedIconColor}},label:{label:"toggleFacade__label",flex:1,minWidth:"0.0625rem",color:p.labelColor,fontFamily:p.labelFontFamily,fontWeight:p.labelFontWeight,lineHeight:p.labelLineHeight,...M[o],...c[a].label}}},ax=p=>{const e=p.colors,o=p.borders,t=p.forms,i=p.shadows,a=p.spacing,c=p.typography,M=p.key,z={canvas:{focusOutlineColor:p["ic-brand-primary"],labelColor:p["ic-brand-font-color-dark"]},"canvas-high-contrast":{background:e==null?void 0:e.backgroundDarkest,borderColor:e==null?void 0:e.borderDarkest}};return{...{color:e==null?void 0:e.textLightest,background:e==null?void 0:e.backgroundLight,borderColor:e==null?void 0:e.borderMedium,borderWidth:o==null?void 0:o.widthSmall,borderRadius:"4rem",marginEnd:a==null?void 0:a.small,marginStart:a==null?void 0:a.small,marginVertical:a==null?void 0:a.xSmall,checkedBackground:e==null?void 0:e.backgroundSuccess,uncheckedIconColor:e==null?void 0:e.textDarkest,checkedIconColor:e==null?void 0:e.textSuccess,focusOutlineColor:e==null?void 0:e.borderBrand,focusBorderWidth:o==null?void 0:o.widthMedium,focusBorderStyle:o==null?void 0:o.style,toggleBackground:e==null?void 0:e.backgroundLightest,toggleShadow:i==null?void 0:i.depth1,toggleSize:t==null?void 0:t.inputHeightSmall,labelColor:e==null?void 0:e.textDarkest,labelFontFamily:c==null?void 0:c.fontFamily,labelFontWeight:c==null?void 0:c.fontWeightNormal,labelLineHeight:c==null?void 0:c.lineHeightCondensed,labelFontSizeSmall:c==null?void 0:c.fontSizeSmall,labelFontSizeMedium:c==null?void 0:c.fontSizeMedium,labelFontSizeLarge:c==null?void 0:c.fontSizeLarge},...z[M]}},lx={children:s.node.isRequired,checked:s.bool,disabled:s.bool,readOnly:s.bool,focused:s.bool,size:s.oneOf(["small","medium","large"]),labelPlacement:s.oneOf(["top","start","end"])},cx=["children","checked","disabled","readOnly","focused","size","labelPlacement"];var fv,Av,H1;let Mx=(fv=L(sx,ax),fv(Av=(H1=class extends l.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=o=>{this.ref=o}}componentDidMount(){var e,o;(e=(o=this.props).makeStyles)===null||e===void 0||e.call(o)}componentDidUpdate(){var e,o;(e=(o=this.props).makeStyles)===null||e===void 0||e.call(o)}renderIcon(){const e=this.props,o=e.styles;return e.checked?b(Wy,{css:o==null?void 0:o.iconSVG}):b(Ly,{css:o==null?void 0:o.iconSVG})}renderLabel(){const e=this.props,o=e.children,t=e.styles;return b("span",{css:t==null?void 0:t.label},o)}render(){const e=this.props,o=e.labelPlacement,t=e.styles;return b("span",{css:t==null?void 0:t.toggleFacade,ref:this.handleRef},(o==="top"||o==="start")&&this.renderLabel(),b("span",{css:t==null?void 0:t.facade,"aria-hidden":"true"},b("span",{css:t==null?void 0:t.icon},b("span",{css:t==null?void 0:t.iconToggle},this.renderIcon()))),o==="end"&&this.renderLabel())}},H1.displayName="ToggleFacade",H1.componentId="ToggleFacade",H1.propTypes=lx,H1.allowedProps=cx,H1.defaultProps={checked:!1,focused:!1,size:"medium",disabled:!1,readOnly:!1,labelPlacement:"end"},H1))||Av);const bx=(p,e)=>{const o=e.inline;return{checkbox:{label:"checkbox",position:"relative",width:"100%",...e.disabled&&{cursor:"not-allowed",pointerEvents:"none",opacity:.5},...o&&{display:"inline-block",verticalAlign:"middle",width:"auto"}},input:{label:"checkbox__input",padding:0,margin:0,fontSize:"inherit",lineHeight:"inherit",width:"auto",position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",opacity:1e-4},control:{label:"checkbox__control",all:"initial",display:"block",direction:"inherit",textAlign:"start"}}},zx={label:s.node.isRequired,id:s.string,value:s.oneOfType([s.string,s.number]),messages:s.arrayOf(n1.message),defaultChecked:s.bool,checked:u0(s.bool,"onChange","defaultChecked"),onChange:s.func,onKeyDown:s.func,onFocus:s.func,onBlur:s.func,onMouseOver:s.func,onMouseOut:s.func,disabled:s.bool,readOnly:s.bool,indeterminate:s.bool,size:s.oneOf(["small","medium","large"]),variant:s.oneOf(["simple","toggle"]),inline:s.bool,labelPlacement:s.oneOf(["top","start","end"])},dx=["label","id","value","messages","defaultChecked","checked","onChange","onKeyDown","onFocus","onBlur","onMouseOver","onMouseOut","disabled","readOnly","indeterminate","size","variant","inline","labelPlacement"];var uv,qv,mv,Z2,$1;let BL=(uv=z0(),qv=L(bx,null),mv=N(),uv(Z2=qv(Z2=mv(Z2=($1=class CL extends l.Component{constructor(e){super(e),this._defaultId=void 0,this._input=null,this.ref=null,this.handleRef=o=>{this.ref=o},this.handleChange=o=>{const t=this.props,i=t.onChange,a=t.disabled,c=t.checked,M=t.readOnly;if(a||M){o.preventDefault();return}typeof c>"u"&&this.setState({checked:!this.state.checked}),typeof i=="function"&&i(o)},this.handleKeyDown=o=>{this.props.variant==="toggle"&&o.keyCode===k.codes.enter&&(this._input&&this._input.click(),o.preventDefault())},this.handleFocus=()=>{this.setState({focused:!0})},this.handleBlur=()=>{this.setState({focused:!1})},this.handleMouseOver=()=>{!this.props.disabled&&this.setState({hovered:!0})},this.handleMouseOut=()=>{this.setState({hovered:!1})},this.state={focused:!1,hovered:!1,checked:typeof e.checked>"u"?!!e.defaultChecked:void 0},typeof e.checked>"u"&&(this.state.checked=!!e.defaultChecked),this._defaultId=e.deterministicId()}componentDidMount(){var e,o;this._input&&(this._input.indeterminate=this.props.indeterminate),(e=(o=this.props).makeStyles)===null||e===void 0||e.call(o)}componentDidUpdate(e){var o,t;e.indeterminate!==this.props.indeterminate&&this._input&&(this._input.indeterminate=this.props.indeterminate||!1),(o=(t=this.props).makeStyles)===null||o===void 0||o.call(t)}get id(){return this.props.id||this._defaultId}get checked(){return typeof this.props.checked>"u"?this.state.checked:this.props.checked}get focused(){return no(this._input)}focus(){this._input&&this._input.focus()}renderFacade(){const e=this.props,o=e.size,t=e.disabled,i=e.variant,a=e.label,c=e.readOnly,M=e.indeterminate,z=e.labelPlacement,d=e.themeOverride,O=this.state,f=O.hovered,A=O.focused;return t0(!(i==="simple"&&z!=="end"),"[Checkbox] The `simple` variant does not support the `labelPlacement` property. Use the `toggle` variant instead."),i==="toggle"?b(Mx,{disabled:t,size:o,focused:A,checked:this.checked,readOnly:c,labelPlacement:z,themeOverride:d},a):b(ix,{size:o,hovered:f,focused:A,checked:this.checked,indeterminate:M,themeOverride:d},a)}renderMessages(){const e=this.props.messages;return e&&e.length>0?b(w,{display:"block",margin:"small 0 0"},b(hy,{messages:e})):null}render(){const e=this.props,o=e.disabled,t=e.readOnly,i=e.value,a=e.onKeyDown,c=e.onFocus,M=e.onBlur,z=e.onMouseOver,d=e.onMouseOut,O=e.indeterminate,f=e.variant,A=e.styles,u=V(this.props,CL.allowedProps);return t0(!(f==="toggle"&&O),"[Checkbox] The `toggle` variant does not support the `indeterminate` property. Use the `simple` variant instead."),b("div",{css:A==null?void 0:A.checkbox,onMouseOver:c0(z,this.handleMouseOver),onMouseOut:c0(d,this.handleMouseOut),ref:this.handleRef},b("input",Object.assign({},u,{id:this.id,value:i,type:"checkbox",ref:R=>{this._input=R},disabled:o||t,"aria-checked":O?"mixed":void 0,css:A==null?void 0:A.input,onChange:this.handleChange,onKeyDown:c0(a,this.handleKeyDown),onFocus:c0(c,this.handleFocus),onBlur:c0(M,this.handleBlur),checked:this.checked})),b("label",{htmlFor:this.id,css:A==null?void 0:A.control},this.renderFacade(),this.renderMessages()))}},$1.displayName="Checkbox",$1.componentId="Checkbox",$1.propTypes=zx,$1.allowedProps=dx,$1.defaultProps={size:"medium",variant:"simple",disabled:!1,inline:!1,indeterminate:!1,readOnly:!1,labelPlacement:"end"},$1))||Z2)||Z2)||Z2);const Ox={name:s.string.isRequired,description:s.node.isRequired,defaultValue:s.array,value:u0(s.array),onChange:s.func,disabled:s.bool,readOnly:s.bool,messages:s.arrayOf(n1.message),children:h0.oneOf([BL]),size:s.oneOf(["small","medium","large"]),layout:s.oneOf(["stacked","columns","inline"])},hx=["name","description","defaultValue","value","onChange","disabled","readOnly","messages","children","size","layout"];var Rv,vv,Ql,V1;let SX=(Rv=z0(),vv=N(),Rv(Ql=vv(Ql=(V1=class SL extends l.Component{constructor(e){super(e),this._messagesId=void 0,this.ref=null,this.handleRef=o=>{this.ref=o},this.handleChange=o=>{const t=this.value;if(this.props.disabled||this.props.readOnly){o.preventDefault();return}o.target.checked?t.push(o.target.value):t.splice(t.indexOf(o.target.value),1),typeof this.props.value>"u"&&this.setState({value:t}),typeof this.props.onChange=="function"&&this.props.onChange(t)},typeof e.value>"u"&&(this.state={value:e.defaultValue||[]}),this._messagesId=e.deterministicId()}get hasMessages(){return this.props.messages&&this.props.messages.length>0}get value(){return typeof this.props.value>"u"?[...this.state.value]:[...this.props.value]}renderChildren(){const e=this.props,o=e.children,t=e.name,i=e.size,a=e.disabled,c=e.readOnly;return l.Children.map(o,M=>M0(M,[BL])?i0(M,{key:`${M.props.name}`,name:t,label:M.props.label,disabled:a||M.props.disabled,readOnly:c||M.props.readOnly,size:i,checked:this.value.indexOf(M.props.value)>-1,onChange:this.handleChange,width:M.props.width||"auto","aria-describedby":this.hasMessages?this._messagesId:void 0}):M)}render(){return r.createElement(TM,Object.assign({},V(this.props,SL.allowedProps),Q0(this.props,TM.allowedProps),{description:this.props.description,rowSpacing:"small",vAlign:"top",messagesId:this._messagesId,elementRef:this.handleRef}),this.renderChildren())}},V1.displayName="CheckboxGroup",V1.componentId="CheckboxGroup",V1.propTypes=Ox,V1.allowedProps=hx,V1.defaultProps={disabled:!1,readOnly:!1,size:"medium",layout:"stacked",children:null},V1))||Ql)||Ql);const Wv=X2` 0% {} 50% { background-color: transparent; } - 100% {}`,fx=(p,e)=>{const o=e.attachment,t={top:{borderBottomLeftRadius:0,borderBottomRightRadius:0,marginTop:"0.25rem"},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0,marginBottom:"0.25rem"}};return{codeEditor:{label:"codeEditor"},globalStyles:{".CodeMirror":{direction:"ltr",position:"relative",overflow:"hidden",background:p.background,height:"auto",fontFamily:p.fontFamily,fontSize:p.fontSize,borderRadius:p.borderRadius,border:p.border,color:p.color,lineHeight:1.4375,minHeight:"1.4375rem",marginBottom:"1rem",...o&&t[o]},".CodeMirror-lines":{padding:`${p.verticalPadding} 0`,cursor:"text",minHeight:"0.0625rem"},".CodeMirror pre":{padding:`0 ${p.horizontalPadding}`,borderRadius:"0",borderWidth:"0",background:"transparent",fontFamily:"inherit",fontSize:"inherit",margin:"0",whiteSpace:"pre",wordWrap:"normal",lineHeight:"inherit",color:"inherit",zIndex:`calc(${p.zIndex} + 3)`,position:"relative",overflow:"visible",WebkitTapHighlightColor:"transparent",fontVariantLigatures:"contextual"},".CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler":{background:p.background},".CodeMirror-cursor":{borderLeft:`0.0625rem solid ${p.cursorColor}`,borderRight:"none",width:"0",position:"absolute",pointerEvents:"none"},".CodeMirror-cursors":{visibility:"hidden",position:"relative",zIndex:`calc(${p.zIndex} + 4)`},".CodeMirror-dragcursors":{visibility:"visible"},".CodeMirror-focused .CodeMirror-cursors":{visibility:"visible"},".CodeMirror-crosshair":{cursor:"crosshair"},".cm-fat-cursor .CodeMirror-cursor":{width:"auto",border:"0 !important",background:p.fatCursorBackground},".cm-fat-cursor .CodeMirror-cursors":{zIndex:`calc(${p.zIndex} + 2)`},".CodeMirror .CodeMirror-secondarycursor":{borderLeft:`0.0625rem solid ${p.secondaryCursorColor}`},".cm-fat-cursor-mark":{background:p.fatCursorMarkBackground,animation:`${Wv} 1.06s steps(1) infinite`},".cm-animate-fat-cursor":{width:"auto",border:"0",animation:`${Wv} 1.06s steps(1) infinite`,backgroundColor:p.fatCursorBackground},".cm-tab":{display:"inline-block",textDecoration:"inherit"},".CodeMirror-rulers":{position:"absolute",left:"0",right:"0",top:"-50px",bottom:"-20px",overflow:"hidden"},".CodeMirror-ruler":{borderLeft:`0.0625rem solid ${p.rulerColor}`,top:"0",bottom:"0",position:"absolute"},"div.CodeMirror span.CodeMirror-matchingbracket":{outline:`0.0625rem solid ${p.matchingBracketOutline}`},"div.CodeMirror span.CodeMirror-nonmatchingbracket":{color:p.nonMatchingBracketColor},".CodeMirror-matchingtag":{background:p.matchingTagBackground},"div.CodeMirror-activeline-background":{background:p.activeLineBackground},".CodeMirror-scroll":{overflow:"scroll !important",marginBottom:"-30px",marginRight:"-30px",paddingBottom:"30px",height:"100%",outline:"none",position:"relative"},".CodeMirror-sizer":{position:"relative",borderRight:"30px solid transparent"},".CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler":{position:"absolute",zIndex:`calc(${p.zIndex} + 7)`,display:"none"},".CodeMirror-vscrollbar":{right:"0",top:"0",overflowX:"hidden",overflowY:"scroll"},".CodeMirror-hscrollbar":{bottom:"0",left:"0",overflowY:"hidden",overflowX:"scroll"},".CodeMirror-scrollbar-filler":{right:"0",bottom:"0"},".CodeMirror-gutter-filler":{left:"0",bottom:"0"},".CodeMirror-gutters":{borderTopLeftRadius:p.borderRadius,borderBottomLeftRadius:p.borderRadius,borderRight:`0.0625rem solid ${p.gutterBorder}`,overflow:"hidden",background:p.gutterBackground,whiteSpace:"nowrap",position:"absolute",left:"0",top:"0",minHeight:"100%",zIndex:`calc(${p.zIndex} + 4)`},".CodeMirror-linenumber":{padding:"0 0.1875rem 0 0.3125rem",minWidth:"1.25rem",textAlign:"right",color:p.lineNumberColor,whiteSpace:"nowrap"},".CodeMirror-guttermarker":{color:p.gutterMarkerColor},".CodeMirror-guttermarker-subtle":{color:p.gutterMarkerSubtleColor},".CodeMirror-gutter":{whiteSpace:"normal",height:"100%",display:"inline-block",verticalAlign:"top",marginBottom:"-30px"},".CodeMirror-gutter-wrapper":{position:"absolute",zIndex:`calc(${p.zIndex} + 5)`,background:"none !important",border:"none !important"},".CodeMirror-gutter-background":{position:"absolute",top:"0",bottom:"0",zIndex:`calc(${p.zIndex} + 5)`},".CodeMirror-gutter-elt":{position:"absolute",cursor:"default",zIndex:`calc(${p.zIndex} + 5)`},".CodeMirror-gutter-wrapper ::selection":{backgroundColor:"transparent"},".CodeMirror-wrap pre":{wordWrap:"break-word",whiteSpace:"pre-wrap",wordBreak:"normal"},".CodeMirror-linebackground":{position:"absolute",left:"0",right:"0",top:"0",bottom:"0",zIndex:`calc(${p.zIndex} + 1)`},".CodeMirror-linewidget":{position:"relative",zIndex:`calc(${p.zIndex} + 3)`,padding:"0.1px"},".CodeMirror-rtl pre":{direction:"rtl"},".CodeMirror-code":{outline:"none"},".CodeMirror-scroll, .CodeMirror-sizer, .CodeMirror-gutter, .CodeMirror-gutters, .CodeMirror-linenumber":{boxSizing:"content-box"},".CodeMirror-measure":{position:"absolute",width:"100%",height:"0",overflow:"hidden",visibility:"hidden"},".CodeMirror-measure pre":{position:"static"},".CodeMirror-selected, .CodeMirror-focused .CodeMirror-selected, .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection":{background:p.selectedBackground},".cm-searching":{background:p.searchingBackground},".cm-force-border":{paddingRight:"0.1px"},"@media print":{".CodeMirror .CodeMirror-cursors":{visibility:"hidden"}},".cm-tab-wrap-hack::after":{content:'""'},".CodeMirror-selectedtext":{background:"none"},".CodeMirror-focused":{boxShadow:p.focusBoxShadow,borderColor:p.focusBorderColor},".cm-keyword":{color:p.keywordColor,fontWeight:"bold"},".cm-atom":{color:p.atomColor},".cm-number":{color:p.numberColor},".cm-def":{color:p.defColor},"span.cm-variable-2, span.cm-tag":{color:p.tagColor},"span.cm-variable-3, span.cm-def, span.cm-type":{color:p.typeColor},".cm-variable":{color:p.variableColor},".cm-property":{color:p.propertyColor},".cm-qualifier":{color:p.qualifierColor},".cm-operator":{color:p.operatorColor},".cm-comment":{color:p.commentColor,fontWeight:"normal"},".cm-string":{color:p.stringColor,fontStyle:"italic"},".cm-string-2":{color:p.secondaryStringColor},".cm-meta":{color:p.metaColor},".cm-builtin":{color:p.builtInColor},".cm-tag":{color:p.tagColor},".cm-attribute":{color:p.attributeColor},".cm-header":{color:p.headerColor},".cm-hr":{color:p.hrColor},".cm-link":{color:p.linkColor,fontStyle:"italic",textDecoration:"none"},".cm-error":{}}}},Ax=p=>{const e=p.colors,o=p.borders,t=p.spacing,i=p.typography,a=p.stacking;return{...{fontFamily:i==null?void 0:i.fontFamilyMonospace,fontSize:i==null?void 0:i.fontSizeSmall,background:e==null?void 0:e.backgroundLight,border:`${o==null?void 0:o.widthSmall} solid ${e==null?void 0:e.borderLight}`,borderRadius:o==null?void 0:o.radiusMedium,focusBorderColor:e==null?void 0:e.borderBrand,focusBoxShadow:`inset 0 0 0 1px ${e==null?void 0:e.borderLightest}`,horizontalPadding:t==null?void 0:t.xSmall,verticalPadding:t==null?void 0:t.xxSmall,color:e==null?void 0:e.textDarkest,lineNumberColor:e==null?void 0:e.textDark,gutterBorder:e==null?void 0:e.borderLight,gutterBackground:le(e==null?void 0:e.backgroundLight,5),gutterMarkerColor:e==null?void 0:e.textBrand,gutterMarkerSubtleColor:e==null?void 0:e.textDark,cursorColor:e==null?void 0:e.textDarkest,secondaryCursorColor:e==null?void 0:e.textDark,rulerColor:e==null?void 0:e.borderDark,matchingBracketOutline:e==null?void 0:e.textDark,nonMatchingBracketColor:e==null?void 0:e.textDanger,matchingTagBackground:"rgba(255, 150, 0, 0.3)",activeLineBackground:le(e==null?void 0:e.backgroundLight,5),selectedBackground:le(e==null?void 0:e.backgroundLight,15),fatCursorBackground:e==null?void 0:e.backgroundSuccess,fatCursorMarkBackground:"rgba(20, 255, 20, 0.5)",searchingBackground:"rgba(255, 255, 0, 0.4)",zIndex:a==null?void 0:a.above,quoteColor:e==null?void 0:e.textSuccess,headerColor:e==null?void 0:e.textWarning,negativeColor:e==null?void 0:e.textDanger,positiveColor:e==null?void 0:e.textSuccess,keywordColor:e==null?void 0:e.textBrand,atomColor:e==null?void 0:e.textWarning,numberColor:e==null?void 0:e.textWarning,defColor:e==null?void 0:e.textDarkest,variableColor:e==null?void 0:e.textBrand,secondaryVariableColor:e==null?void 0:e.textWarning,typeColor:e==null?void 0:e.textBrand,commentColor:e==null?void 0:e.textDark,stringColor:e==null?void 0:e.textBrand,secondaryStringColor:e==null?void 0:e.textDanger,metaColor:e==null?void 0:e.textDarkest,qualifierColor:e==null?void 0:e.textSuccess,builtInColor:e==null?void 0:e.textWarning,bracketColor:e==null?void 0:e.borderDark,tagColor:e==null?void 0:e.textSuccess,attributeColor:e==null?void 0:e.textBrand,hrColor:e==null?void 0:e.borderDark,linkColor:e==null?void 0:e.textBrand,errorColor:e==null?void 0:e.textDanger,propertyColor:e==null?void 0:e.textAlert,nodeColor:e==null?void 0:e.textWarning,operatorColor:e==null?void 0:e.textDarkest}}},ux={label:s.string.isRequired,language:s.oneOf(["sh","js","json","javascript","jsx","shell","css","html","markdown","yaml","yml","bash"]),readOnly:s.bool,onChange:s.func,options:s.object,attachment:s.oneOf(["bottom","top"]),value:s.string},qx=["label","language","readOnly","onChange","options","attachment","value"],mx=["value","label","attachment","readOnly","onChange","styles"];var gv,yv,Lv,Nv,l1,Z1;const Rx=l.lazy(()=>typeof navigator>"u"||typeof global<"u"&&global.PREVENT_CODEMIRROR_RENDER===!0?Hb(()=>import("./index.node-evW1ZN7C.js"),__vite__mapDeps([0,1,2])):Hb(()=>import("./index-DTxffNH3.js"),__vite__mapDeps([3,1,2])));let wX=(gv=z0(),yv=L(fx,Ax),Lv=N(),Nv=Ny("[TBD]",null,"This component is deprecated and will be removed in a later version. Use instead, which is the wrapper for the newer version of the CodeMirror code editor."),gv(l1=yv(l1=Lv(l1=Nv(l1=(Z1=class extends l.Component{constructor(e){super(e),this._id=void 0,this.codeMirror=void 0,this.ref=void 0,this.editor=void 0,this._id=e.deterministicId(),this.ref=l.createRef(),this.editor=l.createRef(),this.codeMirror=l.createRef()}componentDidMount(){var e,o;(e=(o=this.props).makeStyles)===null||e===void 0||e.call(o)}componentDidUpdate(){var e,o;(e=(o=this.props).makeStyles)===null||e===void 0||e.call(o)}focus(){this.codeMirror&&this.codeMirror.focus()}get mode(){const e=this.props.language;return e==="json"||e==="js"?"jsx":e==="sh"?"shell":e==="html"?"htmlmixed":e==="yml"?"yaml":e}get options(){return{...this.props.options,readOnly:this.props.readOnly,mode:this.mode,extraKeys:this.props.readOnly?{Tab:!1,"Shift-Tab":!1}:{}}}render(){const e=this.props,o=e.value,t=e.label;e.attachment,e.readOnly;const i=e.onChange,a=e.styles,c=Y(e,mx);return b("div",{css:a==null?void 0:a.codeEditor,ref:this.ref},b(l.Suspense,null,b(vN,{styles:a==null?void 0:a.globalStyles}),b("label",{htmlFor:this._id},b(m0,null,t),b(Rx,Object.assign({},p0(c),{id:this._id,options:this.options,value:o,onBeforeChange:(M,z,d)=>{i==null||i(d)},ref:this.codeMirror,editorDidMount:M=>{this.editor.current=M},editorWillUnmount:()=>{this.editor.current.display.wrapper.remove(),this.codeMirror.current&&(this.codeMirror.current.hydrated=!1)}})))))}},Z1.displayName="CodeEditor",Z1.componentId="CodeEditor",Z1.propTypes=ux,Z1.allowedProps=qx,Z1.defaultProps={language:"jsx",readOnly:!1,options:{styleActiveLine:!0}},Z1))||l1)||l1)||l1)||l1);const vx=(p,e)=>{const o=e.a*.4,t=1-o,i=1-t*(1-t);return`rgba( + 100% {}`,fx=(p,e)=>{const o=e.attachment,t={top:{borderBottomLeftRadius:0,borderBottomRightRadius:0,marginTop:"0.25rem"},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0,marginBottom:"0.25rem"}};return{codeEditor:{label:"codeEditor"},globalStyles:{".CodeMirror":{direction:"ltr",position:"relative",overflow:"hidden",background:p.background,height:"auto",fontFamily:p.fontFamily,fontSize:p.fontSize,borderRadius:p.borderRadius,border:p.border,color:p.color,lineHeight:1.4375,minHeight:"1.4375rem",marginBottom:"1rem",...o&&t[o]},".CodeMirror-lines":{padding:`${p.verticalPadding} 0`,cursor:"text",minHeight:"0.0625rem"},".CodeMirror pre":{padding:`0 ${p.horizontalPadding}`,borderRadius:"0",borderWidth:"0",background:"transparent",fontFamily:"inherit",fontSize:"inherit",margin:"0",whiteSpace:"pre",wordWrap:"normal",lineHeight:"inherit",color:"inherit",zIndex:`calc(${p.zIndex} + 3)`,position:"relative",overflow:"visible",WebkitTapHighlightColor:"transparent",fontVariantLigatures:"contextual"},".CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler":{background:p.background},".CodeMirror-cursor":{borderLeft:`0.0625rem solid ${p.cursorColor}`,borderRight:"none",width:"0",position:"absolute",pointerEvents:"none"},".CodeMirror-cursors":{visibility:"hidden",position:"relative",zIndex:`calc(${p.zIndex} + 4)`},".CodeMirror-dragcursors":{visibility:"visible"},".CodeMirror-focused .CodeMirror-cursors":{visibility:"visible"},".CodeMirror-crosshair":{cursor:"crosshair"},".cm-fat-cursor .CodeMirror-cursor":{width:"auto",border:"0 !important",background:p.fatCursorBackground},".cm-fat-cursor .CodeMirror-cursors":{zIndex:`calc(${p.zIndex} + 2)`},".CodeMirror .CodeMirror-secondarycursor":{borderLeft:`0.0625rem solid ${p.secondaryCursorColor}`},".cm-fat-cursor-mark":{background:p.fatCursorMarkBackground,animation:`${Wv} 1.06s steps(1) infinite`},".cm-animate-fat-cursor":{width:"auto",border:"0",animation:`${Wv} 1.06s steps(1) infinite`,backgroundColor:p.fatCursorBackground},".cm-tab":{display:"inline-block",textDecoration:"inherit"},".CodeMirror-rulers":{position:"absolute",left:"0",right:"0",top:"-50px",bottom:"-20px",overflow:"hidden"},".CodeMirror-ruler":{borderLeft:`0.0625rem solid ${p.rulerColor}`,top:"0",bottom:"0",position:"absolute"},"div.CodeMirror span.CodeMirror-matchingbracket":{outline:`0.0625rem solid ${p.matchingBracketOutline}`},"div.CodeMirror span.CodeMirror-nonmatchingbracket":{color:p.nonMatchingBracketColor},".CodeMirror-matchingtag":{background:p.matchingTagBackground},"div.CodeMirror-activeline-background":{background:p.activeLineBackground},".CodeMirror-scroll":{overflow:"scroll !important",marginBottom:"-30px",marginRight:"-30px",paddingBottom:"30px",height:"100%",outline:"none",position:"relative"},".CodeMirror-sizer":{position:"relative",borderRight:"30px solid transparent"},".CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler":{position:"absolute",zIndex:`calc(${p.zIndex} + 7)`,display:"none"},".CodeMirror-vscrollbar":{right:"0",top:"0",overflowX:"hidden",overflowY:"scroll"},".CodeMirror-hscrollbar":{bottom:"0",left:"0",overflowY:"hidden",overflowX:"scroll"},".CodeMirror-scrollbar-filler":{right:"0",bottom:"0"},".CodeMirror-gutter-filler":{left:"0",bottom:"0"},".CodeMirror-gutters":{borderTopLeftRadius:p.borderRadius,borderBottomLeftRadius:p.borderRadius,borderRight:`0.0625rem solid ${p.gutterBorder}`,overflow:"hidden",background:p.gutterBackground,whiteSpace:"nowrap",position:"absolute",left:"0",top:"0",minHeight:"100%",zIndex:`calc(${p.zIndex} + 4)`},".CodeMirror-linenumber":{padding:"0 0.1875rem 0 0.3125rem",minWidth:"1.25rem",textAlign:"right",color:p.lineNumberColor,whiteSpace:"nowrap"},".CodeMirror-guttermarker":{color:p.gutterMarkerColor},".CodeMirror-guttermarker-subtle":{color:p.gutterMarkerSubtleColor},".CodeMirror-gutter":{whiteSpace:"normal",height:"100%",display:"inline-block",verticalAlign:"top",marginBottom:"-30px"},".CodeMirror-gutter-wrapper":{position:"absolute",zIndex:`calc(${p.zIndex} + 5)`,background:"none !important",border:"none !important"},".CodeMirror-gutter-background":{position:"absolute",top:"0",bottom:"0",zIndex:`calc(${p.zIndex} + 5)`},".CodeMirror-gutter-elt":{position:"absolute",cursor:"default",zIndex:`calc(${p.zIndex} + 5)`},".CodeMirror-gutter-wrapper ::selection":{backgroundColor:"transparent"},".CodeMirror-wrap pre":{wordWrap:"break-word",whiteSpace:"pre-wrap",wordBreak:"normal"},".CodeMirror-linebackground":{position:"absolute",left:"0",right:"0",top:"0",bottom:"0",zIndex:`calc(${p.zIndex} + 1)`},".CodeMirror-linewidget":{position:"relative",zIndex:`calc(${p.zIndex} + 3)`,padding:"0.1px"},".CodeMirror-rtl pre":{direction:"rtl"},".CodeMirror-code":{outline:"none"},".CodeMirror-scroll, .CodeMirror-sizer, .CodeMirror-gutter, .CodeMirror-gutters, .CodeMirror-linenumber":{boxSizing:"content-box"},".CodeMirror-measure":{position:"absolute",width:"100%",height:"0",overflow:"hidden",visibility:"hidden"},".CodeMirror-measure pre":{position:"static"},".CodeMirror-selected, .CodeMirror-focused .CodeMirror-selected, .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection":{background:p.selectedBackground},".cm-searching":{background:p.searchingBackground},".cm-force-border":{paddingRight:"0.1px"},"@media print":{".CodeMirror .CodeMirror-cursors":{visibility:"hidden"}},".cm-tab-wrap-hack::after":{content:'""'},".CodeMirror-selectedtext":{background:"none"},".CodeMirror-focused":{boxShadow:p.focusBoxShadow,borderColor:p.focusBorderColor},".cm-keyword":{color:p.keywordColor,fontWeight:"bold"},".cm-atom":{color:p.atomColor},".cm-number":{color:p.numberColor},".cm-def":{color:p.defColor},"span.cm-variable-2, span.cm-tag":{color:p.tagColor},"span.cm-variable-3, span.cm-def, span.cm-type":{color:p.typeColor},".cm-variable":{color:p.variableColor},".cm-property":{color:p.propertyColor},".cm-qualifier":{color:p.qualifierColor},".cm-operator":{color:p.operatorColor},".cm-comment":{color:p.commentColor,fontWeight:"normal"},".cm-string":{color:p.stringColor,fontStyle:"italic"},".cm-string-2":{color:p.secondaryStringColor},".cm-meta":{color:p.metaColor},".cm-builtin":{color:p.builtInColor},".cm-tag":{color:p.tagColor},".cm-attribute":{color:p.attributeColor},".cm-header":{color:p.headerColor},".cm-hr":{color:p.hrColor},".cm-link":{color:p.linkColor,fontStyle:"italic",textDecoration:"none"},".cm-error":{}}}},Ax=p=>{const e=p.colors,o=p.borders,t=p.spacing,i=p.typography,a=p.stacking;return{...{fontFamily:i==null?void 0:i.fontFamilyMonospace,fontSize:i==null?void 0:i.fontSizeSmall,background:e==null?void 0:e.backgroundLight,border:`${o==null?void 0:o.widthSmall} solid ${e==null?void 0:e.borderLight}`,borderRadius:o==null?void 0:o.radiusMedium,focusBorderColor:e==null?void 0:e.borderBrand,focusBoxShadow:`inset 0 0 0 1px ${e==null?void 0:e.borderLightest}`,horizontalPadding:t==null?void 0:t.xSmall,verticalPadding:t==null?void 0:t.xxSmall,color:e==null?void 0:e.textDarkest,lineNumberColor:e==null?void 0:e.textDark,gutterBorder:e==null?void 0:e.borderLight,gutterBackground:le(e==null?void 0:e.backgroundLight,5),gutterMarkerColor:e==null?void 0:e.textBrand,gutterMarkerSubtleColor:e==null?void 0:e.textDark,cursorColor:e==null?void 0:e.textDarkest,secondaryCursorColor:e==null?void 0:e.textDark,rulerColor:e==null?void 0:e.borderDark,matchingBracketOutline:e==null?void 0:e.textDark,nonMatchingBracketColor:e==null?void 0:e.textDanger,matchingTagBackground:"rgba(255, 150, 0, 0.3)",activeLineBackground:le(e==null?void 0:e.backgroundLight,5),selectedBackground:le(e==null?void 0:e.backgroundLight,15),fatCursorBackground:e==null?void 0:e.backgroundSuccess,fatCursorMarkBackground:"rgba(20, 255, 20, 0.5)",searchingBackground:"rgba(255, 255, 0, 0.4)",zIndex:a==null?void 0:a.above,quoteColor:e==null?void 0:e.textSuccess,headerColor:e==null?void 0:e.textWarning,negativeColor:e==null?void 0:e.textDanger,positiveColor:e==null?void 0:e.textSuccess,keywordColor:e==null?void 0:e.textBrand,atomColor:e==null?void 0:e.textWarning,numberColor:e==null?void 0:e.textWarning,defColor:e==null?void 0:e.textDarkest,variableColor:e==null?void 0:e.textBrand,secondaryVariableColor:e==null?void 0:e.textWarning,typeColor:e==null?void 0:e.textBrand,commentColor:e==null?void 0:e.textDark,stringColor:e==null?void 0:e.textBrand,secondaryStringColor:e==null?void 0:e.textDanger,metaColor:e==null?void 0:e.textDarkest,qualifierColor:e==null?void 0:e.textSuccess,builtInColor:e==null?void 0:e.textWarning,bracketColor:e==null?void 0:e.borderDark,tagColor:e==null?void 0:e.textSuccess,attributeColor:e==null?void 0:e.textBrand,hrColor:e==null?void 0:e.borderDark,linkColor:e==null?void 0:e.textBrand,errorColor:e==null?void 0:e.textDanger,propertyColor:e==null?void 0:e.textAlert,nodeColor:e==null?void 0:e.textWarning,operatorColor:e==null?void 0:e.textDarkest}}},ux={label:s.string.isRequired,language:s.oneOf(["sh","js","json","javascript","jsx","shell","css","html","markdown","yaml","yml","bash"]),readOnly:s.bool,onChange:s.func,options:s.object,attachment:s.oneOf(["bottom","top"]),value:s.string},qx=["label","language","readOnly","onChange","options","attachment","value"],mx=["value","label","attachment","readOnly","onChange","styles"];var gv,yv,Lv,Nv,l1,Z1;const Rx=l.lazy(()=>typeof navigator>"u"||typeof global<"u"&&global.PREVENT_CODEMIRROR_RENDER===!0?Hb(()=>import("./index.node-BLPoF182.js"),__vite__mapDeps([0,1,2])):Hb(()=>import("./index-ZHw2VU9b.js"),__vite__mapDeps([3,1,2])));let wX=(gv=z0(),yv=L(fx,Ax),Lv=N(),Nv=Ny("[TBD]",null,"This component is deprecated and will be removed in a later version. Use instead, which is the wrapper for the newer version of the CodeMirror code editor."),gv(l1=yv(l1=Lv(l1=Nv(l1=(Z1=class extends l.Component{constructor(e){super(e),this._id=void 0,this.codeMirror=void 0,this.ref=void 0,this.editor=void 0,this._id=e.deterministicId(),this.ref=l.createRef(),this.editor=l.createRef(),this.codeMirror=l.createRef()}componentDidMount(){var e,o;(e=(o=this.props).makeStyles)===null||e===void 0||e.call(o)}componentDidUpdate(){var e,o;(e=(o=this.props).makeStyles)===null||e===void 0||e.call(o)}focus(){this.codeMirror&&this.codeMirror.focus()}get mode(){const e=this.props.language;return e==="json"||e==="js"?"jsx":e==="sh"?"shell":e==="html"?"htmlmixed":e==="yml"?"yaml":e}get options(){return{...this.props.options,readOnly:this.props.readOnly,mode:this.mode,extraKeys:this.props.readOnly?{Tab:!1,"Shift-Tab":!1}:{}}}render(){const e=this.props,o=e.value,t=e.label;e.attachment,e.readOnly;const i=e.onChange,a=e.styles,c=Y(e,mx);return b("div",{css:a==null?void 0:a.codeEditor,ref:this.ref},b(l.Suspense,null,b(vN,{styles:a==null?void 0:a.globalStyles}),b("label",{htmlFor:this._id},b(m0,null,t),b(Rx,Object.assign({},p0(c),{id:this._id,options:this.options,value:o,onBeforeChange:(M,z,d)=>{i==null||i(d)},ref:this.codeMirror,editorDidMount:M=>{this.editor.current=M},editorWillUnmount:()=>{this.editor.current.display.wrapper.remove(),this.codeMirror.current&&(this.codeMirror.current.hydrated=!1)}})))))}},Z1.displayName="CodeEditor",Z1.componentId="CodeEditor",Z1.propTypes=ux,Z1.allowedProps=qx,Z1.defaultProps={language:"jsx",readOnly:!1,options:{styleActiveLine:!0}},Z1))||l1)||l1)||l1)||l1);const vx=(p,e)=>{const o=e.a*.4,t=1-o,i=1-t*(1-t);return`rgba( ${e.r*o/i+p.r*t*(1-o)/i}, ${e.g*o/i+p.g*t*(1-o)/i}, ${e.b*o/i+p.b*t*(1-o)/i}, diff --git a/assets/index-CTDsjRCP.js b/assets/index-ykr1wfg1.js similarity index 99% rename from assets/index-CTDsjRCP.js rename to assets/index-ykr1wfg1.js index e0fbf7e..7dba86c 100644 --- a/assets/index-CTDsjRCP.js +++ b/assets/index-ykr1wfg1.js @@ -1,4 +1,4 @@ -import{P as l,T as re,w as F,t as R,r as h,h as se,p as ae,R as x,S as C,s as O,o as P,i as u,n as Q,X as de}from"./index-DCzcanBz.js";import{b as ue,F as M}from"./index-C5yFM9ST.js";import{w as ce,k as ge,B as pe,i as E,p as he,l as Y,m as fe,s as ve,A as be,a2 as me}from"./RenderTopNavBar-CILoEAmM.js";const ye={children:l.node,type:l.oneOf(["button","submit","reset"]),size:l.oneOf(["small","medium","large"]),elementRef:l.func,as:l.elementType,interaction:l.oneOf(["enabled","disabled","readonly"]),color:l.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:l.oneOf(["info","inverse"]),display:l.oneOf(["inline-block","block"]),textAlign:l.oneOf(["start","center"]),withBackground:l.bool,margin:re.spacing,cursor:l.string,href:l.string,renderIcon:l.oneOfType([l.node,l.func]),onClick:l.func},Se=["as","children","color","cursor","display","elementRef","focusColor","href","interaction","margin","renderIcon","size","textAlign","type","withBackground","onClick"],ke=["children","type","size","as","color","focusColor","display","textAlign","withBackground","margin","cursor","href","renderIcon"];var H,W,$,v;let xe=(H=F(null,ce),W=R(),H($=W($=(v=class extends h.Component{constructor(...e){super(...e),this._buttonComponent=null,this.ref=null,this.handleElementRef=t=>{const o=this.props.elementRef;this.ref=t,typeof o=="function"&&o(t)},this.handleButtonRef=t=>{this._buttonComponent=t}}get focused(){return this._buttonComponent&&this._buttonComponent.focused}focus(){this._buttonComponent&&this._buttonComponent.focus()}render(){const e=this.props,t=e.children,o=e.type,n=e.size,a=e.as,r=e.color,s=e.focusColor,d=e.display,c=e.textAlign,g=e.withBackground,p=e.margin,f=e.cursor,z=e.href,oe=e.renderIcon,D=se(e,ke),te=ge({props:D}),le=this.props.themeOverride,ne={...ae(D),type:o,size:n,elementRef:this.handleElementRef,ref:this.handleButtonRef,as:a,color:r,interaction:te,focusColor:s,display:d,textAlign:c,withBackground:g,margin:p,cursor:f,href:z,renderIcon:oe,themeOverride:le};return x.createElement(pe,ne,t)}},v.displayName="Button",v.componentId="Button",v.propTypes=ye,v.allowedProps=Se,v.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",display:"inline-block",textAlign:"center",withBackground:!0,margin:"0",cursor:"pointer"},v))||$)||$);var L;class I extends h.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const o=this.props.elementRef;this.ref=t,typeof o=="function"&&o(t)}}render(){return x.createElement(C,Object.assign({},this.props,{name:"IconCopy",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),L||(L=x.createElement("path",{d:"M0 1919.887h1467.88V452.008H0v1467.88ZM1354.965 564.922v1242.051H112.914V564.922h1242.051ZM1920 0v1467.992h-338.741v-113.027h225.827V112.914H565.035V338.74H452.008V0H1920ZM338.741 1016.93h790.397V904.016H338.74v112.914Zm0 451.062h790.397v-113.027H338.74v113.027Zm0-225.588h564.57v-112.913H338.74v112.913Z",fillRule:"evenodd"})))}}I.glyphName="copy";I.variant="Line";I.displayName="IconCopyLine";I.propTypes={...C.propTypes};I.allowedProps=[...C.allowedProps];var A;class _ extends h.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const o=this.props.elementRef;this.ref=t,typeof o=="function"&&o(t)}}render(){return x.createElement(C,Object.assign({},this.props,{name:"IconX",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),A||(A=x.createElement("path",{d:"M797.32 985.882 344.772 1438.43l188.561 188.562 452.549-452.549 452.548 452.549 188.562-188.562-452.549-452.548 452.549-452.549-188.562-188.561L985.882 797.32 533.333 344.772 344.772 533.333z"})))}}_.glyphName="x";_.variant="Solid";_.displayName="IconXSolid";_.propTypes={...C.propTypes};_.allowedProps=[...C.allowedProps];const Ce={expanded:E(l.bool,"onToggle","defaultExpanded"),defaultExpanded:l.bool,onToggle:l.func,children:l.func,render:l.func},ze=["expanded","defaultExpanded","onToggle","children","render"];var V,N,S;const Ie=({expanded:i})=>({expanded:!i});let j=(V=O(),V(N=(S=class extends h.Component{constructor(e){super(e),this._contentId=void 0,this.handleToggle=t=>{this.isControlled()||this.setState(Ie),this.props.onToggle(t,!this.expanded)},this.state={expanded:this.isControlled(e)?e.expanded:e.defaultExpanded},this._contentId=e.deterministicId()}get expanded(){return this.isControlled()?this.props.expanded:this.state.expanded}isControlled(e=this.props){return typeof e.expanded=="boolean"}static getDerivedStateFromProps(e,t){return typeof e.expanded=="boolean"&&e.expanded!==t.expanded?{expanded:e.expanded}:null}render(){const e=this.props,t=e.children,o=e.render,n=o===void 0?t:o;return typeof n=="function"?n({expanded:this.expanded,getToggleProps:(a={})=>({"aria-controls":this._contentId,"aria-expanded":this.expanded,onClick:he(this.handleToggle,a.onClick),...a}),getDetailsProps:()=>({id:this._contentId})}):null}},S.displayName="Expandable",S.propTypes=Ce,S.allowedProps=ze,S.defaultProps={defaultExpanded:!1,onToggle:function(){},children:null},S))||N);const _e=(i,e)=>{const t=e.disabled,o=e.variant,n=e.context,a=e.size,r=e.inline,s=z=>`[class$=-radioInput__input]:${z} + [class$=-radioInput__control] &`,d={success:{backgroundColor:i.toggleBackgroundSuccess},danger:{backgroundColor:i.toggleBackgroundDanger},warning:{backgroundColor:i.toggleBackgroundWarning},off:{backgroundColor:i.toggleBackgroundOff}},c={simple:{base:{boxSizing:"border-box",display:"block",position:"relative",marginInlineEnd:i.simpleFacadeMarginEnd,marginInlineStart:"0",flexShrink:0,minWidth:"1rem",transition:"all 0.2s ease-out",borderRadius:"100%",border:`${i.borderWidth} solid ${i.borderColor}`,background:i.background,"&::before":{content:'""',position:"absolute",top:"-0.375rem",left:"-0.375rem",width:"calc(100% + 0.75rem)",height:"calc(100% + 0.75rem)",boxSizing:"border-box",borderRadius:"100%",border:`${i.focusBorderWidth} ${i.focusBorderStyle} ${i.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none"},[s("hover")]:{borderColor:i.hoverBorderColor},[s("focus")]:{background:i.background,"&::before":{transform:"scale(1)",opacity:1}}},small:{width:i.simpleFacadeSmallSize,height:i.simpleFacadeSmallSize,[s("checked")]:{background:i.background,boxShadow:`inset 0 0 0 ${i.simpleCheckedInsetSmall} ${i.hoverBorderColor}`,borderColor:i.hoverBorderColor}},medium:{width:i.simpleFacadeMediumSize,height:i.simpleFacadeMediumSize,[s("checked")]:{background:i.background,boxShadow:`inset 0 0 0 ${i.simpleCheckedInsetMedium} ${i.hoverBorderColor}`,borderColor:i.hoverBorderColor}},large:{width:i.simpleFacadeLargeSize,height:i.simpleFacadeLargeSize,[s("checked")]:{background:i.background,boxShadow:`inset 0 0 0 ${i.simpleCheckedInsetLarge} ${i.hoverBorderColor}`,borderColor:i.hoverBorderColor}}},toggle:{base:{boxSizing:"border-box",visibility:"hidden",display:"block",position:"absolute",zIndex:1,top:"0",left:"0",width:"100%",height:"100%",boxShadow:i.toggleShadow,borderRadius:i.toggleBorderRadius,...d[n],"&::before":{content:'""',position:"absolute",top:"-0.25rem",left:"-0.25rem",width:"calc(100% + 0.5rem)",height:"calc(100% + 0.5rem)",boxSizing:"border-box",borderRadius:`calc(${i.toggleBorderRadius} + 0.0625rem)`,border:`${i.focusBorderWidth} ${i.focusBorderStyle} ${i.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0},[s("checked")]:{visibility:"visible"},[s("focus")]:{"&::before":{opacity:1,transform:"scale(1)"}}},small:{},medium:{},large:{}}},g={simple:{base:{display:"flex",alignItems:"flex-start"},small:{},medium:{},large:{}},toggle:{base:{display:"block",userSelect:"none",boxSizing:"border-box",position:"relative"},small:{padding:"0 0.5rem",height:i.toggleSmallHeight},medium:{padding:"0 0.875rem",height:i.toggleMediumHeight},large:{padding:"0 1rem",height:i.toggleLargeHeight}}},p={simple:{base:{},small:{fontSize:i.simpleFontSizeSmall},medium:{fontSize:i.simpleFontSizeMedium},large:{fontSize:i.simpleFontSizeLarge}},toggle:{base:{position:"relative",zIndex:1,textTransform:"uppercase",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",lineHeight:1,display:"flex",alignItems:"center",minWidth:"0.0625rem",[s("checked")]:{color:i.toggleHandleText},[s("focus")]:{textDecoration:"underline"}},small:{fontSize:i.toggleSmallFontSize,height:i.toggleSmallHeight,svg:{fontSize:`calc(${i.toggleSmallFontSize} + 0.375rem)`}},medium:{fontSize:i.toggleMediumFontSize,height:i.toggleMediumHeight,svg:{fontSize:`calc(${i.toggleMediumFontSize} + 0.375rem)`}},large:{fontSize:i.toggleLargeFontSize,height:i.toggleLargeHeight,svg:{fontSize:`calc(${i.toggleLargeFontSize} + 0.375rem)`}}}},f={padding:"0",margin:"0",fontSize:"inherit",lineHeight:"inherit",width:"auto",position:"absolute",top:"0",left:"0",opacity:1e-4};return{radioInput:{label:"radioInput",position:"relative",width:"100%",...t&&{opacity:.5},...r&&{display:"inline-block",verticalAlign:"middle",width:"auto"},"&:hover":{cursor:"default",...t&&{cursor:"not-allowed"}}},input:{label:"radioInput__input",...f,'&:is(input)[type="radio"]':f,'&:-webkit-any(input)[type="radio"]':f},control:{label:"radioInput__control",all:"initial",display:"block",direction:"inherit",textAlign:"start",...g[o].base,...g[o][a]},facade:{label:"radioInput__facade",...c[o].base,...c[o][a]},label:{label:"radioInput__label",flex:"1 1 auto",color:i.labelColor,fontFamily:i.labelFontFamily,fontWeight:i.labelFontWeight,lineHeight:i.labelLineHeight,...p[o].base,...p[o][a],cursor:"default"}}},$e=i=>{const e=i.spacing,t=i.borders,o=i.colors,n=i.forms,a=i.shadows,r=i.typography,s=i.key,d={canvas:{focusBorderColor:i["ic-brand-primary"],hoverBorderColor:i["ic-brand-font-color-dark"],labelColor:i["ic-brand-font-color-dark"]},"canvas-high-contrast":{toggleBackgroundOff:o==null?void 0:o.backgroundDarkest}};return{...{labelColor:o==null?void 0:o.textDarkest,labelFontFamily:r==null?void 0:r.fontFamily,labelFontWeight:r==null?void 0:r.fontWeightNormal,labelLineHeight:r==null?void 0:r.lineHeightCondensed,background:o==null?void 0:o.backgroundLightest,borderWidth:t==null?void 0:t.widthSmall,borderColor:o==null?void 0:o.borderMedium,hoverBorderColor:o==null?void 0:o.borderDarkest,controlSize:"0.1875rem",focusBorderColor:o==null?void 0:o.borderBrand,focusBorderWidth:t==null?void 0:t.widthMedium,focusBorderStyle:t==null?void 0:t.style,simpleFacadeSmallSize:"1rem",simpleFacadeMediumSize:"1.25rem",simpleFacadeLargeSize:"1.75rem",simpleCheckedInsetSmall:"0.1875rem",simpleCheckedInsetMedium:"0.25rem",simpleCheckedInsetLarge:"0.375rem",simpleFontSizeSmall:r==null?void 0:r.fontSizeSmall,simpleFontSizeMedium:r==null?void 0:r.fontSizeMedium,simpleFontSizeLarge:r==null?void 0:r.fontSizeLarge,simpleFacadeMarginEnd:e==null?void 0:e.xSmall,toggleBorderRadius:t==null?void 0:t.radiusSmall,toggleBorderWidth:t==null?void 0:t.widthLarge,toggleBackgroundSuccess:o==null?void 0:o.backgroundSuccess,toggleBackgroundOff:o==null?void 0:o.backgroundDark,toggleBackgroundDanger:o==null?void 0:o.backgroundDanger,toggleBackgroundWarning:o==null?void 0:o.backgroundWarning,toggleHandleText:o==null?void 0:o.textLightest,toggleSmallHeight:n==null?void 0:n.inputHeightSmall,toggleMediumHeight:n==null?void 0:n.inputHeightMedium,toggleLargeHeight:n==null?void 0:n.inputHeightLarge,toggleShadow:a==null?void 0:a.depth1,toggleSmallFontSize:r==null?void 0:r.fontSizeXSmall,toggleMediumFontSize:r==null?void 0:r.fontSizeSmall,toggleLargeFontSize:r==null?void 0:r.fontSizeMedium},...d[s]}},we={label:l.node.isRequired,value:l.oneOfType([l.string,l.number]),id:l.string,name:l.string,checked:l.bool,disabled:l.bool,readOnly:l.bool,variant:l.oneOf(["simple","toggle"]),size:l.oneOf(["small","medium","large"]),context:l.oneOf(["success","warning","danger","off"]),inline:l.bool,onClick:l.func,onChange:l.func},Be=["label","value","id","name","checked","disabled","readOnly","variant","size","context","inline","onClick","onChange"];var G,Z,X,k,b;let Re=(G=O(),Z=F(_e,$e),X=R(),G(k=Z(k=X(k=(b=class T extends h.Component{constructor(e){super(e),this.ref=null,this._defaultId=void 0,this._input=null,this.handleClick=t=>{if(this.props.disabled||this.props.readOnly){t.preventDefault();return}typeof this.props.onClick=="function"&&this.props.onClick(t)},this.handleChange=t=>{if(this.props.disabled||this.props.readOnly){t.preventDefault();return}typeof this.props.checked>"u"&&this.setState({checked:!this.state.checked}),typeof this.props.onChange=="function"&&this.props.onChange(t)},typeof e.checked>"u"&&(this.state={checked:!1}),this._defaultId=e.deterministicId()}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}focus(){var e;(e=this._input)===null||e===void 0||e.focus()}get id(){return this.props.id||this._defaultId}get focused(){return Y(this._input)}get checked(){return typeof this.props.checked>"u"?this.state.checked:this.props.checked}render(){const e=this.props,t=e.disabled,o=e.readOnly,n=e.label,a=e.value,r=e.name,s=e.styles,d=P(this.props,T.allowedProps);return u("div",{css:s==null?void 0:s.radioInput,ref:c=>{this.ref=c}},u("input",Object.assign({},d,{id:this.id,ref:c=>{this._input=c},value:a,name:r,checked:this.checked,type:"radio",css:s==null?void 0:s.input,disabled:t||o,"aria-disabled":t||o?"true":void 0,onChange:this.handleChange,onClick:this.handleClick})),u("label",{css:s==null?void 0:s.control,htmlFor:this.id},u("span",{css:s==null?void 0:s.facade,"aria-hidden":"true"}),u("span",{css:s==null?void 0:s.label},n)))}},b.displayName="RadioInput",b.componentId="RadioInput",b.allowedProps=Be,b.propTypes=we,b.defaultProps={variant:"simple",size:"medium",disabled:!1,inline:!1,context:"success",readOnly:!1},b))||k)||k)||k);const Fe={name:l.string.isRequired,description:l.node.isRequired,defaultValue:l.oneOfType([l.string,l.number]),value:E(l.oneOfType([l.string,l.number])),onChange:l.func,disabled:l.bool,readOnly:l.bool,messages:l.arrayOf(ue.message),children:l.node,variant:l.oneOf(["simple","toggle"]),size:l.oneOf(["small","medium","large"]),layout:l.oneOf(["stacked","columns","inline"])},Oe=["name","description","defaultValue","value","onChange","disabled","readOnly","messages","children","variant","size","layout"];var q,U,w,m;let je=(q=O(),U=R(),q(w=U(w=(m=class ee extends h.Component{constructor(e){super(e),this.ref=null,this._messagesId=void 0,this.handleRef=t=>{this.ref=t},this.handleChange=t=>{const o=t.target.value;if(this.props.disabled||this.props.readOnly){t.preventDefault();return}typeof this.props.value>"u"&&this.setState({value:o}),typeof this.props.onChange=="function"&&this.props.onChange(t,o)},typeof e.value>"u"&&(this.state={value:e.defaultValue}),this._messagesId=e.deterministicId("RadioInputGroup-messages")}get hasMessages(){return!!this.props.messages&&this.props.messages.length>0}get value(){return typeof this.props.value>"u"?this.state.value:this.props.value}renderChildren(){const e=this.props,t=e.children,o=e.name,n=e.variant,a=e.size,r=e.disabled,s=e.readOnly;return h.Children.map(t,(d,c)=>{if(fe(d,[Re])){const g=this.value===d.props.value,p=!this.value&&c===0;return ve(d,{name:o,disabled:r||d.props.disabled,variant:n,size:a,checked:g,onChange:this.handleChange,readOnly:s||d.props.readOnly,width:d.props.width||"auto","aria-describedby":this.hasMessages?this._messagesId:void 0,tabIndex:g||p?0:-1,label:d.props.label})}else return d})}render(){const e=this.props,t=e.variant,o=e.layout,n=e.description;return x.createElement(M,Object.assign({},P(this.props,ee.allowedProps),Q(this.props,M.allowedProps),{description:n,layout:o==="columns"&&t==="toggle"?"stacked":o,vAlign:t==="toggle"?"middle":"top",rowSpacing:"small",colSpacing:t==="toggle"?"none":"small",startAt:t==="toggle"?"small":void 0,messagesId:this._messagesId,elementRef:this.handleRef}),this.renderChildren())}},m.displayName="RadioInputGroup",m.componentId="RadioInputGroup",m.allowedProps=Oe,m.propTypes=Fe,m.defaultProps={disabled:!1,variant:"simple",size:"medium",layout:"stacked",readOnly:!1},m))||w)||w);const Pe=de` +import{P as l,T as re,w as F,t as R,r as h,h as se,p as ae,R as x,S as C,s as O,o as P,i as u,n as Q,X as de}from"./index-C3XQCywa.js";import{b as ue,F as M}from"./index-CuKaSjpf.js";import{w as ce,k as ge,B as pe,i as E,p as he,l as Y,m as fe,s as ve,A as be,a2 as me}from"./RenderTopNavBar-D2dLV4g_.js";const ye={children:l.node,type:l.oneOf(["button","submit","reset"]),size:l.oneOf(["small","medium","large"]),elementRef:l.func,as:l.elementType,interaction:l.oneOf(["enabled","disabled","readonly"]),color:l.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:l.oneOf(["info","inverse"]),display:l.oneOf(["inline-block","block"]),textAlign:l.oneOf(["start","center"]),withBackground:l.bool,margin:re.spacing,cursor:l.string,href:l.string,renderIcon:l.oneOfType([l.node,l.func]),onClick:l.func},Se=["as","children","color","cursor","display","elementRef","focusColor","href","interaction","margin","renderIcon","size","textAlign","type","withBackground","onClick"],ke=["children","type","size","as","color","focusColor","display","textAlign","withBackground","margin","cursor","href","renderIcon"];var H,W,$,v;let xe=(H=F(null,ce),W=R(),H($=W($=(v=class extends h.Component{constructor(...e){super(...e),this._buttonComponent=null,this.ref=null,this.handleElementRef=t=>{const o=this.props.elementRef;this.ref=t,typeof o=="function"&&o(t)},this.handleButtonRef=t=>{this._buttonComponent=t}}get focused(){return this._buttonComponent&&this._buttonComponent.focused}focus(){this._buttonComponent&&this._buttonComponent.focus()}render(){const e=this.props,t=e.children,o=e.type,n=e.size,a=e.as,r=e.color,s=e.focusColor,d=e.display,c=e.textAlign,g=e.withBackground,p=e.margin,f=e.cursor,z=e.href,oe=e.renderIcon,D=se(e,ke),te=ge({props:D}),le=this.props.themeOverride,ne={...ae(D),type:o,size:n,elementRef:this.handleElementRef,ref:this.handleButtonRef,as:a,color:r,interaction:te,focusColor:s,display:d,textAlign:c,withBackground:g,margin:p,cursor:f,href:z,renderIcon:oe,themeOverride:le};return x.createElement(pe,ne,t)}},v.displayName="Button",v.componentId="Button",v.propTypes=ye,v.allowedProps=Se,v.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",display:"inline-block",textAlign:"center",withBackground:!0,margin:"0",cursor:"pointer"},v))||$)||$);var L;class I extends h.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const o=this.props.elementRef;this.ref=t,typeof o=="function"&&o(t)}}render(){return x.createElement(C,Object.assign({},this.props,{name:"IconCopy",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),L||(L=x.createElement("path",{d:"M0 1919.887h1467.88V452.008H0v1467.88ZM1354.965 564.922v1242.051H112.914V564.922h1242.051ZM1920 0v1467.992h-338.741v-113.027h225.827V112.914H565.035V338.74H452.008V0H1920ZM338.741 1016.93h790.397V904.016H338.74v112.914Zm0 451.062h790.397v-113.027H338.74v113.027Zm0-225.588h564.57v-112.913H338.74v112.913Z",fillRule:"evenodd"})))}}I.glyphName="copy";I.variant="Line";I.displayName="IconCopyLine";I.propTypes={...C.propTypes};I.allowedProps=[...C.allowedProps];var A;class _ extends h.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const o=this.props.elementRef;this.ref=t,typeof o=="function"&&o(t)}}render(){return x.createElement(C,Object.assign({},this.props,{name:"IconX",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),A||(A=x.createElement("path",{d:"M797.32 985.882 344.772 1438.43l188.561 188.562 452.549-452.549 452.548 452.549 188.562-188.562-452.549-452.548 452.549-452.549-188.562-188.561L985.882 797.32 533.333 344.772 344.772 533.333z"})))}}_.glyphName="x";_.variant="Solid";_.displayName="IconXSolid";_.propTypes={...C.propTypes};_.allowedProps=[...C.allowedProps];const Ce={expanded:E(l.bool,"onToggle","defaultExpanded"),defaultExpanded:l.bool,onToggle:l.func,children:l.func,render:l.func},ze=["expanded","defaultExpanded","onToggle","children","render"];var V,N,S;const Ie=({expanded:i})=>({expanded:!i});let j=(V=O(),V(N=(S=class extends h.Component{constructor(e){super(e),this._contentId=void 0,this.handleToggle=t=>{this.isControlled()||this.setState(Ie),this.props.onToggle(t,!this.expanded)},this.state={expanded:this.isControlled(e)?e.expanded:e.defaultExpanded},this._contentId=e.deterministicId()}get expanded(){return this.isControlled()?this.props.expanded:this.state.expanded}isControlled(e=this.props){return typeof e.expanded=="boolean"}static getDerivedStateFromProps(e,t){return typeof e.expanded=="boolean"&&e.expanded!==t.expanded?{expanded:e.expanded}:null}render(){const e=this.props,t=e.children,o=e.render,n=o===void 0?t:o;return typeof n=="function"?n({expanded:this.expanded,getToggleProps:(a={})=>({"aria-controls":this._contentId,"aria-expanded":this.expanded,onClick:he(this.handleToggle,a.onClick),...a}),getDetailsProps:()=>({id:this._contentId})}):null}},S.displayName="Expandable",S.propTypes=Ce,S.allowedProps=ze,S.defaultProps={defaultExpanded:!1,onToggle:function(){},children:null},S))||N);const _e=(i,e)=>{const t=e.disabled,o=e.variant,n=e.context,a=e.size,r=e.inline,s=z=>`[class$=-radioInput__input]:${z} + [class$=-radioInput__control] &`,d={success:{backgroundColor:i.toggleBackgroundSuccess},danger:{backgroundColor:i.toggleBackgroundDanger},warning:{backgroundColor:i.toggleBackgroundWarning},off:{backgroundColor:i.toggleBackgroundOff}},c={simple:{base:{boxSizing:"border-box",display:"block",position:"relative",marginInlineEnd:i.simpleFacadeMarginEnd,marginInlineStart:"0",flexShrink:0,minWidth:"1rem",transition:"all 0.2s ease-out",borderRadius:"100%",border:`${i.borderWidth} solid ${i.borderColor}`,background:i.background,"&::before":{content:'""',position:"absolute",top:"-0.375rem",left:"-0.375rem",width:"calc(100% + 0.75rem)",height:"calc(100% + 0.75rem)",boxSizing:"border-box",borderRadius:"100%",border:`${i.focusBorderWidth} ${i.focusBorderStyle} ${i.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none"},[s("hover")]:{borderColor:i.hoverBorderColor},[s("focus")]:{background:i.background,"&::before":{transform:"scale(1)",opacity:1}}},small:{width:i.simpleFacadeSmallSize,height:i.simpleFacadeSmallSize,[s("checked")]:{background:i.background,boxShadow:`inset 0 0 0 ${i.simpleCheckedInsetSmall} ${i.hoverBorderColor}`,borderColor:i.hoverBorderColor}},medium:{width:i.simpleFacadeMediumSize,height:i.simpleFacadeMediumSize,[s("checked")]:{background:i.background,boxShadow:`inset 0 0 0 ${i.simpleCheckedInsetMedium} ${i.hoverBorderColor}`,borderColor:i.hoverBorderColor}},large:{width:i.simpleFacadeLargeSize,height:i.simpleFacadeLargeSize,[s("checked")]:{background:i.background,boxShadow:`inset 0 0 0 ${i.simpleCheckedInsetLarge} ${i.hoverBorderColor}`,borderColor:i.hoverBorderColor}}},toggle:{base:{boxSizing:"border-box",visibility:"hidden",display:"block",position:"absolute",zIndex:1,top:"0",left:"0",width:"100%",height:"100%",boxShadow:i.toggleShadow,borderRadius:i.toggleBorderRadius,...d[n],"&::before":{content:'""',position:"absolute",top:"-0.25rem",left:"-0.25rem",width:"calc(100% + 0.5rem)",height:"calc(100% + 0.5rem)",boxSizing:"border-box",borderRadius:`calc(${i.toggleBorderRadius} + 0.0625rem)`,border:`${i.focusBorderWidth} ${i.focusBorderStyle} ${i.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0},[s("checked")]:{visibility:"visible"},[s("focus")]:{"&::before":{opacity:1,transform:"scale(1)"}}},small:{},medium:{},large:{}}},g={simple:{base:{display:"flex",alignItems:"flex-start"},small:{},medium:{},large:{}},toggle:{base:{display:"block",userSelect:"none",boxSizing:"border-box",position:"relative"},small:{padding:"0 0.5rem",height:i.toggleSmallHeight},medium:{padding:"0 0.875rem",height:i.toggleMediumHeight},large:{padding:"0 1rem",height:i.toggleLargeHeight}}},p={simple:{base:{},small:{fontSize:i.simpleFontSizeSmall},medium:{fontSize:i.simpleFontSizeMedium},large:{fontSize:i.simpleFontSizeLarge}},toggle:{base:{position:"relative",zIndex:1,textTransform:"uppercase",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",lineHeight:1,display:"flex",alignItems:"center",minWidth:"0.0625rem",[s("checked")]:{color:i.toggleHandleText},[s("focus")]:{textDecoration:"underline"}},small:{fontSize:i.toggleSmallFontSize,height:i.toggleSmallHeight,svg:{fontSize:`calc(${i.toggleSmallFontSize} + 0.375rem)`}},medium:{fontSize:i.toggleMediumFontSize,height:i.toggleMediumHeight,svg:{fontSize:`calc(${i.toggleMediumFontSize} + 0.375rem)`}},large:{fontSize:i.toggleLargeFontSize,height:i.toggleLargeHeight,svg:{fontSize:`calc(${i.toggleLargeFontSize} + 0.375rem)`}}}},f={padding:"0",margin:"0",fontSize:"inherit",lineHeight:"inherit",width:"auto",position:"absolute",top:"0",left:"0",opacity:1e-4};return{radioInput:{label:"radioInput",position:"relative",width:"100%",...t&&{opacity:.5},...r&&{display:"inline-block",verticalAlign:"middle",width:"auto"},"&:hover":{cursor:"default",...t&&{cursor:"not-allowed"}}},input:{label:"radioInput__input",...f,'&:is(input)[type="radio"]':f,'&:-webkit-any(input)[type="radio"]':f},control:{label:"radioInput__control",all:"initial",display:"block",direction:"inherit",textAlign:"start",...g[o].base,...g[o][a]},facade:{label:"radioInput__facade",...c[o].base,...c[o][a]},label:{label:"radioInput__label",flex:"1 1 auto",color:i.labelColor,fontFamily:i.labelFontFamily,fontWeight:i.labelFontWeight,lineHeight:i.labelLineHeight,...p[o].base,...p[o][a],cursor:"default"}}},$e=i=>{const e=i.spacing,t=i.borders,o=i.colors,n=i.forms,a=i.shadows,r=i.typography,s=i.key,d={canvas:{focusBorderColor:i["ic-brand-primary"],hoverBorderColor:i["ic-brand-font-color-dark"],labelColor:i["ic-brand-font-color-dark"]},"canvas-high-contrast":{toggleBackgroundOff:o==null?void 0:o.backgroundDarkest}};return{...{labelColor:o==null?void 0:o.textDarkest,labelFontFamily:r==null?void 0:r.fontFamily,labelFontWeight:r==null?void 0:r.fontWeightNormal,labelLineHeight:r==null?void 0:r.lineHeightCondensed,background:o==null?void 0:o.backgroundLightest,borderWidth:t==null?void 0:t.widthSmall,borderColor:o==null?void 0:o.borderMedium,hoverBorderColor:o==null?void 0:o.borderDarkest,controlSize:"0.1875rem",focusBorderColor:o==null?void 0:o.borderBrand,focusBorderWidth:t==null?void 0:t.widthMedium,focusBorderStyle:t==null?void 0:t.style,simpleFacadeSmallSize:"1rem",simpleFacadeMediumSize:"1.25rem",simpleFacadeLargeSize:"1.75rem",simpleCheckedInsetSmall:"0.1875rem",simpleCheckedInsetMedium:"0.25rem",simpleCheckedInsetLarge:"0.375rem",simpleFontSizeSmall:r==null?void 0:r.fontSizeSmall,simpleFontSizeMedium:r==null?void 0:r.fontSizeMedium,simpleFontSizeLarge:r==null?void 0:r.fontSizeLarge,simpleFacadeMarginEnd:e==null?void 0:e.xSmall,toggleBorderRadius:t==null?void 0:t.radiusSmall,toggleBorderWidth:t==null?void 0:t.widthLarge,toggleBackgroundSuccess:o==null?void 0:o.backgroundSuccess,toggleBackgroundOff:o==null?void 0:o.backgroundDark,toggleBackgroundDanger:o==null?void 0:o.backgroundDanger,toggleBackgroundWarning:o==null?void 0:o.backgroundWarning,toggleHandleText:o==null?void 0:o.textLightest,toggleSmallHeight:n==null?void 0:n.inputHeightSmall,toggleMediumHeight:n==null?void 0:n.inputHeightMedium,toggleLargeHeight:n==null?void 0:n.inputHeightLarge,toggleShadow:a==null?void 0:a.depth1,toggleSmallFontSize:r==null?void 0:r.fontSizeXSmall,toggleMediumFontSize:r==null?void 0:r.fontSizeSmall,toggleLargeFontSize:r==null?void 0:r.fontSizeMedium},...d[s]}},we={label:l.node.isRequired,value:l.oneOfType([l.string,l.number]),id:l.string,name:l.string,checked:l.bool,disabled:l.bool,readOnly:l.bool,variant:l.oneOf(["simple","toggle"]),size:l.oneOf(["small","medium","large"]),context:l.oneOf(["success","warning","danger","off"]),inline:l.bool,onClick:l.func,onChange:l.func},Be=["label","value","id","name","checked","disabled","readOnly","variant","size","context","inline","onClick","onChange"];var G,Z,X,k,b;let Re=(G=O(),Z=F(_e,$e),X=R(),G(k=Z(k=X(k=(b=class T extends h.Component{constructor(e){super(e),this.ref=null,this._defaultId=void 0,this._input=null,this.handleClick=t=>{if(this.props.disabled||this.props.readOnly){t.preventDefault();return}typeof this.props.onClick=="function"&&this.props.onClick(t)},this.handleChange=t=>{if(this.props.disabled||this.props.readOnly){t.preventDefault();return}typeof this.props.checked>"u"&&this.setState({checked:!this.state.checked}),typeof this.props.onChange=="function"&&this.props.onChange(t)},typeof e.checked>"u"&&(this.state={checked:!1}),this._defaultId=e.deterministicId()}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}focus(){var e;(e=this._input)===null||e===void 0||e.focus()}get id(){return this.props.id||this._defaultId}get focused(){return Y(this._input)}get checked(){return typeof this.props.checked>"u"?this.state.checked:this.props.checked}render(){const e=this.props,t=e.disabled,o=e.readOnly,n=e.label,a=e.value,r=e.name,s=e.styles,d=P(this.props,T.allowedProps);return u("div",{css:s==null?void 0:s.radioInput,ref:c=>{this.ref=c}},u("input",Object.assign({},d,{id:this.id,ref:c=>{this._input=c},value:a,name:r,checked:this.checked,type:"radio",css:s==null?void 0:s.input,disabled:t||o,"aria-disabled":t||o?"true":void 0,onChange:this.handleChange,onClick:this.handleClick})),u("label",{css:s==null?void 0:s.control,htmlFor:this.id},u("span",{css:s==null?void 0:s.facade,"aria-hidden":"true"}),u("span",{css:s==null?void 0:s.label},n)))}},b.displayName="RadioInput",b.componentId="RadioInput",b.allowedProps=Be,b.propTypes=we,b.defaultProps={variant:"simple",size:"medium",disabled:!1,inline:!1,context:"success",readOnly:!1},b))||k)||k)||k);const Fe={name:l.string.isRequired,description:l.node.isRequired,defaultValue:l.oneOfType([l.string,l.number]),value:E(l.oneOfType([l.string,l.number])),onChange:l.func,disabled:l.bool,readOnly:l.bool,messages:l.arrayOf(ue.message),children:l.node,variant:l.oneOf(["simple","toggle"]),size:l.oneOf(["small","medium","large"]),layout:l.oneOf(["stacked","columns","inline"])},Oe=["name","description","defaultValue","value","onChange","disabled","readOnly","messages","children","variant","size","layout"];var q,U,w,m;let je=(q=O(),U=R(),q(w=U(w=(m=class ee extends h.Component{constructor(e){super(e),this.ref=null,this._messagesId=void 0,this.handleRef=t=>{this.ref=t},this.handleChange=t=>{const o=t.target.value;if(this.props.disabled||this.props.readOnly){t.preventDefault();return}typeof this.props.value>"u"&&this.setState({value:o}),typeof this.props.onChange=="function"&&this.props.onChange(t,o)},typeof e.value>"u"&&(this.state={value:e.defaultValue}),this._messagesId=e.deterministicId("RadioInputGroup-messages")}get hasMessages(){return!!this.props.messages&&this.props.messages.length>0}get value(){return typeof this.props.value>"u"?this.state.value:this.props.value}renderChildren(){const e=this.props,t=e.children,o=e.name,n=e.variant,a=e.size,r=e.disabled,s=e.readOnly;return h.Children.map(t,(d,c)=>{if(fe(d,[Re])){const g=this.value===d.props.value,p=!this.value&&c===0;return ve(d,{name:o,disabled:r||d.props.disabled,variant:n,size:a,checked:g,onChange:this.handleChange,readOnly:s||d.props.readOnly,width:d.props.width||"auto","aria-describedby":this.hasMessages?this._messagesId:void 0,tabIndex:g||p?0:-1,label:d.props.label})}else return d})}render(){const e=this.props,t=e.variant,o=e.layout,n=e.description;return x.createElement(M,Object.assign({},P(this.props,ee.allowedProps),Q(this.props,M.allowedProps),{description:n,layout:o==="columns"&&t==="toggle"?"stacked":o,vAlign:t==="toggle"?"middle":"top",rowSpacing:"small",colSpacing:t==="toggle"?"none":"small",startAt:t==="toggle"?"small":void 0,messagesId:this._messagesId,elementRef:this.handleRef}),this.renderChildren())}},m.displayName="RadioInputGroup",m.componentId="RadioInputGroup",m.allowedProps=Oe,m.propTypes=Fe,m.defaultProps={disabled:!1,variant:"simple",size:"medium",layout:"stacked",readOnly:!1},m))||w)||w);const Pe=de` to { opacity: 1; }`,Ee=(i,e,t)=>{const o=e.fluidWidth,n=e.iconPosition,a=e.size,r=e.variant,s=t.animate,d=n==="end"&&(r==="filled"||o),c=o?{display:"block",width:"100%"}:{},g={start:{marginInlineEnd:i.iconMargin,marginInlineStart:0},end:{marginInlineStart:i.iconMargin,marginInlineEnd:0}},p={small:{fontSize:i.fontSizeSmall},medium:{fontSize:i.fontSizeMedium},large:{fontSize:i.fontSizeLarge}},f={small:{fontSize:i.smallIconSize},medium:{fontSize:i.mediumIconSize},large:{fontSize:i.largeIconSize}},z=n==="start"&&!o?{small:{paddingInlineStart:`calc(${i.smallIconSize} + ${i.togglePadding})`,paddingInlineEnd:"0"},medium:{paddingInlineStart:`calc(${i.mediumIconSize} + ${i.togglePadding})`,paddingInlineEnd:"0"},large:{paddingInlineStart:`calc(${i.largeIconSize} + ${i.togglePadding})`,paddingInlineEnd:"0"}}:{small:{},medium:{},large:{}};return{toggleDetails:{label:"toggleDetails",fontFamily:i.fontFamily,fontWeight:i.fontWeight,lineHeight:i.lineHeight},summary:{label:"toggleDetails__summary",position:"relative",display:"flex",alignItems:"center",boxSizing:"border-box",textAlign:"start"},summaryText:{label:"toggleDetails__summaryText",minWidth:"0.0625rem",flexGrow:1,...d?{flex:1}:{}},toggle:{label:"toggleDetails__toggle",fontFamily:i.fontFamily,appearance:"none",cursor:"pointer",userSelect:"none",touchAction:"manipulation",position:"relative",overflow:"visible",boxSizing:"border-box",padding:"0",margin:"0",outline:"none",border:"none",background:"transparent",color:i.textColor,"&::-moz-focus-inner":{padding:"0",margin:"0"},"&::before":{content:'""',position:"absolute",top:"-0.375rem",left:"-0.375rem",right:"-0.375rem",bottom:"-0.375rem",border:`${i.toggleBorderWidth} ${i.toggleBorderStyle} ${i.toggleFocusBorderColor}`,borderRadius:`calc(${i.toggleBorderRadius} * 1.5)`,opacity:0,pointerEvents:"none"},"&:focus":{"&::before":{opacity:1}},"&:focus, &:hover, &:active":{textDecoration:"none",color:i.textColor},textDecoration:"none",...c,...p[a]},icon:{label:"toggleDetails__icon","& > svg":{display:"block"},...g[n],...f[a]},details:{label:"toggleDetails__details",boxSizing:"border-box",paddingTop:i.togglePadding,color:i.textColor,...p[a],...z[a]},content:s?{label:"toggleDetails__content",opacity:.01,animationName:Pe,animationFillMode:"forwards",animationDuration:".3s"}:{}}},De=i=>{const e=i.colors,t=i.spacing,o=i.borders,n=i.typography,a=i.key,r={canvas:{toggleFocusBorderColor:i["ic-brand-primary"],iconColor:i["ic-brand-font-color-dark"],textColor:i["ic-brand-font-color-dark"]}};return{...{fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,lineHeight:n==null?void 0:n.lineHeight,textColor:e==null?void 0:e.textDarkest,fontSizeSmall:n==null?void 0:n.fontSizeSmall,fontSizeMedium:n==null?void 0:n.fontSizeMedium,fontSizeLarge:n==null?void 0:n.fontSizeLarge,smallIconSize:"0.5rem",mediumIconSize:"0.75rem",largeIconSize:"1rem",iconMargin:t==null?void 0:t.xxSmall,iconColor:e==null?void 0:e.textDarkest,togglePadding:t==null?void 0:t.xxSmall,toggleBorderRadius:o==null?void 0:o.radiusMedium,toggleBorderWidth:o==null?void 0:o.widthMedium,toggleBorderStyle:o==null?void 0:o.style,toggleFocusBorderColor:e==null?void 0:e.borderBrand,filledBackgroundColor:e==null?void 0:e.backgroundLight,filledBorderWidth:o==null?void 0:o.widthSmall,filledBorderStyle:o==null?void 0:o.style,filledBorderColor:e==null?void 0:e.borderMedium,filledBorderRadius:o==null?void 0:o.radiusMedium,filledPadding:t==null?void 0:t.small},...r[a]}},Me={variant:l.oneOf(["default","filled"]),summary:l.node.isRequired,expanded:E(l.bool,"onToggle","defaultExpanded"),defaultExpanded:l.bool,onToggle:l.func,icon:l.func,iconExpanded:l.func,iconPosition:l.oneOf(["start","end"]),fluidWidth:l.bool,children:l.node,size:l.oneOf(["small","medium","large"])},He=["variant","summary","expanded","defaultExpanded","onToggle","icon","iconExpanded","iconPosition","fluidWidth","children","size"];var J,K,B,y;let Ge=(J=F(Ee,De),K=R(),J(B=K(B=(y=class ie extends h.Component{constructor(...e){super(...e),this.ref=null,this._button=null,this.getButtonRef=t=>this._button=t,this.handleToggle=(t,o)=>{var n,a;typeof this.props.onToggle=="function"&&this.props.onToggle(t,o),(n=(a=this.props).makeStyles)===null||n===void 0||n.call(a,{animate:!0})}}get focused(){return Y(this._button)}focus(){var e;(e=this._button)===null||e===void 0||e.focus()}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,{animate:!1})}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,{animate:!0})}renderSummary(e){var t,o;const n=this.props,a=n.summary,r=n.iconPosition;return u("span",{css:(t=this.props.styles)===null||t===void 0?void 0:t.summary},r==="start"&&this.renderIcon(e),u("span",{css:(o=this.props.styles)===null||o===void 0?void 0:o.summaryText},a),r==="end"&&this.renderIcon(e))}renderToggle(e,t){const o=this.props.variant,n={...P(this.props,ie.allowedProps),...e,children:this.renderSummary(t)},a=this.renderSummary(t);if(o==="filled")return u(xe,Object.assign({},n,{display:"block",textAlign:"start",elementRef:this.getButtonRef}),a);if(n.href){var r;return u("a",Object.assign({},n,{css:(r=this.props.styles)===null||r===void 0?void 0:r.toggle,ref:this.getButtonRef}),a)}else{var s;return u("button",Object.assign({},n,{type:"button",css:(s=this.props.styles)===null||s===void 0?void 0:s.toggle,ref:this.getButtonRef}),a)}}renderIcon(e){var t;const o=e?this.props.iconExpanded:this.props.icon;return this.props.children&&o?u("span",{css:(t=this.props.styles)===null||t===void 0?void 0:t.icon},u(o,null)):null}renderDetails(e,t){var o;const n=this.props.children,a=e?{display:"block"}:{display:"none"};return u("div",Object.assign({},t,{css:[(o=this.props.styles)===null||o===void 0?void 0:o.details,a]}),n&&e&&this.renderContent())}renderContent(){var e;return u("div",{css:(e=this.props.styles)===null||e===void 0?void 0:e.content},this.props.children)}render(){return u(j,Object.assign({},Q(this.props,j.allowedProps),{onToggle:this.handleToggle}),({expanded:e,getToggleProps:t,getDetailsProps:o})=>{var n;return u("div",{css:(n=this.props.styles)===null||n===void 0?void 0:n.toggleDetails,ref:a=>{this.ref=a}},this.renderToggle(t(),e),this.renderDetails(e,o()))})}},y.displayName="ToggleDetails",y.componentId="ToggleDetails",y.allowedProps=He,y.propTypes=Me,y.defaultProps={variant:"default",size:"medium",fluidWidth:!1,icon:be,iconExpanded:me,iconPosition:"start",defaultExpanded:!1,children:null},y))||B)||B);export{xe as B,j as E,I,je as R,Ge as T,Re as a,_ as b}; diff --git a/assets/index.node-evW1ZN7C.js b/assets/index.node-BLPoF182.js similarity index 80% rename from assets/index.node-evW1ZN7C.js rename to assets/index.node-BLPoF182.js index 245debc..db85368 100644 --- a/assets/index.node-evW1ZN7C.js +++ b/assets/index.node-BLPoF182.js @@ -1 +1 @@ -import{r as n}from"./index-DCzcanBz.js";class o extends n.Component{constructor(e){super(e)}hydrate(){}initChange(){}resolveChange(){}mirrorChange(){}componentDidMount(){}componentDidUpdate(){}componentWillUnmount(){}shouldComponentUpdate(){return!1}render(){return null}}o.displayName="Controlled";export{o as default}; +import{r as n}from"./index-C3XQCywa.js";class o extends n.Component{constructor(e){super(e)}hydrate(){}initChange(){}resolveChange(){}mirrorChange(){}componentDidMount(){}componentDidUpdate(){}componentWillUnmount(){}shouldComponentUpdate(){return!1}render(){return null}}o.displayName="Controlled";export{o as default}; diff --git a/assets/links-pxnmE0x3.js b/assets/links-D-T-qd9l.js similarity index 91% rename from assets/links-pxnmE0x3.js rename to assets/links-D-T-qd9l.js index 30e83e0..cb93b4a 100644 --- a/assets/links-pxnmE0x3.js +++ b/assets/links-D-T-qd9l.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/error-BC2Hv5fG.js","assets/index-DCzcanBz.js","assets/index-dyNilIOc.css","assets/RenderTopNavBar-CILoEAmM.js","assets/index-De3kK20J.js"])))=>i.map(i=>d[i]); -import{a as Q,r as o,d as g,e as C,L as k,j as e,V as f,_ as Z,g as G}from"./index-DCzcanBz.js";import{a as J,g as X,R as Y,H as A,T as b,d as ee,L as ae,e as re,b as le,f as v}from"./RenderTopNavBar-CILoEAmM.js";import{B as ne,T as se,R as y,a as d,I as oe,b as te}from"./index-CTDsjRCP.js";import{F as ie,T as ce,a as t}from"./index-C5yFM9ST.js";import{I as de,a as w}from"./index-C1tjm6wA.js";const ue={header:{EN:"Redirect Links",ES_LA:"Enlaces de Redirección",PT_BR:"Links de Redirecionamento",DE:"Weiterleitungslinks"},description:{EN:"This page provides a collection of shortened URLs for use in RFP responses. Each row has a short URL and the original URL. Click on the copy icon and the short URL will be added to your clipboard.",ES_LA:"Esta página proporciona una colección de URL abreviadas para usar en las respuestas a RFP. Cada fila tiene una URL corta y la URL original. Haga clic en la copia y la URL corta se agregará a su portapapeles.",PT_BR:"Esta página fornece uma coleção de URLs abreviados para uso em respostas de RFP. Cada linha possui um URL curto e o URL original. Clique na cópia ícone e o URL curto serão adicionados à sua área de transferência.",DE:"Diese Seite bietet eine Sammlung verkürzter URLs zur Verwendung in RFP-Antworten. Jede Zeile enthält eine Kurz-URL und die Original-URL. Klicken Sie auf die Kopie-Symbol und die Kurz-URL wird Ihrer Zwischenablage hinzugefügt."},filters:{EN:"Filters",ES_LA:"Filtros",PT_BR:"Filtros",DE:"filter"},toggleShow:{EN:"Show filters",ES_LA:"Mostrar filtros",PT_BR:"Mostrar filtros",DE:"Filter anzeigen"},toggleHide:{EN:"Hide filters",ES_LA:"Ocultar filtros",PT_BR:"Ocultar filtros",DE:"Filter ausblenden"},search:{EN:"Search",ES_LA:"Buscar",PT_BR:"Procurar",DE:"Suche"},clearSearch:{EN:"Clear search",ES_LA:"Borrar búsqueda",PT_BR:"Limpar pesquisa",DE:"Suche löschen"},placeholder:{EN:"community",ES_LA:"comunidad",PT_BR:"comunidade",DE:"Gemeinschaft"},brands:{EN:"Brands",ES_LA:"Marcas",PT_BR:"Marcas",DE:"Marken"},products:{EN:"Products",ES_LA:"Productos",PT_BR:"Produtos",DE:"Produkte"},language:{EN:"Language",ES_LA:"Idioma",PT_BR:"Idioma",DE:"Sprache"},title:{EN:"Title",ES_LA:"Título",PT_BR:"Título",DE:"Titel"},link:{EN:"Link",ES_LA:"Enlace",PT_BR:"Link",DE:"Link"},copy:{EN:"Copy",ES_LA:"Copiar",PT_BR:"Copiar",DE:"Kopieren"},copy_url:{EN:"Copy URL to clipboard",ES_LA:"Copiar URL al portapapeles",PT_BR:"Copiar URL para a área de transferência",DE:"Kopieren Sie die URL in die Zwischenablage"},copy_error:{EN:"Error copying to clipboard",ES_LA:"Error al copiar al portapapeles",PT_BR:"Erro ao copiar para a área de transferência",DE:"Fehler beim Kopieren in die Zwischenablage"}};function pe(){const i=J(Q().language),n=X(ue,i),m=G.url.replace("https://",""),[p,U]=o.useState({expanded:!1,text:n.toggleShow}),B=()=>{const a=p.expanded?n.toggleShow:n.toggleHide;U({expanded:!p.expanded,text:a})},[u,_]=o.useState(""),P=(a,r)=>{_(r),h(x,r,j,L)},D=a=>{a.stopPropagation(),P(a,"")},N=()=>u.search.length?e.jsx(w,{type:"button",size:"small",withBackground:!1,withBorder:!1,screenReaderLabel:n.clearSearch,onClick:D,children:e.jsx(te,{})}):null,[x,F]=o.useState([i]),I=(a,r)=>{const l=[];r==="all"?(l.push(...v),R(a,"all")):l.push(...v.filter(c=>c.toUpperCase().includes(r.toUpperCase()))),F(l),h(l,u,j,L)},[L,$]=o.useState("all"),[E,z]=o.useState(g),R=(a,r)=>{r==="all"||g.includes(r)?$(r):console.error(`Invalid value for setActiveProduct: ${r}`),h(x,u,j,r)},[T,H]=o.useState("all"),[j,K]=o.useState(C),V=(a,r)=>{const l=[];r==="all"?l.push("AWS",...C):l.push(...["AWS",...C].filter(c=>c.toLowerCase().includes(r.toLowerCase()))),H(r),K(l),R(a,"all"),z(l),h(x,u,l,"all")},[W,M]=o.useState({list:k.map(a=>({...a,links:a.links.filter(r=>r.lang.toUpperCase()===i)}))}),h=(a,r,l,c)=>{const O=k.map(s=>({...s,links:s.links.filter(S=>`${`${s.brand} ${S.title}`}`.toLowerCase().includes(r.toLowerCase())).filter(S=>a.includes(S.lang.toUpperCase()))})).filter(s=>s.links.length>0).filter(s=>l.includes(s.brand)).filter(s=>c!=="all"?s.brand===E[0]||s.brand===c:!0);M({list:O})};async function q(a){try{await navigator.clipboard.writeText(a)}catch(r){let l=n.copy_error;r instanceof Error?l=r.message:typeof r=="string"&&(l=r),console.error(l)}}return e.jsxs(e.Fragment,{children:[e.jsx(Y,{language:i}),e.jsxs(f,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[e.jsxs(f,{as:"div",margin:"none none x-large",children:[e.jsx(A,{level:"h1",children:n.header}),e.jsx(b,{as:"p",children:n.description}),e.jsx(ne,{onClick:B,children:p.text}),e.jsx(se,{id:"toggleFilters",summary:n.filters,onToggle:B,expanded:p.expanded,children:e.jsx(f,{as:"div",margin:"large none none",children:e.jsx("form",{name:"searchFilters",autoComplete:"off",children:e.jsxs(ie,{label:"",description:"",layout:"stacked",children:[e.jsx(ce,{type:"search",renderLabel:n.search,placeholder:n.placeholder,onChange:P,renderBeforeInput:e.jsx(de,{inline:!1}),renderAfterInput:N,value:u}),e.jsxs(y,{name:"brand",description:n.brands,defaultValue:"all",layout:"columns",variant:"toggle",onChange:V,children:[e.jsx(d,{value:"all",label:"All",context:"off"},"all"),["AWS",...g].map(a=>e.jsx(d,{value:a,label:a,context:"off"},a))]}),T!=="all"&&E.length>1&&e.jsxs(y,{name:"product",description:n.products,defaultValue:"all",layout:"columns",variant:"toggle",onChange:R,children:[e.jsx(d,{value:"all",label:"All",context:"off",id:"allProducts",checked:L==="all"},"all"),E.filter(a=>a!==T).map(a=>e.jsx(d,{value:a,label:a,context:"off"},a))]}),e.jsxs(y,{name:"language",description:n.language,defaultValue:i,layout:"columns",variant:"toggle",onChange:I,children:[e.jsx(d,{value:"all",label:"All",context:"off"},"all"),ee.map(a=>e.jsx(d,{value:a.code,label:a.local,context:"off"},a.code))]})]})})})})]}),W.list.map(a=>{if(a.links.length){const r=a.brand;return e.jsxs(f,{as:"div",margin:"none none xx-large",children:[e.jsx(A,{level:g.includes(r)?"h2":"h3",id:r,children:r}),e.jsxs(t,{hover:!0,caption:r,children:[e.jsx(t.Head,{children:e.jsxs(t.Row,{children:[e.jsx(t.ColHeader,{id:"Title",width:"25%",children:n.title}),e.jsx(t.ColHeader,{id:"URLs",children:n.link})]})}),e.jsx(t.Body,{children:a.links.map(l=>e.jsxs(t.Row,{children:[e.jsx(t.Cell,{children:e.jsx(b,{children:l.title})}),e.jsxs(t.Cell,{children:[e.jsx(ae,{href:`https://${m}${l.from}`,children:`${m}${l.from}`}),"  ",e.jsx(re,{renderTip:n.copy,on:["hover","focus"],placement:"top",color:"primary-inverse",children:e.jsx(w,{withBackground:!1,withBorder:!1,screenReaderLabel:n.copy_url,onClick:()=>{q(`https://${m}${l.from}`)},children:e.jsx(oe,{})})}),e.jsx("br",{}),e.jsx(b,{size:"small",color:"secondary",children:l.to.split("?")[0]})]})]},l.title))})]})]},r)}return null})]}),e.jsx(le,{language:i})]})}pe.displayName="Route.Links";function he(){const i=o.lazy(()=>Z(()=>import("./error-BC2Hv5fG.js"),__vite__mapDeps([0,1,2,3,4])).then(n=>({default:n.Component})));return e.jsx(o.Suspense,{fallback:e.jsx("h1",{children:"Error."}),children:e.jsx(i,{})})}he.displayName="Error.Links";export{pe as Component,he as ErrorBoundary}; +const __vite__fileDeps=["assets/error-Cp8tnuu0.js","assets/index-C3XQCywa.js","assets/index-dyNilIOc.css","assets/RenderTopNavBar-D2dLV4g_.js","assets/index-BfwAAv1n.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +import{a as Q,r as o,d as g,e as C,L as k,j as e,V as f,_ as Z,g as G}from"./index-C3XQCywa.js";import{a as J,g as X,R as Y,H as A,T as b,d as ee,L as ae,e as re,b as le,f as v}from"./RenderTopNavBar-D2dLV4g_.js";import{B as ne,T as se,R as y,a as d,I as oe,b as te}from"./index-ykr1wfg1.js";import{F as ie,T as ce,a as t}from"./index-CuKaSjpf.js";import{I as de,a as w}from"./index-D14ZWBB_.js";const ue={header:{EN:"Redirect Links",ES_LA:"Enlaces de Redirección",PT_BR:"Links de Redirecionamento",DE:"Weiterleitungslinks"},description:{EN:"This page provides a collection of shortened URLs for use in RFP responses. Each row has a short URL and the original URL. Click on the copy icon and the short URL will be added to your clipboard.",ES_LA:"Esta página proporciona una colección de URL abreviadas para usar en las respuestas a RFP. Cada fila tiene una URL corta y la URL original. Haga clic en la copia y la URL corta se agregará a su portapapeles.",PT_BR:"Esta página fornece uma coleção de URLs abreviados para uso em respostas de RFP. Cada linha possui um URL curto e o URL original. Clique na cópia ícone e o URL curto serão adicionados à sua área de transferência.",DE:"Diese Seite bietet eine Sammlung verkürzter URLs zur Verwendung in RFP-Antworten. Jede Zeile enthält eine Kurz-URL und die Original-URL. Klicken Sie auf die Kopie-Symbol und die Kurz-URL wird Ihrer Zwischenablage hinzugefügt."},filters:{EN:"Filters",ES_LA:"Filtros",PT_BR:"Filtros",DE:"filter"},toggleShow:{EN:"Show filters",ES_LA:"Mostrar filtros",PT_BR:"Mostrar filtros",DE:"Filter anzeigen"},toggleHide:{EN:"Hide filters",ES_LA:"Ocultar filtros",PT_BR:"Ocultar filtros",DE:"Filter ausblenden"},search:{EN:"Search",ES_LA:"Buscar",PT_BR:"Procurar",DE:"Suche"},clearSearch:{EN:"Clear search",ES_LA:"Borrar búsqueda",PT_BR:"Limpar pesquisa",DE:"Suche löschen"},placeholder:{EN:"community",ES_LA:"comunidad",PT_BR:"comunidade",DE:"Gemeinschaft"},brands:{EN:"Brands",ES_LA:"Marcas",PT_BR:"Marcas",DE:"Marken"},products:{EN:"Products",ES_LA:"Productos",PT_BR:"Produtos",DE:"Produkte"},language:{EN:"Language",ES_LA:"Idioma",PT_BR:"Idioma",DE:"Sprache"},title:{EN:"Title",ES_LA:"Título",PT_BR:"Título",DE:"Titel"},link:{EN:"Link",ES_LA:"Enlace",PT_BR:"Link",DE:"Link"},copy:{EN:"Copy",ES_LA:"Copiar",PT_BR:"Copiar",DE:"Kopieren"},copy_url:{EN:"Copy URL to clipboard",ES_LA:"Copiar URL al portapapeles",PT_BR:"Copiar URL para a área de transferência",DE:"Kopieren Sie die URL in die Zwischenablage"},copy_error:{EN:"Error copying to clipboard",ES_LA:"Error al copiar al portapapeles",PT_BR:"Erro ao copiar para a área de transferência",DE:"Fehler beim Kopieren in die Zwischenablage"}};function pe(){const i=J(Q().language),n=X(ue,i),m=G.url.replace("https://",""),[p,U]=o.useState({expanded:!1,text:n.toggleShow}),B=()=>{const a=p.expanded?n.toggleShow:n.toggleHide;U({expanded:!p.expanded,text:a})},[u,_]=o.useState(""),P=(a,r)=>{_(r),h(x,r,j,L)},D=a=>{a.stopPropagation(),P(a,"")},N=()=>u.search.length?e.jsx(w,{type:"button",size:"small",withBackground:!1,withBorder:!1,screenReaderLabel:n.clearSearch,onClick:D,children:e.jsx(te,{})}):null,[x,F]=o.useState([i]),I=(a,r)=>{const l=[];r==="all"?(l.push(...v),R(a,"all")):l.push(...v.filter(c=>c.toUpperCase().includes(r.toUpperCase()))),F(l),h(l,u,j,L)},[L,$]=o.useState("all"),[E,z]=o.useState(g),R=(a,r)=>{r==="all"||g.includes(r)?$(r):console.error(`Invalid value for setActiveProduct: ${r}`),h(x,u,j,r)},[T,H]=o.useState("all"),[j,K]=o.useState(C),V=(a,r)=>{const l=[];r==="all"?l.push("AWS",...C):l.push(...["AWS",...C].filter(c=>c.toLowerCase().includes(r.toLowerCase()))),H(r),K(l),R(a,"all"),z(l),h(x,u,l,"all")},[W,M]=o.useState({list:k.map(a=>({...a,links:a.links.filter(r=>r.lang.toUpperCase()===i)}))}),h=(a,r,l,c)=>{const O=k.map(s=>({...s,links:s.links.filter(S=>`${`${s.brand} ${S.title}`}`.toLowerCase().includes(r.toLowerCase())).filter(S=>a.includes(S.lang.toUpperCase()))})).filter(s=>s.links.length>0).filter(s=>l.includes(s.brand)).filter(s=>c!=="all"?s.brand===E[0]||s.brand===c:!0);M({list:O})};async function q(a){try{await navigator.clipboard.writeText(a)}catch(r){let l=n.copy_error;r instanceof Error?l=r.message:typeof r=="string"&&(l=r),console.error(l)}}return e.jsxs(e.Fragment,{children:[e.jsx(Y,{language:i}),e.jsxs(f,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[e.jsxs(f,{as:"div",margin:"none none x-large",children:[e.jsx(A,{level:"h1",children:n.header}),e.jsx(b,{as:"p",children:n.description}),e.jsx(ne,{onClick:B,children:p.text}),e.jsx(se,{id:"toggleFilters",summary:n.filters,onToggle:B,expanded:p.expanded,children:e.jsx(f,{as:"div",margin:"large none none",children:e.jsx("form",{name:"searchFilters",autoComplete:"off",children:e.jsxs(ie,{label:"",description:"",layout:"stacked",children:[e.jsx(ce,{type:"search",renderLabel:n.search,placeholder:n.placeholder,onChange:P,renderBeforeInput:e.jsx(de,{inline:!1}),renderAfterInput:N,value:u}),e.jsxs(y,{name:"brand",description:n.brands,defaultValue:"all",layout:"columns",variant:"toggle",onChange:V,children:[e.jsx(d,{value:"all",label:"All",context:"off"},"all"),["AWS",...g].map(a=>e.jsx(d,{value:a,label:a,context:"off"},a))]}),T!=="all"&&E.length>1&&e.jsxs(y,{name:"product",description:n.products,defaultValue:"all",layout:"columns",variant:"toggle",onChange:R,children:[e.jsx(d,{value:"all",label:"All",context:"off",id:"allProducts",checked:L==="all"},"all"),E.filter(a=>a!==T).map(a=>e.jsx(d,{value:a,label:a,context:"off"},a))]}),e.jsxs(y,{name:"language",description:n.language,defaultValue:i,layout:"columns",variant:"toggle",onChange:I,children:[e.jsx(d,{value:"all",label:"All",context:"off"},"all"),ee.map(a=>e.jsx(d,{value:a.code,label:a.local,context:"off"},a.code))]})]})})})})]}),W.list.map(a=>{if(a.links.length){const r=a.brand;return e.jsxs(f,{as:"div",margin:"none none xx-large",children:[e.jsx(A,{level:g.includes(r)?"h2":"h3",id:r,children:r}),e.jsxs(t,{hover:!0,caption:r,children:[e.jsx(t.Head,{children:e.jsxs(t.Row,{children:[e.jsx(t.ColHeader,{id:"Title",width:"25%",children:n.title}),e.jsx(t.ColHeader,{id:"URLs",children:n.link})]})}),e.jsx(t.Body,{children:a.links.map(l=>e.jsxs(t.Row,{children:[e.jsx(t.Cell,{children:e.jsx(b,{children:l.title})}),e.jsxs(t.Cell,{children:[e.jsx(ae,{href:`https://${m}${l.from}`,children:`${m}${l.from}`}),"  ",e.jsx(re,{renderTip:n.copy,on:["hover","focus"],placement:"top",color:"primary-inverse",children:e.jsx(w,{withBackground:!1,withBorder:!1,screenReaderLabel:n.copy_url,onClick:()=>{q(`https://${m}${l.from}`)},children:e.jsx(oe,{})})}),e.jsx("br",{}),e.jsx(b,{size:"small",color:"secondary",children:l.to.split("?")[0]})]})]},l.title))})]})]},r)}return null})]}),e.jsx(le,{language:i})]})}pe.displayName="Route.Links";function he(){const i=o.lazy(()=>Z(()=>import("./error-Cp8tnuu0.js"),__vite__mapDeps([0,1,2,3,4])).then(n=>({default:n.Component})));return e.jsx(o.Suspense,{fallback:e.jsx("h1",{children:"Error."}),children:e.jsx(i,{})})}he.displayName="Error.Links";export{pe as Component,he as ErrorBoundary}; diff --git a/assets/markdownBrand-DRRkJwz6.js b/assets/markdownBrand-GGRWnoGz.js similarity index 87% rename from assets/markdownBrand-DRRkJwz6.js rename to assets/markdownBrand-GGRWnoGz.js index 45ee825..99d44e2 100644 --- a/assets/markdownBrand-DRRkJwz6.js +++ b/assets/markdownBrand-GGRWnoGz.js @@ -1,9 +1,9 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/error-BC2Hv5fG.js","assets/index-DCzcanBz.js","assets/index-dyNilIOc.css","assets/RenderTopNavBar-CILoEAmM.js","assets/index-De3kK20J.js"])))=>i.map(i=>d[i]); -import{g as C,r as g,j as m,u as F,a as H,b as q,_ as K,V as D}from"./index-DCzcanBz.js";import{g as N,c as v,a as J,R as Q,b as X}from"./RenderTopNavBar-CILoEAmM.js";import{r as I,a as O,b as U,M as G,c as M,d as V}from"./Mdtoui-B81NOHR9.js";import"./index-C5yFM9ST.js";const W={fetch_fail:{EN:"Didn't fetch text correctly.",ES_LA:"No se obtuvo el texto correctamente.",PT_BR:"Não buscou o texto corretamente.",DE:"Text nicht korrekt abgerufen."},download:{EN:"Download",ES_LA:"Descargar",PT_BR:"Baixar",DE:"Herunterladen"},explore:{EN:"Explore",ES_LA:"Explorar",PT_BR:"Explorar",DE:"Erkunden"},error:{EN:"An error occurred fetching package contents.",ES_LA:"Ocurrió un error al obtener el contenido del paquete.",PT_BR:"Ocorreu um erro ao buscar o conteúdo do pacote.",DE:"Beim Abrufen des Paketinhalts ist ein Fehler aufgetreten."}};var T={VITE_APP_VERSION:"4.3.1+1720017714",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};async function Y(e,t,r){const c=`${C.api}/repos/${e}/${t}/git/trees/${r}?recursive=1`;try{const s=await(await fetch(c,{method:"GET",headers:{Accept:"application/vnd.github.v3+json",Authorization:T!=null&&T.GITHUB_TOKEN?`token ${T.GITHUB_TOKEN}`:""}})).json();return{...s,tree:s.tree.sort(Z)}}catch(n){n instanceof Error?console.error(`Error: ${n.message}`):console.error(`An unexpected error occurred: ${n}`)}}function Z(e,t){const r=o=>{const l=o.toLocaleUpperCase(),u=c.findIndex(a=>l.startsWith(a.toLocaleUpperCase()));return u!==-1?u:c.length},c=["Amazon Web Services","Instructure"],n=r(e.path),s=r(t.path);return n!==s?s-n:e.path.localeCompare(t.path)}function ee(e,t,r,c,n){var p;const o=N(W,n),l=e.tree.filter(i=>i.type==="tree"),u=e.tree.filter(i=>i.type==="blob").filter(i=>i.path!==".gitignore");let a=`
+const __vite__fileDeps=["assets/error-Cp8tnuu0.js","assets/index-C3XQCywa.js","assets/index-dyNilIOc.css","assets/RenderTopNavBar-D2dLV4g_.js","assets/index-BfwAAv1n.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +import{g as C,r as g,j as m,u as F,a as H,b as q,_ as K,V as D}from"./index-C3XQCywa.js";import{g as N,c as v,a as J,R as Q,b as X}from"./RenderTopNavBar-D2dLV4g_.js";import{r as I,a as O,b as U,M as G,c as M,d as V}from"./Mdtoui-yQNCxW-t.js";import"./index-CuKaSjpf.js";const W={fetch_fail:{EN:"Didn't fetch text correctly.",ES_LA:"No se obtuvo el texto correctamente.",PT_BR:"Não buscou o texto corretamente.",DE:"Text nicht korrekt abgerufen."},download:{EN:"Download",ES_LA:"Descargar",PT_BR:"Baixar",DE:"Herunterladen"},explore:{EN:"Explore",ES_LA:"Explorar",PT_BR:"Explorar",DE:"Erkunden"},error:{EN:"An error occurred fetching package contents.",ES_LA:"Ocurrió un error al obtener el contenido del paquete.",PT_BR:"Ocorreu um erro ao buscar o conteúdo do pacote.",DE:"Beim Abrufen des Paketinhalts ist ein Fehler aufgetreten."}};var T={VITE_APP_VERSION:"4.3.1+1720135115",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};async function Y(e,t,r){const c=`${C.api}/repos/${e}/${t}/git/trees/${r}?recursive=1`;try{const s=await(await fetch(c,{method:"GET",headers:{Accept:"application/vnd.github.v3+json",Authorization:T!=null&&T.GITHUB_TOKEN?`token ${T.GITHUB_TOKEN}`:""}})).json();return{...s,tree:s.tree.sort(Z)}}catch(n){n instanceof Error?console.error(`Error: ${n.message}`):console.error(`An unexpected error occurred: ${n}`)}}function Z(e,t){const r=o=>{const l=o.toLocaleUpperCase(),u=c.findIndex(a=>l.startsWith(a.toLocaleUpperCase()));return u!==-1?u:c.length},c=["Amazon Web Services","Instructure"],n=r(e.path),s=r(t.path);return n!==s?s-n:e.path.localeCompare(t.path)}function ee(e,t,r,c,n){var p;const o=N(W,n),l=e.tree.filter(i=>i.type==="tree"),u=e.tree.filter(i=>i.type==="blob").filter(i=>i.path!==".gitignore");let a=`
🕵️ ${o.explore}\r \r `;for(const[i,d]of l.entries()){a+=`| ${d.path} |\r | ---------------- |`;for(const f of u)d!=null&&d.path&&((p=f==null?void 0:f.path)!=null&&p.startsWith(d.path))&&(a+=`\r | [${f.path.replace(`${d.path}/`,"")}](${encodeURI(`${C.raw}/${t}/${r}/${c}/${f.path}`)}) |`);i~l.indexOf(e)).toString();if(o){const l=await Y(n,s,o);if(l)return ee(l,n,s,o,c)}return null}const re=e=>{const t=v.c(9),{brand:r,branch:c,l:n}=e,[s,o]=g.useState(null);let l,u;t[0]!==r||t[1]!==c||t[2]!==n?(l=()=>{te(r.toLowerCase(),c,n).then(d=>o(d)).catch(d=>console.error(d))},u=[r,c,n],t[0]=r,t[1]=c,t[2]=n,t[3]=l,t[4]=u):(l=t[3],u=t[4]),g.useEffect(l,u);let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=[I,O],t[5]=a):a=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=[U],t[6]=p):p=t[6];let i;return t[7]!==s?(i=m.jsx(G,{remarkPlugins:a,rehypePlugins:p,allowedElements:M,components:V,children:s}),t[7]=s,t[8]=i):i=t[8],i};function oe(){const e=v.c(39),{readme:t,brand:r}=F(),c=H().language;let n,s,o;e[0]!==c?(o=J(c),s=N(W,o),n=o.toUpperCase(),e[0]=c,e[1]=n,e[2]=s,e[3]=o):(n=e[1],s=e[2],o=e[3]);const l=`.markdown .lang { display: none; } .markdown .lang.${n} { display: inherit; }`,u=t,[a,p]=g.useState("Loading..."),[i,d]=g.useState(!1);let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[4]=f):f=e[4];const[$,z]=g.useState(f);let R;e[5]!==r||e[6]!==u||e[7]!==s.fetch_fail?(R=()=>{document.title=`${r} Compliance Packages`,fetch(u).then(h=>h.ok?h.text():Promise.reject(s.fetch_fail)).then(h=>{p(h)}).catch(h=>console.error(h))},e[5]=r,e[6]=u,e[7]=s.fetch_fail,e[8]=R):R=e[8],g.useEffect(R);let k,w;e[9]!==a?(k=()=>{a&&(z(Array.from(document.querySelectorAll(".contents"))),d(!0))},w=[a],e[9]=a,e[10]=k,e[11]=w):(k=e[10],w=e[11]),g.useEffect(k,w);let E;e[12]!==i||e[13]!==$||e[14]!==r||e[15]!==o?(E=i&&($==null?void 0:$.map(h=>q.createPortal(m.jsx(re,{brand:r,branch:h,l:o}),h))),e[12]=i,e[13]=$,e[14]=r,e[15]=o,e[16]=E):E=e[16];let x;e[17]!==r||e[18]!==o?(x=m.jsx(Q,{brand:r,language:o}),e[17]=r,e[18]=o,e[19]=x):x=e[19];let _;e[20]!==l?(_=m.jsx("style",{children:l}),e[20]=l,e[21]=_):_=e[21];const L=`${r.toLowerCase()} markdown`;let j;e[22]===Symbol.for("react.memo_cache_sentinel")?(j=[I,O],e[22]=j):j=e[22];let A;e[23]===Symbol.for("react.memo_cache_sentinel")?(A=[U],e[23]=A):A=e[23];let y;e[24]!==a?(y=m.jsx(G,{remarkPlugins:j,rehypePlugins:A,allowedElements:M,components:V,children:a}),e[24]=a,e[25]=y):y=e[25];let b;e[26]!==L||e[27]!==y?(b=m.jsx(D,{as:"div",className:L,children:y}),e[26]=L,e[27]=y,e[28]=b):b=e[28];let S;e[29]!==_||e[30]!==b?(S=m.jsxs(D,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[_,b]}),e[29]=_,e[30]=b,e[31]=S):S=e[31];let P;e[32]!==o?(P=m.jsx(X,{language:o}),e[32]=o,e[33]=P):P=e[33];let B;return e[34]!==E||e[35]!==x||e[36]!==S||e[37]!==P?(B=m.jsxs(m.Fragment,{children:[E,x,S,P]}),e[34]=E,e[35]=x,e[36]=S,e[37]=P,e[38]=B):B=e[38],B}oe.displayName="Route.MarkdownBrand";function ne(){const e=g.lazy(()=>K(()=>import("./error-BC2Hv5fG.js"),__vite__mapDeps([0,1,2,3,4])).then(t=>({default:t.Component})));return m.jsx(g.Suspense,{fallback:m.jsx("h1",{children:"Error."}),children:m.jsx(e,{})})}ne.displayName="Error.MarkdownBrand";export{oe as Component,ne as ErrorBoundary}; +`)}return a+="
",a}async function te(e,t,r){const c=r,n=C.owner,s=C.repo,o=[...t.classList].filter(l=>~l.indexOf(e)).toString();if(o){const l=await Y(n,s,o);if(l)return ee(l,n,s,o,c)}return null}const re=e=>{const t=v.c(9),{brand:r,branch:c,l:n}=e,[s,o]=g.useState(null);let l,u;t[0]!==r||t[1]!==c||t[2]!==n?(l=()=>{te(r.toLowerCase(),c,n).then(d=>o(d)).catch(d=>console.error(d))},u=[r,c,n],t[0]=r,t[1]=c,t[2]=n,t[3]=l,t[4]=u):(l=t[3],u=t[4]),g.useEffect(l,u);let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=[I,O],t[5]=a):a=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=[U],t[6]=p):p=t[6];let i;return t[7]!==s?(i=m.jsx(G,{remarkPlugins:a,rehypePlugins:p,allowedElements:M,components:V,children:s}),t[7]=s,t[8]=i):i=t[8],i};function oe(){const e=v.c(39),{readme:t,brand:r}=F(),c=H().language;let n,s,o;e[0]!==c?(o=J(c),s=N(W,o),n=o.toUpperCase(),e[0]=c,e[1]=n,e[2]=s,e[3]=o):(n=e[1],s=e[2],o=e[3]);const l=`.markdown .lang { display: none; } .markdown .lang.${n} { display: inherit; }`,u=t,[a,p]=g.useState("Loading..."),[i,d]=g.useState(!1);let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[4]=f):f=e[4];const[$,z]=g.useState(f);let R;e[5]!==r||e[6]!==u||e[7]!==s.fetch_fail?(R=()=>{document.title=`${r} Compliance Packages`,fetch(u).then(h=>h.ok?h.text():Promise.reject(s.fetch_fail)).then(h=>{p(h)}).catch(h=>console.error(h))},e[5]=r,e[6]=u,e[7]=s.fetch_fail,e[8]=R):R=e[8],g.useEffect(R);let k,w;e[9]!==a?(k=()=>{a&&(z(Array.from(document.querySelectorAll(".contents"))),d(!0))},w=[a],e[9]=a,e[10]=k,e[11]=w):(k=e[10],w=e[11]),g.useEffect(k,w);let E;e[12]!==i||e[13]!==$||e[14]!==r||e[15]!==o?(E=i&&($==null?void 0:$.map(h=>q.createPortal(m.jsx(re,{brand:r,branch:h,l:o}),h))),e[12]=i,e[13]=$,e[14]=r,e[15]=o,e[16]=E):E=e[16];let x;e[17]!==r||e[18]!==o?(x=m.jsx(Q,{brand:r,language:o}),e[17]=r,e[18]=o,e[19]=x):x=e[19];let _;e[20]!==l?(_=m.jsx("style",{children:l}),e[20]=l,e[21]=_):_=e[21];const L=`${r.toLowerCase()} markdown`;let j;e[22]===Symbol.for("react.memo_cache_sentinel")?(j=[I,O],e[22]=j):j=e[22];let A;e[23]===Symbol.for("react.memo_cache_sentinel")?(A=[U],e[23]=A):A=e[23];let y;e[24]!==a?(y=m.jsx(G,{remarkPlugins:j,rehypePlugins:A,allowedElements:M,components:V,children:a}),e[24]=a,e[25]=y):y=e[25];let b;e[26]!==L||e[27]!==y?(b=m.jsx(D,{as:"div",className:L,children:y}),e[26]=L,e[27]=y,e[28]=b):b=e[28];let S;e[29]!==_||e[30]!==b?(S=m.jsxs(D,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[_,b]}),e[29]=_,e[30]=b,e[31]=S):S=e[31];let P;e[32]!==o?(P=m.jsx(X,{language:o}),e[32]=o,e[33]=P):P=e[33];let B;return e[34]!==E||e[35]!==x||e[36]!==S||e[37]!==P?(B=m.jsxs(m.Fragment,{children:[E,x,S,P]}),e[34]=E,e[35]=x,e[36]=S,e[37]=P,e[38]=B):B=e[38],B}oe.displayName="Route.MarkdownBrand";function ne(){const e=g.lazy(()=>K(()=>import("./error-Cp8tnuu0.js"),__vite__mapDeps([0,1,2,3,4])).then(t=>({default:t.Component})));return m.jsx(g.Suspense,{fallback:m.jsx("h1",{children:"Error."}),children:m.jsx(e,{})})}ne.displayName="Error.MarkdownBrand";export{oe as Component,ne as ErrorBoundary}; diff --git a/assets/mdui-DUzyFQJ0.js b/assets/mdui-DEQHbAAt.js similarity index 91% rename from assets/mdui-DUzyFQJ0.js rename to assets/mdui-DEQHbAAt.js index 2ed2f9b..7a4dd57 100644 --- a/assets/mdui-DUzyFQJ0.js +++ b/assets/mdui-DEQHbAAt.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/error-BC2Hv5fG.js","assets/index-DCzcanBz.js","assets/index-dyNilIOc.css","assets/RenderTopNavBar-CILoEAmM.js","assets/index-De3kK20J.js"])))=>i.map(i=>d[i]); -import{a as T,r as m,j as n,V as C,_ as v}from"./index-DCzcanBz.js";import{c as S,a as A,g as R,R as N,b as M}from"./RenderTopNavBar-CILoEAmM.js";import{M as I,c as L,d as P,r as B,a as H,b as G}from"./Mdtoui-B81NOHR9.js";import{G as w}from"./index-C5yFM9ST.js";import{S as D}from"./index-2_RebUFS.js";import"./index-C1tjm6wA.js";const U={loading:{EN:"Loading...",ES_LA:"Cargando...",PT_BR:"Carregando...",DE:"Wird geladen..."},markdown_source:{EN:"Markdown Source",ES_LA:"Fuente de Markdown",PT_BR:"Fonte de Markdown",DE:"Markdown-Quelle"},try_editor:{EN:"Try editing the markdown below.",ES_LA:"Intenta editar el markdown abajo.",PT_BR:"Tente editar o markdown abaixo.",DE:"Versuche den Markdown unten zu bearbeiten."},close:{EN:"Close",ES_LA:"Cerrar",PT_BR:"Fechar",DE:"Schließen"}},x=`# Markdown to Instructure UI +const __vite__fileDeps=["assets/error-Cp8tnuu0.js","assets/index-C3XQCywa.js","assets/index-dyNilIOc.css","assets/RenderTopNavBar-D2dLV4g_.js","assets/index-BfwAAv1n.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +import{a as T,r as m,j as n,V as C,_ as v}from"./index-C3XQCywa.js";import{c as S,a as A,g as R,R as N,b as M}from"./RenderTopNavBar-D2dLV4g_.js";import{M as I,c as L,d as P,r as B,a as H,b as G}from"./Mdtoui-yQNCxW-t.js";import{G as w}from"./index-CuKaSjpf.js";import{S as D}from"./index-B7tEZKBe.js";import"./index-D14ZWBB_.js";const U={loading:{EN:"Loading...",ES_LA:"Cargando...",PT_BR:"Carregando...",DE:"Wird geladen..."},markdown_source:{EN:"Markdown Source",ES_LA:"Fuente de Markdown",PT_BR:"Fonte de Markdown",DE:"Markdown-Quelle"},try_editor:{EN:"Try editing the markdown below.",ES_LA:"Intenta editar el markdown abajo.",PT_BR:"Tente editar o markdown abaixo.",DE:"Versuche den Markdown unten zu bearbeiten."},close:{EN:"Close",ES_LA:"Cerrar",PT_BR:"Fechar",DE:"Schließen"}},x=`# Markdown to Instructure UI > [!NOTE] > Try editing the markdown on this page. @@ -118,4 +118,4 @@ Text style: *italic* **bold** ~struck~ **Bacon** ipsum dolor amet beef ribs porchetta shank prosciutto burgdoggen sirloin pork belly pancetta picanha drumstick shoulder meatloaf. Sausage ground round flank shank venison, turducken frankfurter sirloin landjaeger jerky bresaola swine picanha. Buffalo shank short ribs rump swine tail, meatloaf capicola venison pork loin cupim. Buffalo spare ribs ribeye sausage. Ground round porchetta cow, landjaeger pork belly jowl picanha salami. Pork belly pancetta spare ribs swine t-bone, meatloaf bresaola kielbasa pastrami burgdoggen turkey sausage ham hock. Ribeye shank tenderloin beef ribs tail venison drumstick tongue pastrami. -Shank spare ribs sausage landjaeger strip steak jerky, fatback salami tenderloin ball tip pastrami pork. Meatball tri-tip ham tongue, beef ribs chuck boudin short ribs pork burgdoggen spare ribs shankle bacon picanha. Burgdoggen pork meatball boudin venison tenderloin tail pork loin short loin chicken. Salami pork loin shankle bresaola, ground round pork pork belly beef ribs flank tongue biltong pastrami cow. Hamburger cupim sausage tri-tip. Ham rump shoulder, ground round sausage flank hamburger spare ribs picanha bacon chuck strip steak.`;function F(){const e=S.c(25),d=T().language;let c,t;e[0]!==d?(t=A(d),c=R(U,t),e[0]=d,e[1]=c,e[2]=t):(c=e[1],t=e[2]);const _=c;let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{document.title="Markdown to Instructure UI"},e[3]=u):u=e[3],m.useEffect(u);const[a,j]=m.useState(`${_.loading}`);let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{j(x)},e[4]=g):g=e[4];let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=[x],e[5]=h):h=e[5],m.useEffect(g,h);let r;e[6]!==t?(r=n.jsx(N,{language:t}),e[6]=t,e[7]=r):r=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=[B,H],e[8]=b):b=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=[G],e[9]=p):p=e[9];let o;e[10]!==a?(o=n.jsx(w.Col,{children:n.jsx(I,{remarkPlugins:b,rehypePlugins:p,allowedElements:L,components:P,children:a})}),e[10]=a,e[11]=o):o=e[11];const y=`${_.markdown_source}`;let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=E=>{j(E)},e[12]=f):f=e[12];let i;e[13]!==y||e[14]!==a?(i=n.jsx(w.Col,{children:n.jsx(D,{label:y,language:"markdown",readOnly:!1,editable:!0,lineNumbers:!0,foldGutter:!0,highlightActiveLineGutter:!0,highlightActiveLine:!0,lineWrapping:!0,value:a,onChange:f})}),e[13]=y,e[14]=a,e[15]=i):i=e[15];let s;e[16]!==o||e[17]!==i?(s=n.jsx(C,{id:"main",className:"mdui",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"100vw",margin:"0 auto",children:n.jsx(w,{startAt:"large",children:n.jsxs(w.Row,{children:[o,i]})})}),e[16]=o,e[17]=i,e[18]=s):s=e[18];let l;e[19]!==t?(l=n.jsx(M,{language:t}),e[19]=t,e[20]=l):l=e[20];let k;return e[21]!==r||e[22]!==s||e[23]!==l?(k=n.jsxs(n.Fragment,{children:[r,s,l]}),e[21]=r,e[22]=s,e[23]=l,e[24]=k):k=e[24],k}F.displayName="Route.MDUI";function O(){const e=m.lazy(()=>v(()=>import("./error-BC2Hv5fG.js"),__vite__mapDeps([0,1,2,3,4])).then(d=>({default:d.Component})));return n.jsx(m.Suspense,{fallback:n.jsx("h1",{children:"Error."}),children:n.jsx(e,{})})}O.displayName="Error.Releases";export{F as Component,O as ErrorBoundary}; +Shank spare ribs sausage landjaeger strip steak jerky, fatback salami tenderloin ball tip pastrami pork. Meatball tri-tip ham tongue, beef ribs chuck boudin short ribs pork burgdoggen spare ribs shankle bacon picanha. Burgdoggen pork meatball boudin venison tenderloin tail pork loin short loin chicken. Salami pork loin shankle bresaola, ground round pork pork belly beef ribs flank tongue biltong pastrami cow. Hamburger cupim sausage tri-tip. Ham rump shoulder, ground round sausage flank hamburger spare ribs picanha bacon chuck strip steak.`;function F(){const e=S.c(25),d=T().language;let c,t;e[0]!==d?(t=A(d),c=R(U,t),e[0]=d,e[1]=c,e[2]=t):(c=e[1],t=e[2]);const _=c;let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{document.title="Markdown to Instructure UI"},e[3]=u):u=e[3],m.useEffect(u);const[a,j]=m.useState(`${_.loading}`);let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{j(x)},e[4]=g):g=e[4];let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=[x],e[5]=h):h=e[5],m.useEffect(g,h);let r;e[6]!==t?(r=n.jsx(N,{language:t}),e[6]=t,e[7]=r):r=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=[B,H],e[8]=b):b=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=[G],e[9]=p):p=e[9];let o;e[10]!==a?(o=n.jsx(w.Col,{children:n.jsx(I,{remarkPlugins:b,rehypePlugins:p,allowedElements:L,components:P,children:a})}),e[10]=a,e[11]=o):o=e[11];const y=`${_.markdown_source}`;let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=E=>{j(E)},e[12]=f):f=e[12];let i;e[13]!==y||e[14]!==a?(i=n.jsx(w.Col,{children:n.jsx(D,{label:y,language:"markdown",readOnly:!1,editable:!0,lineNumbers:!0,foldGutter:!0,highlightActiveLineGutter:!0,highlightActiveLine:!0,lineWrapping:!0,value:a,onChange:f})}),e[13]=y,e[14]=a,e[15]=i):i=e[15];let s;e[16]!==o||e[17]!==i?(s=n.jsx(C,{id:"main",className:"mdui",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"100vw",margin:"0 auto",children:n.jsx(w,{startAt:"large",children:n.jsxs(w.Row,{children:[o,i]})})}),e[16]=o,e[17]=i,e[18]=s):s=e[18];let l;e[19]!==t?(l=n.jsx(M,{language:t}),e[19]=t,e[20]=l):l=e[20];let k;return e[21]!==r||e[22]!==s||e[23]!==l?(k=n.jsxs(n.Fragment,{children:[r,s,l]}),e[21]=r,e[22]=s,e[23]=l,e[24]=k):k=e[24],k}F.displayName="Route.MDUI";function O(){const e=m.lazy(()=>v(()=>import("./error-Cp8tnuu0.js"),__vite__mapDeps([0,1,2,3,4])).then(d=>({default:d.Component})));return n.jsx(m.Suspense,{fallback:n.jsx("h1",{children:"Error."}),children:n.jsx(e,{})})}O.displayName="Error.Releases";export{F as Component,O as ErrorBoundary}; diff --git a/assets/redirectTo-De8G5wZL.js b/assets/redirectTo-Dw5dzXUk.js similarity index 84% rename from assets/redirectTo-De8G5wZL.js rename to assets/redirectTo-Dw5dzXUk.js index 1651a88..c135ded 100644 --- a/assets/redirectTo-De8G5wZL.js +++ b/assets/redirectTo-Dw5dzXUk.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/error-BC2Hv5fG.js","assets/index-DCzcanBz.js","assets/index-dyNilIOc.css","assets/RenderTopNavBar-CILoEAmM.js","assets/index-De3kK20J.js"])))=>i.map(i=>d[i]); -import{u as D,a as B,r as k,_ as L,j as o,V as y}from"./index-DCzcanBz.js";import{c as N,a as P,g as S,T as j,L as T,R as A,b}from"./RenderTopNavBar-CILoEAmM.js";import{B as v}from"./index-De3kK20J.js";const $={downloading:{EN:"Downloading",ES_LA:"Descargando",PT_BR:"Baixando",DE:"Herunterladen"},redirecting:{EN:"Redirecting",ES_LA:"Redirigiendo",PT_BR:"Redirecionando",DE:"Weiterleitung"},youre_downloading_the:{EN:"You're downloading the",ES_LA:"¡Estás descargando el paquete de cumplimiento de",PT_BR:"Você está baixando o pacote de conformidade do",DE:"Sie laden das"},youre_downloading_a:{EN:"You're downloading a document from the",ES_LA:"Estás descargando un documento del paquete de cumplimiento de",PT_BR:"Você está baixando um documento do pacote de conformidade do",DE:"Sie laden ein Dokument aus dem"},compliance_package:{EN:"compliance package!",ES_LA:"!",PT_BR:"!",DE:"-Compliance-Paket herunter!"},didnt_work:{EN:"Didn't work?",ES_LA:"¿No funcionó?",PT_BR:"Não funcionou?",DE:"Hat nicht funktioniert?"},try_again:{EN:"Try again",ES_LA:"Inténtalo de nuevo",PT_BR:"Tente novamente",DE:"Versuchen Sie es erneut"},redirecting_to:{EN:"Redirecting you to",ES_LA:"Redirigiéndote a",PT_BR:"Redirecionando você para",DE:"Weiterleitung zu"}};function V(){const e=N.c(32),{path:E,brand:s,url:i}=D(),h=B().language;let l,a;e[0]!==h?(a=P(h),l=S($,a),e[0]=h,e[1]=l,e[2]=a):(l=e[1],a=e[2]);const n=l;let c;e[3]!==i?(c=i.split("?"),e[3]=i,e[4]=c):c=e[4];const x=c[0];let u;e[5]!==i?(u=i.slice(-4),e[5]=i,e[6]=u):u=e[6];const f=u,g=E.slice(-3)==="/dl";let _;e[7]!==i?(_=()=>{window.location.href=i},e[7]=i,e[8]=_):_=e[8],k.useEffect(_);let m;e[9]!==g||e[10]!==f||e[11]!==n.youre_downloading_the||e[12]!==n.compliance_package||e[13]!==n.youre_downloading_a||e[14]!==n.didnt_work||e[15]!==n.try_again||e[16]!==n.redirecting_to||e[17]!==s||e[18]!==i||e[19]!==x?(m=()=>g?o.jsxs(y,{as:"div",children:[o.jsx(j,{children:f===".zip"?`${n.youre_downloading_the} ${s} ${n.compliance_package}`:`${n.youre_downloading_a} ${s} ${n.compliance_package}`}),o.jsx("br",{}),o.jsxs(j,{size:"x-small",children:[n.didnt_work," ",o.jsx(T,{href:i,children:n.try_again})]})]}):o.jsx(y,{as:"div",children:o.jsxs(j,{children:[n.redirecting_to," ",o.jsx(T,{href:i,children:x})]})}),e[9]=g,e[10]=f,e[11]=n.youre_downloading_the,e[12]=n.compliance_package,e[13]=n.youre_downloading_a,e[14]=n.didnt_work,e[15]=n.try_again,e[16]=n.redirecting_to,e[17]=s,e[18]=i,e[19]=x,e[20]=m):m=e[20];const R=m;let t;e[21]!==a?(t=o.jsx(A,{language:a}),e[21]=a,e[22]=t):t=e[22];const w=g?n.downloading:n.redirecting;let r;e[23]!==w||e[24]!==R?(r=o.jsx(y,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:o.jsx(v,{size:"medium",heading:w,headingAs:"h1",message:R})}),e[23]=w,e[24]=R,e[25]=r):r=e[25];let d;e[26]!==a?(d=o.jsx(b,{language:a}),e[26]=a,e[27]=d):d=e[27];let p;return e[28]!==t||e[29]!==r||e[30]!==d?(p=o.jsxs(o.Fragment,{children:[t,r,d]}),e[28]=t,e[29]=r,e[30]=d,e[31]=p):p=e[31],p}V.displayName="Route.Redirect";function z(){const e=k.lazy(()=>L(()=>import("./error-BC2Hv5fG.js"),__vite__mapDeps([0,1,2,3,4])).then(E=>({default:E.Component})));return o.jsx(k.Suspense,{fallback:o.jsx("h1",{children:"Error."}),children:o.jsx(e,{})})}z.displayName="Error.Redirect";export{V as Component,z as ErrorBoundary}; +const __vite__fileDeps=["assets/error-Cp8tnuu0.js","assets/index-C3XQCywa.js","assets/index-dyNilIOc.css","assets/RenderTopNavBar-D2dLV4g_.js","assets/index-BfwAAv1n.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +import{u as D,a as B,r as k,_ as L,j as o,V as y}from"./index-C3XQCywa.js";import{c as N,a as P,g as S,T as j,L as T,R as A,b}from"./RenderTopNavBar-D2dLV4g_.js";import{B as v}from"./index-BfwAAv1n.js";const $={downloading:{EN:"Downloading",ES_LA:"Descargando",PT_BR:"Baixando",DE:"Herunterladen"},redirecting:{EN:"Redirecting",ES_LA:"Redirigiendo",PT_BR:"Redirecionando",DE:"Weiterleitung"},youre_downloading_the:{EN:"You're downloading the",ES_LA:"¡Estás descargando el paquete de cumplimiento de",PT_BR:"Você está baixando o pacote de conformidade do",DE:"Sie laden das"},youre_downloading_a:{EN:"You're downloading a document from the",ES_LA:"Estás descargando un documento del paquete de cumplimiento de",PT_BR:"Você está baixando um documento do pacote de conformidade do",DE:"Sie laden ein Dokument aus dem"},compliance_package:{EN:"compliance package!",ES_LA:"!",PT_BR:"!",DE:"-Compliance-Paket herunter!"},didnt_work:{EN:"Didn't work?",ES_LA:"¿No funcionó?",PT_BR:"Não funcionou?",DE:"Hat nicht funktioniert?"},try_again:{EN:"Try again",ES_LA:"Inténtalo de nuevo",PT_BR:"Tente novamente",DE:"Versuchen Sie es erneut"},redirecting_to:{EN:"Redirecting you to",ES_LA:"Redirigiéndote a",PT_BR:"Redirecionando você para",DE:"Weiterleitung zu"}};function V(){const e=N.c(32),{path:E,brand:s,url:i}=D(),h=B().language;let l,a;e[0]!==h?(a=P(h),l=S($,a),e[0]=h,e[1]=l,e[2]=a):(l=e[1],a=e[2]);const n=l;let c;e[3]!==i?(c=i.split("?"),e[3]=i,e[4]=c):c=e[4];const x=c[0];let u;e[5]!==i?(u=i.slice(-4),e[5]=i,e[6]=u):u=e[6];const f=u,g=E.slice(-3)==="/dl";let _;e[7]!==i?(_=()=>{window.location.href=i},e[7]=i,e[8]=_):_=e[8],k.useEffect(_);let m;e[9]!==g||e[10]!==f||e[11]!==n.youre_downloading_the||e[12]!==n.compliance_package||e[13]!==n.youre_downloading_a||e[14]!==n.didnt_work||e[15]!==n.try_again||e[16]!==n.redirecting_to||e[17]!==s||e[18]!==i||e[19]!==x?(m=()=>g?o.jsxs(y,{as:"div",children:[o.jsx(j,{children:f===".zip"?`${n.youre_downloading_the} ${s} ${n.compliance_package}`:`${n.youre_downloading_a} ${s} ${n.compliance_package}`}),o.jsx("br",{}),o.jsxs(j,{size:"x-small",children:[n.didnt_work," ",o.jsx(T,{href:i,children:n.try_again})]})]}):o.jsx(y,{as:"div",children:o.jsxs(j,{children:[n.redirecting_to," ",o.jsx(T,{href:i,children:x})]})}),e[9]=g,e[10]=f,e[11]=n.youre_downloading_the,e[12]=n.compliance_package,e[13]=n.youre_downloading_a,e[14]=n.didnt_work,e[15]=n.try_again,e[16]=n.redirecting_to,e[17]=s,e[18]=i,e[19]=x,e[20]=m):m=e[20];const R=m;let t;e[21]!==a?(t=o.jsx(A,{language:a}),e[21]=a,e[22]=t):t=e[22];const w=g?n.downloading:n.redirecting;let r;e[23]!==w||e[24]!==R?(r=o.jsx(y,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:o.jsx(v,{size:"medium",heading:w,headingAs:"h1",message:R})}),e[23]=w,e[24]=R,e[25]=r):r=e[25];let d;e[26]!==a?(d=o.jsx(b,{language:a}),e[26]=a,e[27]=d):d=e[27];let p;return e[28]!==t||e[29]!==r||e[30]!==d?(p=o.jsxs(o.Fragment,{children:[t,r,d]}),e[28]=t,e[29]=r,e[30]=d,e[31]=p):p=e[31],p}V.displayName="Route.Redirect";function z(){const e=k.lazy(()=>L(()=>import("./error-Cp8tnuu0.js"),__vite__mapDeps([0,1,2,3,4])).then(E=>({default:E.Component})));return o.jsx(k.Suspense,{fallback:o.jsx("h1",{children:"Error."}),children:o.jsx(e,{})})}z.displayName="Error.Redirect";export{V as Component,z as ErrorBoundary}; diff --git a/assets/releases-wyg0zbfr.js b/assets/releases-BXrmG0c_.js similarity index 82% rename from assets/releases-wyg0zbfr.js rename to assets/releases-BXrmG0c_.js index d03bb84..4c1a700 100644 --- a/assets/releases-wyg0zbfr.js +++ b/assets/releases-BXrmG0c_.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/error-BC2Hv5fG.js","assets/index-DCzcanBz.js","assets/index-dyNilIOc.css","assets/RenderTopNavBar-CILoEAmM.js","assets/index-De3kK20J.js"])))=>i.map(i=>d[i]); -import{g as f,a as P,r as x,j as t,_ as k,V as $}from"./index-DCzcanBz.js";import{c as L,a as A,g as I,H as N,R as V,L as v,b as D}from"./RenderTopNavBar-CILoEAmM.js";import{r as B,a as G,b as O,M as C,c as U,d as H}from"./Mdtoui-B81NOHR9.js";import{I as M}from"./IconRssLine-BqBzMn_a.js";import"./index-C5yFM9ST.js";const W={releases:{EN:"Releases",ES_LA:"Versiones",PT_BR:"Lançamentos",DE:"Veröffentlichungen"},loading:{EN:"Loading...",ES_LA:"Cargando...",PT_BR:"Carregando...",DE:"Wird geladen..."},subscribe:{EN:"Subscribe",ES_LA:"Suscríbete",PT_BR:"Inscreva-se",DE:"Abonnieren Sie"}};var R={VITE_APP_VERSION:"4.3.1+1720017714",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};async function z(e,r){const n=`${f.api}/repos/${e}/${r}/releases`;try{const a=await(await fetch(n,{method:"GET",headers:{Accept:"application/vnd.github.v3+json",Authorization:R!=null&&R.VITE_GITHUB_TOKEN?`token ${R.VITE_GITHUB_TOKEN}`:""}})).json();return a.length>3?`${a.slice(0,3).map(w).join(`\r +const __vite__fileDeps=["assets/error-Cp8tnuu0.js","assets/index-C3XQCywa.js","assets/index-dyNilIOc.css","assets/RenderTopNavBar-D2dLV4g_.js","assets/index-BfwAAv1n.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +import{g as f,a as P,r as x,j as t,_ as k,V as $}from"./index-C3XQCywa.js";import{c as L,a as A,g as I,H as N,R as V,L as v,b as D}from"./RenderTopNavBar-D2dLV4g_.js";import{r as B,a as G,b as O,M as C,c as U,d as H}from"./Mdtoui-yQNCxW-t.js";import{I as M}from"./IconRssLine-Cd1K2zy4.js";import"./index-CuKaSjpf.js";const W={releases:{EN:"Releases",ES_LA:"Versiones",PT_BR:"Lançamentos",DE:"Veröffentlichungen"},loading:{EN:"Loading...",ES_LA:"Cargando...",PT_BR:"Carregando...",DE:"Wird geladen..."},subscribe:{EN:"Subscribe",ES_LA:"Suscríbete",PT_BR:"Inscreva-se",DE:"Abonnieren Sie"}};var R={VITE_APP_VERSION:"4.3.1+1720135115",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};async function z(e,r){const n=`${f.api}/repos/${e}/${r}/releases`;try{const a=await(await fetch(n,{method:"GET",headers:{Accept:"application/vnd.github.v3+json",Authorization:R!=null&&R.VITE_GITHUB_TOKEN?`token ${R.VITE_GITHUB_TOKEN}`:""}})).json();return a.length>3?`${a.slice(0,3).map(w).join(`\r \r `).slice(0,-3)}---\r \r @@ -13,4 +13,4 @@ import{g as f,a as P,r as x,j as t,_ as k,V as $}from"./index-DCzcanBz.js";impor ${e.body}\r ----`}async function F(){const e=f.owner,r=f.repo;return z(e,r)}function K(){const e=L.c(32),r=P().language;let n,s,a,l;e[0]!==r?(a=A(r),s=I(W,a),l=`https://github.com/${f.owner}/${f.repo}/releases.atom`,n=a.toUpperCase(),e[0]=r,e[1]=n,e[2]=s,e[3]=a,e[4]=l):(n=e[1],s=e[2],a=e[3],l=e[4]);const y=`.markdown .lang { display: none; } .markdown .lang.${n} { display: inherit; }`,[j,T]=x.useState(`${s.loading}`);let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{F().then(S=>{T(S)}).catch(S=>console.error(S))},e[5]=p):p=e[5],x.useEffect(p);let o;e[6]!==a?(o=t.jsx(V,{language:a}),e[6]=a,e[7]=o):o=e[7];let i;e[8]!==s.subscribe?(i=t.jsx(M,{size:"small",color:"warning",title:s.subscribe}),e[8]=s.subscribe,e[9]=i):i=e[9];let c;e[10]!==l||e[11]!==i?(c=t.jsx(v,{href:l,children:i}),e[10]=l,e[11]=i,e[12]=c):c=e[12];let m;e[13]!==c||e[14]!==s.releases?(m=t.jsxs(N,{level:"h1",children:[c," ",s.releases]}),e[13]=c,e[14]=s.releases,e[15]=m):m=e[15];let d;e[16]!==y?(d=t.jsx("style",{children:y}),e[16]=y,e[17]=d):d=e[17];let E;e[18]===Symbol.for("react.memo_cache_sentinel")?(E=[B,G],e[18]=E):E=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=[O],e[19]=b):b=e[19];let u;e[20]!==j?(u=t.jsx($,{as:"div",className:"markdown",children:t.jsx(C,{remarkPlugins:E,rehypePlugins:b,allowedElements:U,components:H,children:j})}),e[20]=j,e[21]=u):u=e[21];let h;e[22]!==m||e[23]!==d||e[24]!==u?(h=t.jsxs($,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[m,d,u]}),e[22]=m,e[23]=d,e[24]=u,e[25]=h):h=e[25];let g;e[26]!==a?(g=t.jsx(D,{language:a}),e[26]=a,e[27]=g):g=e[27];let _;return e[28]!==o||e[29]!==h||e[30]!==g?(_=t.jsxs(t.Fragment,{children:[o,h,g]}),e[28]=o,e[29]=h,e[30]=g,e[31]=_):_=e[31],_}K.displayName="Route.Releases";function q(){const e=x.lazy(()=>k(()=>import("./error-BC2Hv5fG.js"),__vite__mapDeps([0,1,2,3,4])).then(r=>({default:r.Component})));return t.jsx(x.Suspense,{fallback:t.jsx("h1",{children:"Error."}),children:t.jsx(e,{})})}q.displayName="Error.Releases";export{K as Component,q as ErrorBoundary}; +---`}async function F(){const e=f.owner,r=f.repo;return z(e,r)}function K(){const e=L.c(32),r=P().language;let n,s,a,l;e[0]!==r?(a=A(r),s=I(W,a),l=`https://github.com/${f.owner}/${f.repo}/releases.atom`,n=a.toUpperCase(),e[0]=r,e[1]=n,e[2]=s,e[3]=a,e[4]=l):(n=e[1],s=e[2],a=e[3],l=e[4]);const y=`.markdown .lang { display: none; } .markdown .lang.${n} { display: inherit; }`,[j,T]=x.useState(`${s.loading}`);let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{F().then(S=>{T(S)}).catch(S=>console.error(S))},e[5]=p):p=e[5],x.useEffect(p);let o;e[6]!==a?(o=t.jsx(V,{language:a}),e[6]=a,e[7]=o):o=e[7];let i;e[8]!==s.subscribe?(i=t.jsx(M,{size:"small",color:"warning",title:s.subscribe}),e[8]=s.subscribe,e[9]=i):i=e[9];let c;e[10]!==l||e[11]!==i?(c=t.jsx(v,{href:l,children:i}),e[10]=l,e[11]=i,e[12]=c):c=e[12];let m;e[13]!==c||e[14]!==s.releases?(m=t.jsxs(N,{level:"h1",children:[c," ",s.releases]}),e[13]=c,e[14]=s.releases,e[15]=m):m=e[15];let d;e[16]!==y?(d=t.jsx("style",{children:y}),e[16]=y,e[17]=d):d=e[17];let E;e[18]===Symbol.for("react.memo_cache_sentinel")?(E=[B,G],e[18]=E):E=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=[O],e[19]=b):b=e[19];let u;e[20]!==j?(u=t.jsx($,{as:"div",className:"markdown",children:t.jsx(C,{remarkPlugins:E,rehypePlugins:b,allowedElements:U,components:H,children:j})}),e[20]=j,e[21]=u):u=e[21];let h;e[22]!==m||e[23]!==d||e[24]!==u?(h=t.jsxs($,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[m,d,u]}),e[22]=m,e[23]=d,e[24]=u,e[25]=h):h=e[25];let g;e[26]!==a?(g=t.jsx(D,{language:a}),e[26]=a,e[27]=g):g=e[27];let _;return e[28]!==o||e[29]!==h||e[30]!==g?(_=t.jsxs(t.Fragment,{children:[o,h,g]}),e[28]=o,e[29]=h,e[30]=g,e[31]=_):_=e[31],_}K.displayName="Route.Releases";function q(){const e=x.lazy(()=>k(()=>import("./error-Cp8tnuu0.js"),__vite__mapDeps([0,1,2,3,4])).then(r=>({default:r.Component})));return t.jsx(x.Suspense,{fallback:t.jsx("h1",{children:"Error."}),children:t.jsx(e,{})})}q.displayName="Error.Releases";export{K as Component,q as ErrorBoundary}; diff --git a/index.html b/index.html index 78350ed..521332f 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ - + @@ -16,7 +16,7 @@ Instructure Compliance Packages - +