@malloy-publisher/sdk 0.0.83 → 0.0.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var w0=Object.create;var Ol=Object.defineProperty;var P0=Object.getOwnPropertyDescriptor;var N0=Object.getOwnPropertyNames;var R0=Object.getPrototypeOf,L0=Object.prototype.hasOwnProperty;var O0=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of N0(t))!L0.call(e,i)&&i!==n&&Ol(e,i,{get:()=>t[i],enumerable:!(r=P0(t,i))||r.enumerable});return e};var Fl=(e,t,n)=>(n=e!=null?w0(R0(e)):{},O0(t||!e||!e.__esModule?Ol(n,"default",{value:e,enumerable:!0}):n,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),N=require("react"),We=require("@mui/system"),F0=require("@emotion/styled"),M0=require("@emotion/react"),x=require("@mui/material"),Ve=require("axios"),pu=require("@tanstack/react-query"),mu=require("markdown-to-jsx"),Ps=require("@mui/icons-material"),gh=require("@react-spring/web"),ns=require("react-dom"),bh=require("react-router-dom");function B0(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const $=B0(N),Ml=e=>e,j0=()=>{let e=Ml;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Ml}}},H0=j0();function tr(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function tn(e){if(typeof e!="string")throw new Error(tr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function sa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ma={exports:{}},Ba,Bl;function U0(){if(Bl)return Ba;Bl=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ba=e,Ba}var ja,jl;function z0(){if(jl)return ja;jl=1;var e=U0();function t(){}function n(){}return n.resetWarningCache=t,ja=function(){function r(a,o,u,l,d,c){if(c!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},ja}var Hl;function $0(){return Hl||(Hl=1,Ma.exports=z0()()),Ma.exports}var q0=$0();const Ul=sa(q0);function Eh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Eh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ye(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Eh(e))&&(r&&(r+=" "),r+=t);return r}function Hi(e,t,n=void 0){const r={};for(const i in e){const s=e[i];let a="",o=!0;for(let u=0;u<s.length;u+=1){const l=s[u];l&&(a+=(o===!0?"":" ")+t(l),o=!1,n&&n[l]&&(a+=" "+n[l]))}r[i]=a}return r}var Ha={exports:{}},Pe={};/**
1
+ "use strict";var P0=Object.create;var Ol=Object.defineProperty;var R0=Object.getOwnPropertyDescriptor;var L0=Object.getOwnPropertyNames;var O0=Object.getPrototypeOf,F0=Object.prototype.hasOwnProperty;var M0=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of L0(t))!F0.call(e,i)&&i!==n&&Ol(e,i,{get:()=>t[i],enumerable:!(r=R0(t,i))||r.enumerable});return e};var Fl=(e,t,n)=>(n=e!=null?P0(O0(e)):{},M0(t||!e||!e.__esModule?Ol(n,"default",{value:e,enumerable:!0}):n,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),P=require("react"),We=require("@mui/system"),B0=require("@emotion/styled"),j0=require("@emotion/react"),x=require("@mui/material"),Ve=require("axios"),pu=require("@tanstack/react-query"),mu=require("markdown-to-jsx"),Ns=require("@mui/icons-material"),gh=require("@react-spring/web"),ns=require("react-dom"),bh=require("react-router-dom");function H0(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const $=H0(P),Ml=e=>e,U0=()=>{let e=Ml;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Ml}}},z0=U0();function tr(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function tn(e){if(typeof e!="string")throw new Error(tr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function sa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ma={exports:{}},Ba,Bl;function $0(){if(Bl)return Ba;Bl=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ba=e,Ba}var ja,jl;function q0(){if(jl)return ja;jl=1;var e=$0();function t(){}function n(){}return n.resetWarningCache=t,ja=function(){function r(a,o,u,l,d,c){if(c!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},ja}var Hl;function V0(){return Hl||(Hl=1,Ma.exports=q0()()),Ma.exports}var W0=V0();const Ul=sa(W0);function Eh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Eh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ye(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Eh(e))&&(r&&(r+=" "),r+=t);return r}function Hi(e,t,n=void 0){const r={};for(const i in e){const s=e[i];let a="",o=!0;for(let u=0;u<s.length;u+=1){const l=s[u];l&&(a+=(o===!0?"":" ")+t(l),o=!1,n&&n[l]&&(a+=" "+n[l]))}r[i]=a}return r}var Ha={exports:{}},Ne={};/**
2
2
  * @license React
3
3
  * react-is.production.js
4
4
  *
@@ -6,16 +6,16 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var zl;function V0(){if(zl)return Pe;zl=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function g(b){if(typeof b=="object"&&b!==null){var T=b.$$typeof;switch(T){case e:switch(b=b.type,b){case n:case i:case r:case u:case l:case m:return b;default:switch(b=b&&b.$$typeof,b){case a:case o:case c:case d:return b;case s:return b;default:return T}}case t:return T}}}return Pe.ContextConsumer=s,Pe.ContextProvider=a,Pe.Element=e,Pe.ForwardRef=o,Pe.Fragment=n,Pe.Lazy=c,Pe.Memo=d,Pe.Portal=t,Pe.Profiler=i,Pe.StrictMode=r,Pe.Suspense=u,Pe.SuspenseList=l,Pe.isContextConsumer=function(b){return g(b)===s},Pe.isContextProvider=function(b){return g(b)===a},Pe.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Pe.isForwardRef=function(b){return g(b)===o},Pe.isFragment=function(b){return g(b)===n},Pe.isLazy=function(b){return g(b)===c},Pe.isMemo=function(b){return g(b)===d},Pe.isPortal=function(b){return g(b)===t},Pe.isProfiler=function(b){return g(b)===i},Pe.isStrictMode=function(b){return g(b)===r},Pe.isSuspense=function(b){return g(b)===u},Pe.isSuspenseList=function(b){return g(b)===l},Pe.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===i||b===r||b===u||b===l||typeof b=="object"&&b!==null&&(b.$$typeof===c||b.$$typeof===d||b.$$typeof===a||b.$$typeof===s||b.$$typeof===o||b.$$typeof===p||b.getModuleId!==void 0)},Pe.typeOf=g,Pe}var $l;function W0(){return $l||($l=1,Ha.exports=V0()),Ha.exports}var xh=W0();function xn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function yh(e){if($.isValidElement(e)||xh.isValidElementType(e)||!xn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=yh(e[n])}),t}function jt(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return xn(e)&&xn(t)&&Object.keys(t).forEach(i=>{$.isValidElement(t[i])||xh.isValidElementType(t[i])?r[i]=t[i]:xn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&xn(e[i])?r[i]=jt(e[i],t[i],n):n.clone?r[i]=xn(t[i])?yh(t[i]):t[i]:r[i]=t[i]}),r}function mi(e,t){return t?jt(e,t,{clone:!1}):e}function G0(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{const s=/min-width:\s*([0-9.]+)/;return+(r.match(s)?.[1]||0)-+(i.match(s)?.[1]||0)});return n.length?n.reduce((r,i)=>{const s=t[i];return delete r[i],r[i]=s,r},{...t}):t}function Y0(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function K0(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,i]=n,s=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(s)}function Q0(e){const t=(s,a)=>s.replace("@media",a?`@container ${a}`:"@container");function n(s,a){s.up=(...o)=>t(e.breakpoints.up(...o),a),s.down=(...o)=>t(e.breakpoints.down(...o),a),s.between=(...o)=>t(e.breakpoints.between(...o),a),s.only=(...o)=>t(e.breakpoints.only(...o),a),s.not=(...o)=>{const u=t(e.breakpoints.not(...o),a);return u.includes("not all and")?u.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):u}}const r={},i=s=>(n(r,s),r);return n(i),{...e,containerQueries:i}}const aa={xs:0,sm:600,md:900,lg:1200,xl:1536},ql={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${aa[e]}px)`},X0={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:aa[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function kn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const s=r.breakpoints||ql;return t.reduce((a,o,u)=>(a[s.up(s.keys[u])]=n(t[u]),a),{})}if(typeof t=="object"){const s=r.breakpoints||ql;return Object.keys(t).reduce((a,o)=>{if(Y0(s.keys,o)){const u=K0(r.containerQueries?r:X0,o);u&&(a[u]=n(t[o],o))}else if(Object.keys(s.values||aa).includes(o)){const u=s.up(o);a[u]=n(t[o],o)}else{const u=o;a[u]=t[u]}return a},{})}return n(t)}function Z0(e={}){return e.keys?.reduce((n,r)=>{const i=e.up(r);return n[i]={},n},{})||{}}function J0(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function oa(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,s)=>i&&i[s]?i[s]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Ns(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=oa(e,n)||r,t&&(i=t(i,r,e)),i}function Qe(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,s=a=>{if(a[t]==null)return null;const o=a[t],u=a.theme,l=oa(u,r)||{};return kn(a,o,c=>{let m=Ns(l,i,c);return c===m&&typeof c=="string"&&(m=Ns(l,i,`${t}${c==="default"?"":tn(c)}`,c)),n===!1?m:{[n]:m}})};return s.propTypes={},s.filterProps=[t],s}function e1(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const t1={m:"margin",p:"padding"},n1={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Vl={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},r1=e1(e=>{if(e.length>2)if(Vl[e])e=Vl[e];else return[e];const[t,n]=e.split(""),r=t1[t],i=n1[n]||"";return Array.isArray(i)?i.map(s=>r+s):[r+i]}),gu=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],bu=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...gu,...bu];function Ui(e,t,n,r){const i=oa(e,t,!0)??n;return typeof i=="number"||typeof i=="string"?s=>typeof s=="string"?s:typeof i=="string"?i.startsWith("var(")&&s===0?0:i.startsWith("var(")&&s===1?i:`calc(${s} * ${i})`:i*s:Array.isArray(i)?s=>{if(typeof s=="string")return s;const a=Math.abs(s),o=i[a];return s>=0?o:typeof o=="number"?-o:typeof o=="string"&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:typeof i=="function"?i:()=>{}}function Eu(e){return Ui(e,"spacing",8)}function zi(e,t){return typeof t=="string"||t==null?t:e(t)}function i1(e,t){return n=>e.reduce((r,i)=>(r[i]=zi(t,n),r),{})}function s1(e,t,n,r){if(!t.includes(n))return null;const i=r1(n),s=i1(i,r),a=e[n];return kn(e,a,s)}function Th(e,t){const n=Eu(e.theme);return Object.keys(e).map(r=>s1(e,t,r,n)).reduce(mi,{})}function $e(e){return Th(e,gu)}$e.propTypes={};$e.filterProps=gu;function qe(e){return Th(e,bu)}qe.propTypes={};qe.filterProps=bu;function ua(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(s=>{r[s]=i}),r),{}),n=r=>Object.keys(r).reduce((i,s)=>t[s]?mi(i,t[s](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Gt(e){return typeof e!="number"?e:`${e}px solid`}function Xt(e,t){return Qe({prop:e,themeKey:"borders",transform:t})}const a1=Xt("border",Gt),o1=Xt("borderTop",Gt),u1=Xt("borderRight",Gt),l1=Xt("borderBottom",Gt),c1=Xt("borderLeft",Gt),d1=Xt("borderColor"),h1=Xt("borderTopColor"),f1=Xt("borderRightColor"),p1=Xt("borderBottomColor"),m1=Xt("borderLeftColor"),g1=Xt("outline",Gt),b1=Xt("outlineColor"),la=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ui(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:zi(t,r)});return kn(e,e.borderRadius,n)}return null};la.propTypes={};la.filterProps=["borderRadius"];ua(a1,o1,u1,l1,c1,d1,h1,f1,p1,m1,la,g1,b1);const ca=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({gap:zi(t,r)});return kn(e,e.gap,n)}return null};ca.propTypes={};ca.filterProps=["gap"];const da=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({columnGap:zi(t,r)});return kn(e,e.columnGap,n)}return null};da.propTypes={};da.filterProps=["columnGap"];const ha=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({rowGap:zi(t,r)});return kn(e,e.rowGap,n)}return null};ha.propTypes={};ha.filterProps=["rowGap"];const E1=Qe({prop:"gridColumn"}),x1=Qe({prop:"gridRow"}),y1=Qe({prop:"gridAutoFlow"}),T1=Qe({prop:"gridAutoColumns"}),C1=Qe({prop:"gridAutoRows"}),S1=Qe({prop:"gridTemplateColumns"}),A1=Qe({prop:"gridTemplateRows"}),k1=Qe({prop:"gridTemplateAreas"}),I1=Qe({prop:"gridArea"});ua(ca,da,ha,E1,x1,y1,T1,C1,S1,A1,k1,I1);function Ar(e,t){return t==="grey"?t:e}const _1=Qe({prop:"color",themeKey:"palette",transform:Ar}),v1=Qe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ar}),D1=Qe({prop:"backgroundColor",themeKey:"palette",transform:Ar});ua(_1,v1,D1);function Bt(e){return e<=1&&e!==0?`${e*100}%`:e}const w1=Qe({prop:"width",transform:Bt}),xu=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const r=e.theme?.breakpoints?.values?.[n]||aa[n];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Bt(n)}};return kn(e,e.maxWidth,t)}return null};xu.filterProps=["maxWidth"];const P1=Qe({prop:"minWidth",transform:Bt}),N1=Qe({prop:"height",transform:Bt}),R1=Qe({prop:"maxHeight",transform:Bt}),L1=Qe({prop:"minHeight",transform:Bt});Qe({prop:"size",cssProperty:"width",transform:Bt});Qe({prop:"size",cssProperty:"height",transform:Bt});const O1=Qe({prop:"boxSizing"});ua(w1,xu,P1,N1,R1,L1,O1);const fa={border:{themeKey:"borders",transform:Gt},borderTop:{themeKey:"borders",transform:Gt},borderRight:{themeKey:"borders",transform:Gt},borderBottom:{themeKey:"borders",transform:Gt},borderLeft:{themeKey:"borders",transform:Gt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Gt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:la},color:{themeKey:"palette",transform:Ar},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ar},backgroundColor:{themeKey:"palette",transform:Ar},p:{style:qe},pt:{style:qe},pr:{style:qe},pb:{style:qe},pl:{style:qe},px:{style:qe},py:{style:qe},padding:{style:qe},paddingTop:{style:qe},paddingRight:{style:qe},paddingBottom:{style:qe},paddingLeft:{style:qe},paddingX:{style:qe},paddingY:{style:qe},paddingInline:{style:qe},paddingInlineStart:{style:qe},paddingInlineEnd:{style:qe},paddingBlock:{style:qe},paddingBlockStart:{style:qe},paddingBlockEnd:{style:qe},m:{style:$e},mt:{style:$e},mr:{style:$e},mb:{style:$e},ml:{style:$e},mx:{style:$e},my:{style:$e},margin:{style:$e},marginTop:{style:$e},marginRight:{style:$e},marginBottom:{style:$e},marginLeft:{style:$e},marginX:{style:$e},marginY:{style:$e},marginInline:{style:$e},marginInlineStart:{style:$e},marginInlineEnd:{style:$e},marginBlock:{style:$e},marginBlockStart:{style:$e},marginBlockEnd:{style:$e},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:ca},rowGap:{style:ha},columnGap:{style:da},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Bt},maxWidth:{style:xu},minWidth:{transform:Bt},height:{transform:Bt},maxHeight:{transform:Bt},minHeight:{transform:Bt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function F1(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function M1(e,t){return typeof e=="function"?e(t):e}function B1(){function e(n,r,i,s){const a={[n]:r,theme:i},o=s[n];if(!o)return{[n]:r};const{cssProperty:u=n,themeKey:l,transform:d,style:c}=o;if(r==null)return null;if(l==="typography"&&r==="inherit")return{[n]:r};const m=oa(i,l)||{};return c?c(a):kn(a,r,g=>{let b=Ns(m,d,g);return g===b&&typeof g=="string"&&(b=Ns(m,d,`${n}${g==="default"?"":tn(g)}`,g)),u===!1?b:{[u]:b}})}function t(n){const{sx:r,theme:i={}}=n||{};if(!r)return null;const s=i.unstable_sxConfig??fa;function a(o){let u=o;if(typeof o=="function")u=o(i);else if(typeof o!="object")return o;if(!u)return null;const l=Z0(i.breakpoints),d=Object.keys(l);let c=l;return Object.keys(u).forEach(m=>{const p=M1(u[m],i);if(p!=null)if(typeof p=="object")if(s[m])c=mi(c,e(m,p,i,s));else{const g=kn({theme:i},p,b=>({[m]:b}));F1(g,p)?c[m]=t({sx:p,theme:i}):c=mi(c,g)}else c=mi(c,e(m,p,i,s))}),G0(i,J0(d,c))}return Array.isArray(r)?r.map(a):a(r)}return t}const Pr=B1();Pr.filterProps=["sx"];function j1(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function yu(e,t=0,n=1){return j1(e,t,n)}function H1(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Bn(e){if(e.type)return e;if(e.charAt(0)==="#")return Bn(H1(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(tr(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(tr(10,i))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:i}}const U1=e=>{const t=Bn(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},ci=(e,t)=>{try{return U1(e)}catch{return e}};function pa(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((i,s)=>s<3?parseInt(i,10):i):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Ch(e){e=Bn(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),a=(l,d=(l+n/30)%12)=>i-s*Math.max(Math.min(d-3,9-d,1),-1);let o="rgb";const u=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(o+="a",u.push(t[3])),pa({type:o,values:u})}function Do(e){e=Bn(e);let t=e.type==="hsl"||e.type==="hsla"?Bn(Ch(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function z1(e,t){const n=Do(e),r=Do(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function wo(e,t){return e=Bn(e),t=yu(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,pa(e)}function rs(e,t,n){try{return wo(e,t)}catch{return e}}function Tu(e,t){if(e=Bn(e),t=yu(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return pa(e)}function Ne(e,t,n){try{return Tu(e,t)}catch{return e}}function Cu(e,t){if(e=Bn(e),t=yu(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return pa(e)}function Re(e,t,n){try{return Cu(e,t)}catch{return e}}function $1(e,t=.15){return Do(e)>.5?Tu(e,t):Cu(e,t)}function is(e,t,n){try{return $1(e,t)}catch{return e}}const vi={black:"#000",white:"#fff"},q1={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},cr={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},dr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},ei={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},hr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},fr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},pr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Sh(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:vi.white,default:vi.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const V1=Sh();function Ah(){return{text:{primary:vi.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:vi.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Wl=Ah();function Gl(e,t,n,r){const i=r.light||r,s=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Cu(e.main,i):t==="dark"&&(e.dark=Tu(e.main,s)))}function W1(e="light"){return e==="dark"?{main:hr[200],light:hr[50],dark:hr[400]}:{main:hr[700],light:hr[400],dark:hr[800]}}function G1(e="light"){return e==="dark"?{main:cr[200],light:cr[50],dark:cr[400]}:{main:cr[500],light:cr[300],dark:cr[700]}}function Y1(e="light"){return e==="dark"?{main:dr[500],light:dr[300],dark:dr[700]}:{main:dr[700],light:dr[400],dark:dr[800]}}function K1(e="light"){return e==="dark"?{main:fr[400],light:fr[300],dark:fr[700]}:{main:fr[700],light:fr[500],dark:fr[900]}}function Q1(e="light"){return e==="dark"?{main:pr[400],light:pr[300],dark:pr[700]}:{main:pr[800],light:pr[500],dark:pr[900]}}function X1(e="light"){return e==="dark"?{main:ei[400],light:ei[300],dark:ei[700]}:{main:"#ed6c02",light:ei[500],dark:ei[900]}}function Su(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...i}=e,s=e.primary||W1(t),a=e.secondary||G1(t),o=e.error||Y1(t),u=e.info||K1(t),l=e.success||Q1(t),d=e.warning||X1(t);function c(b){return z1(b,Wl.text.primary)>=n?Wl.text.primary:V1.text.primary}const m=({color:b,name:T,mainShade:y=500,lightShade:C=300,darkShade:S=700})=>{if(b={...b},!b.main&&b[y]&&(b.main=b[y]),!b.hasOwnProperty("main"))throw new Error(tr(11,T?` (${T})`:"",y));if(typeof b.main!="string")throw new Error(tr(12,T?` (${T})`:"",JSON.stringify(b.main)));return Gl(b,"light",C,r),Gl(b,"dark",S,r),b.contrastText||(b.contrastText=c(b.main)),b};let p;return t==="light"?p=Sh():t==="dark"&&(p=Ah()),jt({common:{...vi},mode:t,primary:m({color:s,name:"primary"}),secondary:m({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:o,name:"error"}),warning:m({color:d,name:"warning"}),info:m({color:u,name:"info"}),success:m({color:l,name:"success"}),grey:q1,contrastThreshold:n,getContrastText:c,augmentColor:m,tonalOffset:r,...p},i)}function Z1(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&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 J1={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,scale: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};function eg(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var tg=/[A-Z]|^ms/g,ng=/_EMO_([^_]+?)_([^]*?)_EMO_/g,kh=function(t){return t.charCodeAt(1)===45},Yl=function(t){return t!=null&&typeof t!="boolean"},Ua=eg(function(e){return kh(e)?e:e.replace(tg,"-$&").toLowerCase()}),Kl=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(ng,function(r,i,s){return On={name:i,styles:s,next:On},i})}return J1[t]!==1&&!kh(t)&&typeof n=="number"&&n!==0?n+"px":n};function Rs(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return On={name:i.name,styles:i.styles,next:On},i.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)On={name:a.name,styles:a.styles,next:On},a=a.next;var o=s.styles+";";return o}return rg(e,t,n)}}var u=n;return u}function rg(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Rs(e,t,n[i])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var o=a;Yl(o)&&(r+=Ua(s)+":"+Kl(s,o)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var u=0;u<a.length;u++)Yl(a[u])&&(r+=Ua(s)+":"+Kl(s,a[u])+";");else{var l=Rs(e,t,a);switch(s){case"animation":case"animationName":{r+=Ua(s)+":"+l+";";break}default:r+=s+"{"+l+"}"}}}return r}var Ql=/label:\s*([^\s;{]+)\s*(;|$)/g,On;function ig(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";On=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,i+=Rs(n,t,s);else{var a=s;i+=a[0]}for(var o=1;o<e.length;o++)if(i+=Rs(n,t,e[o]),r){var u=s;i+=u[o]}Ql.lastIndex=0;for(var l="",d;(d=Ql.exec(i))!==null;)l+="-"+d[1];var c=Z1(i)+l;return{name:c,styles:i,next:On}}function sg(e,t){return F0(e,t)}function ag(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Xl=[];function Zl(e){return Xl[0]=e,ig(Xl)}const og=typeof window<"u"?$.useLayoutEffect:$.useEffect;function ug(e){return Object.keys(e).length===0}function lg(e=null){const t=$.useContext(M0.ThemeContext);return!t||ug(t)?e:t}const cg=$.createContext(),dg=()=>$.useContext(cg)??!1;function Ls(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]={...e[i],...n[i]};else if(i==="componentsProps"||i==="slotProps"){const s=e[i],a=t[i];if(!a)n[i]=s||{};else if(!s)n[i]=a;else{n[i]={...a};for(const o in s)if(Object.prototype.hasOwnProperty.call(s,o)){const u=o;n[i][u]=Ls(s[u],a[u])}}}else n[i]===void 0&&(n[i]=e[i])}return n}const hg=$.createContext(void 0);function fg(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?Ls(i.defaultProps,r):!i.styleOverrides&&!i.variants?Ls(i,r):r}function pg({props:e,name:t}){const n=$.useContext(hg);return fg({props:e,name:t,theme:{components:n}})}const Jl=(e,t,n,r=[])=>{let i=e;t.forEach((s,a)=>{a===t.length-1?Array.isArray(i)?i[Number(s)]=n:i&&typeof i=="object"&&(i[s]=n):i&&typeof i=="object"&&(i[s]||(i[s]=r.includes(s)?[]:{}),i=i[s])})},mg=(e,t,n)=>{function r(i,s=[],a=[]){Object.entries(i).forEach(([o,u])=>{(!n||n&&!n([...s,o]))&&u!=null&&(typeof u=="object"&&Object.keys(u).length>0?r(u,[...s,o],Array.isArray(u)?[...a,o]:a):t([...s,o],u,a))})}r(e)},gg=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function za(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},s={},a={};return mg(e,(o,u,l)=>{if((typeof u=="string"||typeof u=="number")&&(!r||!r(o,u))){const d=`--${n?`${n}-`:""}${o.join("-")}`,c=gg(o,u);Object.assign(i,{[d]:c}),Jl(s,o,`var(${d})`,l),Jl(a,o,`var(${d}, ${c})`,l)}},o=>o[0]==="vars"),{css:i,vars:s,varsWithDefaults:a}}function bg(e,t={}){const{getSelector:n=T,disableCssColorScheme:r,colorSchemeSelector:i}=t,{colorSchemes:s={},components:a,defaultColorScheme:o="light",...u}=e,{vars:l,css:d,varsWithDefaults:c}=za(u,t);let m=c;const p={},{[o]:g,...b}=s;if(Object.entries(b||{}).forEach(([S,P])=>{const{vars:D,css:w,varsWithDefaults:B}=za(P,t);m=jt(m,B),p[S]={css:w,vars:D}}),g){const{css:S,vars:P,varsWithDefaults:D}=za(g,t);m=jt(m,D),p[o]={css:S,vars:P}}function T(S,P){let D=i;if(i==="class"&&(D=".%s"),i==="data"&&(D="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(D=`[${i}="%s"]`),S){if(D==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${s[S]?.palette?.mode||S})`]:{":root":P}};if(D)return e.defaultColorScheme===S?`:root, ${D.replace("%s",String(S))}`:D.replace("%s",String(S))}return":root"}return{vars:m,generateThemeVars:()=>{let S={...l};return Object.entries(p).forEach(([,{vars:P}])=>{S=jt(S,P)}),S},generateStyleSheets:()=>{const S=[],P=e.defaultColorScheme||"light";function D(V,Q){Object.keys(Q).length&&S.push(typeof V=="string"?{[V]:{...Q}}:V)}D(n(void 0,{...d}),d);const{[P]:w,...B}=p;if(w){const{css:V}=w,Q=s[P]?.palette?.mode,E=!r&&Q?{colorScheme:Q,...V}:{...V};D(n(P,{...E}),E)}return Object.entries(B).forEach(([V,{css:Q}])=>{const E=s[V]?.palette?.mode,L=!r&&E?{colorScheme:E,...Q}:{...Q};D(n(V,{...L}),L)}),S}}}function Eg(e){const t={};return Object.entries(e).forEach(r=>{const[i,s]=r;typeof s=="object"&&(t[i]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),t}function xg(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const yg=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function Tg(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,s=yg(t),a=Object.keys(s);function o(m){return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${n})`}function u(m){return`@media (max-width:${(typeof t[m]=="number"?t[m]:m)-r/100}${n})`}function l(m,p){const g=a.indexOf(p);return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${n}) and (max-width:${(g!==-1&&typeof t[a[g]]=="number"?t[a[g]]:p)-r/100}${n})`}function d(m){return a.indexOf(m)+1<a.length?l(m,a[a.indexOf(m)+1]):o(m)}function c(m){const p=a.indexOf(m);return p===0?o(a[1]):p===a.length-1?u(a[p]):l(m,a[a.indexOf(m)+1]).replace("@media","@media not all and")}return{keys:a,values:s,up:o,down:u,between:l,only:d,not:c,unit:n,...i}}const Cg={borderRadius:4};function Sg(e=8,t=Eu({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(s=>{const a=t(s);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function Ag(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!="function")return{};let r=n.getColorSchemeSelector(e);return r==="&"?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function Au(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:s={},...a}=e,o=Tg(n),u=Sg(i);let l=jt({breakpoints:o,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:u,shape:{...Cg,...s}},a);return l=Q0(l),l.applyStyles=Ag,l=t.reduce((d,c)=>jt(d,c),l),l.unstable_sxConfig={...fa,...a?.unstable_sxConfig},l.unstable_sx=function(c){return Pr({sx:c,theme:this})},l}const kg={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Mr(e,t,n="Mui"){const r=kg[t];return r?`${n}-${r}`:`${H0.generate(e)}-${t}`}function Ig(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function _g(e){return Math.round(e*1e5)/1e5}const ec={textTransform:"uppercase"},tc='"Roboto", "Helvetica", "Arial", sans-serif';function vg(e,t){const{fontFamily:n=tc,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:o=700,htmlFontSize:u=16,allVariants:l,pxToRem:d,...c}=typeof t=="function"?t(e):t,m=r/14,p=d||(T=>`${T/u*m}rem`),g=(T,y,C,S,P)=>({fontFamily:n,fontWeight:T,fontSize:p(y),lineHeight:C,...n===tc?{letterSpacing:`${_g(S/y)}em`}:{},...P,...l}),b={h1:g(i,96,1.167,-1.5),h2:g(i,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(a,14,1.75,.4,ec),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,ec),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return jt({htmlFontSize:u,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:o,...b},c,{clone:!1})}const Dg=.2,wg=.14,Pg=.12;function He(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Dg})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${wg})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Pg})`].join(",")}const Ng=["none",He(0,2,1,-1,0,1,1,0,0,1,3,0),He(0,3,1,-2,0,2,2,0,0,1,5,0),He(0,3,3,-2,0,3,4,0,0,1,8,0),He(0,2,4,-1,0,4,5,0,0,1,10,0),He(0,3,5,-1,0,5,8,0,0,1,14,0),He(0,3,5,-1,0,6,10,0,0,1,18,0),He(0,4,5,-2,0,7,10,1,0,2,16,1),He(0,5,5,-3,0,8,10,1,0,3,14,2),He(0,5,6,-3,0,9,12,1,0,3,16,2),He(0,6,6,-3,0,10,14,1,0,4,18,3),He(0,6,7,-4,0,11,15,1,0,4,20,3),He(0,7,8,-4,0,12,17,2,0,5,22,4),He(0,7,8,-4,0,13,19,2,0,5,24,4),He(0,7,9,-4,0,14,21,2,0,5,26,4),He(0,8,9,-5,0,15,22,2,0,6,28,5),He(0,8,10,-5,0,16,24,2,0,6,30,5),He(0,8,11,-5,0,17,26,2,0,6,32,5),He(0,9,11,-5,0,18,28,2,0,7,34,6),He(0,9,12,-6,0,19,29,2,0,7,36,6),He(0,10,13,-6,0,20,31,3,0,8,38,7),He(0,10,13,-6,0,21,33,3,0,8,40,7),He(0,10,14,-6,0,22,35,3,0,8,42,7),He(0,11,14,-7,0,23,36,3,0,9,44,8),He(0,11,15,-7,0,24,38,3,0,9,46,8)],Rg={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Ih={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function nc(e){return`${Math.round(e)}ms`}function Lg(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Og(e){const t={...Rg,...e.easing},n={...Ih,...e.duration};return{getAutoHeightDuration:Lg,create:(i=["all"],s={})=>{const{duration:a=n.standard,easing:o=t.easeInOut,delay:u=0,...l}=s;return(Array.isArray(i)?i:[i]).map(d=>`${d} ${typeof a=="string"?a:nc(a)} ${o} ${typeof u=="string"?u:nc(u)}`).join(",")},...e,easing:t,duration:n}}const Fg={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Mg(e){return xn(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function _h(e={}){const t={...e};function n(r){const i=Object.entries(r);for(let s=0;s<i.length;s++){const[a,o]=i[s];!Mg(o)||a.startsWith("unstable_")?delete r[a]:xn(o)&&(r[a]={...o},n(r[a]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
9
+ */var zl;function G0(){if(zl)return Ne;zl=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function g(b){if(typeof b=="object"&&b!==null){var T=b.$$typeof;switch(T){case e:switch(b=b.type,b){case n:case i:case r:case u:case l:case m:return b;default:switch(b=b&&b.$$typeof,b){case a:case o:case c:case d:return b;case s:return b;default:return T}}case t:return T}}}return Ne.ContextConsumer=s,Ne.ContextProvider=a,Ne.Element=e,Ne.ForwardRef=o,Ne.Fragment=n,Ne.Lazy=c,Ne.Memo=d,Ne.Portal=t,Ne.Profiler=i,Ne.StrictMode=r,Ne.Suspense=u,Ne.SuspenseList=l,Ne.isContextConsumer=function(b){return g(b)===s},Ne.isContextProvider=function(b){return g(b)===a},Ne.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Ne.isForwardRef=function(b){return g(b)===o},Ne.isFragment=function(b){return g(b)===n},Ne.isLazy=function(b){return g(b)===c},Ne.isMemo=function(b){return g(b)===d},Ne.isPortal=function(b){return g(b)===t},Ne.isProfiler=function(b){return g(b)===i},Ne.isStrictMode=function(b){return g(b)===r},Ne.isSuspense=function(b){return g(b)===u},Ne.isSuspenseList=function(b){return g(b)===l},Ne.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===i||b===r||b===u||b===l||typeof b=="object"&&b!==null&&(b.$$typeof===c||b.$$typeof===d||b.$$typeof===a||b.$$typeof===s||b.$$typeof===o||b.$$typeof===p||b.getModuleId!==void 0)},Ne.typeOf=g,Ne}var $l;function Y0(){return $l||($l=1,Ha.exports=G0()),Ha.exports}var xh=Y0();function xn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function yh(e){if($.isValidElement(e)||xh.isValidElementType(e)||!xn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=yh(e[n])}),t}function jt(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return xn(e)&&xn(t)&&Object.keys(t).forEach(i=>{$.isValidElement(t[i])||xh.isValidElementType(t[i])?r[i]=t[i]:xn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&xn(e[i])?r[i]=jt(e[i],t[i],n):n.clone?r[i]=xn(t[i])?yh(t[i]):t[i]:r[i]=t[i]}),r}function mi(e,t){return t?jt(e,t,{clone:!1}):e}function K0(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{const s=/min-width:\s*([0-9.]+)/;return+(r.match(s)?.[1]||0)-+(i.match(s)?.[1]||0)});return n.length?n.reduce((r,i)=>{const s=t[i];return delete r[i],r[i]=s,r},{...t}):t}function Q0(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function X0(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,i]=n,s=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(s)}function Z0(e){const t=(s,a)=>s.replace("@media",a?`@container ${a}`:"@container");function n(s,a){s.up=(...o)=>t(e.breakpoints.up(...o),a),s.down=(...o)=>t(e.breakpoints.down(...o),a),s.between=(...o)=>t(e.breakpoints.between(...o),a),s.only=(...o)=>t(e.breakpoints.only(...o),a),s.not=(...o)=>{const u=t(e.breakpoints.not(...o),a);return u.includes("not all and")?u.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):u}}const r={},i=s=>(n(r,s),r);return n(i),{...e,containerQueries:i}}const aa={xs:0,sm:600,md:900,lg:1200,xl:1536},ql={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${aa[e]}px)`},J0={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:aa[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function kn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const s=r.breakpoints||ql;return t.reduce((a,o,u)=>(a[s.up(s.keys[u])]=n(t[u]),a),{})}if(typeof t=="object"){const s=r.breakpoints||ql;return Object.keys(t).reduce((a,o)=>{if(Q0(s.keys,o)){const u=X0(r.containerQueries?r:J0,o);u&&(a[u]=n(t[o],o))}else if(Object.keys(s.values||aa).includes(o)){const u=s.up(o);a[u]=n(t[o],o)}else{const u=o;a[u]=t[u]}return a},{})}return n(t)}function e1(e={}){return e.keys?.reduce((n,r)=>{const i=e.up(r);return n[i]={},n},{})||{}}function t1(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function oa(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,s)=>i&&i[s]?i[s]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Ps(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=oa(e,n)||r,t&&(i=t(i,r,e)),i}function Qe(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,s=a=>{if(a[t]==null)return null;const o=a[t],u=a.theme,l=oa(u,r)||{};return kn(a,o,c=>{let m=Ps(l,i,c);return c===m&&typeof c=="string"&&(m=Ps(l,i,`${t}${c==="default"?"":tn(c)}`,c)),n===!1?m:{[n]:m}})};return s.propTypes={},s.filterProps=[t],s}function n1(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const r1={m:"margin",p:"padding"},i1={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Vl={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},s1=n1(e=>{if(e.length>2)if(Vl[e])e=Vl[e];else return[e];const[t,n]=e.split(""),r=r1[t],i=i1[n]||"";return Array.isArray(i)?i.map(s=>r+s):[r+i]}),gu=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],bu=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...gu,...bu];function Ui(e,t,n,r){const i=oa(e,t,!0)??n;return typeof i=="number"||typeof i=="string"?s=>typeof s=="string"?s:typeof i=="string"?i.startsWith("var(")&&s===0?0:i.startsWith("var(")&&s===1?i:`calc(${s} * ${i})`:i*s:Array.isArray(i)?s=>{if(typeof s=="string")return s;const a=Math.abs(s),o=i[a];return s>=0?o:typeof o=="number"?-o:typeof o=="string"&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:typeof i=="function"?i:()=>{}}function Eu(e){return Ui(e,"spacing",8)}function zi(e,t){return typeof t=="string"||t==null?t:e(t)}function a1(e,t){return n=>e.reduce((r,i)=>(r[i]=zi(t,n),r),{})}function o1(e,t,n,r){if(!t.includes(n))return null;const i=s1(n),s=a1(i,r),a=e[n];return kn(e,a,s)}function Th(e,t){const n=Eu(e.theme);return Object.keys(e).map(r=>o1(e,t,r,n)).reduce(mi,{})}function $e(e){return Th(e,gu)}$e.propTypes={};$e.filterProps=gu;function qe(e){return Th(e,bu)}qe.propTypes={};qe.filterProps=bu;function ua(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(s=>{r[s]=i}),r),{}),n=r=>Object.keys(r).reduce((i,s)=>t[s]?mi(i,t[s](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Gt(e){return typeof e!="number"?e:`${e}px solid`}function Xt(e,t){return Qe({prop:e,themeKey:"borders",transform:t})}const u1=Xt("border",Gt),l1=Xt("borderTop",Gt),c1=Xt("borderRight",Gt),d1=Xt("borderBottom",Gt),h1=Xt("borderLeft",Gt),f1=Xt("borderColor"),p1=Xt("borderTopColor"),m1=Xt("borderRightColor"),g1=Xt("borderBottomColor"),b1=Xt("borderLeftColor"),E1=Xt("outline",Gt),x1=Xt("outlineColor"),la=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ui(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:zi(t,r)});return kn(e,e.borderRadius,n)}return null};la.propTypes={};la.filterProps=["borderRadius"];ua(u1,l1,c1,d1,h1,f1,p1,m1,g1,b1,la,E1,x1);const ca=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({gap:zi(t,r)});return kn(e,e.gap,n)}return null};ca.propTypes={};ca.filterProps=["gap"];const da=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({columnGap:zi(t,r)});return kn(e,e.columnGap,n)}return null};da.propTypes={};da.filterProps=["columnGap"];const ha=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({rowGap:zi(t,r)});return kn(e,e.rowGap,n)}return null};ha.propTypes={};ha.filterProps=["rowGap"];const y1=Qe({prop:"gridColumn"}),T1=Qe({prop:"gridRow"}),C1=Qe({prop:"gridAutoFlow"}),S1=Qe({prop:"gridAutoColumns"}),A1=Qe({prop:"gridAutoRows"}),k1=Qe({prop:"gridTemplateColumns"}),I1=Qe({prop:"gridTemplateRows"}),_1=Qe({prop:"gridTemplateAreas"}),v1=Qe({prop:"gridArea"});ua(ca,da,ha,y1,T1,C1,S1,A1,k1,I1,_1,v1);function Ar(e,t){return t==="grey"?t:e}const D1=Qe({prop:"color",themeKey:"palette",transform:Ar}),w1=Qe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ar}),N1=Qe({prop:"backgroundColor",themeKey:"palette",transform:Ar});ua(D1,w1,N1);function Bt(e){return e<=1&&e!==0?`${e*100}%`:e}const P1=Qe({prop:"width",transform:Bt}),xu=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const r=e.theme?.breakpoints?.values?.[n]||aa[n];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Bt(n)}};return kn(e,e.maxWidth,t)}return null};xu.filterProps=["maxWidth"];const R1=Qe({prop:"minWidth",transform:Bt}),L1=Qe({prop:"height",transform:Bt}),O1=Qe({prop:"maxHeight",transform:Bt}),F1=Qe({prop:"minHeight",transform:Bt});Qe({prop:"size",cssProperty:"width",transform:Bt});Qe({prop:"size",cssProperty:"height",transform:Bt});const M1=Qe({prop:"boxSizing"});ua(P1,xu,R1,L1,O1,F1,M1);const fa={border:{themeKey:"borders",transform:Gt},borderTop:{themeKey:"borders",transform:Gt},borderRight:{themeKey:"borders",transform:Gt},borderBottom:{themeKey:"borders",transform:Gt},borderLeft:{themeKey:"borders",transform:Gt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Gt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:la},color:{themeKey:"palette",transform:Ar},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ar},backgroundColor:{themeKey:"palette",transform:Ar},p:{style:qe},pt:{style:qe},pr:{style:qe},pb:{style:qe},pl:{style:qe},px:{style:qe},py:{style:qe},padding:{style:qe},paddingTop:{style:qe},paddingRight:{style:qe},paddingBottom:{style:qe},paddingLeft:{style:qe},paddingX:{style:qe},paddingY:{style:qe},paddingInline:{style:qe},paddingInlineStart:{style:qe},paddingInlineEnd:{style:qe},paddingBlock:{style:qe},paddingBlockStart:{style:qe},paddingBlockEnd:{style:qe},m:{style:$e},mt:{style:$e},mr:{style:$e},mb:{style:$e},ml:{style:$e},mx:{style:$e},my:{style:$e},margin:{style:$e},marginTop:{style:$e},marginRight:{style:$e},marginBottom:{style:$e},marginLeft:{style:$e},marginX:{style:$e},marginY:{style:$e},marginInline:{style:$e},marginInlineStart:{style:$e},marginInlineEnd:{style:$e},marginBlock:{style:$e},marginBlockStart:{style:$e},marginBlockEnd:{style:$e},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:ca},rowGap:{style:ha},columnGap:{style:da},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Bt},maxWidth:{style:xu},minWidth:{transform:Bt},height:{transform:Bt},maxHeight:{transform:Bt},minHeight:{transform:Bt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function B1(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function j1(e,t){return typeof e=="function"?e(t):e}function H1(){function e(n,r,i,s){const a={[n]:r,theme:i},o=s[n];if(!o)return{[n]:r};const{cssProperty:u=n,themeKey:l,transform:d,style:c}=o;if(r==null)return null;if(l==="typography"&&r==="inherit")return{[n]:r};const m=oa(i,l)||{};return c?c(a):kn(a,r,g=>{let b=Ps(m,d,g);return g===b&&typeof g=="string"&&(b=Ps(m,d,`${n}${g==="default"?"":tn(g)}`,g)),u===!1?b:{[u]:b}})}function t(n){const{sx:r,theme:i={}}=n||{};if(!r)return null;const s=i.unstable_sxConfig??fa;function a(o){let u=o;if(typeof o=="function")u=o(i);else if(typeof o!="object")return o;if(!u)return null;const l=e1(i.breakpoints),d=Object.keys(l);let c=l;return Object.keys(u).forEach(m=>{const p=j1(u[m],i);if(p!=null)if(typeof p=="object")if(s[m])c=mi(c,e(m,p,i,s));else{const g=kn({theme:i},p,b=>({[m]:b}));B1(g,p)?c[m]=t({sx:p,theme:i}):c=mi(c,g)}else c=mi(c,e(m,p,i,s))}),K0(i,t1(d,c))}return Array.isArray(r)?r.map(a):a(r)}return t}const Nr=H1();Nr.filterProps=["sx"];function U1(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function yu(e,t=0,n=1){return U1(e,t,n)}function z1(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Bn(e){if(e.type)return e;if(e.charAt(0)==="#")return Bn(z1(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(tr(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(tr(10,i))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:i}}const $1=e=>{const t=Bn(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},ci=(e,t)=>{try{return $1(e)}catch{return e}};function pa(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((i,s)=>s<3?parseInt(i,10):i):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Ch(e){e=Bn(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),a=(l,d=(l+n/30)%12)=>i-s*Math.max(Math.min(d-3,9-d,1),-1);let o="rgb";const u=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(o+="a",u.push(t[3])),pa({type:o,values:u})}function Do(e){e=Bn(e);let t=e.type==="hsl"||e.type==="hsla"?Bn(Ch(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function q1(e,t){const n=Do(e),r=Do(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function wo(e,t){return e=Bn(e),t=yu(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,pa(e)}function rs(e,t,n){try{return wo(e,t)}catch{return e}}function Tu(e,t){if(e=Bn(e),t=yu(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return pa(e)}function Pe(e,t,n){try{return Tu(e,t)}catch{return e}}function Cu(e,t){if(e=Bn(e),t=yu(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return pa(e)}function Re(e,t,n){try{return Cu(e,t)}catch{return e}}function V1(e,t=.15){return Do(e)>.5?Tu(e,t):Cu(e,t)}function is(e,t,n){try{return V1(e,t)}catch{return e}}const vi={black:"#000",white:"#fff"},W1={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},cr={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},dr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},ei={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},hr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},fr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},pr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Sh(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:vi.white,default:vi.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const G1=Sh();function Ah(){return{text:{primary:vi.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:vi.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Wl=Ah();function Gl(e,t,n,r){const i=r.light||r,s=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Cu(e.main,i):t==="dark"&&(e.dark=Tu(e.main,s)))}function Y1(e="light"){return e==="dark"?{main:hr[200],light:hr[50],dark:hr[400]}:{main:hr[700],light:hr[400],dark:hr[800]}}function K1(e="light"){return e==="dark"?{main:cr[200],light:cr[50],dark:cr[400]}:{main:cr[500],light:cr[300],dark:cr[700]}}function Q1(e="light"){return e==="dark"?{main:dr[500],light:dr[300],dark:dr[700]}:{main:dr[700],light:dr[400],dark:dr[800]}}function X1(e="light"){return e==="dark"?{main:fr[400],light:fr[300],dark:fr[700]}:{main:fr[700],light:fr[500],dark:fr[900]}}function Z1(e="light"){return e==="dark"?{main:pr[400],light:pr[300],dark:pr[700]}:{main:pr[800],light:pr[500],dark:pr[900]}}function J1(e="light"){return e==="dark"?{main:ei[400],light:ei[300],dark:ei[700]}:{main:"#ed6c02",light:ei[500],dark:ei[900]}}function Su(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...i}=e,s=e.primary||Y1(t),a=e.secondary||K1(t),o=e.error||Q1(t),u=e.info||X1(t),l=e.success||Z1(t),d=e.warning||J1(t);function c(b){return q1(b,Wl.text.primary)>=n?Wl.text.primary:G1.text.primary}const m=({color:b,name:T,mainShade:y=500,lightShade:C=300,darkShade:S=700})=>{if(b={...b},!b.main&&b[y]&&(b.main=b[y]),!b.hasOwnProperty("main"))throw new Error(tr(11,T?` (${T})`:"",y));if(typeof b.main!="string")throw new Error(tr(12,T?` (${T})`:"",JSON.stringify(b.main)));return Gl(b,"light",C,r),Gl(b,"dark",S,r),b.contrastText||(b.contrastText=c(b.main)),b};let p;return t==="light"?p=Sh():t==="dark"&&(p=Ah()),jt({common:{...vi},mode:t,primary:m({color:s,name:"primary"}),secondary:m({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:o,name:"error"}),warning:m({color:d,name:"warning"}),info:m({color:u,name:"info"}),success:m({color:l,name:"success"}),grey:W1,contrastThreshold:n,getContrastText:c,augmentColor:m,tonalOffset:r,...p},i)}function eg(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&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 tg={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,scale: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};function ng(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var rg=/[A-Z]|^ms/g,ig=/_EMO_([^_]+?)_([^]*?)_EMO_/g,kh=function(t){return t.charCodeAt(1)===45},Yl=function(t){return t!=null&&typeof t!="boolean"},Ua=ng(function(e){return kh(e)?e:e.replace(rg,"-$&").toLowerCase()}),Kl=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(ig,function(r,i,s){return On={name:i,styles:s,next:On},i})}return tg[t]!==1&&!kh(t)&&typeof n=="number"&&n!==0?n+"px":n};function Rs(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return On={name:i.name,styles:i.styles,next:On},i.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)On={name:a.name,styles:a.styles,next:On},a=a.next;var o=s.styles+";";return o}return sg(e,t,n)}}var u=n;return u}function sg(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Rs(e,t,n[i])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var o=a;Yl(o)&&(r+=Ua(s)+":"+Kl(s,o)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var u=0;u<a.length;u++)Yl(a[u])&&(r+=Ua(s)+":"+Kl(s,a[u])+";");else{var l=Rs(e,t,a);switch(s){case"animation":case"animationName":{r+=Ua(s)+":"+l+";";break}default:r+=s+"{"+l+"}"}}}return r}var Ql=/label:\s*([^\s;{]+)\s*(;|$)/g,On;function ag(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";On=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,i+=Rs(n,t,s);else{var a=s;i+=a[0]}for(var o=1;o<e.length;o++)if(i+=Rs(n,t,e[o]),r){var u=s;i+=u[o]}Ql.lastIndex=0;for(var l="",d;(d=Ql.exec(i))!==null;)l+="-"+d[1];var c=eg(i)+l;return{name:c,styles:i,next:On}}function og(e,t){return B0(e,t)}function ug(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Xl=[];function Zl(e){return Xl[0]=e,ag(Xl)}const lg=typeof window<"u"?$.useLayoutEffect:$.useEffect;function cg(e){return Object.keys(e).length===0}function dg(e=null){const t=$.useContext(j0.ThemeContext);return!t||cg(t)?e:t}const hg=$.createContext(),fg=()=>$.useContext(hg)??!1;function Ls(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]={...e[i],...n[i]};else if(i==="componentsProps"||i==="slotProps"){const s=e[i],a=t[i];if(!a)n[i]=s||{};else if(!s)n[i]=a;else{n[i]={...a};for(const o in s)if(Object.prototype.hasOwnProperty.call(s,o)){const u=o;n[i][u]=Ls(s[u],a[u])}}}else n[i]===void 0&&(n[i]=e[i])}return n}const pg=$.createContext(void 0);function mg(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?Ls(i.defaultProps,r):!i.styleOverrides&&!i.variants?Ls(i,r):r}function gg({props:e,name:t}){const n=$.useContext(pg);return mg({props:e,name:t,theme:{components:n}})}const Jl=(e,t,n,r=[])=>{let i=e;t.forEach((s,a)=>{a===t.length-1?Array.isArray(i)?i[Number(s)]=n:i&&typeof i=="object"&&(i[s]=n):i&&typeof i=="object"&&(i[s]||(i[s]=r.includes(s)?[]:{}),i=i[s])})},bg=(e,t,n)=>{function r(i,s=[],a=[]){Object.entries(i).forEach(([o,u])=>{(!n||n&&!n([...s,o]))&&u!=null&&(typeof u=="object"&&Object.keys(u).length>0?r(u,[...s,o],Array.isArray(u)?[...a,o]:a):t([...s,o],u,a))})}r(e)},Eg=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function za(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},s={},a={};return bg(e,(o,u,l)=>{if((typeof u=="string"||typeof u=="number")&&(!r||!r(o,u))){const d=`--${n?`${n}-`:""}${o.join("-")}`,c=Eg(o,u);Object.assign(i,{[d]:c}),Jl(s,o,`var(${d})`,l),Jl(a,o,`var(${d}, ${c})`,l)}},o=>o[0]==="vars"),{css:i,vars:s,varsWithDefaults:a}}function xg(e,t={}){const{getSelector:n=T,disableCssColorScheme:r,colorSchemeSelector:i}=t,{colorSchemes:s={},components:a,defaultColorScheme:o="light",...u}=e,{vars:l,css:d,varsWithDefaults:c}=za(u,t);let m=c;const p={},{[o]:g,...b}=s;if(Object.entries(b||{}).forEach(([S,N])=>{const{vars:D,css:w,varsWithDefaults:B}=za(N,t);m=jt(m,B),p[S]={css:w,vars:D}}),g){const{css:S,vars:N,varsWithDefaults:D}=za(g,t);m=jt(m,D),p[o]={css:S,vars:N}}function T(S,N){let D=i;if(i==="class"&&(D=".%s"),i==="data"&&(D="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(D=`[${i}="%s"]`),S){if(D==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${s[S]?.palette?.mode||S})`]:{":root":N}};if(D)return e.defaultColorScheme===S?`:root, ${D.replace("%s",String(S))}`:D.replace("%s",String(S))}return":root"}return{vars:m,generateThemeVars:()=>{let S={...l};return Object.entries(p).forEach(([,{vars:N}])=>{S=jt(S,N)}),S},generateStyleSheets:()=>{const S=[],N=e.defaultColorScheme||"light";function D(V,Q){Object.keys(Q).length&&S.push(typeof V=="string"?{[V]:{...Q}}:V)}D(n(void 0,{...d}),d);const{[N]:w,...B}=p;if(w){const{css:V}=w,Q=s[N]?.palette?.mode,E=!r&&Q?{colorScheme:Q,...V}:{...V};D(n(N,{...E}),E)}return Object.entries(B).forEach(([V,{css:Q}])=>{const E=s[V]?.palette?.mode,L=!r&&E?{colorScheme:E,...Q}:{...Q};D(n(V,{...L}),L)}),S}}}function yg(e){const t={};return Object.entries(e).forEach(r=>{const[i,s]=r;typeof s=="object"&&(t[i]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),t}function Tg(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const Cg=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function Sg(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,s=Cg(t),a=Object.keys(s);function o(m){return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${n})`}function u(m){return`@media (max-width:${(typeof t[m]=="number"?t[m]:m)-r/100}${n})`}function l(m,p){const g=a.indexOf(p);return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${n}) and (max-width:${(g!==-1&&typeof t[a[g]]=="number"?t[a[g]]:p)-r/100}${n})`}function d(m){return a.indexOf(m)+1<a.length?l(m,a[a.indexOf(m)+1]):o(m)}function c(m){const p=a.indexOf(m);return p===0?o(a[1]):p===a.length-1?u(a[p]):l(m,a[a.indexOf(m)+1]).replace("@media","@media not all and")}return{keys:a,values:s,up:o,down:u,between:l,only:d,not:c,unit:n,...i}}const Ag={borderRadius:4};function kg(e=8,t=Eu({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(s=>{const a=t(s);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function Ig(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!="function")return{};let r=n.getColorSchemeSelector(e);return r==="&"?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function Au(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:s={},...a}=e,o=Sg(n),u=kg(i);let l=jt({breakpoints:o,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:u,shape:{...Ag,...s}},a);return l=Z0(l),l.applyStyles=Ig,l=t.reduce((d,c)=>jt(d,c),l),l.unstable_sxConfig={...fa,...a?.unstable_sxConfig},l.unstable_sx=function(c){return Nr({sx:c,theme:this})},l}const _g={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Mr(e,t,n="Mui"){const r=_g[t];return r?`${n}-${r}`:`${z0.generate(e)}-${t}`}function vg(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Dg(e){return Math.round(e*1e5)/1e5}const ec={textTransform:"uppercase"},tc='"Roboto", "Helvetica", "Arial", sans-serif';function wg(e,t){const{fontFamily:n=tc,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:o=700,htmlFontSize:u=16,allVariants:l,pxToRem:d,...c}=typeof t=="function"?t(e):t,m=r/14,p=d||(T=>`${T/u*m}rem`),g=(T,y,C,S,N)=>({fontFamily:n,fontWeight:T,fontSize:p(y),lineHeight:C,...n===tc?{letterSpacing:`${Dg(S/y)}em`}:{},...N,...l}),b={h1:g(i,96,1.167,-1.5),h2:g(i,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(a,14,1.75,.4,ec),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,ec),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return jt({htmlFontSize:u,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:o,...b},c,{clone:!1})}const Ng=.2,Pg=.14,Rg=.12;function He(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Ng})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Pg})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Rg})`].join(",")}const Lg=["none",He(0,2,1,-1,0,1,1,0,0,1,3,0),He(0,3,1,-2,0,2,2,0,0,1,5,0),He(0,3,3,-2,0,3,4,0,0,1,8,0),He(0,2,4,-1,0,4,5,0,0,1,10,0),He(0,3,5,-1,0,5,8,0,0,1,14,0),He(0,3,5,-1,0,6,10,0,0,1,18,0),He(0,4,5,-2,0,7,10,1,0,2,16,1),He(0,5,5,-3,0,8,10,1,0,3,14,2),He(0,5,6,-3,0,9,12,1,0,3,16,2),He(0,6,6,-3,0,10,14,1,0,4,18,3),He(0,6,7,-4,0,11,15,1,0,4,20,3),He(0,7,8,-4,0,12,17,2,0,5,22,4),He(0,7,8,-4,0,13,19,2,0,5,24,4),He(0,7,9,-4,0,14,21,2,0,5,26,4),He(0,8,9,-5,0,15,22,2,0,6,28,5),He(0,8,10,-5,0,16,24,2,0,6,30,5),He(0,8,11,-5,0,17,26,2,0,6,32,5),He(0,9,11,-5,0,18,28,2,0,7,34,6),He(0,9,12,-6,0,19,29,2,0,7,36,6),He(0,10,13,-6,0,20,31,3,0,8,38,7),He(0,10,13,-6,0,21,33,3,0,8,40,7),He(0,10,14,-6,0,22,35,3,0,8,42,7),He(0,11,14,-7,0,23,36,3,0,9,44,8),He(0,11,15,-7,0,24,38,3,0,9,46,8)],Og={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Ih={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function nc(e){return`${Math.round(e)}ms`}function Fg(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Mg(e){const t={...Og,...e.easing},n={...Ih,...e.duration};return{getAutoHeightDuration:Fg,create:(i=["all"],s={})=>{const{duration:a=n.standard,easing:o=t.easeInOut,delay:u=0,...l}=s;return(Array.isArray(i)?i:[i]).map(d=>`${d} ${typeof a=="string"?a:nc(a)} ${o} ${typeof u=="string"?u:nc(u)}`).join(",")},...e,easing:t,duration:n}}const Bg={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function jg(e){return xn(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function _h(e={}){const t={...e};function n(r){const i=Object.entries(r);for(let s=0;s<i.length;s++){const[a,o]=i[s];!jg(o)||a.startsWith("unstable_")?delete r[a]:xn(o)&&(r[a]={...o},n(r[a]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
10
10
 
11
11
  const theme = ${JSON.stringify(t,null,2)};
12
12
 
13
13
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
14
14
  theme.transitions = createTransitions(theme.transitions || {});
15
15
 
16
- export default theme;`}function Po(e={},...t){const{breakpoints:n,mixins:r={},spacing:i,palette:s={},transitions:a={},typography:o={},shape:u,...l}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(tr(20));const d=Su(s),c=Au(e);let m=jt(c,{mixins:Ig(c.breakpoints,r),palette:d,shadows:Ng.slice(),typography:vg(d,o),transitions:Og(a),zIndex:{...Fg}});return m=jt(m,l),m=t.reduce((p,g)=>jt(p,g),m),m.unstable_sxConfig={...fa,...l?.unstable_sxConfig},m.unstable_sx=function(g){return Pr({sx:g,theme:this})},m.toRuntimeSource=_h,m}function Bg(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const jg=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Bg(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function vh(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Dh(e){return e==="dark"?jg:[]}function Hg(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...i}=e,s=Su(t);return{palette:s,opacity:{...vh(s.mode),...n},overlays:r||Dh(s.mode),...i}}function Ug(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const zg=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],$g=e=>(t,n)=>{const r=e.rootSelector||":root",i=e.colorSchemeSelector;let s=i;if(i==="class"&&(s=".%s"),i==="data"&&(s="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(s=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return zg(e.cssVarPrefix).forEach(o=>{a[o]=n[o],delete n[o]}),s==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:s?{[s.replace("%s",t)]:a,[`${r}, ${s.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(s&&s!=="media")return`${r}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(s)return s.replace("%s",String(t))}return r};function qg(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function j(e,t,n){!e[t]&&n&&(e[t]=n)}function di(e){return typeof e!="string"||!e.startsWith("hsl")?e:Ch(e)}function fn(e,t){`${t}Channel`in e||(e[`${t}Channel`]=ci(di(e[t])))}function Vg(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const sn=e=>{try{return e()}catch{}},Wg=(e="mui")=>We.unstable_createGetCssVar(e);function $a(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=Hg({...t,palette:{mode:i,...t?.palette}});return}const{palette:s,...a}=Po({...n,palette:{mode:i,...t?.palette}});return e[r]={...t,palette:s,opacity:{...vh(i),...t?.opacity},overlays:t?.overlays||Dh(i)},a}function Gg(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:a=Ug,colorSchemeSelector:o=n.light&&n.dark?"media":void 0,rootSelector:u=":root",...l}=e,d=Object.keys(n)[0],c=r||(n.light&&d!=="light"?"light":d),m=Wg(s),{[c]:p,light:g,dark:b,...T}=n,y={...T};let C=p;if((c==="dark"&&!("dark"in n)||c==="light"&&!("light"in n))&&(C=!0),!C)throw new Error(tr(21,c));const S=$a(y,C,l,c);g&&!y.light&&$a(y,g,void 0,"light"),b&&!y.dark&&$a(y,b,void 0,"dark");let P={defaultColorScheme:c,...S,cssVarPrefix:s,colorSchemeSelector:o,rootSelector:u,getCssVar:m,colorSchemes:y,font:{...Eg(S.typography),...S.font},spacing:Vg(l.spacing)};Object.keys(P.colorSchemes).forEach(Q=>{const E=P.colorSchemes[Q].palette,L=O=>{const z=O.split("-"),M=z[1],J=z[2];return m(O,E[M][J])};if(E.mode==="light"&&(j(E.common,"background","#fff"),j(E.common,"onBackground","#000")),E.mode==="dark"&&(j(E.common,"background","#000"),j(E.common,"onBackground","#fff")),qg(E,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),E.mode==="light"){j(E.Alert,"errorColor",Ne(E.error.light,.6)),j(E.Alert,"infoColor",Ne(E.info.light,.6)),j(E.Alert,"successColor",Ne(E.success.light,.6)),j(E.Alert,"warningColor",Ne(E.warning.light,.6)),j(E.Alert,"errorFilledBg",L("palette-error-main")),j(E.Alert,"infoFilledBg",L("palette-info-main")),j(E.Alert,"successFilledBg",L("palette-success-main")),j(E.Alert,"warningFilledBg",L("palette-warning-main")),j(E.Alert,"errorFilledColor",sn(()=>E.getContrastText(E.error.main))),j(E.Alert,"infoFilledColor",sn(()=>E.getContrastText(E.info.main))),j(E.Alert,"successFilledColor",sn(()=>E.getContrastText(E.success.main))),j(E.Alert,"warningFilledColor",sn(()=>E.getContrastText(E.warning.main))),j(E.Alert,"errorStandardBg",Re(E.error.light,.9)),j(E.Alert,"infoStandardBg",Re(E.info.light,.9)),j(E.Alert,"successStandardBg",Re(E.success.light,.9)),j(E.Alert,"warningStandardBg",Re(E.warning.light,.9)),j(E.Alert,"errorIconColor",L("palette-error-main")),j(E.Alert,"infoIconColor",L("palette-info-main")),j(E.Alert,"successIconColor",L("palette-success-main")),j(E.Alert,"warningIconColor",L("palette-warning-main")),j(E.AppBar,"defaultBg",L("palette-grey-100")),j(E.Avatar,"defaultBg",L("palette-grey-400")),j(E.Button,"inheritContainedBg",L("palette-grey-300")),j(E.Button,"inheritContainedHoverBg",L("palette-grey-A100")),j(E.Chip,"defaultBorder",L("palette-grey-400")),j(E.Chip,"defaultAvatarColor",L("palette-grey-700")),j(E.Chip,"defaultIconColor",L("palette-grey-700")),j(E.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),j(E.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),j(E.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),j(E.LinearProgress,"primaryBg",Re(E.primary.main,.62)),j(E.LinearProgress,"secondaryBg",Re(E.secondary.main,.62)),j(E.LinearProgress,"errorBg",Re(E.error.main,.62)),j(E.LinearProgress,"infoBg",Re(E.info.main,.62)),j(E.LinearProgress,"successBg",Re(E.success.main,.62)),j(E.LinearProgress,"warningBg",Re(E.warning.main,.62)),j(E.Skeleton,"bg",`rgba(${L("palette-text-primaryChannel")} / 0.11)`),j(E.Slider,"primaryTrack",Re(E.primary.main,.62)),j(E.Slider,"secondaryTrack",Re(E.secondary.main,.62)),j(E.Slider,"errorTrack",Re(E.error.main,.62)),j(E.Slider,"infoTrack",Re(E.info.main,.62)),j(E.Slider,"successTrack",Re(E.success.main,.62)),j(E.Slider,"warningTrack",Re(E.warning.main,.62));const O=is(E.background.default,.8);j(E.SnackbarContent,"bg",O),j(E.SnackbarContent,"color",sn(()=>E.getContrastText(O))),j(E.SpeedDialAction,"fabHoverBg",is(E.background.paper,.15)),j(E.StepConnector,"border",L("palette-grey-400")),j(E.StepContent,"border",L("palette-grey-400")),j(E.Switch,"defaultColor",L("palette-common-white")),j(E.Switch,"defaultDisabledColor",L("palette-grey-100")),j(E.Switch,"primaryDisabledColor",Re(E.primary.main,.62)),j(E.Switch,"secondaryDisabledColor",Re(E.secondary.main,.62)),j(E.Switch,"errorDisabledColor",Re(E.error.main,.62)),j(E.Switch,"infoDisabledColor",Re(E.info.main,.62)),j(E.Switch,"successDisabledColor",Re(E.success.main,.62)),j(E.Switch,"warningDisabledColor",Re(E.warning.main,.62)),j(E.TableCell,"border",Re(rs(E.divider,1),.88)),j(E.Tooltip,"bg",rs(E.grey[700],.92))}if(E.mode==="dark"){j(E.Alert,"errorColor",Re(E.error.light,.6)),j(E.Alert,"infoColor",Re(E.info.light,.6)),j(E.Alert,"successColor",Re(E.success.light,.6)),j(E.Alert,"warningColor",Re(E.warning.light,.6)),j(E.Alert,"errorFilledBg",L("palette-error-dark")),j(E.Alert,"infoFilledBg",L("palette-info-dark")),j(E.Alert,"successFilledBg",L("palette-success-dark")),j(E.Alert,"warningFilledBg",L("palette-warning-dark")),j(E.Alert,"errorFilledColor",sn(()=>E.getContrastText(E.error.dark))),j(E.Alert,"infoFilledColor",sn(()=>E.getContrastText(E.info.dark))),j(E.Alert,"successFilledColor",sn(()=>E.getContrastText(E.success.dark))),j(E.Alert,"warningFilledColor",sn(()=>E.getContrastText(E.warning.dark))),j(E.Alert,"errorStandardBg",Ne(E.error.light,.9)),j(E.Alert,"infoStandardBg",Ne(E.info.light,.9)),j(E.Alert,"successStandardBg",Ne(E.success.light,.9)),j(E.Alert,"warningStandardBg",Ne(E.warning.light,.9)),j(E.Alert,"errorIconColor",L("palette-error-main")),j(E.Alert,"infoIconColor",L("palette-info-main")),j(E.Alert,"successIconColor",L("palette-success-main")),j(E.Alert,"warningIconColor",L("palette-warning-main")),j(E.AppBar,"defaultBg",L("palette-grey-900")),j(E.AppBar,"darkBg",L("palette-background-paper")),j(E.AppBar,"darkColor",L("palette-text-primary")),j(E.Avatar,"defaultBg",L("palette-grey-600")),j(E.Button,"inheritContainedBg",L("palette-grey-800")),j(E.Button,"inheritContainedHoverBg",L("palette-grey-700")),j(E.Chip,"defaultBorder",L("palette-grey-700")),j(E.Chip,"defaultAvatarColor",L("palette-grey-300")),j(E.Chip,"defaultIconColor",L("palette-grey-300")),j(E.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),j(E.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),j(E.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),j(E.LinearProgress,"primaryBg",Ne(E.primary.main,.5)),j(E.LinearProgress,"secondaryBg",Ne(E.secondary.main,.5)),j(E.LinearProgress,"errorBg",Ne(E.error.main,.5)),j(E.LinearProgress,"infoBg",Ne(E.info.main,.5)),j(E.LinearProgress,"successBg",Ne(E.success.main,.5)),j(E.LinearProgress,"warningBg",Ne(E.warning.main,.5)),j(E.Skeleton,"bg",`rgba(${L("palette-text-primaryChannel")} / 0.13)`),j(E.Slider,"primaryTrack",Ne(E.primary.main,.5)),j(E.Slider,"secondaryTrack",Ne(E.secondary.main,.5)),j(E.Slider,"errorTrack",Ne(E.error.main,.5)),j(E.Slider,"infoTrack",Ne(E.info.main,.5)),j(E.Slider,"successTrack",Ne(E.success.main,.5)),j(E.Slider,"warningTrack",Ne(E.warning.main,.5));const O=is(E.background.default,.98);j(E.SnackbarContent,"bg",O),j(E.SnackbarContent,"color",sn(()=>E.getContrastText(O))),j(E.SpeedDialAction,"fabHoverBg",is(E.background.paper,.15)),j(E.StepConnector,"border",L("palette-grey-600")),j(E.StepContent,"border",L("palette-grey-600")),j(E.Switch,"defaultColor",L("palette-grey-300")),j(E.Switch,"defaultDisabledColor",L("palette-grey-600")),j(E.Switch,"primaryDisabledColor",Ne(E.primary.main,.55)),j(E.Switch,"secondaryDisabledColor",Ne(E.secondary.main,.55)),j(E.Switch,"errorDisabledColor",Ne(E.error.main,.55)),j(E.Switch,"infoDisabledColor",Ne(E.info.main,.55)),j(E.Switch,"successDisabledColor",Ne(E.success.main,.55)),j(E.Switch,"warningDisabledColor",Ne(E.warning.main,.55)),j(E.TableCell,"border",Ne(rs(E.divider,1),.68)),j(E.Tooltip,"bg",rs(E.grey[700],.92))}fn(E.background,"default"),fn(E.background,"paper"),fn(E.common,"background"),fn(E.common,"onBackground"),fn(E,"divider"),Object.keys(E).forEach(O=>{const z=E[O];O!=="tonalOffset"&&z&&typeof z=="object"&&(z.main&&j(E[O],"mainChannel",ci(di(z.main))),z.light&&j(E[O],"lightChannel",ci(di(z.light))),z.dark&&j(E[O],"darkChannel",ci(di(z.dark))),z.contrastText&&j(E[O],"contrastTextChannel",ci(di(z.contrastText))),O==="text"&&(fn(E[O],"primary"),fn(E[O],"secondary")),O==="action"&&(z.active&&fn(E[O],"active"),z.selected&&fn(E[O],"selected")))})}),P=t.reduce((Q,E)=>jt(Q,E),P);const D={prefix:s,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:$g(P)},{vars:w,generateThemeVars:B,generateStyleSheets:V}=bg(P,D);return P.vars=w,Object.entries(P.colorSchemes[P.defaultColorScheme]).forEach(([Q,E])=>{P[Q]=E}),P.generateThemeVars=B,P.generateStyleSheets=V,P.generateSpacing=function(){return We.createSpacing(l.spacing,Eu(this))},P.getColorSchemeSelector=xg(o),P.spacing=P.generateSpacing(),P.shouldSkipGeneratingVar=a,P.unstable_sxConfig={...fa,...l?.unstable_sxConfig},P.unstable_sx=function(E){return Pr({sx:E,theme:this})},P.toRuntimeSource=_h,P}function rc(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Su({...n===!0?{}:n.palette,mode:t})})}function Yg(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:s=n?.mode,...a}=e,o=s||"light",u=i?.[o],l={...i,...n?{[o]:{...typeof u!="boolean"&&u,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Po(e,...t);let d=n;"palette"in e||l[o]&&(l[o]!==!0?d=l[o].palette:o==="dark"&&(d={mode:"dark"}));const c=Po({...e,palette:d},...t);return c.defaultColorScheme=o,c.colorSchemes=l,c.palette.mode==="light"&&(c.colorSchemes.light={...l.light!==!0&&l.light,palette:c.palette},rc(c,"dark",l.dark)),c.palette.mode==="dark"&&(c.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:c.palette},rc(c,"light",l.light)),c}return!n&&!("light"in l)&&o==="light"&&(l.light=!0),Gg({...a,colorSchemes:l,defaultColorScheme:o,...typeof r!="boolean"&&r},...t)}const ku=Yg(),Iu="$$material";function Kg(){const e=We.useTheme(ku);return e[Iu]||e}function Qg(e){const{variants:t,...n}=e,r={variants:t,style:Zl(n),isProcessed:!0};return r.style===n||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=Zl(i.style))}),r}const Xg=Au();function Mn(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Zg(e){return e?(t,n)=>n[e]:null}function Jg(e,t,n){e.theme=nb(e.theme)?n:e.theme[t]||e.theme}function Es(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>Es(e,r));if(Array.isArray(n?.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:i,...s}=n;r=s}return wh(e,n.variants,[r])}return n?.isProcessed?n.style:n}function wh(e,t,n=[]){let r;e:for(let i=0;i<t.length;i+=1){const s=t[i];if(typeof s.props=="function"){if(r??={...e,...e.ownerState,ownerState:e.ownerState},!s.props(r))continue}else for(const a in s.props)if(e[a]!==s.props[a]&&e.ownerState?.[a]!==s.props[a])continue e;typeof s.style=="function"?(r??={...e,...e.ownerState,ownerState:e.ownerState},n.push(s.style(r))):n.push(s.style)}return n}function eb(e={}){const{themeId:t,defaultTheme:n=Xg,rootShouldForwardProp:r=Mn,slotShouldForwardProp:i=Mn}=e;function s(o){Jg(o,t,n)}return(o,u={})=>{ag(o,D=>D.filter(w=>w!==Pr));const{name:l,slot:d,skipVariantsResolver:c,skipSx:m,overridesResolver:p=Zg(ib(d)),...g}=u,b=c!==void 0?c:d&&d!=="Root"&&d!=="root"||!1,T=m||!1;let y=Mn;d==="Root"||d==="root"?y=r:d?y=i:rb(o)&&(y=void 0);const C=sg(o,{shouldForwardProp:y,label:tb(),...g}),S=D=>{if(D.__emotion_real===D)return D;if(typeof D=="function")return function(B){return Es(B,D)};if(xn(D)){const w=Qg(D);return w.variants?function(V){return Es(V,w)}:w.style}return D},P=(...D)=>{const w=[],B=D.map(S),V=[];if(w.push(s),l&&p&&V.push(function(O){const M=O.theme.components?.[l]?.styleOverrides;if(!M)return null;const J={};for(const oe in M)J[oe]=Es(O,M[oe]);return p(O,J)}),l&&!b&&V.push(function(O){const M=O.theme?.components?.[l]?.variants;return M?wh(O,M):null}),T||V.push(Pr),Array.isArray(B[0])){const L=B.shift(),O=new Array(w.length).fill(""),z=new Array(V.length).fill("");let M;M=[...O,...L,...z],M.raw=[...O,...L.raw,...z],w.unshift(M)}const Q=[...w,...B,...V],E=C(...Q);return o.muiName&&(E.muiName=o.muiName),E};return C.withConfig&&(P.withConfig=C.withConfig),P}}function tb(e,t){return void 0}function nb(e){for(const t in e)return!1;return!0}function rb(e){return typeof e=="string"&&e.charCodeAt(0)>96}function ib(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function sb(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const _u=e=>sb(e)&&e!=="classes",Be=eb({themeId:Iu,defaultTheme:ku,rootShouldForwardProp:_u}),vu=We.unstable_memoTheme;function Br(e){return pg(e)}function jr(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Mr(e,i,n)}),r}function ab(e){return Mr("MuiSvgIcon",e)}jr("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const ob=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${tn(t)}`,`fontSize${tn(n)}`]};return Hi(i,ab,r)},ub=Be("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${tn(n.color)}`],t[`fontSize${tn(n.fontSize)}`]]}})(vu(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),No=$.forwardRef(function(t,n){const r=Br({props:t,name:"MuiSvgIcon"}),{children:i,className:s,color:a="inherit",component:o="svg",fontSize:u="medium",htmlColor:l,inheritViewBox:d=!1,titleAccess:c,viewBox:m="0 0 24 24",...p}=r,g=$.isValidElement(i)&&i.type==="svg",b={...r,color:a,component:o,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:m,hasSvgAsChild:g},T={};d||(T.viewBox=m);const y=ob(b);return h.jsxs(ub,{as:o,className:Ye(y.root,s),focusable:"false",color:l,"aria-hidden":c?void 0:!0,role:c?"img":void 0,ref:n,...T,...p,...g&&i.props,ownerState:b,children:[g?i.props.children:i,c?h.jsx("title",{children:c}):null]})});No.muiName="SvgIcon";function Me(e,t){function n(r,i){return h.jsx(No,{"data-testid":void 0,ref:i,...r,children:e})}return n.muiName=No.muiName,$.memo($.forwardRef(n))}function lb(e){const{controlled:t,default:n}=e,{current:r}=$.useRef(t!==void 0),[i,s]=$.useState(n),a=r?t:i,o=$.useCallback(u=>{r||s(u)},[]);return[a,o]}function xs(e){const t=$.useRef(e);return og(()=>{t.current=e}),$.useRef((...n)=>(0,t.current)(...n)).current}function Os(...e){const t=$.useRef(void 0),n=$.useCallback(r=>{const i=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const a=s,o=a(r);return typeof o=="function"?o:()=>{a(null)}}return s.current=r,()=>{s.current=null}});return()=>{i.forEach(s=>s?.())}},e);return $.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function cb(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function db(e,t){if(!e)return t;function n(a,o){const u={};return Object.keys(o).forEach(l=>{cb(l,o[l])&&typeof a[l]=="function"&&(u[l]=(...d)=>{a[l](...d),o[l](...d)})}),u}if(typeof e=="function"||typeof t=="function")return a=>{const o=typeof t=="function"?t(a):t,u=typeof e=="function"?e({...a,...o}):e,l=Ye(a?.className,o?.className,u?.className),d=n(u,o);return{...o,...u,...d,...!!l&&{className:l},...o?.style&&u?.style&&{style:{...o.style,...u.style}},...o?.sx&&u?.sx&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(u.sx)?u.sx:[u.sx]]}}};const r=t,i=n(e,r),s=Ye(r?.className,e?.className);return{...t,...e,...i,...!!s&&{className:s},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}const ma=Me(h.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"})),$i=Me(h.jsx("path",{d:"M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5m-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4zm-3-4h8v2H8z"})),Ph=[{id:"abap",name:"ABAP",import:()=>Promise.resolve().then(()=>require("./abap-Dwt2rH6y.cjs"))},{id:"actionscript-3",name:"ActionScript",import:()=>Promise.resolve().then(()=>require("./actionscript-3-mj8Uhnsc.cjs"))},{id:"ada",name:"Ada",import:()=>Promise.resolve().then(()=>require("./ada-DZM58Vqs.cjs"))},{id:"angular-html",name:"Angular HTML",import:()=>Promise.resolve().then(()=>require("./angular-html-BqlvNDNu.cjs")).then(e=>e.angularHtml)},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.resolve().then(()=>require("./angular-ts-4ebgyujK.cjs"))},{id:"apache",name:"Apache Conf",import:()=>Promise.resolve().then(()=>require("./apache-D7v5fxtZ.cjs"))},{id:"apex",name:"Apex",import:()=>Promise.resolve().then(()=>require("./apex-4hrAnw0a.cjs"))},{id:"apl",name:"APL",import:()=>Promise.resolve().then(()=>require("./apl-BeeGx1jW.cjs"))},{id:"applescript",name:"AppleScript",import:()=>Promise.resolve().then(()=>require("./applescript-Cnd3Dxju.cjs"))},{id:"ara",name:"Ara",import:()=>Promise.resolve().then(()=>require("./ara-BQ2aGbFQ.cjs"))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>Promise.resolve().then(()=>require("./asciidoc-C6nYvw8K.cjs"))},{id:"asm",name:"Assembly",import:()=>Promise.resolve().then(()=>require("./asm-CQnBVCj-.cjs"))},{id:"astro",name:"Astro",import:()=>Promise.resolve().then(()=>require("./astro-UBxncqOW.cjs"))},{id:"awk",name:"AWK",import:()=>Promise.resolve().then(()=>require("./awk-DUx4h__E.cjs"))},{id:"ballerina",name:"Ballerina",import:()=>Promise.resolve().then(()=>require("./ballerina-CXlzbmzl.cjs"))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>Promise.resolve().then(()=>require("./bat-DlMT9sut.cjs"))},{id:"beancount",name:"Beancount",import:()=>Promise.resolve().then(()=>require("./beancount-CyyiuUzM.cjs"))},{id:"berry",name:"Berry",aliases:["be"],import:()=>Promise.resolve().then(()=>require("./berry-B0EjuzrL.cjs"))},{id:"bibtex",name:"BibTeX",import:()=>Promise.resolve().then(()=>require("./bibtex-CfoG9xRq.cjs"))},{id:"bicep",name:"Bicep",import:()=>Promise.resolve().then(()=>require("./bicep-D6PH_9IY.cjs"))},{id:"blade",name:"Blade",import:()=>Promise.resolve().then(()=>require("./blade-DYqOCSTj.cjs"))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>Promise.resolve().then(()=>require("./bsl-zRqJRzLj.cjs"))},{id:"c",name:"C",import:()=>Promise.resolve().then(()=>require("./c-C4sXGJZM.cjs"))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>Promise.resolve().then(()=>require("./cadence-Dq2CYzXG.cjs"))},{id:"cairo",name:"Cairo",import:()=>Promise.resolve().then(()=>require("./cairo-C5yDOd-R.cjs"))},{id:"clarity",name:"Clarity",import:()=>Promise.resolve().then(()=>require("./clarity-ytMkUD5Q.cjs"))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>Promise.resolve().then(()=>require("./clojure-B_Wv414H.cjs"))},{id:"cmake",name:"CMake",import:()=>Promise.resolve().then(()=>require("./cmake-TBUaQXYY.cjs"))},{id:"cobol",name:"COBOL",import:()=>Promise.resolve().then(()=>require("./cobol-D9bHhy8D.cjs"))},{id:"codeowners",name:"CODEOWNERS",import:()=>Promise.resolve().then(()=>require("./codeowners-QhPK6lIJ.cjs"))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>Promise.resolve().then(()=>require("./codeql-B7Q9tkDJ.cjs"))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.resolve().then(()=>require("./coffee-ZdyLosN6.cjs"))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>Promise.resolve().then(()=>require("./common-lisp-Ced3ctK5.cjs"))},{id:"coq",name:"Coq",import:()=>Promise.resolve().then(()=>require("./coq-BTRB4iqi.cjs"))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.resolve().then(()=>require("./cpp-DgQ-zDub.cjs"))},{id:"crystal",name:"Crystal",import:()=>Promise.resolve().then(()=>require("./crystal-C5h1rMTi.cjs"))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>Promise.resolve().then(()=>require("./csharp-TKds-MhG.cjs"))},{id:"css",name:"CSS",import:()=>Promise.resolve().then(()=>require("./css-B0kbn78J.cjs"))},{id:"csv",name:"CSV",import:()=>Promise.resolve().then(()=>require("./csv-BVJjiaC3.cjs"))},{id:"cue",name:"CUE",import:()=>Promise.resolve().then(()=>require("./cue-Cz4J-rnd.cjs"))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>Promise.resolve().then(()=>require("./cypher-DuKTiyez.cjs"))},{id:"d",name:"D",import:()=>Promise.resolve().then(()=>require("./d-BW9Wd7aK.cjs"))},{id:"dart",name:"Dart",import:()=>Promise.resolve().then(()=>require("./dart-CWs-er6b.cjs"))},{id:"dax",name:"DAX",import:()=>Promise.resolve().then(()=>require("./dax-CDxFL2Kb.cjs"))},{id:"desktop",name:"Desktop",import:()=>Promise.resolve().then(()=>require("./desktop-CFgo0jo7.cjs"))},{id:"diff",name:"Diff",import:()=>Promise.resolve().then(()=>require("./diff-BsEkKwI8.cjs"))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>Promise.resolve().then(()=>require("./docker-hwiw4W8I.cjs"))},{id:"dotenv",name:"dotEnv",import:()=>Promise.resolve().then(()=>require("./dotenv-CJ5o3G1C.cjs"))},{id:"dream-maker",name:"Dream Maker",import:()=>Promise.resolve().then(()=>require("./dream-maker-DBharE9Q.cjs"))},{id:"edge",name:"Edge",import:()=>Promise.resolve().then(()=>require("./edge-D4UQJJI4.cjs"))},{id:"elixir",name:"Elixir",import:()=>Promise.resolve().then(()=>require("./elixir-Drlan-oo.cjs"))},{id:"elm",name:"Elm",import:()=>Promise.resolve().then(()=>require("./elm-BcZHvJ8F.cjs"))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>Promise.resolve().then(()=>require("./emacs-lisp-CDDyFsvQ.cjs"))},{id:"erb",name:"ERB",import:()=>Promise.resolve().then(()=>require("./erb-CnncUHI5.cjs"))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>Promise.resolve().then(()=>require("./erlang-3VgdrQXV.cjs"))},{id:"fennel",name:"Fennel",import:()=>Promise.resolve().then(()=>require("./fennel-BvcDRFAV.cjs"))},{id:"fish",name:"Fish",import:()=>Promise.resolve().then(()=>require("./fish-CnamI0Ar.cjs"))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>Promise.resolve().then(()=>require("./fluent-DFpT66K8.cjs"))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>Promise.resolve().then(()=>require("./fortran-fixed-form-BEveYJYo.cjs"))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>Promise.resolve().then(()=>require("./fortran-free-form-IaGrWIda.cjs"))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>Promise.resolve().then(()=>require("./fsharp-JIb2RzF4.cjs"))},{id:"gdresource",name:"GDResource",import:()=>Promise.resolve().then(()=>require("./gdresource-YnzGv0RG.cjs"))},{id:"gdscript",name:"GDScript",import:()=>Promise.resolve().then(()=>require("./gdscript-5N_43TPQ.cjs"))},{id:"gdshader",name:"GDShader",import:()=>Promise.resolve().then(()=>require("./gdshader-Bl85Hrm5.cjs"))},{id:"genie",name:"Genie",import:()=>Promise.resolve().then(()=>require("./genie-DGsxMAbQ.cjs"))},{id:"gherkin",name:"Gherkin",import:()=>Promise.resolve().then(()=>require("./gherkin-CVV6nEUH.cjs"))},{id:"git-commit",name:"Git Commit Message",import:()=>Promise.resolve().then(()=>require("./git-commit-CBAAAmmS.cjs"))},{id:"git-rebase",name:"Git Rebase Message",import:()=>Promise.resolve().then(()=>require("./git-rebase-teQnnXpn.cjs"))},{id:"gleam",name:"Gleam",import:()=>Promise.resolve().then(()=>require("./gleam-nR4mjrhK.cjs"))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>Promise.resolve().then(()=>require("./glimmer-js-DAfoXdQ-.cjs"))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>Promise.resolve().then(()=>require("./glimmer-ts-CeO7A1-5.cjs"))},{id:"glsl",name:"GLSL",import:()=>Promise.resolve().then(()=>require("./glsl-RcB3ToOh.cjs"))},{id:"gnuplot",name:"Gnuplot",import:()=>Promise.resolve().then(()=>require("./gnuplot-CurtDYoJ.cjs"))},{id:"go",name:"Go",import:()=>Promise.resolve().then(()=>require("./go-CM9_GlwL.cjs"))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.resolve().then(()=>require("./graphql-DWzZPj_V.cjs"))},{id:"groovy",name:"Groovy",import:()=>Promise.resolve().then(()=>require("./groovy-BaVp9Il5.cjs"))},{id:"hack",name:"Hack",import:()=>Promise.resolve().then(()=>require("./hack-DDrvhASj.cjs"))},{id:"haml",name:"Ruby Haml",import:()=>Promise.resolve().then(()=>require("./haml-BK3-xJKV.cjs"))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.resolve().then(()=>require("./handlebars-DjnxWdl9.cjs"))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>Promise.resolve().then(()=>require("./haskell-suhyCHEm.cjs"))},{id:"haxe",name:"Haxe",import:()=>Promise.resolve().then(()=>require("./haxe-BIQU1qHi.cjs"))},{id:"hcl",name:"HashiCorp HCL",import:()=>Promise.resolve().then(()=>require("./hcl-CbQ1yCnz.cjs"))},{id:"hjson",name:"Hjson",import:()=>Promise.resolve().then(()=>require("./hjson-Ddklb4QM.cjs"))},{id:"hlsl",name:"HLSL",import:()=>Promise.resolve().then(()=>require("./hlsl-B4NkiBfC.cjs"))},{id:"html",name:"HTML",import:()=>Promise.resolve().then(()=>require("./html-DiyIZFpA.cjs"))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.resolve().then(()=>require("./html-derivative-m27xHPNF.cjs"))},{id:"http",name:"HTTP",import:()=>Promise.resolve().then(()=>require("./http-B4wR56ug.cjs"))},{id:"hxml",name:"HXML",import:()=>Promise.resolve().then(()=>require("./hxml-Bv32SKqg.cjs"))},{id:"hy",name:"Hy",import:()=>Promise.resolve().then(()=>require("./hy-DpyTdO3T.cjs"))},{id:"imba",name:"Imba",import:()=>Promise.resolve().then(()=>require("./imba-B0C0YBnY.cjs"))},{id:"ini",name:"INI",aliases:["properties"],import:()=>Promise.resolve().then(()=>require("./ini-CymULaw_.cjs"))},{id:"java",name:"Java",import:()=>Promise.resolve().then(()=>require("./java-Bn1Lvoni.cjs"))},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>Promise.resolve().then(()=>require("./javascript-Bnnicc83.cjs"))},{id:"jinja",name:"Jinja",import:()=>Promise.resolve().then(()=>require("./jinja-D8wWNdMe.cjs"))},{id:"jison",name:"Jison",import:()=>Promise.resolve().then(()=>require("./jison-f6CjvOiG.cjs"))},{id:"json",name:"JSON",import:()=>Promise.resolve().then(()=>require("./json-y-J1j5EW.cjs"))},{id:"json5",name:"JSON5",import:()=>Promise.resolve().then(()=>require("./json5-CzvlWgZ7.cjs"))},{id:"jsonc",name:"JSON with Comments",import:()=>Promise.resolve().then(()=>require("./jsonc-BnhWfmQw.cjs"))},{id:"jsonl",name:"JSON Lines",import:()=>Promise.resolve().then(()=>require("./jsonl-BbGkWPJz.cjs"))},{id:"jsonnet",name:"Jsonnet",import:()=>Promise.resolve().then(()=>require("./jsonnet-Bn--UDZ1.cjs"))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>Promise.resolve().then(()=>require("./jssm-4CSVp8lc.cjs"))},{id:"jsx",name:"JSX",import:()=>Promise.resolve().then(()=>require("./jsx-D8YwVp-7.cjs"))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.resolve().then(()=>require("./julia-CPt_7dt8.cjs"))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>Promise.resolve().then(()=>require("./kotlin-DDI6myF6.cjs"))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>Promise.resolve().then(()=>require("./kusto-OZxALJZT.cjs"))},{id:"latex",name:"LaTeX",import:()=>Promise.resolve().then(()=>require("./latex-C1zmrAP3.cjs"))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>Promise.resolve().then(()=>require("./lean-D1iY-35j.cjs"))},{id:"less",name:"Less",import:()=>Promise.resolve().then(()=>require("./less-DIaY7vQJ.cjs"))},{id:"liquid",name:"Liquid",import:()=>Promise.resolve().then(()=>require("./liquid-mYFf3Ubk.cjs"))},{id:"log",name:"Log file",import:()=>Promise.resolve().then(()=>require("./log-BIXUeBaj.cjs"))},{id:"logo",name:"Logo",import:()=>Promise.resolve().then(()=>require("./logo-B2d3b27P.cjs"))},{id:"lua",name:"Lua",import:()=>Promise.resolve().then(()=>require("./lua-BNycEOCj.cjs"))},{id:"luau",name:"Luau",import:()=>Promise.resolve().then(()=>require("./luau-CvqAeq4F.cjs"))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>Promise.resolve().then(()=>require("./make-Oob5Z9Pk.cjs"))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>Promise.resolve().then(()=>require("./markdown-BGBuj4LZ.cjs"))},{id:"marko",name:"Marko",import:()=>Promise.resolve().then(()=>require("./marko-orX0YPzY.cjs"))},{id:"matlab",name:"MATLAB",import:()=>Promise.resolve().then(()=>require("./matlab-CbN2rF6P.cjs"))},{id:"mdc",name:"MDC",import:()=>Promise.resolve().then(()=>require("./mdc-BNCAtGbK.cjs"))},{id:"mdx",name:"MDX",import:()=>Promise.resolve().then(()=>require("./mdx-Cl31h8mi.cjs"))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>Promise.resolve().then(()=>require("./mermaid-CSogK_LM.cjs"))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>Promise.resolve().then(()=>require("./mipsasm-BseoYJQp.cjs"))},{id:"mojo",name:"Mojo",import:()=>Promise.resolve().then(()=>require("./mojo-D8QAG3Ze.cjs"))},{id:"move",name:"Move",import:()=>Promise.resolve().then(()=>require("./move-DaBrcjat.cjs"))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>Promise.resolve().then(()=>require("./narrat-oOfAO4q8.cjs"))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>Promise.resolve().then(()=>require("./nextflow-BxJSKvPb.cjs"))},{id:"nginx",name:"Nginx",import:()=>Promise.resolve().then(()=>require("./nginx-CWVY90PN.cjs"))},{id:"nim",name:"Nim",import:()=>Promise.resolve().then(()=>require("./nim-CwodQ6jZ.cjs"))},{id:"nix",name:"Nix",import:()=>Promise.resolve().then(()=>require("./nix-DNME0Ea7.cjs"))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>Promise.resolve().then(()=>require("./nushell-DI9Z3l3M.cjs"))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>Promise.resolve().then(()=>require("./objective-c-DVx8Rcni.cjs"))},{id:"objective-cpp",name:"Objective-C++",import:()=>Promise.resolve().then(()=>require("./objective-cpp-s6XI7Jvk.cjs"))},{id:"ocaml",name:"OCaml",import:()=>Promise.resolve().then(()=>require("./ocaml-kUzDDUf2.cjs"))},{id:"pascal",name:"Pascal",import:()=>Promise.resolve().then(()=>require("./pascal-D509_I72.cjs"))},{id:"perl",name:"Perl",import:()=>Promise.resolve().then(()=>require("./perl-CzmOInqo.cjs"))},{id:"php",name:"PHP",import:()=>Promise.resolve().then(()=>require("./php-YwMoY7CJ.cjs"))},{id:"plsql",name:"PL/SQL",import:()=>Promise.resolve().then(()=>require("./plsql-C_qH_YOK.cjs"))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>Promise.resolve().then(()=>require("./po-CBsLQIcu.cjs"))},{id:"polar",name:"Polar",import:()=>Promise.resolve().then(()=>require("./polar-De-CDeYv.cjs"))},{id:"postcss",name:"PostCSS",import:()=>Promise.resolve().then(()=>require("./postcss-BtcsgaYj.cjs"))},{id:"powerquery",name:"PowerQuery",import:()=>Promise.resolve().then(()=>require("./powerquery-B0rHn13V.cjs"))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>Promise.resolve().then(()=>require("./powershell-rCX2OYXT.cjs"))},{id:"prisma",name:"Prisma",import:()=>Promise.resolve().then(()=>require("./prisma-BaaUHYMp.cjs"))},{id:"prolog",name:"Prolog",import:()=>Promise.resolve().then(()=>require("./prolog-DrXD2tGS.cjs"))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>Promise.resolve().then(()=>require("./proto-BtmQjBQu.cjs"))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.resolve().then(()=>require("./pug-CkHoCGUm.cjs"))},{id:"puppet",name:"Puppet",import:()=>Promise.resolve().then(()=>require("./puppet-cIrXIuy8.cjs"))},{id:"purescript",name:"PureScript",import:()=>Promise.resolve().then(()=>require("./purescript-CX9QPs2N.cjs"))},{id:"python",name:"Python",aliases:["py"],import:()=>Promise.resolve().then(()=>require("./python-B9x3euv6.cjs"))},{id:"qml",name:"QML",import:()=>Promise.resolve().then(()=>require("./qml-Dwwb3xcM.cjs"))},{id:"qmldir",name:"QML Directory",import:()=>Promise.resolve().then(()=>require("./qmldir-DNF9H2ir.cjs"))},{id:"qss",name:"Qt Style Sheets",import:()=>Promise.resolve().then(()=>require("./qss-C744dLby.cjs"))},{id:"r",name:"R",import:()=>Promise.resolve().then(()=>require("./r-DgOc9oMe.cjs"))},{id:"racket",name:"Racket",import:()=>Promise.resolve().then(()=>require("./racket-Do9_vqnd.cjs"))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>Promise.resolve().then(()=>require("./raku-BW8wAUIz.cjs"))},{id:"razor",name:"ASP.NET Razor",import:()=>Promise.resolve().then(()=>require("./razor-g8HV3m4q.cjs"))},{id:"reg",name:"Windows Registry Script",import:()=>Promise.resolve().then(()=>require("./reg-CGWN_v-z.cjs"))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>Promise.resolve().then(()=>require("./regexp-N7Z4hEeU.cjs"))},{id:"rel",name:"Rel",import:()=>Promise.resolve().then(()=>require("./rel-BYqA7mnV.cjs"))},{id:"riscv",name:"RISC-V",import:()=>Promise.resolve().then(()=>require("./riscv-ayQMUpo9.cjs"))},{id:"rst",name:"reStructuredText",import:()=>Promise.resolve().then(()=>require("./rst-MlYKz4rn.cjs"))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>Promise.resolve().then(()=>require("./ruby-DJN5DFiR.cjs"))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>Promise.resolve().then(()=>require("./rust-BnFKGEfa.cjs"))},{id:"sas",name:"SAS",import:()=>Promise.resolve().then(()=>require("./sas-F7gHsd4H.cjs"))},{id:"sass",name:"Sass",import:()=>Promise.resolve().then(()=>require("./sass-B9gYryDE.cjs"))},{id:"scala",name:"Scala",import:()=>Promise.resolve().then(()=>require("./scala-C85dOwSU.cjs"))},{id:"scheme",name:"Scheme",import:()=>Promise.resolve().then(()=>require("./scheme-B_XUaARm.cjs"))},{id:"scss",name:"SCSS",import:()=>Promise.resolve().then(()=>require("./scss-Bn9tb5MW.cjs"))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>Promise.resolve().then(()=>require("./sdbl-7Y5u0OW0.cjs"))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>Promise.resolve().then(()=>require("./shaderlab-Ca09aCzm.cjs"))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>Promise.resolve().then(()=>require("./shellscript-3DYM9fut.cjs"))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>Promise.resolve().then(()=>require("./shellsession-CpSha4Rb.cjs"))},{id:"smalltalk",name:"Smalltalk",import:()=>Promise.resolve().then(()=>require("./smalltalk-CCvytUuW.cjs"))},{id:"solidity",name:"Solidity",import:()=>Promise.resolve().then(()=>require("./solidity-BcNcjFC4.cjs"))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>Promise.resolve().then(()=>require("./soy-CeuZwkAk.cjs"))},{id:"sparql",name:"SPARQL",import:()=>Promise.resolve().then(()=>require("./sparql-BRQlWq86.cjs"))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>Promise.resolve().then(()=>require("./splunk-CzITjJj7.cjs"))},{id:"sql",name:"SQL",import:()=>Promise.resolve().then(()=>require("./sql-BqWZrLHB.cjs"))},{id:"ssh-config",name:"SSH Config",import:()=>Promise.resolve().then(()=>require("./ssh-config-DUPeuEdB.cjs"))},{id:"stata",name:"Stata",import:()=>Promise.resolve().then(()=>require("./stata-B-LlW9Cr.cjs"))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>Promise.resolve().then(()=>require("./stylus-ByHs6N-o.cjs"))},{id:"svelte",name:"Svelte",import:()=>Promise.resolve().then(()=>require("./svelte-DXe6QUZV.cjs"))},{id:"swift",name:"Swift",import:()=>Promise.resolve().then(()=>require("./swift-C5DnOriA.cjs"))},{id:"system-verilog",name:"SystemVerilog",import:()=>Promise.resolve().then(()=>require("./system-verilog-ClPLYLwh.cjs"))},{id:"systemd",name:"Systemd Units",import:()=>Promise.resolve().then(()=>require("./systemd-BASX0DlX.cjs"))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>Promise.resolve().then(()=>require("./talonscript-DkCSnLHD.cjs"))},{id:"tasl",name:"Tasl",import:()=>Promise.resolve().then(()=>require("./tasl-BAQJK7KZ.cjs"))},{id:"tcl",name:"Tcl",import:()=>Promise.resolve().then(()=>require("./tcl-CwJAYTvh.cjs"))},{id:"templ",name:"Templ",import:()=>Promise.resolve().then(()=>require("./templ-BZj57XLK.cjs"))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>Promise.resolve().then(()=>require("./terraform-s-pzyVvp.cjs"))},{id:"tex",name:"TeX",import:()=>Promise.resolve().then(()=>require("./tex-CTRO38Wo.cjs"))},{id:"toml",name:"TOML",import:()=>Promise.resolve().then(()=>require("./toml-CyMM7IXy.cjs"))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.resolve().then(()=>require("./ts-tags-hDAF_laC.cjs"))},{id:"tsv",name:"TSV",import:()=>Promise.resolve().then(()=>require("./tsv-DqNGnuVj.cjs"))},{id:"tsx",name:"TSX",import:()=>Promise.resolve().then(()=>require("./tsx-DpBRUnKC.cjs"))},{id:"turtle",name:"Turtle",import:()=>Promise.resolve().then(()=>require("./turtle-DfO3eAsu.cjs"))},{id:"twig",name:"Twig",import:()=>Promise.resolve().then(()=>require("./twig-B2qtj3-0.cjs"))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>Promise.resolve().then(()=>require("./typescript-BqvpT6pB.cjs"))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>Promise.resolve().then(()=>require("./typespec-P-ZVy8yC.cjs"))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>Promise.resolve().then(()=>require("./typst-BVh2IsT9.cjs"))},{id:"v",name:"V",import:()=>Promise.resolve().then(()=>require("./v-BUlE9136.cjs"))},{id:"vala",name:"Vala",import:()=>Promise.resolve().then(()=>require("./vala-BIymb2K_.cjs"))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>Promise.resolve().then(()=>require("./vb-IXOh8mqV.cjs"))},{id:"verilog",name:"Verilog",import:()=>Promise.resolve().then(()=>require("./verilog-BiglCqvO.cjs"))},{id:"vhdl",name:"VHDL",import:()=>Promise.resolve().then(()=>require("./vhdl-CJUzuS2t.cjs"))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>Promise.resolve().then(()=>require("./viml-B1nKLcgt.cjs"))},{id:"vue",name:"Vue",import:()=>Promise.resolve().then(()=>require("./vue-Bz7ob1S8.cjs"))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.resolve().then(()=>require("./vue-html-rW8a786u.cjs"))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>Promise.resolve().then(()=>require("./vyper-CO9xUkIY.cjs"))},{id:"wasm",name:"WebAssembly",import:()=>Promise.resolve().then(()=>require("./wasm-CdIThIat.cjs"))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>Promise.resolve().then(()=>require("./wenyan-BSJ3fk7e.cjs"))},{id:"wgsl",name:"WGSL",import:()=>Promise.resolve().then(()=>require("./wgsl-d3zZE7ZN.cjs"))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>Promise.resolve().then(()=>require("./wikitext-BRCqXN2g.cjs"))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>Promise.resolve().then(()=>require("./wolfram-C3rR92zj.cjs"))},{id:"xml",name:"XML",import:()=>Promise.resolve().then(()=>require("./xml-CJLy8-Dx.cjs"))},{id:"xsl",name:"XSL",import:()=>Promise.resolve().then(()=>require("./xsl-D4BTm9yO.cjs"))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>Promise.resolve().then(()=>require("./yaml-7DV6pRKj.cjs"))},{id:"zenscript",name:"ZenScript",import:()=>Promise.resolve().then(()=>require("./zenscript-BWMxwjeH.cjs"))},{id:"zig",name:"Zig",import:()=>Promise.resolve().then(()=>require("./zig-yAcNfpgW.cjs"))}],hb=Object.fromEntries(Ph.map(e=>[e.id,e.import])),fb=Object.fromEntries(Ph.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),pb={...hb,...fb},mb=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>Promise.resolve().then(()=>require("./andromeeda-BXc5FOIb.cjs"))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>Promise.resolve().then(()=>require("./aurora-x-C5IpmIOG.cjs"))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./ayu-dark-Cv7nTiif.cjs"))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-frappe-DXAedND3.cjs"))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>Promise.resolve().then(()=>require("./catppuccin-latte-mwGw3-Ej.cjs"))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-macchiato-cQCk9ADg.cjs"))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-mocha-ClSzDZSl.cjs"))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>Promise.resolve().then(()=>require("./dark-plus-Cd5emcYO.cjs"))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>Promise.resolve().then(()=>require("./dracula-BNgwAJ-d.cjs"))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>Promise.resolve().then(()=>require("./dracula-soft-BHZ7sHFu.cjs"))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./everforest-dark-_sBMomR1.cjs"))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>Promise.resolve().then(()=>require("./everforest-light-H0xoYxl0.cjs"))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-BKL9xNgN.cjs"))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-default-Dsv5MuSi.cjs"))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-dimmed-CtB9hz8U.cjs"))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-high-contrast-BqZVM-jF.cjs"))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-BFTOhCbz.cjs"))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-default-BZoWH9dH.cjs"))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-high-contrast-Ks3kPGJU.cjs"))},{id:"houston",displayName:"Houston",type:"dark",import:()=>Promise.resolve().then(()=>require("./houston-T57H3gQZ.cjs"))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>Promise.resolve().then(()=>require("./kanagawa-dragon-BJZF7xDr.cjs"))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>Promise.resolve().then(()=>require("./kanagawa-lotus-BhgzmRV4.cjs"))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>Promise.resolve().then(()=>require("./kanagawa-wave-BgJip59C.cjs"))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>Promise.resolve().then(()=>require("./laserwave--izBLY1I.cjs"))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>Promise.resolve().then(()=>require("./light-plus-B5D0le0o.cjs"))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-Dj0-OyRN.cjs"))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-darker-Dvfs29ir.cjs"))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>Promise.resolve().then(()=>require("./material-theme-lighter-EU3ZGl_r.cjs"))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-ocean-px_3Pwqa.cjs"))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-palenight-38jxvsGX.cjs"))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./min-dark-tt5o_I5e.cjs"))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>Promise.resolve().then(()=>require("./min-light-tmTHl_CQ.cjs"))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>Promise.resolve().then(()=>require("./monokai-DMIxv6MM.cjs"))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>Promise.resolve().then(()=>require("./night-owl-BN78kThQ.cjs"))},{id:"nord",displayName:"Nord",type:"dark",import:()=>Promise.resolve().then(()=>require("./nord-Ca5AGUWc.cjs"))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>Promise.resolve().then(()=>require("./one-dark-pro-JOzzHStv.cjs"))},{id:"one-light",displayName:"One Light",type:"light",import:()=>Promise.resolve().then(()=>require("./one-light-020-h_lv.cjs"))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>Promise.resolve().then(()=>require("./plastic-r5piqq-S.cjs"))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>Promise.resolve().then(()=>require("./poimandres-BLP3NNjc.cjs"))},{id:"red",displayName:"Red",type:"dark",import:()=>Promise.resolve().then(()=>require("./red-BQGOv1D5.cjs"))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>Promise.resolve().then(()=>require("./rose-pine-DKEdv1Oe.cjs"))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>Promise.resolve().then(()=>require("./rose-pine-dawn-Bvt6DtVH.cjs"))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>Promise.resolve().then(()=>require("./rose-pine-moon-cHuJy0Ng.cjs"))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./slack-dark-akqwQ7ED.cjs"))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>Promise.resolve().then(()=>require("./slack-ochin-BoQQWmTv.cjs"))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>Promise.resolve().then(()=>require("./snazzy-light-D_IwRieF.cjs"))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./solarized-dark-gmm-WbDC.cjs"))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>Promise.resolve().then(()=>require("./solarized-light-DzcxRSZP.cjs"))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>Promise.resolve().then(()=>require("./synthwave-84-BBRLOmNT.cjs"))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>Promise.resolve().then(()=>require("./tokyo-night-9T7_vGSy.cjs"))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>Promise.resolve().then(()=>require("./vesper-DqLWLxOu.cjs"))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>Promise.resolve().then(()=>require("./vitesse-black-MF-1S1MG.cjs"))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./vitesse-dark-SIffJYSe.cjs"))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>Promise.resolve().then(()=>require("./vitesse-light-U63SkYGT.cjs"))}],gb=Object.fromEntries(mb.map(e=>[e.id,e.import]));let An=class extends Error{constructor(t){super(t),this.name="ShikiError"}},Du=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function bb(){return 2147483648}function Eb(){return typeof performance<"u"?performance.now():Date.now()}const xb=(e,t)=>e+(t-e%t)%t;async function yb(e){let t,n;const r={};function i(p){n=p,r.HEAPU8=new Uint8Array(p),r.HEAPU32=new Uint32Array(p)}function s(p,g,b){r.HEAPU8.copyWithin(p,g,g+b)}function a(p){try{return t.grow(p-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function o(p){const g=r.HEAPU8.length;p=p>>>0;const b=bb();if(p>b)return!1;for(let T=1;T<=4;T*=2){let y=g*(1+.2/T);y=Math.min(y,p+100663296);const C=Math.min(b,xb(Math.max(p,y),65536));if(a(C))return!0}return!1}const u=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function l(p,g,b=1024){const T=g+b;let y=g;for(;p[y]&&!(y>=T);)++y;if(y-g>16&&p.buffer&&u)return u.decode(p.subarray(g,y));let C="";for(;g<y;){let S=p[g++];if(!(S&128)){C+=String.fromCharCode(S);continue}const P=p[g++]&63;if((S&224)===192){C+=String.fromCharCode((S&31)<<6|P);continue}const D=p[g++]&63;if((S&240)===224?S=(S&15)<<12|P<<6|D:S=(S&7)<<18|P<<12|D<<6|p[g++]&63,S<65536)C+=String.fromCharCode(S);else{const w=S-65536;C+=String.fromCharCode(55296|w>>10,56320|w&1023)}}return C}function d(p,g){return p?l(r.HEAPU8,p,g):""}const c={emscripten_get_now:Eb,emscripten_memcpy_big:s,emscripten_resize_heap:o,fd_write:()=>0};async function m(){const g=await e({env:c,wasi_snapshot_preview1:c});t=g.memory,i(t.buffer),Object.assign(r,g),r.UTF8ToString=d}return await m(),r}var Tb=Object.defineProperty,Cb=(e,t,n)=>t in e?Tb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ot=(e,t,n)=>(Cb(e,typeof t!="symbol"?t+"":t,n),n);let ht=null;function Sb(e){throw new Du(e.UTF8ToString(e.getLastOnigError()))}class ga{constructor(t){ot(this,"utf16Length"),ot(this,"utf8Length"),ot(this,"utf16Value"),ot(this,"utf8Value"),ot(this,"utf16OffsetToUtf8"),ot(this,"utf8OffsetToUtf16");const n=t.length,r=ga._utf8ByteLength(t),i=r!==n,s=i?new Uint32Array(n+1):null;i&&(s[n]=r);const a=i?new Uint32Array(r+1):null;i&&(a[r]=n);const o=new Uint8Array(r);let u=0;for(let l=0;l<n;l++){const d=t.charCodeAt(l);let c=d,m=!1;if(d>=55296&&d<=56319&&l+1<n){const p=t.charCodeAt(l+1);p>=56320&&p<=57343&&(c=(d-55296<<10)+65536|p-56320,m=!0)}i&&(s[l]=u,m&&(s[l+1]=u),c<=127?a[u+0]=l:c<=2047?(a[u+0]=l,a[u+1]=l):c<=65535?(a[u+0]=l,a[u+1]=l,a[u+2]=l):(a[u+0]=l,a[u+1]=l,a[u+2]=l,a[u+3]=l)),c<=127?o[u++]=c:c<=2047?(o[u++]=192|(c&1984)>>>6,o[u++]=128|(c&63)>>>0):c<=65535?(o[u++]=224|(c&61440)>>>12,o[u++]=128|(c&4032)>>>6,o[u++]=128|(c&63)>>>0):(o[u++]=240|(c&1835008)>>>18,o[u++]=128|(c&258048)>>>12,o[u++]=128|(c&4032)>>>6,o[u++]=128|(c&63)>>>0),m&&l++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=o,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=a}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r<i;r++){const s=t.charCodeAt(r);let a=s,o=!1;if(s>=55296&&s<=56319&&r+1<i){const u=t.charCodeAt(r+1);u>=56320&&u<=57343&&(a=(s-55296<<10)+65536|u-56320,o=!0)}a<=127?n+=1:a<=2047?n+=2:a<=65535?n+=3:n+=4,o&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const an=class{constructor(e){if(ot(this,"id",++an.LAST_ID),ot(this,"_onigBinding"),ot(this,"content"),ot(this,"utf16Length"),ot(this,"utf8Length"),ot(this,"utf16OffsetToUtf8"),ot(this,"utf8OffsetToUtf16"),ot(this,"ptr"),!ht)throw new Du("Must invoke loadWasm first.");this._onigBinding=ht,this.content=e;const t=new ga(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!an._sharedPtrInUse?(an._sharedPtr||(an._sharedPtr=ht.omalloc(1e4)),an._sharedPtrInUse=!0,ht.HEAPU8.set(t.utf8Value,an._sharedPtr),this.ptr=an._sharedPtr):this.ptr=t.createString(ht)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===an._sharedPtr?an._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};let qi=an;ot(qi,"LAST_ID",0);ot(qi,"_sharedPtr",0);ot(qi,"_sharedPtrInUse",!1);class Ab{constructor(t){if(ot(this,"_onigBinding"),ot(this,"_ptr"),!ht)throw new Du("Must invoke loadWasm first.");const n=[],r=[];for(let o=0,u=t.length;o<u;o++){const l=new ga(t[o]);n[o]=l.createString(ht),r[o]=l.utf8Length}const i=ht.omalloc(4*t.length);ht.HEAPU32.set(n,i/4);const s=ht.omalloc(4*t.length);ht.HEAPU32.set(r,s/4);const a=ht.createOnigScanner(i,s,t.length);for(let o=0,u=t.length;o<u;o++)ht.ofree(n[o]);ht.ofree(s),ht.ofree(i),a===0&&Sb(ht),this._onigBinding=ht,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof t=="string"){t=new qi(t);const s=this._findNextMatchSync(t,n,!1,i);return t.dispose(),s}return this._findNextMatchSync(t,n,!1,i)}_findNextMatchSync(t,n,r,i){const s=this._onigBinding,a=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),i);if(a===0)return null;const o=s.HEAPU32;let u=a/4;const l=o[u++],d=o[u++],c=[];for(let m=0;m<d;m++){const p=t.convertUtf8OffsetToUtf16(o[u++]),g=t.convertUtf8OffsetToUtf16(o[u++]);c[m]={start:p,end:g,length:g-p}}return{index:l,captureIndices:c}}}function kb(e){return typeof e.instantiator=="function"}function Ib(e){return typeof e.default=="function"}function _b(e){return typeof e.data<"u"}function vb(e){return typeof Response<"u"&&e instanceof Response}function Db(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let ss;function wb(e){if(ss)return ss;async function t(){ht=await yb(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),kb(r)?r=await r.instantiator(n):Ib(r)?r=await r.default(n):(_b(r)&&(r=r.data),vb(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await Pb(r)(n):r=await Nb(r)(n):Db(r)?r=await qa(r)(n):r instanceof WebAssembly.Module?r=await qa(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await qa(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return ss=t(),ss}function qa(e){return t=>WebAssembly.instantiate(e,t)}function Pb(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Nb(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let Rb;function Lb(){return Rb}async function Nh(e){return e&&await wb(e),{createScanner(t){return new Ab(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new qi(t)}}}function Ob(e){return wu(e)}function wu(e){return Array.isArray(e)?Fb(e):e instanceof RegExp?e:typeof e=="object"?Mb(e):e}function Fb(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=wu(e[n]);return t}function Mb(e){let t={};for(let n in e)t[n]=wu(e[n]);return t}function Rh(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function Lh(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Lh(e.substring(0,e.length-1)):e.substr(~t+1)}var Va=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,as=class{static hasCaptures(e){return e===null?!1:(Va.lastIndex=0,Va.test(e))}static replaceCaptures(e,t,n){return e.replace(Va,(r,i,s,a)=>{let o=n[parseInt(i||s,10)];if(o){let u=t.substring(o.start,o.end);for(;u[0]===".";)u=u.substring(1);switch(a){case"downcase":return u.toLowerCase();case"upcase":return u.toUpperCase();default:return u}}else return r})}};function Oh(e,t){return e<t?-1:e>t?1:0}function Fh(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;i<n;i++){let s=Oh(e[i],t[i]);if(s!==0)return s}return 0}return n-r}function ic(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Mh(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Bh=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Fs=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Hb(e),t)}static createFromParsedTheme(e,t){return zb(e,t)}_cachedMatchRoot=new Bh(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>Bb(e.parent,i.parentScopes));return r?new jh(r.fontStyle,r.foreground,r.background):null}},Wa=class ys{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new ys(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new ys(n,t[r]);return n}push(t){return new ys(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function Bb(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!jb(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function jb(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var jh=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Hb(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,s=t.length;i<s;i++){let a=t[i];if(!a.settings)continue;let o;if(typeof a.scope=="string"){let c=a.scope;c=c.replace(/^[,]+/,""),c=c.replace(/[,]+$/,""),o=c.split(",")}else Array.isArray(a.scope)?o=a.scope:o=[""];let u=-1;if(typeof a.settings.fontStyle=="string"){u=0;let c=a.settings.fontStyle.split(" ");for(let m=0,p=c.length;m<p;m++)switch(c[m]){case"italic":u=u|1;break;case"bold":u=u|2;break;case"underline":u=u|4;break;case"strikethrough":u=u|8;break}}let l=null;typeof a.settings.foreground=="string"&&ic(a.settings.foreground)&&(l=a.settings.foreground);let d=null;typeof a.settings.background=="string"&&ic(a.settings.background)&&(d=a.settings.background);for(let c=0,m=o.length;c<m;c++){let g=o[c].trim().split(" "),b=g[g.length-1],T=null;g.length>1&&(T=g.slice(0,g.length-1),T.reverse()),n[r++]=new Ub(b,T,i,u,l,d)}}return n}var Ub=class{constructor(e,t,n,r,i,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=s}},Tn=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Tn||{});function zb(e,t){e.sort((u,l)=>{let d=Oh(u.scope,l.scope);return d!==0||(d=Fh(u.parentScopes,l.parentScopes),d!==0)?d:u.index-l.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let u=e.shift();u.fontStyle!==-1&&(n=u.fontStyle),u.foreground!==null&&(r=u.foreground),u.background!==null&&(i=u.background)}let s=new $b(t),a=new jh(n,s.getId(r),s.getId(i)),o=new Vb(new Ro(0,null,-1,0,0),[]);for(let u=0,l=e.length;u<l;u++){let d=e[u];o.insert(0,d.scope,d.parentScopes,d.fontStyle,s.getId(d.foreground),s.getId(d.background))}return new Fs(s,a,o)}var $b=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},qb=Object.freeze([]),Ro=class Hh{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,i,s){this.scopeDepth=t,this.parentScopes=n||qb,this.fontStyle=r,this.foreground=i,this.background=s}clone(){return new Hh(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},Vb=class Lo{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const s=n.parentScopes[i].length-t.parentScopes[r].length;if(s!==0)return s;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,s;if(r===-1?(i=t,s=""):(i=t.substring(0,r),s=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Lo._cmpBySpecificity),n}insert(t,n,r,i,s,a){if(n===""){this._doInsertHere(t,r,i,s,a);return}let o=n.indexOf("."),u,l;o===-1?(u=n,l=""):(u=n.substring(0,o),l=n.substring(o+1));let d;this._children.hasOwnProperty(u)?d=this._children[u]:(d=new Lo(this._mainRule.clone(),Ro.cloneArr(this._rulesWithParentScopes)),this._children[u]=d),d.insert(t+1,l,r,i,s,a)}_doInsertHere(t,n,r,i,s){if(n===null){this._mainRule.acceptOverwrite(t,r,i,s);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let u=this._rulesWithParentScopes[a];if(Fh(u.parentScopes,n)===0){u.acceptOverwrite(t,r,i,s);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new Ro(t,n,r,i,s))}},Nr=class qt{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=qt.getLanguageId(t),r=qt.getTokenType(t),i=qt.getFontStyle(t),s=qt.getForeground(t),a=qt.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:s,background:a})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,s,a,o){let u=qt.getLanguageId(t),l=qt.getTokenType(t),d=qt.containsBalancedBrackets(t)?1:0,c=qt.getFontStyle(t),m=qt.getForeground(t),p=qt.getBackground(t);return n!==0&&(u=n),r!==8&&(l=r),i!==null&&(d=i?1:0),s!==-1&&(c=s),a!==0&&(m=a),o!==0&&(p=o),(u<<0|l<<8|d<<10|c<<11|m<<15|p<<24)>>>0}};function Ms(e,t){const n=[],r=Wb(e);let i=r.next();for(;i!==null;){let u=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":u=1;break;case"L":u=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let l=a();if(n.push({matcher:l,priority:u}),i!==",")break;i=r.next()}return n;function s(){if(i==="-"){i=r.next();const u=s();return l=>!!u&&!u(l)}if(i==="("){i=r.next();const u=o();return i===")"&&(i=r.next()),u}if(sc(i)){const u=[];do u.push(i),i=r.next();while(sc(i));return l=>t(u,l)}return null}function a(){const u=[];let l=s();for(;l;)u.push(l),l=s();return d=>u.every(c=>c(d))}function o(){const u=[];let l=a();for(;l&&(u.push(l),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");l=a()}return d=>u.some(c=>c(d))}}function sc(e){return!!e&&!!e.match(/[\w\.:]+/)}function Wb(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function Uh(e){typeof e.dispose=="function"&&e.dispose()}var Di=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Gb=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Yb=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Kb=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Di(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Yb;for(const n of e)Qb(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Di){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Qb(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=n.lookup(t);e instanceof Di?Ts({baseGrammar:s,selfGrammar:i},r):Oo(e.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},r);const a=n.injections(e.scopeName);if(a)for(const o of a)r.add(new Di(o))}function Oo(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Bs([r],t,n)}}function Ts(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Bs(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Bs(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Bs(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Rh({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Bs(r.patterns,{...t,repository:i},n);const s=r.include;if(!s)continue;const a=zh(s);switch(a.kind){case 0:Ts({...t,selfGrammar:t.baseGrammar},n);break;case 1:Ts(t,n);break;case 2:Oo(a.ruleName,{...t,repository:i},n);break;case 3:case 4:const o=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){const u={baseGrammar:t.baseGrammar,selfGrammar:o,repository:i};a.kind===4?Oo(a.ruleName,u,n):Ts(u,n)}else a.kind===4?n.add(new Gb(a.scopeName,a.ruleName)):n.add(new Di(a.scopeName));break}}}var Xb=class{kind=0},Zb=class{kind=1},Jb=class{constructor(e){this.ruleName=e}kind=2},e2=class{constructor(e){this.scopeName=e}kind=3},t2=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function zh(e){if(e==="$base")return new Xb;if(e==="$self")return new Zb;const t=e.indexOf("#");if(t===-1)return new e2(e);if(t===0)return new Jb(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new t2(n,r)}}var n2=/\\(\d+)/,ac=/\\(\d+)/g,r2=-1,$h=-2;var Vi=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=as.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=as.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Lh(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:as.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:as.replaceCaptures(this._contentName,e,t)}},i2=class extends Vi{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},s2=class extends Vi{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new wi(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Pi,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},oc=class extends Vi{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Pi,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Fo=class extends Vi{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,s,a,o,u,l){super(e,t,n,r),this._begin=new wi(i,this.id),this.beginCaptures=s,this._end=new wi(a||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=o,this.applyEndPatternLast=u||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Pi;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},js=class extends Vi{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,s,a,o,u){super(e,t,n,r),this._begin=new wi(i,this.id),this.beginCaptures=s,this.whileCaptures=o,this._while=new wi(a,$h),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Pi;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Pi,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},qh=class Ct{static createCaptureRule(t,n,r,i,s){return t.registerRule(a=>new i2(n,a,r,i,s))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new s2(t.$vscodeTextmateLocation,t.id,t.name,t.match,Ct._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Rh({},r,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new oc(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Ct._compilePatterns(s,n,r))}return t.while?new js(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ct._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,Ct._compileCaptures(t.whileCaptures||t.captures,n,r),Ct._compilePatterns(t.patterns,n,r)):new Fo(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ct._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,Ct._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,Ct._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let s=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);o>s&&(s=o)}for(let a=0;a<=s;a++)i[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);let u=0;t[a].patterns&&(u=Ct.getCompiledRuleId(t[a],n,r)),i[o]=Ct.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,u)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let s=0,a=t.length;s<a;s++){const o=t[s];let u=-1;if(o.include){const l=zh(o.include);switch(l.kind){case 0:case 1:u=Ct.getCompiledRuleId(r[o.include],n,r);break;case 2:let d=r[l.ruleName];d&&(u=Ct.getCompiledRuleId(d,n,r));break;case 3:case 4:const c=l.scopeName,m=l.kind===4?l.ruleName:null,p=n.getExternalGrammar(c,r);if(p)if(m){let g=p.repository[m];g&&(u=Ct.getCompiledRuleId(g,n,p.repository))}else u=Ct.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else u=Ct.getCompiledRuleId(o,n,r);if(u!==-1){const l=n.getRule(u);let d=!1;if((l instanceof oc||l instanceof Fo||l instanceof js)&&l.hasMissingPatterns&&l.patterns.length===0&&(d=!0),d)continue;i.push(u)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},wi=class Vh{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const r=t.length;let i=0,s=[],a=!1;for(let o=0;o<r;o++)if(t.charAt(o)==="\\"&&o+1<r){const l=t.charAt(o+1);l==="z"?(s.push(t.substring(i,o)),s.push("$(?!\\n)(?<!\\n)"),i=o+2):(l==="A"||l==="G")&&(a=!0),o++}this.hasAnchor=a,i===0?this.source=t:(s.push(t.substring(i,r)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=n2.test(this.source):this.hasBackReferences=!1}clone(){return new Vh(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>t.substring(i.start,i.end));return ac.lastIndex=0,this.source.replace(ac,(i,s)=>Mh(r[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],s,a,o,u;for(s=0,a=this.source.length;s<a;s++)o=this.source.charAt(s),t[s]=o,n[s]=o,r[s]=o,i[s]=o,o==="\\"&&s+1<a&&(u=this.source.charAt(s+1),u==="A"?(t[s+1]="￿",n[s+1]="￿",r[s+1]="A",i[s+1]="A"):u==="G"?(t[s+1]="￿",n[s+1]="G",r[s+1]="￿",i[s+1]="G"):(t[s+1]=u,n[s+1]=u,r[s+1]=u,i[s+1]=u),s++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Pi=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new uc(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new uc(e,r,this._items.map(i=>i.ruleId))}},uc=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
17
- `)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Ga=class{constructor(e,t){this.languageId=e,this.tokenType=t}},a2=class Mo{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new Ga(t,8),this._embeddedLanguagesMatcher=new o2(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Mo._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Ga(0,0);_getBasicScopeAttributes=new Bh(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Ga(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Mo.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},o2=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>Mh(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<"u"&&process.env.VSCODE_TEXTMATE_DEBUG;var lc=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Wh(e,t,n,r,i,s,a,o){const u=t.content.length;let l=!1,d=-1;if(a){const p=u2(e,t,n,r,i,s);i=p.stack,r=p.linePos,n=p.isFirstLine,d=p.anchorPosition}const c=Date.now();for(;!l;){if(o!==0&&Date.now()-c>o)return new lc(i,!0);m()}return new lc(i,!1);function m(){const p=l2(e,t,n,r,i,d);if(!p){s.produce(i,u),l=!0;return}const g=p.captureIndices,b=p.matchedRuleId,T=g&&g.length>0?g[0].end>r:!1;if(b===r2){const y=i.getRule(e);s.produce(i,g[0].start),i=i.withContentNameScopesList(i.nameScopesList),hi(e,t,n,i,s,y.endCaptures,g),s.produce(i,g[0].end);const C=i;if(i=i.parent,d=C.getAnchorPos(),!T&&C.getEnterPos()===r){i=C,s.produce(i,u),l=!0;return}}else{const y=e.getRule(b);s.produce(i,g[0].start);const C=i,S=y.getName(t.content,g),P=i.contentNameScopesList.pushAttributed(S,e);if(i=i.push(b,r,d,g[0].end===u,null,P,P),y instanceof Fo){const D=y;hi(e,t,n,i,s,D.beginCaptures,g),s.produce(i,g[0].end),d=g[0].end;const w=D.getContentName(t.content,g),B=P.pushAttributed(w,e);if(i=i.withContentNameScopesList(B),D.endHasBackReferences&&(i=i.withEndRule(D.getEndWithResolvedBackReferences(t.content,g))),!T&&C.hasSameRuleAs(i)){i=i.pop(),s.produce(i,u),l=!0;return}}else if(y instanceof js){const D=y;hi(e,t,n,i,s,D.beginCaptures,g),s.produce(i,g[0].end),d=g[0].end;const w=D.getContentName(t.content,g),B=P.pushAttributed(w,e);if(i=i.withContentNameScopesList(B),D.whileHasBackReferences&&(i=i.withEndRule(D.getWhileWithResolvedBackReferences(t.content,g))),!T&&C.hasSameRuleAs(i)){i=i.pop(),s.produce(i,u),l=!0;return}}else if(hi(e,t,n,i,s,y.captures,g),s.produce(i,g[0].end),i=i.pop(),!T){i=i.safePop(),s.produce(i,u),l=!0;return}}g[0].end>r&&(r=g[0].end,n=!1)}}function u2(e,t,n,r,i,s){let a=i.beginRuleCapturedEOL?0:-1;const o=[];for(let u=i;u;u=u.pop()){const l=u.getRule(e);l instanceof js&&o.push({rule:l,stack:u})}for(let u=o.pop();u;u=o.pop()){const{ruleScanner:l,findOptions:d}=h2(u.rule,e,u.stack.endRule,n,r===a),c=l.findNextMatchSync(t,r,d);if(c){if(c.ruleId!==$h){i=u.stack.pop();break}c.captureIndices&&c.captureIndices.length&&(s.produce(u.stack,c.captureIndices[0].start),hi(e,t,n,u.stack,s,u.rule.whileCaptures,c.captureIndices),s.produce(u.stack,c.captureIndices[0].end),a=c.captureIndices[0].end,c.captureIndices[0].end>r&&(r=c.captureIndices[0].end,n=!1))}else{i=u.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:a,isFirstLine:n}}function l2(e,t,n,r,i,s){const a=c2(e,t,n,r,i,s),o=e.getInjections();if(o.length===0)return a;const u=d2(o,e,t,n,r,i,s);if(!u)return a;if(!a)return u;const l=a.captureIndices[0].start,d=u.captureIndices[0].start;return d<l||u.priorityMatch&&d===l?u:a}function c2(e,t,n,r,i,s){const a=i.getRule(e),{ruleScanner:o,findOptions:u}=Gh(a,e,i.endRule,n,r===s),l=o.findNextMatchSync(t,r,u);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function d2(e,t,n,r,i,s,a){let o=Number.MAX_VALUE,u=null,l,d=0;const c=s.contentNameScopesList.getScopeNames();for(let m=0,p=e.length;m<p;m++){const g=e[m];if(!g.matcher(c))continue;const b=t.getRule(g.ruleId),{ruleScanner:T,findOptions:y}=Gh(b,t,null,r,i===a),C=T.findNextMatchSync(n,i,y);if(!C)continue;const S=C.captureIndices[0].start;if(!(S>=o)&&(o=S,u=C.captureIndices,l=C.ruleId,d=g.priority,o===i))break}return u?{priorityMatch:d===-1,captureIndices:u,matchedRuleId:l}:null}function Gh(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function h2(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function hi(e,t,n,r,i,s,a){if(s.length===0)return;const o=t.content,u=Math.min(s.length,a.length),l=[],d=a[0].end;for(let c=0;c<u;c++){const m=s[c];if(m===null)continue;const p=a[c];if(p.length===0)continue;if(p.start>d)break;for(;l.length>0&&l[l.length-1].endPos<=p.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,p.start):i.produce(r,p.start),m.retokenizeCapturedWithRuleId){const b=m.getName(o,a),T=r.contentNameScopesList.pushAttributed(b,e),y=m.getContentName(o,a),C=T.pushAttributed(y,e),S=r.push(m.retokenizeCapturedWithRuleId,p.start,-1,!1,null,T,C),P=e.createOnigString(o.substring(0,p.end));Wh(e,P,n&&p.start===0,p.start,S,i,!1,0),Uh(P);continue}const g=m.getName(o,a);if(g!==null){const T=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(g,e);l.push(new f2(T,p.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var f2=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function p2(e,t,n,r,i,s,a,o){return new g2(e,t,n,r,i,s,a,o)}function cc(e,t,n,r,i){const s=Ms(t,Hs),a=qh.getCompiledRuleId(n,r,i.repository);for(const o of s)e.push({debugSelector:t,matcher:o.matcher,ruleId:a,grammar:i,priority:o.priority})}function Hs(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let i=n;i<t.length;i++)if(m2(t[i],r))return n=i+1,!0;return!1})}function m2(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var g2=class{constructor(e,t,n,r,i,s,a,o){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=o,this._basicScopeAttributesProvider=new a2(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=dc(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const u of Object.keys(i)){const l=Ms(u,Hs);for(const d of l)this._tokenTypeMatchers.push({matcher:d.matcher,type:i[u]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let a in i)cc(t,a,i[a],this,r);const s=this._grammarRepository.injections(n);s&&s.forEach(a=>{const o=this.getExternalGrammar(a);if(o){const u=o.injectionSelector;u&&cc(t,u,o,this,o)}})}return t.sort((i,s)=>i.priority-s.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=dc(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=qh.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Bo.NULL){i=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),d=this.themeProvider.getDefaults(),c=Nr.set(0,l.languageId,l.tokenType,null,d.fontStyle,d.foregroundId,d.backgroundId),m=this.getRule(this._rootId).getName(null,null);let p;m?p=gi.createRootAndLookUpScopeName(m,c,this):p=gi.createRoot("unknown",c),t=new Bo(null,this._rootId,-1,-1,!1,null,p,p)}else i=!1,t.reset();e=e+`
18
- `;const s=this.createOnigString(e),a=s.content.length,o=new E2(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),u=Wh(this,s,i,0,t,o,!0,r);return Uh(s),{lineLength:a,lineTokens:o,ruleStack:u.stack,stoppedEarly:u.stoppedEarly}}};function dc(e,t){return e=Ob(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var gi=class on{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(const s of n)i=Wa.push(i,s.scopeNames),r=new on(r,i,s.encodedTokenAttributes);return r}static createRoot(t,n){return new on(null,new Wa(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),s=new Wa(null,t),a=r.themeProvider.themeMatch(s),o=on.mergeAttributes(n,i,a);return new on(null,s,o)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return on.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,s=0,a=0;return r!==null&&(i=r.fontStyle,s=r.foregroundId,a=r.backgroundId),Nr.set(t,n.languageId,n.tokenType,null,i,s,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return on._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const s of r)i=on._pushAttributed(i,s,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),s=t.scopePath.push(n),a=r.themeProvider.themeMatch(s),o=on.mergeAttributes(t.tokenAttributes,i,a);return new on(t,s,o)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},Bo=class qn{constructor(t,n,r,i,s,a,o,u){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=u,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new qn(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:qn._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?gi.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){qn._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,s,a,o){return new qn(this,t,n,r,i,s,a,o)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new qn(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=gi.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new qn(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,gi.fromExtension(r,n.contentNameScopesList))}},b2=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Ms(n,Hs).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Ms(n,Hs).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},E2=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=e?.getScopeNames()??[];for(const a of this._tokenTypeOverrides)a.matcher(s)&&(r=Nr.set(r,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(s))}if(i&&(r=Nr.set(r,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},x2=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,p2(e,s,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},y2=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new x2(Fs.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Fs.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new b2(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,s){const a=new Kb(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(o=>this._loadSingleGrammar(o.scopeName)),a.processQueue();return this._grammarForScopeName(t,n,r,i,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,s=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,s)}},jo=Bo.NULL;const Yh=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let Wi=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Wi.prototype.normal={};Wi.prototype.property={};Wi.prototype.space=void 0;function Kh(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Wi(n,r,t)}function Ni(e){return e.toLowerCase()}let Ot=class{constructor(t,n){this.attribute=n,this.property=t}};Ot.prototype.attribute="";Ot.prototype.booleanish=!1;Ot.prototype.boolean=!1;Ot.prototype.commaOrSpaceSeparated=!1;Ot.prototype.commaSeparated=!1;Ot.prototype.defined=!1;Ot.prototype.mustUseProperty=!1;Ot.prototype.number=!1;Ot.prototype.overloadedBoolean=!1;Ot.prototype.property="";Ot.prototype.spaceSeparated=!1;Ot.prototype.space=void 0;let T2=0;const ye=ar(),Ze=ar(),Qh=ar(),X=ar(),Oe=ar(),kr=ar(),Ft=ar();function ar(){return 2**++T2}const Ho=Object.freeze(Object.defineProperty({__proto__:null,boolean:ye,booleanish:Ze,commaOrSpaceSeparated:Ft,commaSeparated:kr,number:X,overloadedBoolean:Qh,spaceSeparated:Oe},Symbol.toStringTag,{value:"Module"})),Ya=Object.keys(Ho);let Pu=class extends Ot{constructor(t,n,r,i){let s=-1;if(super(t,n),hc(this,"space",i),typeof r=="number")for(;++s<Ya.length;){const a=Ya[s];hc(this,Ya[s],(r&Ho[a])===Ho[a])}}};Pu.prototype.defined=!0;function hc(e,t,n){n&&(e[t]=n)}function Hr(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Pu(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Ni(r)]=r,n[Ni(s.attribute)]=r}return new Wi(t,n,e.space)}const Xh=Hr({properties:{ariaActiveDescendant:null,ariaAtomic:Ze,ariaAutoComplete:null,ariaBusy:Ze,ariaChecked:Ze,ariaColCount:X,ariaColIndex:X,ariaColSpan:X,ariaControls:Oe,ariaCurrent:null,ariaDescribedBy:Oe,ariaDetails:null,ariaDisabled:Ze,ariaDropEffect:Oe,ariaErrorMessage:null,ariaExpanded:Ze,ariaFlowTo:Oe,ariaGrabbed:Ze,ariaHasPopup:null,ariaHidden:Ze,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Oe,ariaLevel:X,ariaLive:null,ariaModal:Ze,ariaMultiLine:Ze,ariaMultiSelectable:Ze,ariaOrientation:null,ariaOwns:Oe,ariaPlaceholder:null,ariaPosInSet:X,ariaPressed:Ze,ariaReadOnly:Ze,ariaRelevant:null,ariaRequired:Ze,ariaRoleDescription:Oe,ariaRowCount:X,ariaRowIndex:X,ariaRowSpan:X,ariaSelected:Ze,ariaSetSize:X,ariaSort:null,ariaValueMax:X,ariaValueMin:X,ariaValueNow:X,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Zh(e,t){return t in e?e[t]:t}function Jh(e,t){return Zh(e,t.toLowerCase())}const C2=Hr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:kr,acceptCharset:Oe,accessKey:Oe,action:null,allow:null,allowFullScreen:ye,allowPaymentRequest:ye,allowUserMedia:ye,alt:null,as:null,async:ye,autoCapitalize:null,autoComplete:Oe,autoFocus:ye,autoPlay:ye,blocking:Oe,capture:null,charSet:null,checked:ye,cite:null,className:Oe,cols:X,colSpan:null,content:null,contentEditable:Ze,controls:ye,controlsList:Oe,coords:X|kr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ye,defer:ye,dir:null,dirName:null,disabled:ye,download:Qh,draggable:Ze,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ye,formTarget:null,headers:Oe,height:X,hidden:ye,high:X,href:null,hrefLang:null,htmlFor:Oe,httpEquiv:Oe,id:null,imageSizes:null,imageSrcSet:null,inert:ye,inputMode:null,integrity:null,is:null,isMap:ye,itemId:null,itemProp:Oe,itemRef:Oe,itemScope:ye,itemType:Oe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ye,low:X,manifest:null,max:null,maxLength:X,media:null,method:null,min:null,minLength:X,multiple:ye,muted:ye,name:null,nonce:null,noModule:ye,noValidate:ye,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ye,optimum:X,pattern:null,ping:Oe,placeholder:null,playsInline:ye,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ye,referrerPolicy:null,rel:Oe,required:ye,reversed:ye,rows:X,rowSpan:X,sandbox:Oe,scope:null,scoped:ye,seamless:ye,selected:ye,shadowRootClonable:ye,shadowRootDelegatesFocus:ye,shadowRootMode:null,shape:null,size:X,sizes:null,slot:null,span:X,spellCheck:Ze,src:null,srcDoc:null,srcLang:null,srcSet:null,start:X,step:null,style:null,tabIndex:X,target:null,title:null,translate:null,type:null,typeMustMatch:ye,useMap:null,value:Ze,width:X,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Oe,axis:null,background:null,bgColor:null,border:X,borderColor:null,bottomMargin:X,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ye,declare:ye,event:null,face:null,frame:null,frameBorder:null,hSpace:X,leftMargin:X,link:null,longDesc:null,lowSrc:null,marginHeight:X,marginWidth:X,noResize:ye,noHref:ye,noShade:ye,noWrap:ye,object:null,profile:null,prompt:null,rev:null,rightMargin:X,rules:null,scheme:null,scrolling:Ze,standby:null,summary:null,text:null,topMargin:X,valueType:null,version:null,vAlign:null,vLink:null,vSpace:X,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ye,disableRemotePlayback:ye,prefix:null,property:null,results:X,security:null,unselectable:null},space:"html",transform:Jh}),S2=Hr({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ft,accentHeight:X,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:X,amplitude:X,arabicForm:null,ascent:X,attributeName:null,attributeType:null,azimuth:X,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:X,by:null,calcMode:null,capHeight:X,className:Oe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:X,diffuseConstant:X,direction:null,display:null,dur:null,divisor:X,dominantBaseline:null,download:ye,dx:null,dy:null,edgeMode:null,editable:null,elevation:X,enableBackground:null,end:null,event:null,exponent:X,externalResourcesRequired:null,fill:null,fillOpacity:X,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:kr,g2:kr,glyphName:kr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:X,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:X,horizOriginX:X,horizOriginY:X,id:null,ideographic:X,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:X,k:X,k1:X,k2:X,k3:X,k4:X,kernelMatrix:Ft,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:X,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:X,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:X,overlineThickness:X,paintOrder:null,panose1:null,path:null,pathLength:X,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Oe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:X,pointsAtY:X,pointsAtZ:X,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ft,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ft,rev:Ft,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ft,requiredFeatures:Ft,requiredFonts:Ft,requiredFormats:Ft,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:X,specularExponent:X,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:X,strikethroughThickness:X,string:null,stroke:null,strokeDashArray:Ft,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:X,strokeOpacity:X,strokeWidth:null,style:null,surfaceScale:X,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ft,tabIndex:X,tableValues:null,target:null,targetX:X,targetY:X,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ft,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:X,underlineThickness:X,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:X,values:null,vAlphabetic:X,vMathematical:X,vectorEffect:null,vHanging:X,vIdeographic:X,version:null,vertAdvY:X,vertOriginX:X,vertOriginY:X,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:X,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Zh}),ef=Hr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),tf=Hr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Jh}),nf=Hr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),A2={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"},k2=/[A-Z]/g,fc=/-[a-z]/g,I2=/^data[-\w.:]+$/i;function Gi(e,t){const n=Ni(t);let r=t,i=Ot;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&I2.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(fc,v2);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!fc.test(s)){let a=s.replace(k2,_2);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Pu}return new i(r,t)}function _2(e){return"-"+e.toLowerCase()}function v2(e){return e.charAt(1).toUpperCase()}const Ur=Kh([Xh,C2,ef,tf,nf],"html"),In=Kh([Xh,S2,ef,tf,nf],"svg"),pc={}.hasOwnProperty;function ba(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const o=r.handlers;if(i&&pc.call(i,e)){const u=String(i[e]);a=pc.call(o,u)?o[u]:r.unknown}if(a)return a.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const D2=/["&'<>`]/g,w2=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P2=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,N2=/[|\\{}()[\]^$+*?.]/g,mc=new WeakMap;function R2(e,t){if(e=e.replace(t.subset?L2(t.subset):D2,r),t.subset||t.escapeOnly)return e;return e.replace(w2,n).replace(P2,r);function n(i,s,a){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,a.charCodeAt(s+2),t)}function r(i,s,a){return t.format(i.charCodeAt(0),a.charCodeAt(s+1),t)}}function L2(e){let t=mc.get(e);return t||(t=O2(e),mc.set(e,t)),t}function O2(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(N2,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const F2=/[\dA-Fa-f]/;function M2(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!F2.test(String.fromCharCode(t))?r:r+";"}const B2=/\d/;function j2(e,t,n){const r="&#"+String(e);return n&&t&&!B2.test(String.fromCharCode(t))?r:r+";"}const H2=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Ka={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},U2=["cent","copy","divide","gt","lt","not","para","times"],rf={}.hasOwnProperty,Uo={};let os;for(os in Ka)rf.call(Ka,os)&&(Uo[Ka[os]]=os);const z2=/[^\dA-Za-z]/;function $2(e,t,n,r){const i=String.fromCharCode(e);if(rf.call(Uo,i)){const s=Uo[i],a="&"+s;return n&&H2.includes(s)&&!U2.includes(s)&&(!r||t&&t!==61&&z2.test(String.fromCharCode(t)))?a:a+";"}return""}function q2(e,t,n){let r=M2(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=$2(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const s=j2(e,t,n.omitOptionalSemicolons);s.length<r.length&&(r=s)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Ir(e,t){return R2(e,Object.assign({format:q2},t))}const V2=/^>|^->|<!--|-->|--!>|<!-$/g,W2=[">"],G2=["<",">"];function Y2(e,t,n,r){return r.settings.bogusComments?"<?"+Ir(e.value,Object.assign({},r.settings.characterReferences,{subset:W2}))+">":"<!--"+e.value.replace(V2,i)+"-->";function i(s){return Ir(s,Object.assign({},r.settings.characterReferences,{subset:G2}))}}function K2(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Us(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function zo(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function Ea(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function $o(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function xa(e){return e.join(" ").trim()}const Q2=/[ \t\n\f\r]/g;function Yi(e){return typeof e=="object"?e.type==="text"?gc(e.value):!1:gc(e)}function gc(e){return e.replace(Q2,"")===""}const lt=af(1),sf=af(-1),X2=[];function af(e){return t;function t(n,r,i){const s=n?n.children:X2;let a=(r||0)+e,o=s[a];if(!i)for(;o&&Yi(o);)a+=e,o=s[a];return o}}const Z2={}.hasOwnProperty;function of(e){return t;function t(n,r,i){return Z2.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const Nu=of({body:eE,caption:Qa,colgroup:Qa,dd:iE,dt:rE,head:Qa,html:J2,li:nE,optgroup:sE,option:aE,p:tE,rp:bc,rt:bc,tbody:uE,td:Ec,tfoot:lE,th:Ec,thead:oE,tr:cE});function Qa(e,t,n){const r=lt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Yi(r.value.charAt(0)))}function J2(e,t,n){const r=lt(n,t);return!r||r.type!=="comment"}function eE(e,t,n){const r=lt(n,t);return!r||r.type!=="comment"}function tE(e,t,n){const r=lt(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function nE(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function rE(e,t,n){const r=lt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function iE(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function bc(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function sE(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function aE(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function oE(e,t,n){const r=lt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function uE(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function lE(e,t,n){return!lt(n,t)}function cE(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function Ec(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const dE=of({body:pE,colgroup:mE,head:fE,html:hE,tbody:gE});function hE(e){const t=lt(e,-1);return!t||t.type!=="comment"}function fE(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function pE(e){const t=lt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Yi(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function mE(e,t,n){const r=sf(n,t),i=lt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Nu(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function gE(e,t,n){const r=sf(n,t),i=lt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Nu(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const us={name:[[`
16
+ export default theme;`}function No(e={},...t){const{breakpoints:n,mixins:r={},spacing:i,palette:s={},transitions:a={},typography:o={},shape:u,...l}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(tr(20));const d=Su(s),c=Au(e);let m=jt(c,{mixins:vg(c.breakpoints,r),palette:d,shadows:Lg.slice(),typography:wg(d,o),transitions:Mg(a),zIndex:{...Bg}});return m=jt(m,l),m=t.reduce((p,g)=>jt(p,g),m),m.unstable_sxConfig={...fa,...l?.unstable_sxConfig},m.unstable_sx=function(g){return Nr({sx:g,theme:this})},m.toRuntimeSource=_h,m}function Hg(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const Ug=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Hg(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function vh(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Dh(e){return e==="dark"?Ug:[]}function zg(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...i}=e,s=Su(t);return{palette:s,opacity:{...vh(s.mode),...n},overlays:r||Dh(s.mode),...i}}function $g(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const qg=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Vg=e=>(t,n)=>{const r=e.rootSelector||":root",i=e.colorSchemeSelector;let s=i;if(i==="class"&&(s=".%s"),i==="data"&&(s="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(s=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return qg(e.cssVarPrefix).forEach(o=>{a[o]=n[o],delete n[o]}),s==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:s?{[s.replace("%s",t)]:a,[`${r}, ${s.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(s&&s!=="media")return`${r}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(s)return s.replace("%s",String(t))}return r};function Wg(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function j(e,t,n){!e[t]&&n&&(e[t]=n)}function di(e){return typeof e!="string"||!e.startsWith("hsl")?e:Ch(e)}function fn(e,t){`${t}Channel`in e||(e[`${t}Channel`]=ci(di(e[t])))}function Gg(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const sn=e=>{try{return e()}catch{}},Yg=(e="mui")=>We.unstable_createGetCssVar(e);function $a(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=zg({...t,palette:{mode:i,...t?.palette}});return}const{palette:s,...a}=No({...n,palette:{mode:i,...t?.palette}});return e[r]={...t,palette:s,opacity:{...vh(i),...t?.opacity},overlays:t?.overlays||Dh(i)},a}function Kg(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:a=$g,colorSchemeSelector:o=n.light&&n.dark?"media":void 0,rootSelector:u=":root",...l}=e,d=Object.keys(n)[0],c=r||(n.light&&d!=="light"?"light":d),m=Yg(s),{[c]:p,light:g,dark:b,...T}=n,y={...T};let C=p;if((c==="dark"&&!("dark"in n)||c==="light"&&!("light"in n))&&(C=!0),!C)throw new Error(tr(21,c));const S=$a(y,C,l,c);g&&!y.light&&$a(y,g,void 0,"light"),b&&!y.dark&&$a(y,b,void 0,"dark");let N={defaultColorScheme:c,...S,cssVarPrefix:s,colorSchemeSelector:o,rootSelector:u,getCssVar:m,colorSchemes:y,font:{...yg(S.typography),...S.font},spacing:Gg(l.spacing)};Object.keys(N.colorSchemes).forEach(Q=>{const E=N.colorSchemes[Q].palette,L=O=>{const z=O.split("-"),M=z[1],J=z[2];return m(O,E[M][J])};if(E.mode==="light"&&(j(E.common,"background","#fff"),j(E.common,"onBackground","#000")),E.mode==="dark"&&(j(E.common,"background","#000"),j(E.common,"onBackground","#fff")),Wg(E,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),E.mode==="light"){j(E.Alert,"errorColor",Pe(E.error.light,.6)),j(E.Alert,"infoColor",Pe(E.info.light,.6)),j(E.Alert,"successColor",Pe(E.success.light,.6)),j(E.Alert,"warningColor",Pe(E.warning.light,.6)),j(E.Alert,"errorFilledBg",L("palette-error-main")),j(E.Alert,"infoFilledBg",L("palette-info-main")),j(E.Alert,"successFilledBg",L("palette-success-main")),j(E.Alert,"warningFilledBg",L("palette-warning-main")),j(E.Alert,"errorFilledColor",sn(()=>E.getContrastText(E.error.main))),j(E.Alert,"infoFilledColor",sn(()=>E.getContrastText(E.info.main))),j(E.Alert,"successFilledColor",sn(()=>E.getContrastText(E.success.main))),j(E.Alert,"warningFilledColor",sn(()=>E.getContrastText(E.warning.main))),j(E.Alert,"errorStandardBg",Re(E.error.light,.9)),j(E.Alert,"infoStandardBg",Re(E.info.light,.9)),j(E.Alert,"successStandardBg",Re(E.success.light,.9)),j(E.Alert,"warningStandardBg",Re(E.warning.light,.9)),j(E.Alert,"errorIconColor",L("palette-error-main")),j(E.Alert,"infoIconColor",L("palette-info-main")),j(E.Alert,"successIconColor",L("palette-success-main")),j(E.Alert,"warningIconColor",L("palette-warning-main")),j(E.AppBar,"defaultBg",L("palette-grey-100")),j(E.Avatar,"defaultBg",L("palette-grey-400")),j(E.Button,"inheritContainedBg",L("palette-grey-300")),j(E.Button,"inheritContainedHoverBg",L("palette-grey-A100")),j(E.Chip,"defaultBorder",L("palette-grey-400")),j(E.Chip,"defaultAvatarColor",L("palette-grey-700")),j(E.Chip,"defaultIconColor",L("palette-grey-700")),j(E.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),j(E.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),j(E.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),j(E.LinearProgress,"primaryBg",Re(E.primary.main,.62)),j(E.LinearProgress,"secondaryBg",Re(E.secondary.main,.62)),j(E.LinearProgress,"errorBg",Re(E.error.main,.62)),j(E.LinearProgress,"infoBg",Re(E.info.main,.62)),j(E.LinearProgress,"successBg",Re(E.success.main,.62)),j(E.LinearProgress,"warningBg",Re(E.warning.main,.62)),j(E.Skeleton,"bg",`rgba(${L("palette-text-primaryChannel")} / 0.11)`),j(E.Slider,"primaryTrack",Re(E.primary.main,.62)),j(E.Slider,"secondaryTrack",Re(E.secondary.main,.62)),j(E.Slider,"errorTrack",Re(E.error.main,.62)),j(E.Slider,"infoTrack",Re(E.info.main,.62)),j(E.Slider,"successTrack",Re(E.success.main,.62)),j(E.Slider,"warningTrack",Re(E.warning.main,.62));const O=is(E.background.default,.8);j(E.SnackbarContent,"bg",O),j(E.SnackbarContent,"color",sn(()=>E.getContrastText(O))),j(E.SpeedDialAction,"fabHoverBg",is(E.background.paper,.15)),j(E.StepConnector,"border",L("palette-grey-400")),j(E.StepContent,"border",L("palette-grey-400")),j(E.Switch,"defaultColor",L("palette-common-white")),j(E.Switch,"defaultDisabledColor",L("palette-grey-100")),j(E.Switch,"primaryDisabledColor",Re(E.primary.main,.62)),j(E.Switch,"secondaryDisabledColor",Re(E.secondary.main,.62)),j(E.Switch,"errorDisabledColor",Re(E.error.main,.62)),j(E.Switch,"infoDisabledColor",Re(E.info.main,.62)),j(E.Switch,"successDisabledColor",Re(E.success.main,.62)),j(E.Switch,"warningDisabledColor",Re(E.warning.main,.62)),j(E.TableCell,"border",Re(rs(E.divider,1),.88)),j(E.Tooltip,"bg",rs(E.grey[700],.92))}if(E.mode==="dark"){j(E.Alert,"errorColor",Re(E.error.light,.6)),j(E.Alert,"infoColor",Re(E.info.light,.6)),j(E.Alert,"successColor",Re(E.success.light,.6)),j(E.Alert,"warningColor",Re(E.warning.light,.6)),j(E.Alert,"errorFilledBg",L("palette-error-dark")),j(E.Alert,"infoFilledBg",L("palette-info-dark")),j(E.Alert,"successFilledBg",L("palette-success-dark")),j(E.Alert,"warningFilledBg",L("palette-warning-dark")),j(E.Alert,"errorFilledColor",sn(()=>E.getContrastText(E.error.dark))),j(E.Alert,"infoFilledColor",sn(()=>E.getContrastText(E.info.dark))),j(E.Alert,"successFilledColor",sn(()=>E.getContrastText(E.success.dark))),j(E.Alert,"warningFilledColor",sn(()=>E.getContrastText(E.warning.dark))),j(E.Alert,"errorStandardBg",Pe(E.error.light,.9)),j(E.Alert,"infoStandardBg",Pe(E.info.light,.9)),j(E.Alert,"successStandardBg",Pe(E.success.light,.9)),j(E.Alert,"warningStandardBg",Pe(E.warning.light,.9)),j(E.Alert,"errorIconColor",L("palette-error-main")),j(E.Alert,"infoIconColor",L("palette-info-main")),j(E.Alert,"successIconColor",L("palette-success-main")),j(E.Alert,"warningIconColor",L("palette-warning-main")),j(E.AppBar,"defaultBg",L("palette-grey-900")),j(E.AppBar,"darkBg",L("palette-background-paper")),j(E.AppBar,"darkColor",L("palette-text-primary")),j(E.Avatar,"defaultBg",L("palette-grey-600")),j(E.Button,"inheritContainedBg",L("palette-grey-800")),j(E.Button,"inheritContainedHoverBg",L("palette-grey-700")),j(E.Chip,"defaultBorder",L("palette-grey-700")),j(E.Chip,"defaultAvatarColor",L("palette-grey-300")),j(E.Chip,"defaultIconColor",L("palette-grey-300")),j(E.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),j(E.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),j(E.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),j(E.LinearProgress,"primaryBg",Pe(E.primary.main,.5)),j(E.LinearProgress,"secondaryBg",Pe(E.secondary.main,.5)),j(E.LinearProgress,"errorBg",Pe(E.error.main,.5)),j(E.LinearProgress,"infoBg",Pe(E.info.main,.5)),j(E.LinearProgress,"successBg",Pe(E.success.main,.5)),j(E.LinearProgress,"warningBg",Pe(E.warning.main,.5)),j(E.Skeleton,"bg",`rgba(${L("palette-text-primaryChannel")} / 0.13)`),j(E.Slider,"primaryTrack",Pe(E.primary.main,.5)),j(E.Slider,"secondaryTrack",Pe(E.secondary.main,.5)),j(E.Slider,"errorTrack",Pe(E.error.main,.5)),j(E.Slider,"infoTrack",Pe(E.info.main,.5)),j(E.Slider,"successTrack",Pe(E.success.main,.5)),j(E.Slider,"warningTrack",Pe(E.warning.main,.5));const O=is(E.background.default,.98);j(E.SnackbarContent,"bg",O),j(E.SnackbarContent,"color",sn(()=>E.getContrastText(O))),j(E.SpeedDialAction,"fabHoverBg",is(E.background.paper,.15)),j(E.StepConnector,"border",L("palette-grey-600")),j(E.StepContent,"border",L("palette-grey-600")),j(E.Switch,"defaultColor",L("palette-grey-300")),j(E.Switch,"defaultDisabledColor",L("palette-grey-600")),j(E.Switch,"primaryDisabledColor",Pe(E.primary.main,.55)),j(E.Switch,"secondaryDisabledColor",Pe(E.secondary.main,.55)),j(E.Switch,"errorDisabledColor",Pe(E.error.main,.55)),j(E.Switch,"infoDisabledColor",Pe(E.info.main,.55)),j(E.Switch,"successDisabledColor",Pe(E.success.main,.55)),j(E.Switch,"warningDisabledColor",Pe(E.warning.main,.55)),j(E.TableCell,"border",Pe(rs(E.divider,1),.68)),j(E.Tooltip,"bg",rs(E.grey[700],.92))}fn(E.background,"default"),fn(E.background,"paper"),fn(E.common,"background"),fn(E.common,"onBackground"),fn(E,"divider"),Object.keys(E).forEach(O=>{const z=E[O];O!=="tonalOffset"&&z&&typeof z=="object"&&(z.main&&j(E[O],"mainChannel",ci(di(z.main))),z.light&&j(E[O],"lightChannel",ci(di(z.light))),z.dark&&j(E[O],"darkChannel",ci(di(z.dark))),z.contrastText&&j(E[O],"contrastTextChannel",ci(di(z.contrastText))),O==="text"&&(fn(E[O],"primary"),fn(E[O],"secondary")),O==="action"&&(z.active&&fn(E[O],"active"),z.selected&&fn(E[O],"selected")))})}),N=t.reduce((Q,E)=>jt(Q,E),N);const D={prefix:s,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:Vg(N)},{vars:w,generateThemeVars:B,generateStyleSheets:V}=xg(N,D);return N.vars=w,Object.entries(N.colorSchemes[N.defaultColorScheme]).forEach(([Q,E])=>{N[Q]=E}),N.generateThemeVars=B,N.generateStyleSheets=V,N.generateSpacing=function(){return We.createSpacing(l.spacing,Eu(this))},N.getColorSchemeSelector=Tg(o),N.spacing=N.generateSpacing(),N.shouldSkipGeneratingVar=a,N.unstable_sxConfig={...fa,...l?.unstable_sxConfig},N.unstable_sx=function(E){return Nr({sx:E,theme:this})},N.toRuntimeSource=_h,N}function rc(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Su({...n===!0?{}:n.palette,mode:t})})}function Qg(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:s=n?.mode,...a}=e,o=s||"light",u=i?.[o],l={...i,...n?{[o]:{...typeof u!="boolean"&&u,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return No(e,...t);let d=n;"palette"in e||l[o]&&(l[o]!==!0?d=l[o].palette:o==="dark"&&(d={mode:"dark"}));const c=No({...e,palette:d},...t);return c.defaultColorScheme=o,c.colorSchemes=l,c.palette.mode==="light"&&(c.colorSchemes.light={...l.light!==!0&&l.light,palette:c.palette},rc(c,"dark",l.dark)),c.palette.mode==="dark"&&(c.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:c.palette},rc(c,"light",l.light)),c}return!n&&!("light"in l)&&o==="light"&&(l.light=!0),Kg({...a,colorSchemes:l,defaultColorScheme:o,...typeof r!="boolean"&&r},...t)}const ku=Qg(),Iu="$$material";function Xg(){const e=We.useTheme(ku);return e[Iu]||e}function Zg(e){const{variants:t,...n}=e,r={variants:t,style:Zl(n),isProcessed:!0};return r.style===n||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=Zl(i.style))}),r}const Jg=Au();function Mn(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function eb(e){return e?(t,n)=>n[e]:null}function tb(e,t,n){e.theme=ib(e.theme)?n:e.theme[t]||e.theme}function Es(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>Es(e,r));if(Array.isArray(n?.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:i,...s}=n;r=s}return wh(e,n.variants,[r])}return n?.isProcessed?n.style:n}function wh(e,t,n=[]){let r;e:for(let i=0;i<t.length;i+=1){const s=t[i];if(typeof s.props=="function"){if(r??={...e,...e.ownerState,ownerState:e.ownerState},!s.props(r))continue}else for(const a in s.props)if(e[a]!==s.props[a]&&e.ownerState?.[a]!==s.props[a])continue e;typeof s.style=="function"?(r??={...e,...e.ownerState,ownerState:e.ownerState},n.push(s.style(r))):n.push(s.style)}return n}function nb(e={}){const{themeId:t,defaultTheme:n=Jg,rootShouldForwardProp:r=Mn,slotShouldForwardProp:i=Mn}=e;function s(o){tb(o,t,n)}return(o,u={})=>{ug(o,D=>D.filter(w=>w!==Nr));const{name:l,slot:d,skipVariantsResolver:c,skipSx:m,overridesResolver:p=eb(ab(d)),...g}=u,b=c!==void 0?c:d&&d!=="Root"&&d!=="root"||!1,T=m||!1;let y=Mn;d==="Root"||d==="root"?y=r:d?y=i:sb(o)&&(y=void 0);const C=og(o,{shouldForwardProp:y,label:rb(),...g}),S=D=>{if(D.__emotion_real===D)return D;if(typeof D=="function")return function(B){return Es(B,D)};if(xn(D)){const w=Zg(D);return w.variants?function(V){return Es(V,w)}:w.style}return D},N=(...D)=>{const w=[],B=D.map(S),V=[];if(w.push(s),l&&p&&V.push(function(O){const M=O.theme.components?.[l]?.styleOverrides;if(!M)return null;const J={};for(const oe in M)J[oe]=Es(O,M[oe]);return p(O,J)}),l&&!b&&V.push(function(O){const M=O.theme?.components?.[l]?.variants;return M?wh(O,M):null}),T||V.push(Nr),Array.isArray(B[0])){const L=B.shift(),O=new Array(w.length).fill(""),z=new Array(V.length).fill("");let M;M=[...O,...L,...z],M.raw=[...O,...L.raw,...z],w.unshift(M)}const Q=[...w,...B,...V],E=C(...Q);return o.muiName&&(E.muiName=o.muiName),E};return C.withConfig&&(N.withConfig=C.withConfig),N}}function rb(e,t){return void 0}function ib(e){for(const t in e)return!1;return!0}function sb(e){return typeof e=="string"&&e.charCodeAt(0)>96}function ab(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function ob(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const _u=e=>ob(e)&&e!=="classes",Be=nb({themeId:Iu,defaultTheme:ku,rootShouldForwardProp:_u}),vu=We.unstable_memoTheme;function Br(e){return gg(e)}function jr(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Mr(e,i,n)}),r}function ub(e){return Mr("MuiSvgIcon",e)}jr("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const lb=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${tn(t)}`,`fontSize${tn(n)}`]};return Hi(i,ub,r)},cb=Be("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${tn(n.color)}`],t[`fontSize${tn(n.fontSize)}`]]}})(vu(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Po=$.forwardRef(function(t,n){const r=Br({props:t,name:"MuiSvgIcon"}),{children:i,className:s,color:a="inherit",component:o="svg",fontSize:u="medium",htmlColor:l,inheritViewBox:d=!1,titleAccess:c,viewBox:m="0 0 24 24",...p}=r,g=$.isValidElement(i)&&i.type==="svg",b={...r,color:a,component:o,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:m,hasSvgAsChild:g},T={};d||(T.viewBox=m);const y=lb(b);return h.jsxs(cb,{as:o,className:Ye(y.root,s),focusable:"false",color:l,"aria-hidden":c?void 0:!0,role:c?"img":void 0,ref:n,...T,...p,...g&&i.props,ownerState:b,children:[g?i.props.children:i,c?h.jsx("title",{children:c}):null]})});Po.muiName="SvgIcon";function Oe(e,t){function n(r,i){return h.jsx(Po,{"data-testid":void 0,ref:i,...r,children:e})}return n.muiName=Po.muiName,$.memo($.forwardRef(n))}function db(e){const{controlled:t,default:n}=e,{current:r}=$.useRef(t!==void 0),[i,s]=$.useState(n),a=r?t:i,o=$.useCallback(u=>{r||s(u)},[]);return[a,o]}function xs(e){const t=$.useRef(e);return lg(()=>{t.current=e}),$.useRef((...n)=>(0,t.current)(...n)).current}function Os(...e){const t=$.useRef(void 0),n=$.useCallback(r=>{const i=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const a=s,o=a(r);return typeof o=="function"?o:()=>{a(null)}}return s.current=r,()=>{s.current=null}});return()=>{i.forEach(s=>s?.())}},e);return $.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function hb(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function fb(e,t){if(!e)return t;function n(a,o){const u={};return Object.keys(o).forEach(l=>{hb(l,o[l])&&typeof a[l]=="function"&&(u[l]=(...d)=>{a[l](...d),o[l](...d)})}),u}if(typeof e=="function"||typeof t=="function")return a=>{const o=typeof t=="function"?t(a):t,u=typeof e=="function"?e({...a,...o}):e,l=Ye(a?.className,o?.className,u?.className),d=n(u,o);return{...o,...u,...d,...!!l&&{className:l},...o?.style&&u?.style&&{style:{...o.style,...u.style}},...o?.sx&&u?.sx&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(u.sx)?u.sx:[u.sx]]}}};const r=t,i=n(e,r),s=Ye(r?.className,e?.className);return{...t,...e,...i,...!!s&&{className:s},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}const ma=Oe(h.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"})),$i=Oe(h.jsx("path",{d:"M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5m-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4zm-3-4h8v2H8z"})),Nh=[{id:"abap",name:"ABAP",import:()=>Promise.resolve().then(()=>require("./abap-Dwt2rH6y.cjs"))},{id:"actionscript-3",name:"ActionScript",import:()=>Promise.resolve().then(()=>require("./actionscript-3-mj8Uhnsc.cjs"))},{id:"ada",name:"Ada",import:()=>Promise.resolve().then(()=>require("./ada-DZM58Vqs.cjs"))},{id:"angular-html",name:"Angular HTML",import:()=>Promise.resolve().then(()=>require("./angular-html-BqlvNDNu.cjs")).then(e=>e.angularHtml)},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.resolve().then(()=>require("./angular-ts-4ebgyujK.cjs"))},{id:"apache",name:"Apache Conf",import:()=>Promise.resolve().then(()=>require("./apache-D7v5fxtZ.cjs"))},{id:"apex",name:"Apex",import:()=>Promise.resolve().then(()=>require("./apex-4hrAnw0a.cjs"))},{id:"apl",name:"APL",import:()=>Promise.resolve().then(()=>require("./apl-BeeGx1jW.cjs"))},{id:"applescript",name:"AppleScript",import:()=>Promise.resolve().then(()=>require("./applescript-Cnd3Dxju.cjs"))},{id:"ara",name:"Ara",import:()=>Promise.resolve().then(()=>require("./ara-BQ2aGbFQ.cjs"))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>Promise.resolve().then(()=>require("./asciidoc-C6nYvw8K.cjs"))},{id:"asm",name:"Assembly",import:()=>Promise.resolve().then(()=>require("./asm-CQnBVCj-.cjs"))},{id:"astro",name:"Astro",import:()=>Promise.resolve().then(()=>require("./astro-UBxncqOW.cjs"))},{id:"awk",name:"AWK",import:()=>Promise.resolve().then(()=>require("./awk-DUx4h__E.cjs"))},{id:"ballerina",name:"Ballerina",import:()=>Promise.resolve().then(()=>require("./ballerina-CXlzbmzl.cjs"))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>Promise.resolve().then(()=>require("./bat-DlMT9sut.cjs"))},{id:"beancount",name:"Beancount",import:()=>Promise.resolve().then(()=>require("./beancount-CyyiuUzM.cjs"))},{id:"berry",name:"Berry",aliases:["be"],import:()=>Promise.resolve().then(()=>require("./berry-B0EjuzrL.cjs"))},{id:"bibtex",name:"BibTeX",import:()=>Promise.resolve().then(()=>require("./bibtex-CfoG9xRq.cjs"))},{id:"bicep",name:"Bicep",import:()=>Promise.resolve().then(()=>require("./bicep-D6PH_9IY.cjs"))},{id:"blade",name:"Blade",import:()=>Promise.resolve().then(()=>require("./blade-DYqOCSTj.cjs"))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>Promise.resolve().then(()=>require("./bsl-zRqJRzLj.cjs"))},{id:"c",name:"C",import:()=>Promise.resolve().then(()=>require("./c-C4sXGJZM.cjs"))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>Promise.resolve().then(()=>require("./cadence-Dq2CYzXG.cjs"))},{id:"cairo",name:"Cairo",import:()=>Promise.resolve().then(()=>require("./cairo-C5yDOd-R.cjs"))},{id:"clarity",name:"Clarity",import:()=>Promise.resolve().then(()=>require("./clarity-ytMkUD5Q.cjs"))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>Promise.resolve().then(()=>require("./clojure-B_Wv414H.cjs"))},{id:"cmake",name:"CMake",import:()=>Promise.resolve().then(()=>require("./cmake-TBUaQXYY.cjs"))},{id:"cobol",name:"COBOL",import:()=>Promise.resolve().then(()=>require("./cobol-D9bHhy8D.cjs"))},{id:"codeowners",name:"CODEOWNERS",import:()=>Promise.resolve().then(()=>require("./codeowners-QhPK6lIJ.cjs"))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>Promise.resolve().then(()=>require("./codeql-B7Q9tkDJ.cjs"))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.resolve().then(()=>require("./coffee-ZdyLosN6.cjs"))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>Promise.resolve().then(()=>require("./common-lisp-Ced3ctK5.cjs"))},{id:"coq",name:"Coq",import:()=>Promise.resolve().then(()=>require("./coq-BTRB4iqi.cjs"))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.resolve().then(()=>require("./cpp-DgQ-zDub.cjs"))},{id:"crystal",name:"Crystal",import:()=>Promise.resolve().then(()=>require("./crystal-C5h1rMTi.cjs"))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>Promise.resolve().then(()=>require("./csharp-TKds-MhG.cjs"))},{id:"css",name:"CSS",import:()=>Promise.resolve().then(()=>require("./css-B0kbn78J.cjs"))},{id:"csv",name:"CSV",import:()=>Promise.resolve().then(()=>require("./csv-BVJjiaC3.cjs"))},{id:"cue",name:"CUE",import:()=>Promise.resolve().then(()=>require("./cue-Cz4J-rnd.cjs"))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>Promise.resolve().then(()=>require("./cypher-DuKTiyez.cjs"))},{id:"d",name:"D",import:()=>Promise.resolve().then(()=>require("./d-BW9Wd7aK.cjs"))},{id:"dart",name:"Dart",import:()=>Promise.resolve().then(()=>require("./dart-CWs-er6b.cjs"))},{id:"dax",name:"DAX",import:()=>Promise.resolve().then(()=>require("./dax-CDxFL2Kb.cjs"))},{id:"desktop",name:"Desktop",import:()=>Promise.resolve().then(()=>require("./desktop-CFgo0jo7.cjs"))},{id:"diff",name:"Diff",import:()=>Promise.resolve().then(()=>require("./diff-BsEkKwI8.cjs"))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>Promise.resolve().then(()=>require("./docker-hwiw4W8I.cjs"))},{id:"dotenv",name:"dotEnv",import:()=>Promise.resolve().then(()=>require("./dotenv-CJ5o3G1C.cjs"))},{id:"dream-maker",name:"Dream Maker",import:()=>Promise.resolve().then(()=>require("./dream-maker-DBharE9Q.cjs"))},{id:"edge",name:"Edge",import:()=>Promise.resolve().then(()=>require("./edge-D4UQJJI4.cjs"))},{id:"elixir",name:"Elixir",import:()=>Promise.resolve().then(()=>require("./elixir-Drlan-oo.cjs"))},{id:"elm",name:"Elm",import:()=>Promise.resolve().then(()=>require("./elm-BcZHvJ8F.cjs"))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>Promise.resolve().then(()=>require("./emacs-lisp-CDDyFsvQ.cjs"))},{id:"erb",name:"ERB",import:()=>Promise.resolve().then(()=>require("./erb-CnncUHI5.cjs"))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>Promise.resolve().then(()=>require("./erlang-3VgdrQXV.cjs"))},{id:"fennel",name:"Fennel",import:()=>Promise.resolve().then(()=>require("./fennel-BvcDRFAV.cjs"))},{id:"fish",name:"Fish",import:()=>Promise.resolve().then(()=>require("./fish-CnamI0Ar.cjs"))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>Promise.resolve().then(()=>require("./fluent-DFpT66K8.cjs"))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>Promise.resolve().then(()=>require("./fortran-fixed-form-BEveYJYo.cjs"))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>Promise.resolve().then(()=>require("./fortran-free-form-IaGrWIda.cjs"))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>Promise.resolve().then(()=>require("./fsharp-JIb2RzF4.cjs"))},{id:"gdresource",name:"GDResource",import:()=>Promise.resolve().then(()=>require("./gdresource-YnzGv0RG.cjs"))},{id:"gdscript",name:"GDScript",import:()=>Promise.resolve().then(()=>require("./gdscript-5N_43TPQ.cjs"))},{id:"gdshader",name:"GDShader",import:()=>Promise.resolve().then(()=>require("./gdshader-Bl85Hrm5.cjs"))},{id:"genie",name:"Genie",import:()=>Promise.resolve().then(()=>require("./genie-DGsxMAbQ.cjs"))},{id:"gherkin",name:"Gherkin",import:()=>Promise.resolve().then(()=>require("./gherkin-CVV6nEUH.cjs"))},{id:"git-commit",name:"Git Commit Message",import:()=>Promise.resolve().then(()=>require("./git-commit-CBAAAmmS.cjs"))},{id:"git-rebase",name:"Git Rebase Message",import:()=>Promise.resolve().then(()=>require("./git-rebase-teQnnXpn.cjs"))},{id:"gleam",name:"Gleam",import:()=>Promise.resolve().then(()=>require("./gleam-nR4mjrhK.cjs"))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>Promise.resolve().then(()=>require("./glimmer-js-DAfoXdQ-.cjs"))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>Promise.resolve().then(()=>require("./glimmer-ts-CeO7A1-5.cjs"))},{id:"glsl",name:"GLSL",import:()=>Promise.resolve().then(()=>require("./glsl-RcB3ToOh.cjs"))},{id:"gnuplot",name:"Gnuplot",import:()=>Promise.resolve().then(()=>require("./gnuplot-CurtDYoJ.cjs"))},{id:"go",name:"Go",import:()=>Promise.resolve().then(()=>require("./go-CM9_GlwL.cjs"))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.resolve().then(()=>require("./graphql-DWzZPj_V.cjs"))},{id:"groovy",name:"Groovy",import:()=>Promise.resolve().then(()=>require("./groovy-BaVp9Il5.cjs"))},{id:"hack",name:"Hack",import:()=>Promise.resolve().then(()=>require("./hack-DDrvhASj.cjs"))},{id:"haml",name:"Ruby Haml",import:()=>Promise.resolve().then(()=>require("./haml-BK3-xJKV.cjs"))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.resolve().then(()=>require("./handlebars-DjnxWdl9.cjs"))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>Promise.resolve().then(()=>require("./haskell-suhyCHEm.cjs"))},{id:"haxe",name:"Haxe",import:()=>Promise.resolve().then(()=>require("./haxe-BIQU1qHi.cjs"))},{id:"hcl",name:"HashiCorp HCL",import:()=>Promise.resolve().then(()=>require("./hcl-CbQ1yCnz.cjs"))},{id:"hjson",name:"Hjson",import:()=>Promise.resolve().then(()=>require("./hjson-Ddklb4QM.cjs"))},{id:"hlsl",name:"HLSL",import:()=>Promise.resolve().then(()=>require("./hlsl-B4NkiBfC.cjs"))},{id:"html",name:"HTML",import:()=>Promise.resolve().then(()=>require("./html-DiyIZFpA.cjs"))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.resolve().then(()=>require("./html-derivative-m27xHPNF.cjs"))},{id:"http",name:"HTTP",import:()=>Promise.resolve().then(()=>require("./http-B4wR56ug.cjs"))},{id:"hxml",name:"HXML",import:()=>Promise.resolve().then(()=>require("./hxml-Bv32SKqg.cjs"))},{id:"hy",name:"Hy",import:()=>Promise.resolve().then(()=>require("./hy-DpyTdO3T.cjs"))},{id:"imba",name:"Imba",import:()=>Promise.resolve().then(()=>require("./imba-B0C0YBnY.cjs"))},{id:"ini",name:"INI",aliases:["properties"],import:()=>Promise.resolve().then(()=>require("./ini-CymULaw_.cjs"))},{id:"java",name:"Java",import:()=>Promise.resolve().then(()=>require("./java-Bn1Lvoni.cjs"))},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>Promise.resolve().then(()=>require("./javascript-Bnnicc83.cjs"))},{id:"jinja",name:"Jinja",import:()=>Promise.resolve().then(()=>require("./jinja-D8wWNdMe.cjs"))},{id:"jison",name:"Jison",import:()=>Promise.resolve().then(()=>require("./jison-f6CjvOiG.cjs"))},{id:"json",name:"JSON",import:()=>Promise.resolve().then(()=>require("./json-y-J1j5EW.cjs"))},{id:"json5",name:"JSON5",import:()=>Promise.resolve().then(()=>require("./json5-CzvlWgZ7.cjs"))},{id:"jsonc",name:"JSON with Comments",import:()=>Promise.resolve().then(()=>require("./jsonc-BnhWfmQw.cjs"))},{id:"jsonl",name:"JSON Lines",import:()=>Promise.resolve().then(()=>require("./jsonl-BbGkWPJz.cjs"))},{id:"jsonnet",name:"Jsonnet",import:()=>Promise.resolve().then(()=>require("./jsonnet-Bn--UDZ1.cjs"))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>Promise.resolve().then(()=>require("./jssm-4CSVp8lc.cjs"))},{id:"jsx",name:"JSX",import:()=>Promise.resolve().then(()=>require("./jsx-D8YwVp-7.cjs"))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.resolve().then(()=>require("./julia-CPt_7dt8.cjs"))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>Promise.resolve().then(()=>require("./kotlin-DDI6myF6.cjs"))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>Promise.resolve().then(()=>require("./kusto-OZxALJZT.cjs"))},{id:"latex",name:"LaTeX",import:()=>Promise.resolve().then(()=>require("./latex-C1zmrAP3.cjs"))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>Promise.resolve().then(()=>require("./lean-D1iY-35j.cjs"))},{id:"less",name:"Less",import:()=>Promise.resolve().then(()=>require("./less-DIaY7vQJ.cjs"))},{id:"liquid",name:"Liquid",import:()=>Promise.resolve().then(()=>require("./liquid-mYFf3Ubk.cjs"))},{id:"log",name:"Log file",import:()=>Promise.resolve().then(()=>require("./log-BIXUeBaj.cjs"))},{id:"logo",name:"Logo",import:()=>Promise.resolve().then(()=>require("./logo-B2d3b27P.cjs"))},{id:"lua",name:"Lua",import:()=>Promise.resolve().then(()=>require("./lua-BNycEOCj.cjs"))},{id:"luau",name:"Luau",import:()=>Promise.resolve().then(()=>require("./luau-CvqAeq4F.cjs"))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>Promise.resolve().then(()=>require("./make-Oob5Z9Pk.cjs"))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>Promise.resolve().then(()=>require("./markdown-BGBuj4LZ.cjs"))},{id:"marko",name:"Marko",import:()=>Promise.resolve().then(()=>require("./marko-orX0YPzY.cjs"))},{id:"matlab",name:"MATLAB",import:()=>Promise.resolve().then(()=>require("./matlab-CbN2rF6P.cjs"))},{id:"mdc",name:"MDC",import:()=>Promise.resolve().then(()=>require("./mdc-BNCAtGbK.cjs"))},{id:"mdx",name:"MDX",import:()=>Promise.resolve().then(()=>require("./mdx-Cl31h8mi.cjs"))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>Promise.resolve().then(()=>require("./mermaid-CSogK_LM.cjs"))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>Promise.resolve().then(()=>require("./mipsasm-BseoYJQp.cjs"))},{id:"mojo",name:"Mojo",import:()=>Promise.resolve().then(()=>require("./mojo-D8QAG3Ze.cjs"))},{id:"move",name:"Move",import:()=>Promise.resolve().then(()=>require("./move-DaBrcjat.cjs"))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>Promise.resolve().then(()=>require("./narrat-oOfAO4q8.cjs"))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>Promise.resolve().then(()=>require("./nextflow-BxJSKvPb.cjs"))},{id:"nginx",name:"Nginx",import:()=>Promise.resolve().then(()=>require("./nginx-CWVY90PN.cjs"))},{id:"nim",name:"Nim",import:()=>Promise.resolve().then(()=>require("./nim-CwodQ6jZ.cjs"))},{id:"nix",name:"Nix",import:()=>Promise.resolve().then(()=>require("./nix-DNME0Ea7.cjs"))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>Promise.resolve().then(()=>require("./nushell-DI9Z3l3M.cjs"))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>Promise.resolve().then(()=>require("./objective-c-DVx8Rcni.cjs"))},{id:"objective-cpp",name:"Objective-C++",import:()=>Promise.resolve().then(()=>require("./objective-cpp-s6XI7Jvk.cjs"))},{id:"ocaml",name:"OCaml",import:()=>Promise.resolve().then(()=>require("./ocaml-kUzDDUf2.cjs"))},{id:"pascal",name:"Pascal",import:()=>Promise.resolve().then(()=>require("./pascal-D509_I72.cjs"))},{id:"perl",name:"Perl",import:()=>Promise.resolve().then(()=>require("./perl-CzmOInqo.cjs"))},{id:"php",name:"PHP",import:()=>Promise.resolve().then(()=>require("./php-YwMoY7CJ.cjs"))},{id:"plsql",name:"PL/SQL",import:()=>Promise.resolve().then(()=>require("./plsql-C_qH_YOK.cjs"))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>Promise.resolve().then(()=>require("./po-CBsLQIcu.cjs"))},{id:"polar",name:"Polar",import:()=>Promise.resolve().then(()=>require("./polar-De-CDeYv.cjs"))},{id:"postcss",name:"PostCSS",import:()=>Promise.resolve().then(()=>require("./postcss-BtcsgaYj.cjs"))},{id:"powerquery",name:"PowerQuery",import:()=>Promise.resolve().then(()=>require("./powerquery-B0rHn13V.cjs"))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>Promise.resolve().then(()=>require("./powershell-rCX2OYXT.cjs"))},{id:"prisma",name:"Prisma",import:()=>Promise.resolve().then(()=>require("./prisma-BaaUHYMp.cjs"))},{id:"prolog",name:"Prolog",import:()=>Promise.resolve().then(()=>require("./prolog-DrXD2tGS.cjs"))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>Promise.resolve().then(()=>require("./proto-BtmQjBQu.cjs"))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.resolve().then(()=>require("./pug-CkHoCGUm.cjs"))},{id:"puppet",name:"Puppet",import:()=>Promise.resolve().then(()=>require("./puppet-cIrXIuy8.cjs"))},{id:"purescript",name:"PureScript",import:()=>Promise.resolve().then(()=>require("./purescript-CX9QPs2N.cjs"))},{id:"python",name:"Python",aliases:["py"],import:()=>Promise.resolve().then(()=>require("./python-B9x3euv6.cjs"))},{id:"qml",name:"QML",import:()=>Promise.resolve().then(()=>require("./qml-Dwwb3xcM.cjs"))},{id:"qmldir",name:"QML Directory",import:()=>Promise.resolve().then(()=>require("./qmldir-DNF9H2ir.cjs"))},{id:"qss",name:"Qt Style Sheets",import:()=>Promise.resolve().then(()=>require("./qss-C744dLby.cjs"))},{id:"r",name:"R",import:()=>Promise.resolve().then(()=>require("./r-DgOc9oMe.cjs"))},{id:"racket",name:"Racket",import:()=>Promise.resolve().then(()=>require("./racket-Do9_vqnd.cjs"))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>Promise.resolve().then(()=>require("./raku-BW8wAUIz.cjs"))},{id:"razor",name:"ASP.NET Razor",import:()=>Promise.resolve().then(()=>require("./razor-g8HV3m4q.cjs"))},{id:"reg",name:"Windows Registry Script",import:()=>Promise.resolve().then(()=>require("./reg-CGWN_v-z.cjs"))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>Promise.resolve().then(()=>require("./regexp-N7Z4hEeU.cjs"))},{id:"rel",name:"Rel",import:()=>Promise.resolve().then(()=>require("./rel-BYqA7mnV.cjs"))},{id:"riscv",name:"RISC-V",import:()=>Promise.resolve().then(()=>require("./riscv-ayQMUpo9.cjs"))},{id:"rst",name:"reStructuredText",import:()=>Promise.resolve().then(()=>require("./rst-MlYKz4rn.cjs"))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>Promise.resolve().then(()=>require("./ruby-DJN5DFiR.cjs"))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>Promise.resolve().then(()=>require("./rust-BnFKGEfa.cjs"))},{id:"sas",name:"SAS",import:()=>Promise.resolve().then(()=>require("./sas-F7gHsd4H.cjs"))},{id:"sass",name:"Sass",import:()=>Promise.resolve().then(()=>require("./sass-B9gYryDE.cjs"))},{id:"scala",name:"Scala",import:()=>Promise.resolve().then(()=>require("./scala-C85dOwSU.cjs"))},{id:"scheme",name:"Scheme",import:()=>Promise.resolve().then(()=>require("./scheme-B_XUaARm.cjs"))},{id:"scss",name:"SCSS",import:()=>Promise.resolve().then(()=>require("./scss-Bn9tb5MW.cjs"))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>Promise.resolve().then(()=>require("./sdbl-7Y5u0OW0.cjs"))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>Promise.resolve().then(()=>require("./shaderlab-Ca09aCzm.cjs"))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>Promise.resolve().then(()=>require("./shellscript-3DYM9fut.cjs"))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>Promise.resolve().then(()=>require("./shellsession-CpSha4Rb.cjs"))},{id:"smalltalk",name:"Smalltalk",import:()=>Promise.resolve().then(()=>require("./smalltalk-CCvytUuW.cjs"))},{id:"solidity",name:"Solidity",import:()=>Promise.resolve().then(()=>require("./solidity-BcNcjFC4.cjs"))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>Promise.resolve().then(()=>require("./soy-CeuZwkAk.cjs"))},{id:"sparql",name:"SPARQL",import:()=>Promise.resolve().then(()=>require("./sparql-BRQlWq86.cjs"))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>Promise.resolve().then(()=>require("./splunk-CzITjJj7.cjs"))},{id:"sql",name:"SQL",import:()=>Promise.resolve().then(()=>require("./sql-BqWZrLHB.cjs"))},{id:"ssh-config",name:"SSH Config",import:()=>Promise.resolve().then(()=>require("./ssh-config-DUPeuEdB.cjs"))},{id:"stata",name:"Stata",import:()=>Promise.resolve().then(()=>require("./stata-B-LlW9Cr.cjs"))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>Promise.resolve().then(()=>require("./stylus-ByHs6N-o.cjs"))},{id:"svelte",name:"Svelte",import:()=>Promise.resolve().then(()=>require("./svelte-DXe6QUZV.cjs"))},{id:"swift",name:"Swift",import:()=>Promise.resolve().then(()=>require("./swift-C5DnOriA.cjs"))},{id:"system-verilog",name:"SystemVerilog",import:()=>Promise.resolve().then(()=>require("./system-verilog-ClPLYLwh.cjs"))},{id:"systemd",name:"Systemd Units",import:()=>Promise.resolve().then(()=>require("./systemd-BASX0DlX.cjs"))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>Promise.resolve().then(()=>require("./talonscript-DkCSnLHD.cjs"))},{id:"tasl",name:"Tasl",import:()=>Promise.resolve().then(()=>require("./tasl-BAQJK7KZ.cjs"))},{id:"tcl",name:"Tcl",import:()=>Promise.resolve().then(()=>require("./tcl-CwJAYTvh.cjs"))},{id:"templ",name:"Templ",import:()=>Promise.resolve().then(()=>require("./templ-BZj57XLK.cjs"))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>Promise.resolve().then(()=>require("./terraform-s-pzyVvp.cjs"))},{id:"tex",name:"TeX",import:()=>Promise.resolve().then(()=>require("./tex-CTRO38Wo.cjs"))},{id:"toml",name:"TOML",import:()=>Promise.resolve().then(()=>require("./toml-CyMM7IXy.cjs"))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.resolve().then(()=>require("./ts-tags-hDAF_laC.cjs"))},{id:"tsv",name:"TSV",import:()=>Promise.resolve().then(()=>require("./tsv-DqNGnuVj.cjs"))},{id:"tsx",name:"TSX",import:()=>Promise.resolve().then(()=>require("./tsx-DpBRUnKC.cjs"))},{id:"turtle",name:"Turtle",import:()=>Promise.resolve().then(()=>require("./turtle-DfO3eAsu.cjs"))},{id:"twig",name:"Twig",import:()=>Promise.resolve().then(()=>require("./twig-B2qtj3-0.cjs"))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>Promise.resolve().then(()=>require("./typescript-BqvpT6pB.cjs"))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>Promise.resolve().then(()=>require("./typespec-P-ZVy8yC.cjs"))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>Promise.resolve().then(()=>require("./typst-BVh2IsT9.cjs"))},{id:"v",name:"V",import:()=>Promise.resolve().then(()=>require("./v-BUlE9136.cjs"))},{id:"vala",name:"Vala",import:()=>Promise.resolve().then(()=>require("./vala-BIymb2K_.cjs"))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>Promise.resolve().then(()=>require("./vb-IXOh8mqV.cjs"))},{id:"verilog",name:"Verilog",import:()=>Promise.resolve().then(()=>require("./verilog-BiglCqvO.cjs"))},{id:"vhdl",name:"VHDL",import:()=>Promise.resolve().then(()=>require("./vhdl-CJUzuS2t.cjs"))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>Promise.resolve().then(()=>require("./viml-B1nKLcgt.cjs"))},{id:"vue",name:"Vue",import:()=>Promise.resolve().then(()=>require("./vue-Bz7ob1S8.cjs"))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.resolve().then(()=>require("./vue-html-rW8a786u.cjs"))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>Promise.resolve().then(()=>require("./vyper-CO9xUkIY.cjs"))},{id:"wasm",name:"WebAssembly",import:()=>Promise.resolve().then(()=>require("./wasm-CdIThIat.cjs"))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>Promise.resolve().then(()=>require("./wenyan-BSJ3fk7e.cjs"))},{id:"wgsl",name:"WGSL",import:()=>Promise.resolve().then(()=>require("./wgsl-d3zZE7ZN.cjs"))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>Promise.resolve().then(()=>require("./wikitext-BRCqXN2g.cjs"))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>Promise.resolve().then(()=>require("./wolfram-C3rR92zj.cjs"))},{id:"xml",name:"XML",import:()=>Promise.resolve().then(()=>require("./xml-CJLy8-Dx.cjs"))},{id:"xsl",name:"XSL",import:()=>Promise.resolve().then(()=>require("./xsl-D4BTm9yO.cjs"))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>Promise.resolve().then(()=>require("./yaml-7DV6pRKj.cjs"))},{id:"zenscript",name:"ZenScript",import:()=>Promise.resolve().then(()=>require("./zenscript-BWMxwjeH.cjs"))},{id:"zig",name:"Zig",import:()=>Promise.resolve().then(()=>require("./zig-yAcNfpgW.cjs"))}],pb=Object.fromEntries(Nh.map(e=>[e.id,e.import])),mb=Object.fromEntries(Nh.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),gb={...pb,...mb},bb=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>Promise.resolve().then(()=>require("./andromeeda-BXc5FOIb.cjs"))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>Promise.resolve().then(()=>require("./aurora-x-C5IpmIOG.cjs"))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./ayu-dark-Cv7nTiif.cjs"))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-frappe-DXAedND3.cjs"))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>Promise.resolve().then(()=>require("./catppuccin-latte-mwGw3-Ej.cjs"))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-macchiato-cQCk9ADg.cjs"))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-mocha-ClSzDZSl.cjs"))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>Promise.resolve().then(()=>require("./dark-plus-Cd5emcYO.cjs"))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>Promise.resolve().then(()=>require("./dracula-BNgwAJ-d.cjs"))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>Promise.resolve().then(()=>require("./dracula-soft-BHZ7sHFu.cjs"))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./everforest-dark-_sBMomR1.cjs"))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>Promise.resolve().then(()=>require("./everforest-light-H0xoYxl0.cjs"))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-BKL9xNgN.cjs"))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-default-Dsv5MuSi.cjs"))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-dimmed-CtB9hz8U.cjs"))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-high-contrast-BqZVM-jF.cjs"))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-BFTOhCbz.cjs"))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-default-BZoWH9dH.cjs"))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-high-contrast-Ks3kPGJU.cjs"))},{id:"houston",displayName:"Houston",type:"dark",import:()=>Promise.resolve().then(()=>require("./houston-T57H3gQZ.cjs"))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>Promise.resolve().then(()=>require("./kanagawa-dragon-BJZF7xDr.cjs"))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>Promise.resolve().then(()=>require("./kanagawa-lotus-BhgzmRV4.cjs"))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>Promise.resolve().then(()=>require("./kanagawa-wave-BgJip59C.cjs"))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>Promise.resolve().then(()=>require("./laserwave--izBLY1I.cjs"))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>Promise.resolve().then(()=>require("./light-plus-B5D0le0o.cjs"))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-Dj0-OyRN.cjs"))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-darker-Dvfs29ir.cjs"))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>Promise.resolve().then(()=>require("./material-theme-lighter-EU3ZGl_r.cjs"))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-ocean-px_3Pwqa.cjs"))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-palenight-38jxvsGX.cjs"))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./min-dark-tt5o_I5e.cjs"))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>Promise.resolve().then(()=>require("./min-light-tmTHl_CQ.cjs"))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>Promise.resolve().then(()=>require("./monokai-DMIxv6MM.cjs"))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>Promise.resolve().then(()=>require("./night-owl-BN78kThQ.cjs"))},{id:"nord",displayName:"Nord",type:"dark",import:()=>Promise.resolve().then(()=>require("./nord-Ca5AGUWc.cjs"))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>Promise.resolve().then(()=>require("./one-dark-pro-JOzzHStv.cjs"))},{id:"one-light",displayName:"One Light",type:"light",import:()=>Promise.resolve().then(()=>require("./one-light-020-h_lv.cjs"))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>Promise.resolve().then(()=>require("./plastic-r5piqq-S.cjs"))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>Promise.resolve().then(()=>require("./poimandres-BLP3NNjc.cjs"))},{id:"red",displayName:"Red",type:"dark",import:()=>Promise.resolve().then(()=>require("./red-BQGOv1D5.cjs"))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>Promise.resolve().then(()=>require("./rose-pine-DKEdv1Oe.cjs"))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>Promise.resolve().then(()=>require("./rose-pine-dawn-Bvt6DtVH.cjs"))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>Promise.resolve().then(()=>require("./rose-pine-moon-cHuJy0Ng.cjs"))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./slack-dark-akqwQ7ED.cjs"))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>Promise.resolve().then(()=>require("./slack-ochin-BoQQWmTv.cjs"))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>Promise.resolve().then(()=>require("./snazzy-light-D_IwRieF.cjs"))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./solarized-dark-gmm-WbDC.cjs"))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>Promise.resolve().then(()=>require("./solarized-light-DzcxRSZP.cjs"))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>Promise.resolve().then(()=>require("./synthwave-84-BBRLOmNT.cjs"))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>Promise.resolve().then(()=>require("./tokyo-night-9T7_vGSy.cjs"))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>Promise.resolve().then(()=>require("./vesper-DqLWLxOu.cjs"))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>Promise.resolve().then(()=>require("./vitesse-black-MF-1S1MG.cjs"))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./vitesse-dark-SIffJYSe.cjs"))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>Promise.resolve().then(()=>require("./vitesse-light-U63SkYGT.cjs"))}],Eb=Object.fromEntries(bb.map(e=>[e.id,e.import]));let An=class extends Error{constructor(t){super(t),this.name="ShikiError"}},Du=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function xb(){return 2147483648}function yb(){return typeof performance<"u"?performance.now():Date.now()}const Tb=(e,t)=>e+(t-e%t)%t;async function Cb(e){let t,n;const r={};function i(p){n=p,r.HEAPU8=new Uint8Array(p),r.HEAPU32=new Uint32Array(p)}function s(p,g,b){r.HEAPU8.copyWithin(p,g,g+b)}function a(p){try{return t.grow(p-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function o(p){const g=r.HEAPU8.length;p=p>>>0;const b=xb();if(p>b)return!1;for(let T=1;T<=4;T*=2){let y=g*(1+.2/T);y=Math.min(y,p+100663296);const C=Math.min(b,Tb(Math.max(p,y),65536));if(a(C))return!0}return!1}const u=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function l(p,g,b=1024){const T=g+b;let y=g;for(;p[y]&&!(y>=T);)++y;if(y-g>16&&p.buffer&&u)return u.decode(p.subarray(g,y));let C="";for(;g<y;){let S=p[g++];if(!(S&128)){C+=String.fromCharCode(S);continue}const N=p[g++]&63;if((S&224)===192){C+=String.fromCharCode((S&31)<<6|N);continue}const D=p[g++]&63;if((S&240)===224?S=(S&15)<<12|N<<6|D:S=(S&7)<<18|N<<12|D<<6|p[g++]&63,S<65536)C+=String.fromCharCode(S);else{const w=S-65536;C+=String.fromCharCode(55296|w>>10,56320|w&1023)}}return C}function d(p,g){return p?l(r.HEAPU8,p,g):""}const c={emscripten_get_now:yb,emscripten_memcpy_big:s,emscripten_resize_heap:o,fd_write:()=>0};async function m(){const g=await e({env:c,wasi_snapshot_preview1:c});t=g.memory,i(t.buffer),Object.assign(r,g),r.UTF8ToString=d}return await m(),r}var Sb=Object.defineProperty,Ab=(e,t,n)=>t in e?Sb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ot=(e,t,n)=>(Ab(e,typeof t!="symbol"?t+"":t,n),n);let ht=null;function kb(e){throw new Du(e.UTF8ToString(e.getLastOnigError()))}class ga{constructor(t){ot(this,"utf16Length"),ot(this,"utf8Length"),ot(this,"utf16Value"),ot(this,"utf8Value"),ot(this,"utf16OffsetToUtf8"),ot(this,"utf8OffsetToUtf16");const n=t.length,r=ga._utf8ByteLength(t),i=r!==n,s=i?new Uint32Array(n+1):null;i&&(s[n]=r);const a=i?new Uint32Array(r+1):null;i&&(a[r]=n);const o=new Uint8Array(r);let u=0;for(let l=0;l<n;l++){const d=t.charCodeAt(l);let c=d,m=!1;if(d>=55296&&d<=56319&&l+1<n){const p=t.charCodeAt(l+1);p>=56320&&p<=57343&&(c=(d-55296<<10)+65536|p-56320,m=!0)}i&&(s[l]=u,m&&(s[l+1]=u),c<=127?a[u+0]=l:c<=2047?(a[u+0]=l,a[u+1]=l):c<=65535?(a[u+0]=l,a[u+1]=l,a[u+2]=l):(a[u+0]=l,a[u+1]=l,a[u+2]=l,a[u+3]=l)),c<=127?o[u++]=c:c<=2047?(o[u++]=192|(c&1984)>>>6,o[u++]=128|(c&63)>>>0):c<=65535?(o[u++]=224|(c&61440)>>>12,o[u++]=128|(c&4032)>>>6,o[u++]=128|(c&63)>>>0):(o[u++]=240|(c&1835008)>>>18,o[u++]=128|(c&258048)>>>12,o[u++]=128|(c&4032)>>>6,o[u++]=128|(c&63)>>>0),m&&l++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=o,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=a}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r<i;r++){const s=t.charCodeAt(r);let a=s,o=!1;if(s>=55296&&s<=56319&&r+1<i){const u=t.charCodeAt(r+1);u>=56320&&u<=57343&&(a=(s-55296<<10)+65536|u-56320,o=!0)}a<=127?n+=1:a<=2047?n+=2:a<=65535?n+=3:n+=4,o&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const an=class{constructor(e){if(ot(this,"id",++an.LAST_ID),ot(this,"_onigBinding"),ot(this,"content"),ot(this,"utf16Length"),ot(this,"utf8Length"),ot(this,"utf16OffsetToUtf8"),ot(this,"utf8OffsetToUtf16"),ot(this,"ptr"),!ht)throw new Du("Must invoke loadWasm first.");this._onigBinding=ht,this.content=e;const t=new ga(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!an._sharedPtrInUse?(an._sharedPtr||(an._sharedPtr=ht.omalloc(1e4)),an._sharedPtrInUse=!0,ht.HEAPU8.set(t.utf8Value,an._sharedPtr),this.ptr=an._sharedPtr):this.ptr=t.createString(ht)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===an._sharedPtr?an._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};let qi=an;ot(qi,"LAST_ID",0);ot(qi,"_sharedPtr",0);ot(qi,"_sharedPtrInUse",!1);class Ib{constructor(t){if(ot(this,"_onigBinding"),ot(this,"_ptr"),!ht)throw new Du("Must invoke loadWasm first.");const n=[],r=[];for(let o=0,u=t.length;o<u;o++){const l=new ga(t[o]);n[o]=l.createString(ht),r[o]=l.utf8Length}const i=ht.omalloc(4*t.length);ht.HEAPU32.set(n,i/4);const s=ht.omalloc(4*t.length);ht.HEAPU32.set(r,s/4);const a=ht.createOnigScanner(i,s,t.length);for(let o=0,u=t.length;o<u;o++)ht.ofree(n[o]);ht.ofree(s),ht.ofree(i),a===0&&kb(ht),this._onigBinding=ht,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof t=="string"){t=new qi(t);const s=this._findNextMatchSync(t,n,!1,i);return t.dispose(),s}return this._findNextMatchSync(t,n,!1,i)}_findNextMatchSync(t,n,r,i){const s=this._onigBinding,a=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),i);if(a===0)return null;const o=s.HEAPU32;let u=a/4;const l=o[u++],d=o[u++],c=[];for(let m=0;m<d;m++){const p=t.convertUtf8OffsetToUtf16(o[u++]),g=t.convertUtf8OffsetToUtf16(o[u++]);c[m]={start:p,end:g,length:g-p}}return{index:l,captureIndices:c}}}function _b(e){return typeof e.instantiator=="function"}function vb(e){return typeof e.default=="function"}function Db(e){return typeof e.data<"u"}function wb(e){return typeof Response<"u"&&e instanceof Response}function Nb(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let ss;function Pb(e){if(ss)return ss;async function t(){ht=await Cb(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),_b(r)?r=await r.instantiator(n):vb(r)?r=await r.default(n):(Db(r)&&(r=r.data),wb(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await Rb(r)(n):r=await Lb(r)(n):Nb(r)?r=await qa(r)(n):r instanceof WebAssembly.Module?r=await qa(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await qa(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return ss=t(),ss}function qa(e){return t=>WebAssembly.instantiate(e,t)}function Rb(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Lb(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let Ob;function Fb(){return Ob}async function Ph(e){return e&&await Pb(e),{createScanner(t){return new Ib(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new qi(t)}}}function Mb(e){return wu(e)}function wu(e){return Array.isArray(e)?Bb(e):e instanceof RegExp?e:typeof e=="object"?jb(e):e}function Bb(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=wu(e[n]);return t}function jb(e){let t={};for(let n in e)t[n]=wu(e[n]);return t}function Rh(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function Lh(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Lh(e.substring(0,e.length-1)):e.substr(~t+1)}var Va=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,as=class{static hasCaptures(e){return e===null?!1:(Va.lastIndex=0,Va.test(e))}static replaceCaptures(e,t,n){return e.replace(Va,(r,i,s,a)=>{let o=n[parseInt(i||s,10)];if(o){let u=t.substring(o.start,o.end);for(;u[0]===".";)u=u.substring(1);switch(a){case"downcase":return u.toLowerCase();case"upcase":return u.toUpperCase();default:return u}}else return r})}};function Oh(e,t){return e<t?-1:e>t?1:0}function Fh(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;i<n;i++){let s=Oh(e[i],t[i]);if(s!==0)return s}return 0}return n-r}function ic(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Mh(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Bh=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Fs=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(zb(e),t)}static createFromParsedTheme(e,t){return qb(e,t)}_cachedMatchRoot=new Bh(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>Hb(e.parent,i.parentScopes));return r?new jh(r.fontStyle,r.foreground,r.background):null}},Wa=class ys{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new ys(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new ys(n,t[r]);return n}push(t){return new ys(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function Hb(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Ub(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Ub(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var jh=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function zb(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,s=t.length;i<s;i++){let a=t[i];if(!a.settings)continue;let o;if(typeof a.scope=="string"){let c=a.scope;c=c.replace(/^[,]+/,""),c=c.replace(/[,]+$/,""),o=c.split(",")}else Array.isArray(a.scope)?o=a.scope:o=[""];let u=-1;if(typeof a.settings.fontStyle=="string"){u=0;let c=a.settings.fontStyle.split(" ");for(let m=0,p=c.length;m<p;m++)switch(c[m]){case"italic":u=u|1;break;case"bold":u=u|2;break;case"underline":u=u|4;break;case"strikethrough":u=u|8;break}}let l=null;typeof a.settings.foreground=="string"&&ic(a.settings.foreground)&&(l=a.settings.foreground);let d=null;typeof a.settings.background=="string"&&ic(a.settings.background)&&(d=a.settings.background);for(let c=0,m=o.length;c<m;c++){let g=o[c].trim().split(" "),b=g[g.length-1],T=null;g.length>1&&(T=g.slice(0,g.length-1),T.reverse()),n[r++]=new $b(b,T,i,u,l,d)}}return n}var $b=class{constructor(e,t,n,r,i,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=s}},Tn=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Tn||{});function qb(e,t){e.sort((u,l)=>{let d=Oh(u.scope,l.scope);return d!==0||(d=Fh(u.parentScopes,l.parentScopes),d!==0)?d:u.index-l.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let u=e.shift();u.fontStyle!==-1&&(n=u.fontStyle),u.foreground!==null&&(r=u.foreground),u.background!==null&&(i=u.background)}let s=new Vb(t),a=new jh(n,s.getId(r),s.getId(i)),o=new Gb(new Ro(0,null,-1,0,0),[]);for(let u=0,l=e.length;u<l;u++){let d=e[u];o.insert(0,d.scope,d.parentScopes,d.fontStyle,s.getId(d.foreground),s.getId(d.background))}return new Fs(s,a,o)}var Vb=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Wb=Object.freeze([]),Ro=class Hh{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,i,s){this.scopeDepth=t,this.parentScopes=n||Wb,this.fontStyle=r,this.foreground=i,this.background=s}clone(){return new Hh(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},Gb=class Lo{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const s=n.parentScopes[i].length-t.parentScopes[r].length;if(s!==0)return s;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,s;if(r===-1?(i=t,s=""):(i=t.substring(0,r),s=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Lo._cmpBySpecificity),n}insert(t,n,r,i,s,a){if(n===""){this._doInsertHere(t,r,i,s,a);return}let o=n.indexOf("."),u,l;o===-1?(u=n,l=""):(u=n.substring(0,o),l=n.substring(o+1));let d;this._children.hasOwnProperty(u)?d=this._children[u]:(d=new Lo(this._mainRule.clone(),Ro.cloneArr(this._rulesWithParentScopes)),this._children[u]=d),d.insert(t+1,l,r,i,s,a)}_doInsertHere(t,n,r,i,s){if(n===null){this._mainRule.acceptOverwrite(t,r,i,s);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let u=this._rulesWithParentScopes[a];if(Fh(u.parentScopes,n)===0){u.acceptOverwrite(t,r,i,s);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new Ro(t,n,r,i,s))}},Pr=class qt{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=qt.getLanguageId(t),r=qt.getTokenType(t),i=qt.getFontStyle(t),s=qt.getForeground(t),a=qt.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:s,background:a})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,s,a,o){let u=qt.getLanguageId(t),l=qt.getTokenType(t),d=qt.containsBalancedBrackets(t)?1:0,c=qt.getFontStyle(t),m=qt.getForeground(t),p=qt.getBackground(t);return n!==0&&(u=n),r!==8&&(l=r),i!==null&&(d=i?1:0),s!==-1&&(c=s),a!==0&&(m=a),o!==0&&(p=o),(u<<0|l<<8|d<<10|c<<11|m<<15|p<<24)>>>0}};function Ms(e,t){const n=[],r=Yb(e);let i=r.next();for(;i!==null;){let u=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":u=1;break;case"L":u=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let l=a();if(n.push({matcher:l,priority:u}),i!==",")break;i=r.next()}return n;function s(){if(i==="-"){i=r.next();const u=s();return l=>!!u&&!u(l)}if(i==="("){i=r.next();const u=o();return i===")"&&(i=r.next()),u}if(sc(i)){const u=[];do u.push(i),i=r.next();while(sc(i));return l=>t(u,l)}return null}function a(){const u=[];let l=s();for(;l;)u.push(l),l=s();return d=>u.every(c=>c(d))}function o(){const u=[];let l=a();for(;l&&(u.push(l),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");l=a()}return d=>u.some(c=>c(d))}}function sc(e){return!!e&&!!e.match(/[\w\.:]+/)}function Yb(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function Uh(e){typeof e.dispose=="function"&&e.dispose()}var Di=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Kb=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Qb=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Xb=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Di(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Qb;for(const n of e)Zb(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Di){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Zb(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=n.lookup(t);e instanceof Di?Ts({baseGrammar:s,selfGrammar:i},r):Oo(e.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},r);const a=n.injections(e.scopeName);if(a)for(const o of a)r.add(new Di(o))}function Oo(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Bs([r],t,n)}}function Ts(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Bs(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Bs(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Bs(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Rh({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Bs(r.patterns,{...t,repository:i},n);const s=r.include;if(!s)continue;const a=zh(s);switch(a.kind){case 0:Ts({...t,selfGrammar:t.baseGrammar},n);break;case 1:Ts(t,n);break;case 2:Oo(a.ruleName,{...t,repository:i},n);break;case 3:case 4:const o=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){const u={baseGrammar:t.baseGrammar,selfGrammar:o,repository:i};a.kind===4?Oo(a.ruleName,u,n):Ts(u,n)}else a.kind===4?n.add(new Kb(a.scopeName,a.ruleName)):n.add(new Di(a.scopeName));break}}}var Jb=class{kind=0},e2=class{kind=1},t2=class{constructor(e){this.ruleName=e}kind=2},n2=class{constructor(e){this.scopeName=e}kind=3},r2=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function zh(e){if(e==="$base")return new Jb;if(e==="$self")return new e2;const t=e.indexOf("#");if(t===-1)return new n2(e);if(t===0)return new t2(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new r2(n,r)}}var i2=/\\(\d+)/,ac=/\\(\d+)/g,s2=-1,$h=-2;var Vi=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=as.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=as.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Lh(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:as.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:as.replaceCaptures(this._contentName,e,t)}},a2=class extends Vi{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},o2=class extends Vi{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new wi(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ni,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},oc=class extends Vi{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ni,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Fo=class extends Vi{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,s,a,o,u,l){super(e,t,n,r),this._begin=new wi(i,this.id),this.beginCaptures=s,this._end=new wi(a||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=o,this.applyEndPatternLast=u||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ni;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},js=class extends Vi{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,s,a,o,u){super(e,t,n,r),this._begin=new wi(i,this.id),this.beginCaptures=s,this.whileCaptures=o,this._while=new wi(a,$h),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ni;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Ni,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},qh=class Ct{static createCaptureRule(t,n,r,i,s){return t.registerRule(a=>new a2(n,a,r,i,s))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new o2(t.$vscodeTextmateLocation,t.id,t.name,t.match,Ct._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Rh({},r,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new oc(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Ct._compilePatterns(s,n,r))}return t.while?new js(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ct._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,Ct._compileCaptures(t.whileCaptures||t.captures,n,r),Ct._compilePatterns(t.patterns,n,r)):new Fo(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ct._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,Ct._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,Ct._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let s=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);o>s&&(s=o)}for(let a=0;a<=s;a++)i[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);let u=0;t[a].patterns&&(u=Ct.getCompiledRuleId(t[a],n,r)),i[o]=Ct.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,u)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let s=0,a=t.length;s<a;s++){const o=t[s];let u=-1;if(o.include){const l=zh(o.include);switch(l.kind){case 0:case 1:u=Ct.getCompiledRuleId(r[o.include],n,r);break;case 2:let d=r[l.ruleName];d&&(u=Ct.getCompiledRuleId(d,n,r));break;case 3:case 4:const c=l.scopeName,m=l.kind===4?l.ruleName:null,p=n.getExternalGrammar(c,r);if(p)if(m){let g=p.repository[m];g&&(u=Ct.getCompiledRuleId(g,n,p.repository))}else u=Ct.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else u=Ct.getCompiledRuleId(o,n,r);if(u!==-1){const l=n.getRule(u);let d=!1;if((l instanceof oc||l instanceof Fo||l instanceof js)&&l.hasMissingPatterns&&l.patterns.length===0&&(d=!0),d)continue;i.push(u)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},wi=class Vh{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const r=t.length;let i=0,s=[],a=!1;for(let o=0;o<r;o++)if(t.charAt(o)==="\\"&&o+1<r){const l=t.charAt(o+1);l==="z"?(s.push(t.substring(i,o)),s.push("$(?!\\n)(?<!\\n)"),i=o+2):(l==="A"||l==="G")&&(a=!0),o++}this.hasAnchor=a,i===0?this.source=t:(s.push(t.substring(i,r)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=i2.test(this.source):this.hasBackReferences=!1}clone(){return new Vh(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>t.substring(i.start,i.end));return ac.lastIndex=0,this.source.replace(ac,(i,s)=>Mh(r[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],s,a,o,u;for(s=0,a=this.source.length;s<a;s++)o=this.source.charAt(s),t[s]=o,n[s]=o,r[s]=o,i[s]=o,o==="\\"&&s+1<a&&(u=this.source.charAt(s+1),u==="A"?(t[s+1]="￿",n[s+1]="￿",r[s+1]="A",i[s+1]="A"):u==="G"?(t[s+1]="￿",n[s+1]="G",r[s+1]="￿",i[s+1]="G"):(t[s+1]=u,n[s+1]=u,r[s+1]=u,i[s+1]=u),s++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Ni=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new uc(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new uc(e,r,this._items.map(i=>i.ruleId))}},uc=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
17
+ `)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Ga=class{constructor(e,t){this.languageId=e,this.tokenType=t}},u2=class Mo{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new Ga(t,8),this._embeddedLanguagesMatcher=new l2(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Mo._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Ga(0,0);_getBasicScopeAttributes=new Bh(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Ga(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Mo.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},l2=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>Mh(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<"u"&&process.env.VSCODE_TEXTMATE_DEBUG;var lc=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Wh(e,t,n,r,i,s,a,o){const u=t.content.length;let l=!1,d=-1;if(a){const p=c2(e,t,n,r,i,s);i=p.stack,r=p.linePos,n=p.isFirstLine,d=p.anchorPosition}const c=Date.now();for(;!l;){if(o!==0&&Date.now()-c>o)return new lc(i,!0);m()}return new lc(i,!1);function m(){const p=d2(e,t,n,r,i,d);if(!p){s.produce(i,u),l=!0;return}const g=p.captureIndices,b=p.matchedRuleId,T=g&&g.length>0?g[0].end>r:!1;if(b===s2){const y=i.getRule(e);s.produce(i,g[0].start),i=i.withContentNameScopesList(i.nameScopesList),hi(e,t,n,i,s,y.endCaptures,g),s.produce(i,g[0].end);const C=i;if(i=i.parent,d=C.getAnchorPos(),!T&&C.getEnterPos()===r){i=C,s.produce(i,u),l=!0;return}}else{const y=e.getRule(b);s.produce(i,g[0].start);const C=i,S=y.getName(t.content,g),N=i.contentNameScopesList.pushAttributed(S,e);if(i=i.push(b,r,d,g[0].end===u,null,N,N),y instanceof Fo){const D=y;hi(e,t,n,i,s,D.beginCaptures,g),s.produce(i,g[0].end),d=g[0].end;const w=D.getContentName(t.content,g),B=N.pushAttributed(w,e);if(i=i.withContentNameScopesList(B),D.endHasBackReferences&&(i=i.withEndRule(D.getEndWithResolvedBackReferences(t.content,g))),!T&&C.hasSameRuleAs(i)){i=i.pop(),s.produce(i,u),l=!0;return}}else if(y instanceof js){const D=y;hi(e,t,n,i,s,D.beginCaptures,g),s.produce(i,g[0].end),d=g[0].end;const w=D.getContentName(t.content,g),B=N.pushAttributed(w,e);if(i=i.withContentNameScopesList(B),D.whileHasBackReferences&&(i=i.withEndRule(D.getWhileWithResolvedBackReferences(t.content,g))),!T&&C.hasSameRuleAs(i)){i=i.pop(),s.produce(i,u),l=!0;return}}else if(hi(e,t,n,i,s,y.captures,g),s.produce(i,g[0].end),i=i.pop(),!T){i=i.safePop(),s.produce(i,u),l=!0;return}}g[0].end>r&&(r=g[0].end,n=!1)}}function c2(e,t,n,r,i,s){let a=i.beginRuleCapturedEOL?0:-1;const o=[];for(let u=i;u;u=u.pop()){const l=u.getRule(e);l instanceof js&&o.push({rule:l,stack:u})}for(let u=o.pop();u;u=o.pop()){const{ruleScanner:l,findOptions:d}=p2(u.rule,e,u.stack.endRule,n,r===a),c=l.findNextMatchSync(t,r,d);if(c){if(c.ruleId!==$h){i=u.stack.pop();break}c.captureIndices&&c.captureIndices.length&&(s.produce(u.stack,c.captureIndices[0].start),hi(e,t,n,u.stack,s,u.rule.whileCaptures,c.captureIndices),s.produce(u.stack,c.captureIndices[0].end),a=c.captureIndices[0].end,c.captureIndices[0].end>r&&(r=c.captureIndices[0].end,n=!1))}else{i=u.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:a,isFirstLine:n}}function d2(e,t,n,r,i,s){const a=h2(e,t,n,r,i,s),o=e.getInjections();if(o.length===0)return a;const u=f2(o,e,t,n,r,i,s);if(!u)return a;if(!a)return u;const l=a.captureIndices[0].start,d=u.captureIndices[0].start;return d<l||u.priorityMatch&&d===l?u:a}function h2(e,t,n,r,i,s){const a=i.getRule(e),{ruleScanner:o,findOptions:u}=Gh(a,e,i.endRule,n,r===s),l=o.findNextMatchSync(t,r,u);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function f2(e,t,n,r,i,s,a){let o=Number.MAX_VALUE,u=null,l,d=0;const c=s.contentNameScopesList.getScopeNames();for(let m=0,p=e.length;m<p;m++){const g=e[m];if(!g.matcher(c))continue;const b=t.getRule(g.ruleId),{ruleScanner:T,findOptions:y}=Gh(b,t,null,r,i===a),C=T.findNextMatchSync(n,i,y);if(!C)continue;const S=C.captureIndices[0].start;if(!(S>=o)&&(o=S,u=C.captureIndices,l=C.ruleId,d=g.priority,o===i))break}return u?{priorityMatch:d===-1,captureIndices:u,matchedRuleId:l}:null}function Gh(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function p2(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function hi(e,t,n,r,i,s,a){if(s.length===0)return;const o=t.content,u=Math.min(s.length,a.length),l=[],d=a[0].end;for(let c=0;c<u;c++){const m=s[c];if(m===null)continue;const p=a[c];if(p.length===0)continue;if(p.start>d)break;for(;l.length>0&&l[l.length-1].endPos<=p.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,p.start):i.produce(r,p.start),m.retokenizeCapturedWithRuleId){const b=m.getName(o,a),T=r.contentNameScopesList.pushAttributed(b,e),y=m.getContentName(o,a),C=T.pushAttributed(y,e),S=r.push(m.retokenizeCapturedWithRuleId,p.start,-1,!1,null,T,C),N=e.createOnigString(o.substring(0,p.end));Wh(e,N,n&&p.start===0,p.start,S,i,!1,0),Uh(N);continue}const g=m.getName(o,a);if(g!==null){const T=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(g,e);l.push(new m2(T,p.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var m2=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function g2(e,t,n,r,i,s,a,o){return new E2(e,t,n,r,i,s,a,o)}function cc(e,t,n,r,i){const s=Ms(t,Hs),a=qh.getCompiledRuleId(n,r,i.repository);for(const o of s)e.push({debugSelector:t,matcher:o.matcher,ruleId:a,grammar:i,priority:o.priority})}function Hs(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let i=n;i<t.length;i++)if(b2(t[i],r))return n=i+1,!0;return!1})}function b2(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var E2=class{constructor(e,t,n,r,i,s,a,o){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=o,this._basicScopeAttributesProvider=new u2(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=dc(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const u of Object.keys(i)){const l=Ms(u,Hs);for(const d of l)this._tokenTypeMatchers.push({matcher:d.matcher,type:i[u]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let a in i)cc(t,a,i[a],this,r);const s=this._grammarRepository.injections(n);s&&s.forEach(a=>{const o=this.getExternalGrammar(a);if(o){const u=o.injectionSelector;u&&cc(t,u,o,this,o)}})}return t.sort((i,s)=>i.priority-s.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=dc(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=qh.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Bo.NULL){i=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),d=this.themeProvider.getDefaults(),c=Pr.set(0,l.languageId,l.tokenType,null,d.fontStyle,d.foregroundId,d.backgroundId),m=this.getRule(this._rootId).getName(null,null);let p;m?p=gi.createRootAndLookUpScopeName(m,c,this):p=gi.createRoot("unknown",c),t=new Bo(null,this._rootId,-1,-1,!1,null,p,p)}else i=!1,t.reset();e=e+`
18
+ `;const s=this.createOnigString(e),a=s.content.length,o=new y2(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),u=Wh(this,s,i,0,t,o,!0,r);return Uh(s),{lineLength:a,lineTokens:o,ruleStack:u.stack,stoppedEarly:u.stoppedEarly}}};function dc(e,t){return e=Mb(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var gi=class on{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(const s of n)i=Wa.push(i,s.scopeNames),r=new on(r,i,s.encodedTokenAttributes);return r}static createRoot(t,n){return new on(null,new Wa(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),s=new Wa(null,t),a=r.themeProvider.themeMatch(s),o=on.mergeAttributes(n,i,a);return new on(null,s,o)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return on.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,s=0,a=0;return r!==null&&(i=r.fontStyle,s=r.foregroundId,a=r.backgroundId),Pr.set(t,n.languageId,n.tokenType,null,i,s,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return on._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const s of r)i=on._pushAttributed(i,s,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),s=t.scopePath.push(n),a=r.themeProvider.themeMatch(s),o=on.mergeAttributes(t.tokenAttributes,i,a);return new on(t,s,o)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},Bo=class qn{constructor(t,n,r,i,s,a,o,u){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=u,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new qn(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:qn._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?gi.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){qn._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,s,a,o){return new qn(this,t,n,r,i,s,a,o)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new qn(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=gi.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new qn(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,gi.fromExtension(r,n.contentNameScopesList))}},x2=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Ms(n,Hs).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Ms(n,Hs).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},y2=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=e?.getScopeNames()??[];for(const a of this._tokenTypeOverrides)a.matcher(s)&&(r=Pr.set(r,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(s))}if(i&&(r=Pr.set(r,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},T2=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,g2(e,s,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},C2=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new T2(Fs.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Fs.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new x2(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,s){const a=new Xb(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(o=>this._loadSingleGrammar(o.scopeName)),a.processQueue();return this._grammarForScopeName(t,n,r,i,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,s=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,s)}},jo=Bo.NULL;const Yh=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let Wi=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Wi.prototype.normal={};Wi.prototype.property={};Wi.prototype.space=void 0;function Kh(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Wi(n,r,t)}function Pi(e){return e.toLowerCase()}let Ot=class{constructor(t,n){this.attribute=n,this.property=t}};Ot.prototype.attribute="";Ot.prototype.booleanish=!1;Ot.prototype.boolean=!1;Ot.prototype.commaOrSpaceSeparated=!1;Ot.prototype.commaSeparated=!1;Ot.prototype.defined=!1;Ot.prototype.mustUseProperty=!1;Ot.prototype.number=!1;Ot.prototype.overloadedBoolean=!1;Ot.prototype.property="";Ot.prototype.spaceSeparated=!1;Ot.prototype.space=void 0;let S2=0;const ye=ar(),Ze=ar(),Qh=ar(),X=ar(),Fe=ar(),kr=ar(),Ft=ar();function ar(){return 2**++S2}const Ho=Object.freeze(Object.defineProperty({__proto__:null,boolean:ye,booleanish:Ze,commaOrSpaceSeparated:Ft,commaSeparated:kr,number:X,overloadedBoolean:Qh,spaceSeparated:Fe},Symbol.toStringTag,{value:"Module"})),Ya=Object.keys(Ho);let Nu=class extends Ot{constructor(t,n,r,i){let s=-1;if(super(t,n),hc(this,"space",i),typeof r=="number")for(;++s<Ya.length;){const a=Ya[s];hc(this,Ya[s],(r&Ho[a])===Ho[a])}}};Nu.prototype.defined=!0;function hc(e,t,n){n&&(e[t]=n)}function Hr(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Nu(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Pi(r)]=r,n[Pi(s.attribute)]=r}return new Wi(t,n,e.space)}const Xh=Hr({properties:{ariaActiveDescendant:null,ariaAtomic:Ze,ariaAutoComplete:null,ariaBusy:Ze,ariaChecked:Ze,ariaColCount:X,ariaColIndex:X,ariaColSpan:X,ariaControls:Fe,ariaCurrent:null,ariaDescribedBy:Fe,ariaDetails:null,ariaDisabled:Ze,ariaDropEffect:Fe,ariaErrorMessage:null,ariaExpanded:Ze,ariaFlowTo:Fe,ariaGrabbed:Ze,ariaHasPopup:null,ariaHidden:Ze,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Fe,ariaLevel:X,ariaLive:null,ariaModal:Ze,ariaMultiLine:Ze,ariaMultiSelectable:Ze,ariaOrientation:null,ariaOwns:Fe,ariaPlaceholder:null,ariaPosInSet:X,ariaPressed:Ze,ariaReadOnly:Ze,ariaRelevant:null,ariaRequired:Ze,ariaRoleDescription:Fe,ariaRowCount:X,ariaRowIndex:X,ariaRowSpan:X,ariaSelected:Ze,ariaSetSize:X,ariaSort:null,ariaValueMax:X,ariaValueMin:X,ariaValueNow:X,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Zh(e,t){return t in e?e[t]:t}function Jh(e,t){return Zh(e,t.toLowerCase())}const A2=Hr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:kr,acceptCharset:Fe,accessKey:Fe,action:null,allow:null,allowFullScreen:ye,allowPaymentRequest:ye,allowUserMedia:ye,alt:null,as:null,async:ye,autoCapitalize:null,autoComplete:Fe,autoFocus:ye,autoPlay:ye,blocking:Fe,capture:null,charSet:null,checked:ye,cite:null,className:Fe,cols:X,colSpan:null,content:null,contentEditable:Ze,controls:ye,controlsList:Fe,coords:X|kr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ye,defer:ye,dir:null,dirName:null,disabled:ye,download:Qh,draggable:Ze,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ye,formTarget:null,headers:Fe,height:X,hidden:ye,high:X,href:null,hrefLang:null,htmlFor:Fe,httpEquiv:Fe,id:null,imageSizes:null,imageSrcSet:null,inert:ye,inputMode:null,integrity:null,is:null,isMap:ye,itemId:null,itemProp:Fe,itemRef:Fe,itemScope:ye,itemType:Fe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ye,low:X,manifest:null,max:null,maxLength:X,media:null,method:null,min:null,minLength:X,multiple:ye,muted:ye,name:null,nonce:null,noModule:ye,noValidate:ye,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ye,optimum:X,pattern:null,ping:Fe,placeholder:null,playsInline:ye,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ye,referrerPolicy:null,rel:Fe,required:ye,reversed:ye,rows:X,rowSpan:X,sandbox:Fe,scope:null,scoped:ye,seamless:ye,selected:ye,shadowRootClonable:ye,shadowRootDelegatesFocus:ye,shadowRootMode:null,shape:null,size:X,sizes:null,slot:null,span:X,spellCheck:Ze,src:null,srcDoc:null,srcLang:null,srcSet:null,start:X,step:null,style:null,tabIndex:X,target:null,title:null,translate:null,type:null,typeMustMatch:ye,useMap:null,value:Ze,width:X,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Fe,axis:null,background:null,bgColor:null,border:X,borderColor:null,bottomMargin:X,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ye,declare:ye,event:null,face:null,frame:null,frameBorder:null,hSpace:X,leftMargin:X,link:null,longDesc:null,lowSrc:null,marginHeight:X,marginWidth:X,noResize:ye,noHref:ye,noShade:ye,noWrap:ye,object:null,profile:null,prompt:null,rev:null,rightMargin:X,rules:null,scheme:null,scrolling:Ze,standby:null,summary:null,text:null,topMargin:X,valueType:null,version:null,vAlign:null,vLink:null,vSpace:X,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ye,disableRemotePlayback:ye,prefix:null,property:null,results:X,security:null,unselectable:null},space:"html",transform:Jh}),k2=Hr({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ft,accentHeight:X,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:X,amplitude:X,arabicForm:null,ascent:X,attributeName:null,attributeType:null,azimuth:X,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:X,by:null,calcMode:null,capHeight:X,className:Fe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:X,diffuseConstant:X,direction:null,display:null,dur:null,divisor:X,dominantBaseline:null,download:ye,dx:null,dy:null,edgeMode:null,editable:null,elevation:X,enableBackground:null,end:null,event:null,exponent:X,externalResourcesRequired:null,fill:null,fillOpacity:X,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:kr,g2:kr,glyphName:kr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:X,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:X,horizOriginX:X,horizOriginY:X,id:null,ideographic:X,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:X,k:X,k1:X,k2:X,k3:X,k4:X,kernelMatrix:Ft,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:X,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:X,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:X,overlineThickness:X,paintOrder:null,panose1:null,path:null,pathLength:X,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Fe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:X,pointsAtY:X,pointsAtZ:X,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ft,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ft,rev:Ft,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ft,requiredFeatures:Ft,requiredFonts:Ft,requiredFormats:Ft,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:X,specularExponent:X,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:X,strikethroughThickness:X,string:null,stroke:null,strokeDashArray:Ft,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:X,strokeOpacity:X,strokeWidth:null,style:null,surfaceScale:X,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ft,tabIndex:X,tableValues:null,target:null,targetX:X,targetY:X,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ft,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:X,underlineThickness:X,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:X,values:null,vAlphabetic:X,vMathematical:X,vectorEffect:null,vHanging:X,vIdeographic:X,version:null,vertAdvY:X,vertOriginX:X,vertOriginY:X,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:X,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Zh}),ef=Hr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),tf=Hr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Jh}),nf=Hr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),I2={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"},_2=/[A-Z]/g,fc=/-[a-z]/g,v2=/^data[-\w.:]+$/i;function Gi(e,t){const n=Pi(t);let r=t,i=Ot;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&v2.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(fc,w2);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!fc.test(s)){let a=s.replace(_2,D2);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Nu}return new i(r,t)}function D2(e){return"-"+e.toLowerCase()}function w2(e){return e.charAt(1).toUpperCase()}const Ur=Kh([Xh,A2,ef,tf,nf],"html"),In=Kh([Xh,k2,ef,tf,nf],"svg"),pc={}.hasOwnProperty;function ba(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const o=r.handlers;if(i&&pc.call(i,e)){const u=String(i[e]);a=pc.call(o,u)?o[u]:r.unknown}if(a)return a.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const N2=/["&'<>`]/g,P2=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,R2=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,L2=/[|\\{}()[\]^$+*?.]/g,mc=new WeakMap;function O2(e,t){if(e=e.replace(t.subset?F2(t.subset):N2,r),t.subset||t.escapeOnly)return e;return e.replace(P2,n).replace(R2,r);function n(i,s,a){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,a.charCodeAt(s+2),t)}function r(i,s,a){return t.format(i.charCodeAt(0),a.charCodeAt(s+1),t)}}function F2(e){let t=mc.get(e);return t||(t=M2(e),mc.set(e,t)),t}function M2(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(L2,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const B2=/[\dA-Fa-f]/;function j2(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!B2.test(String.fromCharCode(t))?r:r+";"}const H2=/\d/;function U2(e,t,n){const r="&#"+String(e);return n&&t&&!H2.test(String.fromCharCode(t))?r:r+";"}const z2=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Ka={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},$2=["cent","copy","divide","gt","lt","not","para","times"],rf={}.hasOwnProperty,Uo={};let os;for(os in Ka)rf.call(Ka,os)&&(Uo[Ka[os]]=os);const q2=/[^\dA-Za-z]/;function V2(e,t,n,r){const i=String.fromCharCode(e);if(rf.call(Uo,i)){const s=Uo[i],a="&"+s;return n&&z2.includes(s)&&!$2.includes(s)&&(!r||t&&t!==61&&q2.test(String.fromCharCode(t)))?a:a+";"}return""}function W2(e,t,n){let r=j2(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=V2(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const s=U2(e,t,n.omitOptionalSemicolons);s.length<r.length&&(r=s)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Ir(e,t){return O2(e,Object.assign({format:W2},t))}const G2=/^>|^->|<!--|-->|--!>|<!-$/g,Y2=[">"],K2=["<",">"];function Q2(e,t,n,r){return r.settings.bogusComments?"<?"+Ir(e.value,Object.assign({},r.settings.characterReferences,{subset:Y2}))+">":"<!--"+e.value.replace(G2,i)+"-->";function i(s){return Ir(s,Object.assign({},r.settings.characterReferences,{subset:K2}))}}function X2(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Us(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function zo(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function Ea(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function $o(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function xa(e){return e.join(" ").trim()}const Z2=/[ \t\n\f\r]/g;function Yi(e){return typeof e=="object"?e.type==="text"?gc(e.value):!1:gc(e)}function gc(e){return e.replace(Z2,"")===""}const lt=af(1),sf=af(-1),J2=[];function af(e){return t;function t(n,r,i){const s=n?n.children:J2;let a=(r||0)+e,o=s[a];if(!i)for(;o&&Yi(o);)a+=e,o=s[a];return o}}const eE={}.hasOwnProperty;function of(e){return t;function t(n,r,i){return eE.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const Pu=of({body:nE,caption:Qa,colgroup:Qa,dd:aE,dt:sE,head:Qa,html:tE,li:iE,optgroup:oE,option:uE,p:rE,rp:bc,rt:bc,tbody:cE,td:Ec,tfoot:dE,th:Ec,thead:lE,tr:hE});function Qa(e,t,n){const r=lt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Yi(r.value.charAt(0)))}function tE(e,t,n){const r=lt(n,t);return!r||r.type!=="comment"}function nE(e,t,n){const r=lt(n,t);return!r||r.type!=="comment"}function rE(e,t,n){const r=lt(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function iE(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function sE(e,t,n){const r=lt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function aE(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function bc(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function oE(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function uE(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function lE(e,t,n){const r=lt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function cE(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function dE(e,t,n){return!lt(n,t)}function hE(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function Ec(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const fE=of({body:gE,colgroup:bE,head:mE,html:pE,tbody:EE});function pE(e){const t=lt(e,-1);return!t||t.type!=="comment"}function mE(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function gE(e){const t=lt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Yi(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function bE(e,t,n){const r=sf(n,t),i=lt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Pu(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function EE(e,t,n){const r=sf(n,t),i=lt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Pu(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const us={name:[[`
19
19
  \f\r &/=>`.split(""),`
20
20
  \f\r "&'/=>\``.split("")],[`\0
21
21
  \f\r "&'/<=>`.split(""),`\0
@@ -23,16 +23,16 @@ export default theme;`}function Po(e={},...t){const{breakpoints:n,mixins:r={},sp
23
23
  \f\r &>`.split(""),`\0
24
24
  \f\r "&'<=>\``.split("")],[`\0
25
25
  \f\r "&'<=>\``.split(""),`\0
26
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function bE(e,t,n,r){const i=r.schema,s=i.space==="svg"?!1:r.settings.omitOptionalTags;let a=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const o=[];let u;i.space==="html"&&e.tagName==="svg"&&(r.schema=In);const l=EE(r,e.properties),d=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,d&&(a=!1),(l||!s||!dE(e,t,n))&&(o.push("<",e.tagName,l?" "+l:""),a&&(i.space==="svg"||r.settings.closeSelfClosing)&&(u=l.charAt(l.length-1),(!r.settings.tightSelfClosing||u==="/"||u&&u!=='"'&&u!=="'")&&o.push(" "),o.push("/")),o.push(">")),o.push(d),!a&&(!s||!Nu(e,t,n))&&o.push("</"+e.tagName+">"),o.join("")}function EE(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const s=xE(e,i,t[i]);s&&n.push(s)}}for(;++r<n.length;){const s=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&s!=='"'&&s!=="'"&&(n[r]+=" ")}return n.join("")}function xE(e,t,n){const r=Gi(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let a=e.quote,o;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const u=Ir(r.attribute,Object.assign({},e.settings.characterReferences,{subset:us.name[i][s]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Ea:xa)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?u:(e.settings.preferUnquoted&&(o=Ir(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:us.unquoted[i][s]}))),o!==n&&(e.settings.quoteSmart&&Us(n,a)>Us(n,e.alternative)&&(a=e.alternative),o=a+Ir(n,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?us.single:us.double)[i][s],attribute:!0}))+a),u+(o&&"="+o))}const yE=["<","&"];function uf(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Ir(e.value,Object.assign({},r.settings.characterReferences,{subset:yE}))}function TE(e,t,n,r){return r.settings.allowDangerousHtml?e.value:uf(e,t,n,r)}function CE(e,t,n,r){return r.all(e)}const SE=ba("type",{invalid:AE,unknown:kE,handlers:{comment:Y2,doctype:K2,element:bE,raw:TE,root:CE,text:uf}});function AE(e){throw new Error("Expected node, not `"+e+"`")}function kE(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const IE={},_E={},vE=[];function DE(e,t){const n=IE,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:wE,all:PE,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Yh,characterReferences:n.characterReferences||_E,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?In:Ur,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function wE(e,t,n){return SE(e,t,n,this)}function PE(e){const t=[],n=e&&e.children||vE;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function NE(e){return Array.isArray(e)?e:[e]}function ya(e,t=!1){const n=e.split(/(\r?\n)/g);let r=0;const i=[];for(let s=0;s<n.length;s+=2){const a=t?n[s]+(n[s+1]||""):n[s];i.push([a,r]),r+=n[s].length,r+=n[s+1]?.length||0}return i}function Ru(e){return!e||["plaintext","txt","text","plain"].includes(e)}function lf(e){return e==="ansi"||Ru(e)}function Lu(e){return e==="none"}function cf(e){return Lu(e)}function df(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function RE(e,t){let n=0;const r=[];for(const i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function LE(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,i)=>r-i);return n.length?e.map(r=>r.flatMap(i=>{const s=n.filter(a=>i.offset<a&&a<i.offset+i.content.length).map(a=>a-i.offset).sort((a,o)=>a-o);return s.length?RE(i,s):i})):e}async function hf(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function zs(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,s]of Object.entries(t?.colorReplacements||{}))typeof s=="string"?n[i]=s:i===r&&Object.assign(n,s);return n}function Gn(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function ff(e){const t={};return e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle&&(e.fontStyle&Tn.Italic&&(t["font-style"]="italic"),e.fontStyle&Tn.Bold&&(t["font-weight"]="bold"),e.fontStyle&Tn.Underline&&(t["text-decoration"]="underline")),t}function OE(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function FE(e){const t=ya(e,!0).map(([i])=>i);function n(i){if(i===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=i,a=0;for(const o of t){if(s<o.length)break;s-=o.length,a++}return{line:a,character:s}}function r(i,s){let a=0;for(let o=0;o<i;o++)a+=t[o].length;return a+=s,a}return{lines:t,indexToPos:n,posToIndex:r}}class _t extends Error{constructor(t){super(t),this.name="ShikiError"}}const pf=new WeakMap;function Ta(e,t){pf.set(e,t)}function Ri(e){return pf.get(e)}class zr{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new zr(Object.fromEntries(NE(n).map(r=>[r,jo])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}get scopes(){return xc(this._stacks[this.theme])}getScopes(t=this.theme){return xc(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.scopes}}}function xc(e){const t=[],n=new Set;function r(i){if(n.has(i))return;n.add(i);const s=i?.nameScopesList?.scopeName;s&&t.push(s),i.parent&&r(i.parent)}return r(e),t}function ME(e,t){if(!(e instanceof zr))throw new _t("Invalid grammar state");return e.getInternalStack(t)}function BE(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(a){if(typeof a=="number"){if(a<0||a>n.source.length)throw new _t(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...i.indexToPos(a),offset:a}}else{const o=i.lines[a.line];if(o===void 0)throw new _t(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${i.lines.length}`);if(a.character<0||a.character>o.length)throw new _t(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${o.length}`);return{...a,offset:i.posToIndex(a.line,a.character)}}};const i=FE(n.source),s=(n.options.decorations||[]).map(a=>({...a,start:r(a.start),end:r(a.end)}));jE(s),e.set(n.meta,{decorations:s,converter:i,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const i=t(this).decorations.flatMap(a=>[a.start.offset,a.end.offset]);return LE(n,i)},code(n){if(!this.options.decorations?.length)return;const r=t(this),i=Array.from(n.children).filter(d=>d.type==="element"&&d.tagName==="span");if(i.length!==r.converter.lines.length)throw new _t(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function s(d,c,m,p){const g=i[d];let b="",T=-1,y=-1;if(c===0&&(T=0),m===0&&(y=0),m===Number.POSITIVE_INFINITY&&(y=g.children.length),T===-1||y===-1)for(let S=0;S<g.children.length;S++)b+=mf(g.children[S]),T===-1&&b.length===c&&(T=S+1),y===-1&&b.length===m&&(y=S+1);if(T===-1)throw new _t(`Failed to find start index for decoration ${JSON.stringify(p.start)}`);if(y===-1)throw new _t(`Failed to find end index for decoration ${JSON.stringify(p.end)}`);const C=g.children.slice(T,y);if(!p.alwaysWrap&&C.length===g.children.length)o(g,p,"line");else if(!p.alwaysWrap&&C.length===1&&C[0].type==="element")o(C[0],p,"token");else{const S={type:"element",tagName:"span",properties:{},children:C};o(S,p,"wrapper"),g.children.splice(T,C.length,S)}}function a(d,c){i[d]=o(i[d],c,"line")}function o(d,c,m){const p=c.properties||{},g=c.transform||(b=>b);return d.tagName=c.tagName||"span",d.properties={...d.properties,...p,class:d.properties.class},c.properties?.class&&df(d,c.properties.class),d=g(d,m)||d,d}const u=[],l=r.decorations.sort((d,c)=>c.start.offset-d.start.offset);for(const d of l){const{start:c,end:m}=d;if(c.line===m.line)s(c.line,c.character,m.character,d);else if(c.line<m.line){s(c.line,c.character,Number.POSITIVE_INFINITY,d);for(let p=c.line+1;p<m.line;p++)u.unshift(()=>a(p,d));s(m.line,0,m.character,d)}}u.forEach(d=>d())}}}function jE(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new _t(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const i=e[r],s=n.start.offset<i.start.offset&&i.start.offset<n.end.offset,a=n.start.offset<i.end.offset&&i.end.offset<n.end.offset,o=i.start.offset<n.start.offset&&n.start.offset<i.end.offset,u=i.start.offset<n.end.offset&&n.end.offset<i.end.offset;if(s||a||o||u){if(a&&a||o&&u)continue;throw new _t(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function mf(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(mf).join(""):""}const HE=[BE()];function $s(e){return[...e.transformers||[],...HE]}var Yn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Xa={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function UE(e,t){const n=e.indexOf("\x1B[",t);if(n!==-1){const r=e.indexOf("m",n);return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function yc(e,t){let n=1;const r=e[t+n++];let i;if(r==="2"){const s=[e[t+n++],e[t+n++],e[t+n]].map(a=>Number.parseInt(a));s.length===3&&!s.some(a=>Number.isNaN(a))&&(i={type:"rgb",rgb:s})}else if(r==="5"){const s=Number.parseInt(e[t+n]);Number.isNaN(s)||(i={type:"table",index:Number(s)})}return[n,i]}function zE(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],i=Number.parseInt(r);if(!Number.isNaN(i))if(i===0)t.push({type:"resetAll"});else if(i<=9)Xa[i]&&t.push({type:"setDecoration",value:Xa[i]});else if(i<=29){const s=Xa[i-20];s&&t.push({type:"resetDecoration",value:s})}else if(i<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Yn[i-30]}});else if(i===38){const[s,a]=yc(e,n);a&&t.push({type:"setForegroundColor",value:a}),n+=s}else if(i===39)t.push({type:"resetForegroundColor"});else if(i<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Yn[i-40]}});else if(i===48){const[s,a]=yc(e,n);a&&t.push({type:"setBackgroundColor",value:a}),n+=s}else i===49?t.push({type:"resetBackgroundColor"}):i>=90&&i<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Yn[i-90+8]}}):i>=100&&i<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Yn[i-100+8]}})}return t}function $E(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let s=0;do{const a=UE(r,s),o=a.sequence?r.substring(s,a.startPosition):r.substring(s);if(o.length>0&&i.push({value:o,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const u=zE(a.sequence);for(const l of u)l.type==="resetAll"?(e=null,t=null,n.clear()):l.type==="resetForegroundColor"?e=null:l.type==="resetBackgroundColor"?t=null:l.type==="resetDecoration"&&n.delete(l.value);for(const l of u)l.type==="setForegroundColor"?e=l.value:l.type==="setBackgroundColor"?t=l.value:l.type==="setDecoration"&&n.add(l.value)}s=a.position}while(s<r.length);return i}}}var qE={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function VE(e=qE){function t(o){return e[o]}function n(o){return`#${o.map(u=>Math.max(0,Math.min(u,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let l=0;l<Yn.length;l++)r.push(t(Yn[l]));let o=[0,95,135,175,215,255];for(let l=0;l<6;l++)for(let d=0;d<6;d++)for(let c=0;c<6;c++)r.push(n([o[l],o[d],o[c]]));let u=8;for(let l=0;l<24;l++,u+=10)r.push(n([u,u,u]));return r}function s(o){return i()[o]}function a(o){switch(o.type){case"named":return t(o.name);case"rgb":return n(o.rgb);case"table":return s(o.index)}}return{value:a}}function WE(e,t,n){const r=zs(e,n),i=ya(t),s=VE(Object.fromEntries(Yn.map(o=>[o,e.colors?.[`terminal.ansi${o[0].toUpperCase()}${o.substring(1)}`]]))),a=$E();return i.map(o=>a.parse(o[0]).map(u=>{let l,d;u.decorations.has("reverse")?(l=u.background?s.value(u.background):e.bg,d=u.foreground?s.value(u.foreground):e.fg):(l=u.foreground?s.value(u.foreground):e.fg,d=u.background?s.value(u.background):void 0),l=Gn(l,r),d=Gn(d,r),u.decorations.has("dim")&&(l=GE(l));let c=Tn.None;return u.decorations.has("bold")&&(c|=Tn.Bold),u.decorations.has("italic")&&(c|=Tn.Italic),u.decorations.has("underline")&&(c|=Tn.Underline),{content:u.value,offset:o[1],color:l,bgColor:d,fontStyle:c}}))}function GE(e){const t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t)if(t[3]){const r=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${r}`}else return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map(r=>`${r}${r}`).join("")}80`;const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Ou(e,t,n={}){const{lang:r="text",theme:i=e.getLoadedThemes()[0]}=n;if(Ru(r)||Lu(i))return ya(t).map(u=>[{content:u[0],offset:u[1]}]);const{theme:s,colorMap:a}=e.setTheme(i);if(r==="ansi")return WE(s,t,n);const o=e.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new An(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(s.name))throw new An(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return KE(t,o,s,a,n)}function YE(...e){if(e.length===2)return Ri(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:s=t.getLoadedThemes()[0]}=r;if(Ru(i)||Lu(s))throw new An("Plain language does not have grammar state");if(i==="ansi")throw new An("ANSI language does not have grammar state");const{theme:a,colorMap:o}=t.setTheme(s),u=t.getLanguage(i);return new zr(qs(n,u,a,o,r).stateStack,u.name,a.name)}function KE(e,t,n,r,i){const s=qs(e,t,n,r,i),a=new zr(qs(e,t,n,r,i).stateStack,t.name,n.name);return Ta(s.tokens,a),s.tokens}function qs(e,t,n,r,i){const s=zs(n,i),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:o=500}=i,u=ya(e);let l=i.grammarState?ME(i.grammarState,n.name)??jo:i.grammarContextCode!=null?qs(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:jo,d=[];const c=[];for(let m=0,p=u.length;m<p;m++){const[g,b]=u[m];if(g===""){d=[],c.push([]);continue}if(a>0&&g.length>=a){d=[],c.push([{content:g,offset:b,color:"",fontStyle:0}]);continue}let T,y,C;i.includeExplanation&&(T=t.tokenizeLine(g,l),y=T.tokens,C=0);const S=t.tokenizeLine2(g,l,o),P=S.tokens.length/2;for(let D=0;D<P;D++){const w=S.tokens[2*D],B=D+1<P?S.tokens[2*D+2]:g.length;if(w===B)continue;const V=S.tokens[2*D+1],Q=Gn(r[Nr.getForeground(V)],s),E=Nr.getFontStyle(V),L={content:g.substring(w,B),offset:b+w,color:Q,fontStyle:E};if(i.includeExplanation){const O=[];if(i.includeExplanation!=="scopeName")for(const M of n.settings){let J;switch(typeof M.scope){case"string":J=M.scope.split(/,/).map(oe=>oe.trim());break;case"object":J=M.scope;break;default:continue}O.push({settings:M,selectors:J.map(oe=>oe.split(/ /))})}L.explanation=[];let z=0;for(;w+z<B;){const M=y[C],J=g.substring(M.startIndex,M.endIndex);z+=J.length,L.explanation.push({content:J,scopes:i.includeExplanation==="scopeName"?QE(M.scopes):XE(O,M.scopes)}),C+=1}}d.push(L)}c.push(d),d=[],l=S.ruleStack}return{tokens:c,stateStack:l}}function QE(e){return e.map(t=>({scopeName:t}))}function XE(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const s=t[r];n[r]={scopeName:s,themeMatches:JE(e,s,t.slice(0,r))}}return n}function Tc(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function ZE(e,t,n){if(!Tc(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Tc(e[r],n[i])&&(r-=1),i-=1;return r===-1}function JE(e,t,n){const r=[];for(const{selectors:i,settings:s}of e)for(const a of i)if(ZE(a,t,n)){r.push(s);break}return r}function gf(e,t,n){const r=Object.entries(n.themes).filter(u=>u[1]).map(u=>({color:u[0],theme:u[1]})),i=r.map(u=>{const l=Ou(e,t,{...n,theme:u.theme}),d=Ri(l),c=typeof u.theme=="string"?u.theme:u.theme.name;return{tokens:l,state:d,theme:c}}),s=ex(...i.map(u=>u.tokens)),a=s[0].map((u,l)=>u.map((d,c)=>{const m={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in n&&n.includeExplanation&&(m.explanation=d.explanation),s.forEach((p,g)=>{const{content:b,explanation:T,offset:y,...C}=p[l][c];m.variants[r[g].color]=C}),m})),o=i[0].state?new zr(Object.fromEntries(i.map(u=>[u.theme,u.state?.getInternalStack(u.theme)])),i[0].state.lang):void 0;return o&&Ta(a,o),a}function ex(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const i=e.map(u=>u[r]),s=t.map(()=>[]);t.forEach((u,l)=>u.push(s[l]));const a=i.map(()=>0),o=i.map(u=>u[0]);for(;o.every(u=>u);){const u=Math.min(...o.map(l=>l.content.length));for(let l=0;l<n;l++){const d=o[l];d.content.length===u?(s[l].push(d),a[l]+=1,o[l]=i[l][a[l]]):(s[l].push({...d,content:d.content.slice(0,u)}),o[l]={...d,content:d.content.slice(u),offset:d.offset+u})}}}return t}function Vs(e,t,n){let r,i,s,a,o,u;if("themes"in n){const{defaultColor:l="light",cssVariablePrefix:d="--shiki-"}=n,c=Object.entries(n.themes).filter(T=>T[1]).map(T=>({color:T[0],theme:T[1]})).sort((T,y)=>T.color===l?-1:y.color===l?1:0);if(c.length===0)throw new An("`themes` option must not be empty");const m=gf(e,t,n);if(u=Ri(m),l&&!c.find(T=>T.color===l))throw new An(`\`themes\` option must contain the defaultColor key \`${l}\``);const p=c.map(T=>e.getTheme(T.theme)),g=c.map(T=>T.color);s=m.map(T=>T.map(y=>tx(y,g,d,l))),u&&Ta(s,u);const b=c.map(T=>zs(T.theme,n));i=c.map((T,y)=>(y===0&&l?"":`${d+T.color}:`)+(Gn(p[y].fg,b[y])||"inherit")).join(";"),r=c.map((T,y)=>(y===0&&l?"":`${d+T.color}-bg:`)+(Gn(p[y].bg,b[y])||"inherit")).join(";"),a=`shiki-themes ${p.map(T=>T.name).join(" ")}`,o=l?void 0:[i,r].join(";")}else if("theme"in n){const l=zs(n.theme,n);s=Ou(e,t,n);const d=e.getTheme(n.theme);r=Gn(d.bg,l),i=Gn(d.fg,l),a=d.name,u=Ri(s)}else throw new An("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:r,themeName:a,rootStyle:o,grammarState:u}}function tx(e,t,n,r){const i={content:e.content,explanation:e.explanation,offset:e.offset},s=t.map(u=>ff(e.variants[u])),a=new Set(s.flatMap(u=>Object.keys(u))),o={};return s.forEach((u,l)=>{for(const d of a){const c=u[d]||"inherit";if(l===0&&r)o[d]=c;else{const m=d==="color"?"":d==="background-color"?"-bg":`-${d}`,p=n+t[l]+(d==="color"?"":m);o[p]=c}}}),i.htmlStyle=o,i}function Ws(e,t,n,r={meta:{},options:n,codeToHast:(i,s)=>Ws(e,i,s),codeToTokens:(i,s)=>Vs(e,i,s)}){let i=t;for(const p of $s(n))i=p.preprocess?.call(r,i,n)||i;let{tokens:s,fg:a,bg:o,themeName:u,rootStyle:l,grammarState:d}=Vs(e,i,n);const{mergeWhitespaces:c=!0}=n;c===!0?s=rx(s):c==="never"&&(s=ix(s));const m={...r,get source(){return i}};for(const p of $s(n))s=p.tokens?.call(m,s)||s;return nx(s,{...n,fg:a,bg:o,themeName:u,rootStyle:l},m,d)}function nx(e,t,n,r=Ri(e)){const i=$s(t),s=[],a={type:"root",children:[]},{structure:o="classic",tabindex:u="0"}=t;let l={type:"element",tagName:"pre",properties:{class:`shiki ${t.themeName||""}`,style:t.rootStyle||`background-color:${t.bg};color:${t.fg}`,...u!==!1&&u!=null?{tabindex:u.toString()}:{},...Object.fromEntries(Array.from(Object.entries(t.meta||{})).filter(([g])=>!g.startsWith("_")))},children:[]},d={type:"element",tagName:"code",properties:{},children:s};const c=[],m={...n,structure:o,addClassToHast:df,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return l},get code(){return d},get lines(){return c}};if(e.forEach((g,b)=>{b&&(o==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):o==="classic"&&s.push({type:"text",value:`
27
- `}));let T={type:"element",tagName:"span",properties:{class:"line"},children:[]},y=0;for(const C of g){let S={type:"element",tagName:"span",properties:{...C.htmlAttrs},children:[{type:"text",value:C.content}]};C.htmlStyle;const P=OE(C.htmlStyle||ff(C));P&&(S.properties.style=P);for(const D of i)S=D?.span?.call(m,S,b+1,y,T,C)||S;o==="inline"?a.children.push(S):o==="classic"&&T.children.push(S),y+=C.content.length}if(o==="classic"){for(const C of i)T=C?.line?.call(m,T,b+1)||T;c.push(T),s.push(T)}}),o==="classic"){for(const g of i)d=g?.code?.call(m,d)||d;l.children.push(d);for(const g of i)l=g?.pre?.call(m,l)||l;a.children.push(l)}let p=a;for(const g of i)p=g?.root?.call(m,p)||p;return r&&Ta(p,r),p}function rx(e){return e.map(t=>{const n=[];let r="",i=0;return t.forEach((s,a)=>{const u=!(s.fontStyle&&s.fontStyle&Tn.Underline);u&&s.content.match(/^\s+$/)&&t[a+1]?(i||(i=s.offset),r+=s.content):r?(u?n.push({...s,offset:i,content:r+s.content}):n.push({content:r,offset:i},s),i=0,r=""):n.push(s)}),n})}function ix(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,i,s,a]=r;if(!i&&!a)return n;const o=[{...n,offset:n.offset+i.length,content:s}];return i&&o.unshift({content:i,offset:n.offset}),a&&o.push({content:a,offset:n.offset+i.length+s.length}),o}))}function sx(e,t,n){const r={meta:{},options:n,codeToHast:(s,a)=>Ws(e,s,a),codeToTokens:(s,a)=>Vs(e,s,a)};let i=DE(Ws(e,t,n,r));for(const s of $s(n))i=s.postprocess?.call(r,i,n)||i;return i}const Cc={light:"#333333",dark:"#bbbbbb"},Sc={light:"#fffffe",dark:"#1e1e1e"},Ac="__shiki_resolved";function Fu(e){if(e?.[Ac])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const o=t.settings?t.settings.find(u=>!u.name&&!u.scope):void 0;o?.settings?.foreground&&(r=o.settings.foreground),o?.settings?.background&&(n=o.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?Cc.light:Cc.dark),n||(n=t.type==="light"?Sc.light:Sc.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const s=new Map;function a(o){if(s.has(o))return s.get(o);i+=1;const u=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${u}`]?a(o):(s.set(o,u),u)}t.settings=t.settings.map(o=>{const u=o.settings?.foreground&&!o.settings.foreground.startsWith("#"),l=o.settings?.background&&!o.settings.background.startsWith("#");if(!u&&!l)return o;const d={...o,settings:{...o.settings}};if(u){const c=a(o.settings.foreground);t.colorReplacements[c]=o.settings.foreground,d.settings.foreground=c}if(l){const c=a(o.settings.background);t.colorReplacements[c]=o.settings.background,d.settings.background=c}return d});for(const o of Object.keys(t.colors||{}))if((o==="editor.foreground"||o==="editor.background"||o.startsWith("terminal.ansi"))&&!t.colors[o]?.startsWith("#")){const u=a(t.colors[o]);t.colorReplacements[u]=t.colors[o],t.colors[o]=u}return Object.defineProperty(t,Ac,{enumerable:!1,writable:!1,value:!0}),t}async function bf(e){return Array.from(new Set((await Promise.all(e.filter(t=>!lf(t)).map(async t=>await hf(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function Ef(e){return(await Promise.all(e.map(async n=>cf(n)?null:Fu(await hf(n))))).filter(n=>!!n)}class ax extends y2{constructor(t,n,r,i={}){super(t),this._resolver=t,this._themes=n,this._langs=r,this._alias=i,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=Fu(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=Fs.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){if(this._alias[t]){const n=new Set([t]);for(;this._alias[t];){if(t=this._alias[t],n.has(t))throw new _t(`Circular alias \`${Array.from(n).join(" -> ")} -> ${t}\``);n.add(t)}}return this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const r={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const i=this.loadGrammarWithConfiguration(t.scopeName,1,r);if(i.name=t.name,this._resolvedGrammars.set(t.name,i),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,n.size)for(const s of n)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const i of t)this.resolveEmbeddedLanguages(i);const n=Array.from(this._langGraph.entries()),r=n.filter(([i,s])=>!s);if(r.length){const i=n.filter(([s,a])=>a&&a.embeddedLangs?.some(o=>r.map(([u])=>u).includes(o))).filter(s=>!r.includes(s));throw new _t(`Missing languages ${r.map(([s])=>`\`${s}\``).join(", ")}, required by ${i.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[i,s]of n)this._resolver.addLanguage(s);for(const[i,s]of n)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){if(this._langMap.set(t.name,t),this._langGraph.set(t.name,t),t.embeddedLangs)for(const n of t.embeddedLangs)this._langGraph.set(n,this._langMap.get(n))}}class ox{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let i=1;i<=n.length;i++){const s=n.slice(0,i).join(".");r=[...r,...this._injections.get(s)||[]]}return r}}let ti=0;function ux(e){ti+=1,e.warnings!==!1&&ti>=10&&ti%10===0&&console.warn(`[Shiki] ${ti} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new _t("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Fu),i=new ox(e.engine,n),s=new ax(i,r,n,e.langAlias);let a;function o(C){T();const S=s.getGrammar(typeof C=="string"?C:C.name);if(!S)throw new _t(`Language \`${C}\` not found, you may need to load it first`);return S}function u(C){if(C==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};T();const S=s.getTheme(C);if(!S)throw new _t(`Theme \`${C}\` not found, you may need to load it first`);return S}function l(C){T();const S=u(C);a!==C&&(s.setTheme(S),a=C);const P=s.getColorMap();return{theme:S,colorMap:P}}function d(){return T(),s.getLoadedThemes()}function c(){return T(),s.getLoadedLanguages()}function m(...C){T(),s.loadLanguages(C.flat(1))}async function p(...C){return m(await bf(C))}function g(...C){T();for(const S of C.flat(1))s.loadTheme(S)}async function b(...C){return T(),g(await Ef(C))}function T(){if(t)throw new _t("Shiki instance has been disposed")}function y(){t||(t=!0,s.dispose(),ti-=1)}return{setTheme:l,getTheme:u,getLanguage:o,getLoadedThemes:d,getLoadedLanguages:c,loadLanguage:p,loadLanguageSync:m,loadTheme:b,loadThemeSync:g,dispose:y,[Symbol.dispose]:y}}async function lx(e={}){e.loadWasm;const[t,n,r]=await Promise.all([Ef(e.themes||[]),bf(e.langs||[]),e.engine||Nh(e.loadWasm||Lb())]);return ux({...e,themes:t,langs:n,engine:r})}async function cx(e={}){const t=await lx(e);return{getLastGrammarState:(...n)=>YE(t,...n),codeToTokensBase:(n,r)=>Ou(t,n,r),codeToTokensWithThemes:(n,r)=>gf(t,n,r),codeToTokens:(n,r)=>Vs(t,n,r),codeToHast:(n,r)=>Ws(t,n,r),codeToHtml:(n,r)=>sx(t,n,r),...t,getInternalContext:()=>t}}function dx(e,t,n){let r,i,s;{const o=e;r=o.langs,i=o.themes,s=o.engine}async function a(o){function u(p){if(typeof p=="string"){if(lf(p))return[];const g=r[p];if(!g)throw new An(`Language \`${p}\` is not included in this bundle. You may want to load it from external source.`);return g}return p}function l(p){if(cf(p))return"none";if(typeof p=="string"){const g=i[p];if(!g)throw new An(`Theme \`${p}\` is not included in this bundle. You may want to load it from external source.`);return g}return p}const d=(o.themes??[]).map(p=>l(p)),c=(o.langs??[]).map(p=>u(p)),m=await cx({engine:o.engine??s(),...o,themes:d,langs:c});return{...m,loadLanguage(...p){return m.loadLanguage(...p.map(u))},loadTheme(...p){return m.loadTheme(...p.map(l))}}}return a}const hx=dx({langs:pb,themes:gb,engine:()=>Nh(Promise.resolve().then(()=>require("./wasm-Dw4u1m6u.cjs")))}),Za={scopeName:"source.malloy",patterns:[{include:"#malloy-language"}],repository:{"malloy-language":{patterns:[{include:"#sql-string"},{include:"#comments"},{include:"#tags"},{include:"#strings"},{include:"#numbers"},{include:"#keywords"},{include:"#properties"},{include:"#functions"},{include:"#datetimes"},{include:"#identifiers-quoted"},{include:"#types"},{include:"#constants"},{include:"#timeframes"},{include:"#identifiers-unquoted"}]},"malloy-matched":{begin:"{",end:"}",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"malloy-in-sql":{begin:"%{",name:"source.malloy-in-sql",end:"}%?",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"sql-string":{patterns:[{begin:'(\\b[A-Za-z_][A-Za-z_0-9]*)(\\s*\\.\\s*)(sql)(\\s*\\(\\s*)(""")',end:'"""',beginCaptures:{1:{name:"variable.other"},3:{name:"keyword.control.sql"},5:{name:"punctuation.sql-block.open"}},endCaptures:{0:{name:"punctuation.sql-block.close"}},name:"source.sql",patterns:[{include:"#malloy-in-sql"},{include:"source.sql"}]}]},functions:{patterns:[{match:"(?i)\\b(count)(\\s*\\()(distinct)",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.function.modifier"}}},{match:"(?i)\\b(AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE|UNGROUPED)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(!)(timestamp|number|string|boolean|date)?(\\s*\\()",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.type"}}}]},datetimes:{patterns:[{match:"(?i)@[0-9]{4}-[0-9]{2}-[0-9]{2}[ T][0-9]{2}:[0-9]{2}((:[0-9]{2})(([\\.,][0-9]+)(\\[[A-Za-z_/]+\\])?)?)?",name:"constant.numeric.timestamp"},{match:"(?i)@[0-9]{4}(-Q[1-4]|-[0-9]{2}(-[0-9]{2}(-WK)?)?)?",name:"constant.numeric.date"}]},"identifiers-quoted":{patterns:[{match:"`[^`]*`",name:"variable.other.quoted"}]},"identifiers-unquoted":{patterns:[{match:"(?i)\\b[A-Za-z_][A-Za-z_0-9]*\\b",name:"variable.other"}]},timeframes:{patterns:[{match:"(?i)\\b((year|quarter|month|week|day|hour|minute|second)s?)\\b",name:"keyword.other.timeframe"},{match:"(?i)\\b(day_of_year|day_of_month)\\b",name:"keyword.other.timeframe"}]},comments:{patterns:[{begin:"/\\*",end:"\\*/",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"comment.block"},{begin:"//",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{begin:"--",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-hyphen"}]},tags:{patterns:[{match:"##\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:'#"',end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{match:"#\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:"#\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"##\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"#",end:"\\n",beginCaptures:{0:{name:"string.quoted"}},name:"string.quoted"}],repository:{"tag-values":{name:"support.type.property-name.json",match:'(-)?((?:[^\\s=#]+)|(?:"[^#]+"))(?:\\s*(=)\\s*((?:[^\\s=#]+)|(?:"[^#]+")))?',captures:{1:{name:"keyword.control.negate"},2:{name:"support.type.property-name.json"},3:{name:"keyword.operator.comparison.ts"},4:{name:"string.quoted"}}}}},strings:{patterns:[{begin:"'",end:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.single",patterns:[{include:"#escapes"}]},{begin:'"',end:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.double",patterns:[{include:"#escapes"}]},{begin:'"""',end:'"""',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.triple"},{begin:"(?i)[r|/]'",end:"'",name:"string.regexp",patterns:[{include:"#regex-escapes"}]}],repository:{escapes:{name:"constant.character.escape",match:"\\\\(u[A-Fa-f0-9]{4}|.)",captures:{0:{name:"constant.character.escape"}}},"regex-escapes":{name:"constant.character.escape",match:"\\\\.",captures:{0:{name:"constant.character.escape"}}}}},numbers:{match:"(?i)(\\b((0|[1-9][0-9]*)(E[+-]?[0-9]+|\\.[0-9]*)?)|\\.[0-9]+)",name:"constant.numeric"},constants:{patterns:[{match:"(?i)\\bnull\\b",name:"constant.language.null"},{match:"(?i)\\btrue\\b",name:"constant.language.true"},{match:"(?i)\\bfalse\\b",name:"constant.language.false"}]},types:{patterns:[{match:"(?i)\\bstring\\b",name:"entity.name.type.string"},{match:"(?i)\\bnumber\\b",name:"entity.name.type.number"},{match:"(?i)\\bdate\\b",name:"entity.name.type.date"},{match:"(?i)\\btimestamp\\b",name:"entity.name.type.timestamp"},{match:"(?i)\\bboolean\\b",name:"entity.name.type.boolean"}]},properties:{patterns:[{match:"(?i)\\baccept\\b",name:"keyword.control.accept"},{match:"(?i)\\bselect\\b",name:"keyword.control.select"},{match:"(?i)\\bconnection\\b",name:"keyword.control.connection"},{match:"(?i)\\brun\\b",name:"keyword.control.run"},{match:"(?i)\\bextend\\b",name:"keyword.control.extend"},{match:"(?i)\\brefine\\b",name:"keyword.control.refine"},{match:"(?i)\\baggregate\\b",name:"keyword.control.aggregate"},{match:"(?i)\\bsample\\b",name:"keyword.control.sample"},{match:"(?i)\\bcalculate\\b",name:"keyword.control.calculate"},{match:"(?i)\\btimezone\\b",name:"keyword.control.timezone"},{match:"(?i)\\bdimension\\b",name:"keyword.control.dimension"},{match:"(?i)\\bexcept\\b",name:"keyword.control.except"},{match:"(?i)\\bsource\\b",name:"keyword.control.source"},{match:"(?i)\\bgroup_by\\b",name:"keyword.control.group_by"},{match:"(?i)\\bhaving\\b",name:"keyword.control.having"},{match:"(?i)\\bindex\\b",name:"keyword.control.index"},{match:"(?i)\\bjoin_one\\b",name:"keyword.control.join_one"},{match:"(?i)\\bwith\\b",name:"keyword.control.with"},{match:"(?i)\\bjoin_many\\b",name:"keyword.control.join_many"},{match:"(?i)\\bjoin_cross\\b",name:"keyword.control.join_cross"},{match:"(?i)\\blimit\\b",name:"keyword.control.limit"},{match:"(?i)\\bmeasure\\b",name:"keyword.control.measure"},{match:"(?i)\\bnest\\b",name:"keyword.control.nest"},{match:"(?i)\\border_by\\b",name:"keyword.control.order_by"},{match:"(?i)\\bpartition_by\\b",name:"keyword.control.partition_by"},{match:"(?i)\\bprimary_key\\b",name:"keyword.control.primary_key"},{match:"(?i)\\bproject\\b",name:"keyword.control.project"},{match:"(?i)\\bquery\\b",name:"keyword.control.query"},{match:"(?i)\\brename\\b",name:"keyword.control.rename"},{match:"(?i)\\btop\\b",name:"keyword.control.top"},{match:"(?i)\\bview\\b",name:"keyword.control.view"},{match:"(?i)\\bwhere\\b",name:"keyword.control.where"},{match:"(?i)\\bdeclare\\b",name:"keyword.control.declare"}]},keywords:{patterns:[{match:"(?i)\\bis\\b",name:"keyword.control.is"},{match:"(?i)\\bon\\b",name:"keyword.control.on"},{match:"(?i)\\bnot\\b",name:"keyword.other.not"},{match:"(?i)\\bor\\b",name:"keyword.other.or"},{match:"(?i)\\bdesc\\b",name:"keyword.control.desc"},{match:"(?i)\\bby\\b",name:"keyword.control.by"},{match:"(?i)\\band\\b",name:"keyword.other.and"},{match:"(?i)\\basc\\b",name:"keyword.control.asc"},{match:"(?i)\\bfor\\b",name:"keyword.other.for"},{match:"(?i)\\belse\\b",name:"keyword.other.else"},{match:"(?i)\\bto\\b",name:"keyword.other.to"},{match:"(?i)\\bwhen\\b",name:"keyword.other.when"},{match:"(?i)\\bpick\\b",name:"keyword.other.pick"},{match:"(?i)\\bimport\\b",name:"keyword.control.import"}]}}},fx={...Za,patterns:[...Za.patterns,{include:"#docvar"}],repository:{...Za.repository,docvar:{patterns:[{match:"\\<\\<[^(\\>\\>)]*\\>\\>",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"markup.italic.markdown"}]}}},px={name:"Malloy SQL",scopeName:"source.malloy-sql",patterns:[{include:"#malloysql-sql"}],repository:{"malloysql-sql":{beginCaptures:{0:{name:"entity.other.attribute.malloy-sql"},1:{name:"entity.other.attribute.malloy-sql"},3:{name:"comment.line.double-slash"}},name:"meta.embedded.block.malloysql.sql",patterns:[{include:"#comments"},{begin:"%{",end:"}%",beginCaptures:{0:{name:"punctuation.definition.malloy-sql"}},endCaptures:{0:{name:"punctuation.definition.malloy-sql"}},name:"meta.embedded.block.malloy",patterns:[{include:"source.malloy"}]},{include:"source.sql"}]},comments:{patterns:[{begin:"/\\*",end:"\\*/",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"comment.block"},{begin:"//",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{begin:"--",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-hyphen"}]}}},xf="catppuccin-latte",mx=hx({themes:[xf],langs:["sql","json","typescript",{name:"malloy",scopeName:"source.malloy",embeddedLangs:["sql"],...fx},{name:"malloysql",scopeName:"source.malloy-sql",embeddedLangs:["sql"],...px}]});async function nr(e,t){return(await mx).codeToHtml(e,{lang:t,theme:xf})}const ut=x.styled(x.Card)({display:"flex",flexDirection:"column",height:"100%"}),Ut=x.styled(x.CardContent)({display:"flex",flexDirection:"column",padding:"10px",flexGrow:1}),Mu=x.styled(x.CardMedia)({padding:"10px"}),gx=x.styled("div")({height:"100%"});x.styled("div")({height:"30px",backgroundColor:"rgba(225, 240, 255, 1)",display:"flex",padding:"4px",alignItems:"center"});const yf=x.styled("div")({height:"75vh",width:"100%",overflowY:"auto"});x.styled("div")({position:"relative",height:"100%",flex:"0 0 auto"});function gt({error:e,context:t}){const n=e.data?.message||"Unknown Error";return h.jsxs(h.Fragment,{children:[t&&h.jsx(x.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:t}),h.jsx("pre",{style:{whiteSpace:"pre-wrap",color:"red",padding:"10px",margin:"auto"},children:n})]})}function bt({text:e,size:t=20,color:n="primary",thickness:r=3.6,centered:i=!0,spacing:s=2,textVariant:a="body2"}){const o=h.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:s},children:[h.jsx(x.CircularProgress,{size:t,color:n,thickness:r}),e&&h.jsx(x.Typography,{variant:a,color:"text.secondary",children:e})]});return i?h.jsx(x.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",width:"100%"},children:o}):o}const bx=Me([h.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14z"},"0"),h.jsx("path",{d:"M7 12h2v5H7zm8-5h2v10h-2zm-4 7h2v3h-2zm0-4h2v2h-2z"},"1")]),Ge="http://localhost/api/v0".replace(/\/+$/,"");class jn{constructor(t,n=Ge,r=Ve){this.basePath=n,this.axios=r,t&&(this.configuration=t,this.basePath=t.basePath??n)}configuration}class Ex extends Error{constructor(t,n){super(n),this.field=t,this.name="RequiredError"}}const et={},tt="https://example.com",Ae=function(e,t,n){if(n==null)throw new Ex(t,`Required parameter ${t} was null or undefined when calling ${e}.`)};function qo(e,t,n=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(r=>qo(e,r,n)):Object.keys(t).forEach(r=>qo(e,t[r],`${n}${n!==""?".":""}${r}`)):e.has(n)?e.append(n,t):e.set(n,t))}const nt=function(e,...t){const n=new URLSearchParams(e.search);qo(n,t),e.search=n.toString()},rt=function(e){return e.pathname+e.search+e.hash},it=function(e,t,n,r){return(i=t,s=n)=>{const a={...e.options,url:(i.defaults.baseURL?"":r?.basePath??s)+e.url};return i.request(a)}},xx=function(e){return{getConnection:async(t,n,r={})=>{Ae("getConnection","projectName",t),Ae("getConnection","connectionName",n);const i="/projects/{projectName}/connections/{connectionName}".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),s=new URL(i,tt);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...r},u={};nt(s,{});let d=a&&a.headers?a.headers:{};return o.headers={...u,...d,...r.headers},{url:rt(s),options:o}},getQuerydata:async(t,n,r,i,s={})=>{Ae("getQuerydata","projectName",t),Ae("getQuerydata","connectionName",n);const a="/projects/{projectName}/connections/{connectionName}/queryData".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),o=new URL(a,tt);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...s},d={},c={};r!==void 0&&(c.sqlStatement=r),i!==void 0&&(c.options=i),nt(o,c);let m=u&&u.headers?u.headers:{};return l.headers={...d,...m,...s.headers},{url:rt(o),options:l}},getSqlsource:async(t,n,r,i={})=>{Ae("getSqlsource","projectName",t),Ae("getSqlsource","connectionName",n);const s="/projects/{projectName}/connections/{connectionName}/sqlSource".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={},d={};r!==void 0&&(d.sqlStatement=r),nt(a,d);let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}},getTablesource:async(t,n,r,i,s={})=>{Ae("getTablesource","projectName",t),Ae("getTablesource","connectionName",n);const a="/projects/{projectName}/connections/{connectionName}/tableSource".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),o=new URL(a,tt);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...s},d={},c={};r!==void 0&&(c.tableKey=r),i!==void 0&&(c.tablePath=i),nt(o,c);let m=u&&u.headers?u.headers:{};return l.headers={...d,...m,...s.headers},{url:rt(o),options:l}},getTemporarytable:async(t,n,r,i={})=>{Ae("getTemporarytable","projectName",t),Ae("getTemporarytable","connectionName",n);const s="/projects/{projectName}/connections/{connectionName}/temporaryTable".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={},d={};r!==void 0&&(d.sqlStatement=r),nt(a,d);let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}},getTest:async(t,n,r={})=>{Ae("getTest","projectName",t),Ae("getTest","connectionName",n);const i="/projects/{projectName}/connections/{connectionName}/test".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),s=new URL(i,tt);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...r},u={};nt(s,{});let d=a&&a.headers?a.headers:{};return o.headers={...u,...d,...r.headers},{url:rt(s),options:o}},listConnections:async(t,n={})=>{Ae("listConnections","projectName",t);const r="/projects/{projectName}/connections".replace("{projectName}",encodeURIComponent(String(t))),i=new URL(r,tt);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...n},o={};nt(i,{});let l=s&&s.headers?s.headers:{};return a.headers={...o,...l,...n.headers},{url:rt(i),options:a}},listSchemas:async(t,n,r={})=>{Ae("listSchemas","projectName",t),Ae("listSchemas","connectionName",n);const i="/projects/{projectName}/connections/{connectionName}/schemas".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),s=new URL(i,tt);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...r},u={};nt(s,{});let d=a&&a.headers?a.headers:{};return o.headers={...u,...d,...r.headers},{url:rt(s),options:o}},listTables:async(t,n,r,i={})=>{Ae("listTables","projectName",t),Ae("listTables","connectionName",n),Ae("listTables","schemaName",r);const s="/projects/{projectName}/connections/{connectionName}/schemas/{schemaName}/tables".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))).replace("{schemaName}",encodeURIComponent(String(r))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={};nt(a,{});let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}}}},pn=function(e){const t=xx(e);return{async getConnection(n,r,i){const s=await t.getConnection(n,r,i),a=e?.serverIndex??0,o=et["ConnectionsApi.getConnection"]?.[a]?.url;return(u,l)=>it(s,Ve,Ge,e)(u,o||l)},async getQuerydata(n,r,i,s,a){const o=await t.getQuerydata(n,r,i,s,a),u=e?.serverIndex??0,l=et["ConnectionsApi.getQuerydata"]?.[u]?.url;return(d,c)=>it(o,Ve,Ge,e)(d,l||c)},async getSqlsource(n,r,i,s){const a=await t.getSqlsource(n,r,i,s),o=e?.serverIndex??0,u=et["ConnectionsApi.getSqlsource"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)},async getTablesource(n,r,i,s,a){const o=await t.getTablesource(n,r,i,s,a),u=e?.serverIndex??0,l=et["ConnectionsApi.getTablesource"]?.[u]?.url;return(d,c)=>it(o,Ve,Ge,e)(d,l||c)},async getTemporarytable(n,r,i,s){const a=await t.getTemporarytable(n,r,i,s),o=e?.serverIndex??0,u=et["ConnectionsApi.getTemporarytable"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)},async getTest(n,r,i){const s=await t.getTest(n,r,i),a=e?.serverIndex??0,o=et["ConnectionsApi.getTest"]?.[a]?.url;return(u,l)=>it(s,Ve,Ge,e)(u,o||l)},async listConnections(n,r){const i=await t.listConnections(n,r),s=e?.serverIndex??0,a=et["ConnectionsApi.listConnections"]?.[s]?.url;return(o,u)=>it(i,Ve,Ge,e)(o,a||u)},async listSchemas(n,r,i){const s=await t.listSchemas(n,r,i),a=e?.serverIndex??0,o=et["ConnectionsApi.listSchemas"]?.[a]?.url;return(u,l)=>it(s,Ve,Ge,e)(u,o||l)},async listTables(n,r,i,s){const a=await t.listTables(n,r,i,s),o=e?.serverIndex??0,u=et["ConnectionsApi.listTables"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)}}};class Tf extends jn{getConnection(t,n,r){return pn(this.configuration).getConnection(t,n,r).then(i=>i(this.axios,this.basePath))}getQuerydata(t,n,r,i,s){return pn(this.configuration).getQuerydata(t,n,r,i,s).then(a=>a(this.axios,this.basePath))}getSqlsource(t,n,r,i){return pn(this.configuration).getSqlsource(t,n,r,i).then(s=>s(this.axios,this.basePath))}getTablesource(t,n,r,i,s){return pn(this.configuration).getTablesource(t,n,r,i,s).then(a=>a(this.axios,this.basePath))}getTemporarytable(t,n,r,i){return pn(this.configuration).getTemporarytable(t,n,r,i).then(s=>s(this.axios,this.basePath))}getTest(t,n,r){return pn(this.configuration).getTest(t,n,r).then(i=>i(this.axios,this.basePath))}listConnections(t,n){return pn(this.configuration).listConnections(t,n).then(r=>r(this.axios,this.basePath))}listSchemas(t,n,r){return pn(this.configuration).listSchemas(t,n,r).then(i=>i(this.axios,this.basePath))}listTables(t,n,r,i){return pn(this.configuration).listTables(t,n,r,i).then(s=>s(this.axios,this.basePath))}}const yx=function(e){return{listDatabases:async(t,n,r,i={})=>{Ae("listDatabases","projectName",t),Ae("listDatabases","packageName",n);const s="/projects/{projectName}/packages/{packageName}/databases".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={},d={};r!==void 0&&(d.versionId=r),nt(a,d);let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}}}},Tx=function(e){const t=yx(e);return{async listDatabases(n,r,i,s){const a=await t.listDatabases(n,r,i,s),o=e?.serverIndex??0,u=et["DatabasesApi.listDatabases"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)}}};class Cx extends jn{listDatabases(t,n,r,i){return Tx(this.configuration).listDatabases(t,n,r,i).then(s=>s(this.axios,this.basePath))}}const Sx=function(e){return{getModel:async(t,n,r,i,s={})=>{Ae("getModel","projectName",t),Ae("getModel","packageName",n),Ae("getModel","path",r);const a="/projects/{projectName}/packages/{packageName}/models/{path}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))).replace("{path}",encodeURIComponent(String(r))),o=new URL(a,tt);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...s},d={},c={};i!==void 0&&(c.versionId=i),nt(o,c);let m=u&&u.headers?u.headers:{};return l.headers={...d,...m,...s.headers},{url:rt(o),options:l}},listModels:async(t,n,r,i={})=>{Ae("listModels","projectName",t),Ae("listModels","packageName",n);const s="/projects/{projectName}/packages/{packageName}/models".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={},d={};r!==void 0&&(d.versionId=r),nt(a,d);let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}}}},kc=function(e){const t=Sx(e);return{async getModel(n,r,i,s,a){const o=await t.getModel(n,r,i,s,a),u=e?.serverIndex??0,l=et["ModelsApi.getModel"]?.[u]?.url;return(d,c)=>it(o,Ve,Ge,e)(d,l||c)},async listModels(n,r,i,s){const a=await t.listModels(n,r,i,s),o=e?.serverIndex??0,u=et["ModelsApi.listModels"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)}}};class Ca extends jn{getModel(t,n,r,i,s){return kc(this.configuration).getModel(t,n,r,i,s).then(a=>a(this.axios,this.basePath))}listModels(t,n,r,i){return kc(this.configuration).listModels(t,n,r,i).then(s=>s(this.axios,this.basePath))}}const Ax=function(e){return{getNotebook:async(t,n,r,i,s={})=>{Ae("getNotebook","projectName",t),Ae("getNotebook","packageName",n),Ae("getNotebook","path",r);const a="/projects/{projectName}/packages/{packageName}/notebooks/{path}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))).replace("{path}",encodeURIComponent(String(r))),o=new URL(a,tt);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...s},d={},c={};i!==void 0&&(c.versionId=i),nt(o,c);let m=u&&u.headers?u.headers:{};return l.headers={...d,...m,...s.headers},{url:rt(o),options:l}},listNotebooks:async(t,n,r,i={})=>{Ae("listNotebooks","projectName",t),Ae("listNotebooks","packageName",n);const s="/projects/{projectName}/packages/{packageName}/notebooks".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={},d={};r!==void 0&&(d.versionId=r),nt(a,d);let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}}}},Ic=function(e){const t=Ax(e);return{async getNotebook(n,r,i,s,a){const o=await t.getNotebook(n,r,i,s,a),u=e?.serverIndex??0,l=et["NotebooksApi.getNotebook"]?.[u]?.url;return(d,c)=>it(o,Ve,Ge,e)(d,l||c)},async listNotebooks(n,r,i,s){const a=await t.listNotebooks(n,r,i,s),o=e?.serverIndex??0,u=et["NotebooksApi.listNotebooks"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)}}};class Cf extends jn{getNotebook(t,n,r,i,s){return Ic(this.configuration).getNotebook(t,n,r,i,s).then(a=>a(this.axios,this.basePath))}listNotebooks(t,n,r,i){return Ic(this.configuration).listNotebooks(t,n,r,i).then(s=>s(this.axios,this.basePath))}}const kx=function(e){return{getPackage:async(t,n,r,i,s={})=>{Ae("getPackage","projectName",t),Ae("getPackage","packageName",n);const a="/projects/{projectName}/packages/{packageName}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),o=new URL(a,tt);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...s},d={},c={};r!==void 0&&(c.versionId=r),i!==void 0&&(c.reload=i),nt(o,c);let m=u&&u.headers?u.headers:{};return l.headers={...d,...m,...s.headers},{url:rt(o),options:l}},listPackages:async(t,n={})=>{Ae("listPackages","projectName",t);const r="/projects/{projectName}/packages".replace("{projectName}",encodeURIComponent(String(t))),i=new URL(r,tt);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...n},o={};nt(i,{});let l=s&&s.headers?s.headers:{};return a.headers={...o,...l,...n.headers},{url:rt(i),options:a}}}},_c=function(e){const t=kx(e);return{async getPackage(n,r,i,s,a){const o=await t.getPackage(n,r,i,s,a),u=e?.serverIndex??0,l=et["PackagesApi.getPackage"]?.[u]?.url;return(d,c)=>it(o,Ve,Ge,e)(d,l||c)},async listPackages(n,r){const i=await t.listPackages(n,r),s=e?.serverIndex??0,a=et["PackagesApi.listPackages"]?.[s]?.url;return(o,u)=>it(i,Ve,Ge,e)(o,a||u)}}};class Sf extends jn{getPackage(t,n,r,i,s){return _c(this.configuration).getPackage(t,n,r,i,s).then(a=>a(this.axios,this.basePath))}listPackages(t,n){return _c(this.configuration).listPackages(t,n).then(r=>r(this.axios,this.basePath))}}const Ix=function(e){return{getProject:async(t,n,r={})=>{Ae("getProject","projectName",t);const i="/projects/{projectName}".replace("{projectName}",encodeURIComponent(String(t))),s=new URL(i,tt);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...r},u={},l={};n!==void 0&&(l.reload=n),nt(s,l);let d=a&&a.headers?a.headers:{};return o.headers={...u,...d,...r.headers},{url:rt(s),options:o}},listProjects:async(t={})=>{const n="/projects",r=new URL(n,tt);let i;e&&(i=e.baseOptions);const s={method:"GET",...i,...t},a={};nt(r,{});let u=i&&i.headers?i.headers:{};return s.headers={...a,...u,...t.headers},{url:rt(r),options:s}}}},vc=function(e){const t=Ix(e);return{async getProject(n,r,i){const s=await t.getProject(n,r,i),a=e?.serverIndex??0,o=et["ProjectsApi.getProject"]?.[a]?.url;return(u,l)=>it(s,Ve,Ge,e)(u,o||l)},async listProjects(n){const r=await t.listProjects(n),i=e?.serverIndex??0,s=et["ProjectsApi.listProjects"]?.[i]?.url;return(a,o)=>it(r,Ve,Ge,e)(a,s||o)}}};class Af extends jn{getProject(t,n,r){return vc(this.configuration).getProject(t,n,r).then(i=>i(this.axios,this.basePath))}listProjects(t){return vc(this.configuration).listProjects(t).then(n=>n(this.axios,this.basePath))}}const _x=function(e){return{executeQuery:async(t,n,r,i,s,a,o,u={})=>{Ae("executeQuery","projectName",t),Ae("executeQuery","packageName",n),Ae("executeQuery","path",r);const l="/projects/{projectName}/packages/{packageName}/queryResults/{path}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))).replace("{path}",encodeURIComponent(String(r))),d=new URL(l,tt);let c;e&&(c=e.baseOptions);const m={method:"GET",...c,...u},p={},g={};i!==void 0&&(g.query=i),s!==void 0&&(g.sourceName=s),a!==void 0&&(g.queryName=a),o!==void 0&&(g.versionId=o),nt(d,g);let b=c&&c.headers?c.headers:{};return m.headers={...p,...b,...u.headers},{url:rt(d),options:m}}}},vx=function(e){const t=_x(e);return{async executeQuery(n,r,i,s,a,o,u,l){const d=await t.executeQuery(n,r,i,s,a,o,u,l),c=e?.serverIndex??0,m=et["QueryresultsApi.executeQuery"]?.[c]?.url;return(p,g)=>it(d,Ve,Ge,e)(p,m||g)}}};class Bu extends jn{executeQuery(t,n,r,i,s,a,o,u){return vx(this.configuration).executeQuery(t,n,r,i,s,a,o,u).then(l=>l(this.axios,this.basePath))}}const Dx=function(e){return{listSchedules:async(t,n,r,i={})=>{Ae("listSchedules","projectName",t),Ae("listSchedules","packageName",n);const s="/projects/{projectName}/packages/{packageName}/schedules".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={},d={};r!==void 0&&(d.versionId=r),nt(a,d);let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}}}},wx=function(e){const t=Dx(e);return{async listSchedules(n,r,i,s){const a=await t.listSchedules(n,r,i,s),o=e?.serverIndex??0,u=et["SchedulesApi.listSchedules"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)}}};class Px extends jn{listSchedules(t,n,r,i){return wx(this.configuration).listSchedules(t,n,r,i).then(s=>s(this.axios,this.basePath))}}class Et{apiKey;username;password;accessToken;basePath;serverIndex;baseOptions;formDataCtor;constructor(t={}){this.apiKey=t.apiKey,this.username=t.username,this.password=t.password,this.accessToken=t.accessToken,this.basePath=t.basePath,this.serverIndex=t.serverIndex,this.baseOptions={...t.baseOptions,headers:{...t.baseOptions?.headers}},this.formDataCtor=t.formDataCtor}isJsonMime(t){const n=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return t!==null&&(n.test(t)||t.toLowerCase()==="application/json-patch+json")}}const kf=N.createContext(void 0),ju=({projectName:e,packageName:t,versionId:n,children:r})=>h.jsx(kf.Provider,{value:{projectName:e,packageName:t,versionId:n},children:r});function pt(e=!0){const t=N.useContext(kf);if(!t&&e)throw new Error("usePackage must be used within a PackageProvider");return t}const If=new pu.QueryClient({defaultOptions:{queries:{retry:!1,throwOnError:!1},mutations:{retry:!1,throwOnError:!1}}}),Hu=async(e,t)=>{const n=t?await t():void 0,r=n?{Authorization:`Bearer ${n}`}:{};return{baseURL:e,withCredentials:!!n,headers:r}};function xt(e){const{server:t,getAccessToken:n}=ka(),r={...e,queryKey:[...e.queryKey,t],queryFn:async()=>{try{const i=await Hu(t,n);return await e.queryFn(i)}catch(i){if(i&&typeof i=="object"&&"response"in i){const s=i;if(s.response?.data){const a=new Error(s.response.data.message||s.message);throw a.status=s.response.status,a.data=s.response.data,a}}throw i}},retry:!1,throwOnError:!1};return pu.useQuery(r,If)}function Nx(e){const{server:t,getAccessToken:n}=ka(),r={...e,mutationFn:async i=>{try{const s=await Hu(t,n);return await e.mutationFn(i,s)}catch(s){if(s&&typeof s=="object"&&"response"in s){const a=s;if(a.response?.data){const o=new Error(a.response.data.message||a.message);throw o.status=a.response.status,o.data=a.response.data,o}}throw s}},retry:!1,throwOnError:!1};return pu.useMutation(r,If)}const Rx=N.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-DW6glKC-.cjs"))),Lx=new Bu(new Et);function Uu(e){const{optionalProjectName:t,optionalPackageName:n}=e;if(!t||!n)throw new Error("Project and Package name must be provided for query embedding.");return JSON.stringify({...e})}function Ox({embeddedQueryResult:e}){const{modelPath:t,query:n,sourceName:r,queryName:i,optionalProjectName:s,optionalPackageName:a,optionalVersionId:o}=JSON.parse(e);if(!t||!n&&(!i||!r)||typeof t!="string")throw new Error("Invalid embedded query result: "+e);return h.jsx(zu,{modelPath:t,query:n,sourceName:r,queryName:i,optionalProjectName:s,optionalPackageName:a,optionalVersionId:o})}function zu({modelPath:e,query:t,sourceName:n,queryName:r,optionalProjectName:i,optionalPackageName:s,optionalVersionId:a}){const o=pt(!1),u=i||o?.projectName,l=s||o?.packageName,d=a||o?.versionId;if(!u||!l)throw new Error("No project or package name provided. Must be set in props or via PackageProvider");const{data:c,isSuccess:m,isError:p,error:g}=xt({queryKey:["queryResult",u,l,e,d,t,n,r],queryFn:b=>Lx.executeQuery(u,l,e,t,n,r,d,b)});return h.jsxs(h.Fragment,{children:[!m&&!p&&h.jsx(bt,{text:"Fetching Query Results..."}),m&&h.jsx(N.Suspense,{fallback:h.jsx("div",{children:"Loading..."}),children:h.jsx(Rx,{result:c.data.result})}),p&&h.jsx(gt,{context:`${u} > ${l} > ${e}`,error:g})]})}const _f=Me(h.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"})),Fx=N.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-DW6glKC-.cjs")));function vf({result:e,minHeight:t,maxHeight:n}){const[r,i]=N.useState(!1),[s,a]=N.useState(0),[o,u]=N.useState(!1),l=N.useRef(null),d=N.useRef(null),[c,m]=N.useState(void 0),[p,g]=N.useState(!1),b=N.useCallback(()=>{const P=r;i(!r),P&&d.current&&setTimeout(()=>{d.current?.scrollIntoView({behavior:"smooth",block:"start"})},100)},[r]),T=N.useCallback(P=>{a(P)},[]);if(N.useEffect(()=>{if(p){u(!0);return}if(s===0){u(!1);return}const P=t-20,D=s>P;s<P&&m(s+20),u(D)},[s,p,t]),!e)return null;const y=h.jsx(bt,{text:"Loading...",centered:!0,size:32}),C=p?r?n-40:t-40:void 0,S=c?{minHeight:`${c}px`,height:"100%"}:{height:"100%"};return h.jsx(h.Fragment,{children:h.jsxs(x.Box,{ref:d,sx:{position:"relative",minHeight:`${t}px`,maxHeight:`${r?n:t}px`,border:"0px",borderRadius:0,overflow:"hidden",display:"flex",flexDirection:"column",...S},children:[h.jsx(x.Box,{ref:l,sx:{flex:1,overflow:r?"auto":"hidden",p:0,pb:o?"40px":1},children:e&&h.jsx(N.Suspense,{fallback:y,children:h.jsx(Fx,{result:e,height:C,isFillElement:P=>{g(P)},onSizeChange:T})})||y}),o&&h.jsx(x.Box,{sx:{position:"absolute",bottom:0,left:0,right:0,height:"32px",backgroundColor:"rgba(255,255,255,0.75)",display:"flex",alignItems:"center",justifyContent:"center"},children:h.jsx(x.IconButton,{size:"small",onClick:b,sx:{color:"text.secondary","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},title:r?"Collapse to original size":"Expand to full size",children:r?h.jsx(Ps.ExpandLess,{sx:{fontSize:30}}):h.jsx(Ps.ExpandMore,{sx:{fontSize:30}})})})]})})}const Mx=`
26
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function xE(e,t,n,r){const i=r.schema,s=i.space==="svg"?!1:r.settings.omitOptionalTags;let a=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const o=[];let u;i.space==="html"&&e.tagName==="svg"&&(r.schema=In);const l=yE(r,e.properties),d=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,d&&(a=!1),(l||!s||!fE(e,t,n))&&(o.push("<",e.tagName,l?" "+l:""),a&&(i.space==="svg"||r.settings.closeSelfClosing)&&(u=l.charAt(l.length-1),(!r.settings.tightSelfClosing||u==="/"||u&&u!=='"'&&u!=="'")&&o.push(" "),o.push("/")),o.push(">")),o.push(d),!a&&(!s||!Pu(e,t,n))&&o.push("</"+e.tagName+">"),o.join("")}function yE(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const s=TE(e,i,t[i]);s&&n.push(s)}}for(;++r<n.length;){const s=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&s!=='"'&&s!=="'"&&(n[r]+=" ")}return n.join("")}function TE(e,t,n){const r=Gi(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let a=e.quote,o;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const u=Ir(r.attribute,Object.assign({},e.settings.characterReferences,{subset:us.name[i][s]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Ea:xa)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?u:(e.settings.preferUnquoted&&(o=Ir(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:us.unquoted[i][s]}))),o!==n&&(e.settings.quoteSmart&&Us(n,a)>Us(n,e.alternative)&&(a=e.alternative),o=a+Ir(n,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?us.single:us.double)[i][s],attribute:!0}))+a),u+(o&&"="+o))}const CE=["<","&"];function uf(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Ir(e.value,Object.assign({},r.settings.characterReferences,{subset:CE}))}function SE(e,t,n,r){return r.settings.allowDangerousHtml?e.value:uf(e,t,n,r)}function AE(e,t,n,r){return r.all(e)}const kE=ba("type",{invalid:IE,unknown:_E,handlers:{comment:Q2,doctype:X2,element:xE,raw:SE,root:AE,text:uf}});function IE(e){throw new Error("Expected node, not `"+e+"`")}function _E(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const vE={},DE={},wE=[];function NE(e,t){const n=vE,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:PE,all:RE,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Yh,characterReferences:n.characterReferences||DE,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?In:Ur,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function PE(e,t,n){return kE(e,t,n,this)}function RE(e){const t=[],n=e&&e.children||wE;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function LE(e){return Array.isArray(e)?e:[e]}function ya(e,t=!1){const n=e.split(/(\r?\n)/g);let r=0;const i=[];for(let s=0;s<n.length;s+=2){const a=t?n[s]+(n[s+1]||""):n[s];i.push([a,r]),r+=n[s].length,r+=n[s+1]?.length||0}return i}function Ru(e){return!e||["plaintext","txt","text","plain"].includes(e)}function lf(e){return e==="ansi"||Ru(e)}function Lu(e){return e==="none"}function cf(e){return Lu(e)}function df(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function OE(e,t){let n=0;const r=[];for(const i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function FE(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,i)=>r-i);return n.length?e.map(r=>r.flatMap(i=>{const s=n.filter(a=>i.offset<a&&a<i.offset+i.content.length).map(a=>a-i.offset).sort((a,o)=>a-o);return s.length?OE(i,s):i})):e}async function hf(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function zs(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,s]of Object.entries(t?.colorReplacements||{}))typeof s=="string"?n[i]=s:i===r&&Object.assign(n,s);return n}function Gn(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function ff(e){const t={};return e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle&&(e.fontStyle&Tn.Italic&&(t["font-style"]="italic"),e.fontStyle&Tn.Bold&&(t["font-weight"]="bold"),e.fontStyle&Tn.Underline&&(t["text-decoration"]="underline")),t}function ME(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function BE(e){const t=ya(e,!0).map(([i])=>i);function n(i){if(i===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=i,a=0;for(const o of t){if(s<o.length)break;s-=o.length,a++}return{line:a,character:s}}function r(i,s){let a=0;for(let o=0;o<i;o++)a+=t[o].length;return a+=s,a}return{lines:t,indexToPos:n,posToIndex:r}}class _t extends Error{constructor(t){super(t),this.name="ShikiError"}}const pf=new WeakMap;function Ta(e,t){pf.set(e,t)}function Ri(e){return pf.get(e)}class zr{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new zr(Object.fromEntries(LE(n).map(r=>[r,jo])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}get scopes(){return xc(this._stacks[this.theme])}getScopes(t=this.theme){return xc(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.scopes}}}function xc(e){const t=[],n=new Set;function r(i){if(n.has(i))return;n.add(i);const s=i?.nameScopesList?.scopeName;s&&t.push(s),i.parent&&r(i.parent)}return r(e),t}function jE(e,t){if(!(e instanceof zr))throw new _t("Invalid grammar state");return e.getInternalStack(t)}function HE(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(a){if(typeof a=="number"){if(a<0||a>n.source.length)throw new _t(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...i.indexToPos(a),offset:a}}else{const o=i.lines[a.line];if(o===void 0)throw new _t(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${i.lines.length}`);if(a.character<0||a.character>o.length)throw new _t(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${o.length}`);return{...a,offset:i.posToIndex(a.line,a.character)}}};const i=BE(n.source),s=(n.options.decorations||[]).map(a=>({...a,start:r(a.start),end:r(a.end)}));UE(s),e.set(n.meta,{decorations:s,converter:i,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const i=t(this).decorations.flatMap(a=>[a.start.offset,a.end.offset]);return FE(n,i)},code(n){if(!this.options.decorations?.length)return;const r=t(this),i=Array.from(n.children).filter(d=>d.type==="element"&&d.tagName==="span");if(i.length!==r.converter.lines.length)throw new _t(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function s(d,c,m,p){const g=i[d];let b="",T=-1,y=-1;if(c===0&&(T=0),m===0&&(y=0),m===Number.POSITIVE_INFINITY&&(y=g.children.length),T===-1||y===-1)for(let S=0;S<g.children.length;S++)b+=mf(g.children[S]),T===-1&&b.length===c&&(T=S+1),y===-1&&b.length===m&&(y=S+1);if(T===-1)throw new _t(`Failed to find start index for decoration ${JSON.stringify(p.start)}`);if(y===-1)throw new _t(`Failed to find end index for decoration ${JSON.stringify(p.end)}`);const C=g.children.slice(T,y);if(!p.alwaysWrap&&C.length===g.children.length)o(g,p,"line");else if(!p.alwaysWrap&&C.length===1&&C[0].type==="element")o(C[0],p,"token");else{const S={type:"element",tagName:"span",properties:{},children:C};o(S,p,"wrapper"),g.children.splice(T,C.length,S)}}function a(d,c){i[d]=o(i[d],c,"line")}function o(d,c,m){const p=c.properties||{},g=c.transform||(b=>b);return d.tagName=c.tagName||"span",d.properties={...d.properties,...p,class:d.properties.class},c.properties?.class&&df(d,c.properties.class),d=g(d,m)||d,d}const u=[],l=r.decorations.sort((d,c)=>c.start.offset-d.start.offset);for(const d of l){const{start:c,end:m}=d;if(c.line===m.line)s(c.line,c.character,m.character,d);else if(c.line<m.line){s(c.line,c.character,Number.POSITIVE_INFINITY,d);for(let p=c.line+1;p<m.line;p++)u.unshift(()=>a(p,d));s(m.line,0,m.character,d)}}u.forEach(d=>d())}}}function UE(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new _t(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const i=e[r],s=n.start.offset<i.start.offset&&i.start.offset<n.end.offset,a=n.start.offset<i.end.offset&&i.end.offset<n.end.offset,o=i.start.offset<n.start.offset&&n.start.offset<i.end.offset,u=i.start.offset<n.end.offset&&n.end.offset<i.end.offset;if(s||a||o||u){if(a&&a||o&&u)continue;throw new _t(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function mf(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(mf).join(""):""}const zE=[HE()];function $s(e){return[...e.transformers||[],...zE]}var Yn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Xa={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function $E(e,t){const n=e.indexOf("\x1B[",t);if(n!==-1){const r=e.indexOf("m",n);return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function yc(e,t){let n=1;const r=e[t+n++];let i;if(r==="2"){const s=[e[t+n++],e[t+n++],e[t+n]].map(a=>Number.parseInt(a));s.length===3&&!s.some(a=>Number.isNaN(a))&&(i={type:"rgb",rgb:s})}else if(r==="5"){const s=Number.parseInt(e[t+n]);Number.isNaN(s)||(i={type:"table",index:Number(s)})}return[n,i]}function qE(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],i=Number.parseInt(r);if(!Number.isNaN(i))if(i===0)t.push({type:"resetAll"});else if(i<=9)Xa[i]&&t.push({type:"setDecoration",value:Xa[i]});else if(i<=29){const s=Xa[i-20];s&&t.push({type:"resetDecoration",value:s})}else if(i<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Yn[i-30]}});else if(i===38){const[s,a]=yc(e,n);a&&t.push({type:"setForegroundColor",value:a}),n+=s}else if(i===39)t.push({type:"resetForegroundColor"});else if(i<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Yn[i-40]}});else if(i===48){const[s,a]=yc(e,n);a&&t.push({type:"setBackgroundColor",value:a}),n+=s}else i===49?t.push({type:"resetBackgroundColor"}):i>=90&&i<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Yn[i-90+8]}}):i>=100&&i<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Yn[i-100+8]}})}return t}function VE(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let s=0;do{const a=$E(r,s),o=a.sequence?r.substring(s,a.startPosition):r.substring(s);if(o.length>0&&i.push({value:o,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const u=qE(a.sequence);for(const l of u)l.type==="resetAll"?(e=null,t=null,n.clear()):l.type==="resetForegroundColor"?e=null:l.type==="resetBackgroundColor"?t=null:l.type==="resetDecoration"&&n.delete(l.value);for(const l of u)l.type==="setForegroundColor"?e=l.value:l.type==="setBackgroundColor"?t=l.value:l.type==="setDecoration"&&n.add(l.value)}s=a.position}while(s<r.length);return i}}}var WE={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function GE(e=WE){function t(o){return e[o]}function n(o){return`#${o.map(u=>Math.max(0,Math.min(u,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let l=0;l<Yn.length;l++)r.push(t(Yn[l]));let o=[0,95,135,175,215,255];for(let l=0;l<6;l++)for(let d=0;d<6;d++)for(let c=0;c<6;c++)r.push(n([o[l],o[d],o[c]]));let u=8;for(let l=0;l<24;l++,u+=10)r.push(n([u,u,u]));return r}function s(o){return i()[o]}function a(o){switch(o.type){case"named":return t(o.name);case"rgb":return n(o.rgb);case"table":return s(o.index)}}return{value:a}}function YE(e,t,n){const r=zs(e,n),i=ya(t),s=GE(Object.fromEntries(Yn.map(o=>[o,e.colors?.[`terminal.ansi${o[0].toUpperCase()}${o.substring(1)}`]]))),a=VE();return i.map(o=>a.parse(o[0]).map(u=>{let l,d;u.decorations.has("reverse")?(l=u.background?s.value(u.background):e.bg,d=u.foreground?s.value(u.foreground):e.fg):(l=u.foreground?s.value(u.foreground):e.fg,d=u.background?s.value(u.background):void 0),l=Gn(l,r),d=Gn(d,r),u.decorations.has("dim")&&(l=KE(l));let c=Tn.None;return u.decorations.has("bold")&&(c|=Tn.Bold),u.decorations.has("italic")&&(c|=Tn.Italic),u.decorations.has("underline")&&(c|=Tn.Underline),{content:u.value,offset:o[1],color:l,bgColor:d,fontStyle:c}}))}function KE(e){const t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t)if(t[3]){const r=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${r}`}else return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map(r=>`${r}${r}`).join("")}80`;const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Ou(e,t,n={}){const{lang:r="text",theme:i=e.getLoadedThemes()[0]}=n;if(Ru(r)||Lu(i))return ya(t).map(u=>[{content:u[0],offset:u[1]}]);const{theme:s,colorMap:a}=e.setTheme(i);if(r==="ansi")return YE(s,t,n);const o=e.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new An(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(s.name))throw new An(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return XE(t,o,s,a,n)}function QE(...e){if(e.length===2)return Ri(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:s=t.getLoadedThemes()[0]}=r;if(Ru(i)||Lu(s))throw new An("Plain language does not have grammar state");if(i==="ansi")throw new An("ANSI language does not have grammar state");const{theme:a,colorMap:o}=t.setTheme(s),u=t.getLanguage(i);return new zr(qs(n,u,a,o,r).stateStack,u.name,a.name)}function XE(e,t,n,r,i){const s=qs(e,t,n,r,i),a=new zr(qs(e,t,n,r,i).stateStack,t.name,n.name);return Ta(s.tokens,a),s.tokens}function qs(e,t,n,r,i){const s=zs(n,i),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:o=500}=i,u=ya(e);let l=i.grammarState?jE(i.grammarState,n.name)??jo:i.grammarContextCode!=null?qs(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:jo,d=[];const c=[];for(let m=0,p=u.length;m<p;m++){const[g,b]=u[m];if(g===""){d=[],c.push([]);continue}if(a>0&&g.length>=a){d=[],c.push([{content:g,offset:b,color:"",fontStyle:0}]);continue}let T,y,C;i.includeExplanation&&(T=t.tokenizeLine(g,l),y=T.tokens,C=0);const S=t.tokenizeLine2(g,l,o),N=S.tokens.length/2;for(let D=0;D<N;D++){const w=S.tokens[2*D],B=D+1<N?S.tokens[2*D+2]:g.length;if(w===B)continue;const V=S.tokens[2*D+1],Q=Gn(r[Pr.getForeground(V)],s),E=Pr.getFontStyle(V),L={content:g.substring(w,B),offset:b+w,color:Q,fontStyle:E};if(i.includeExplanation){const O=[];if(i.includeExplanation!=="scopeName")for(const M of n.settings){let J;switch(typeof M.scope){case"string":J=M.scope.split(/,/).map(oe=>oe.trim());break;case"object":J=M.scope;break;default:continue}O.push({settings:M,selectors:J.map(oe=>oe.split(/ /))})}L.explanation=[];let z=0;for(;w+z<B;){const M=y[C],J=g.substring(M.startIndex,M.endIndex);z+=J.length,L.explanation.push({content:J,scopes:i.includeExplanation==="scopeName"?ZE(M.scopes):JE(O,M.scopes)}),C+=1}}d.push(L)}c.push(d),d=[],l=S.ruleStack}return{tokens:c,stateStack:l}}function ZE(e){return e.map(t=>({scopeName:t}))}function JE(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const s=t[r];n[r]={scopeName:s,themeMatches:tx(e,s,t.slice(0,r))}}return n}function Tc(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function ex(e,t,n){if(!Tc(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Tc(e[r],n[i])&&(r-=1),i-=1;return r===-1}function tx(e,t,n){const r=[];for(const{selectors:i,settings:s}of e)for(const a of i)if(ex(a,t,n)){r.push(s);break}return r}function gf(e,t,n){const r=Object.entries(n.themes).filter(u=>u[1]).map(u=>({color:u[0],theme:u[1]})),i=r.map(u=>{const l=Ou(e,t,{...n,theme:u.theme}),d=Ri(l),c=typeof u.theme=="string"?u.theme:u.theme.name;return{tokens:l,state:d,theme:c}}),s=nx(...i.map(u=>u.tokens)),a=s[0].map((u,l)=>u.map((d,c)=>{const m={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in n&&n.includeExplanation&&(m.explanation=d.explanation),s.forEach((p,g)=>{const{content:b,explanation:T,offset:y,...C}=p[l][c];m.variants[r[g].color]=C}),m})),o=i[0].state?new zr(Object.fromEntries(i.map(u=>[u.theme,u.state?.getInternalStack(u.theme)])),i[0].state.lang):void 0;return o&&Ta(a,o),a}function nx(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const i=e.map(u=>u[r]),s=t.map(()=>[]);t.forEach((u,l)=>u.push(s[l]));const a=i.map(()=>0),o=i.map(u=>u[0]);for(;o.every(u=>u);){const u=Math.min(...o.map(l=>l.content.length));for(let l=0;l<n;l++){const d=o[l];d.content.length===u?(s[l].push(d),a[l]+=1,o[l]=i[l][a[l]]):(s[l].push({...d,content:d.content.slice(0,u)}),o[l]={...d,content:d.content.slice(u),offset:d.offset+u})}}}return t}function Vs(e,t,n){let r,i,s,a,o,u;if("themes"in n){const{defaultColor:l="light",cssVariablePrefix:d="--shiki-"}=n,c=Object.entries(n.themes).filter(T=>T[1]).map(T=>({color:T[0],theme:T[1]})).sort((T,y)=>T.color===l?-1:y.color===l?1:0);if(c.length===0)throw new An("`themes` option must not be empty");const m=gf(e,t,n);if(u=Ri(m),l&&!c.find(T=>T.color===l))throw new An(`\`themes\` option must contain the defaultColor key \`${l}\``);const p=c.map(T=>e.getTheme(T.theme)),g=c.map(T=>T.color);s=m.map(T=>T.map(y=>rx(y,g,d,l))),u&&Ta(s,u);const b=c.map(T=>zs(T.theme,n));i=c.map((T,y)=>(y===0&&l?"":`${d+T.color}:`)+(Gn(p[y].fg,b[y])||"inherit")).join(";"),r=c.map((T,y)=>(y===0&&l?"":`${d+T.color}-bg:`)+(Gn(p[y].bg,b[y])||"inherit")).join(";"),a=`shiki-themes ${p.map(T=>T.name).join(" ")}`,o=l?void 0:[i,r].join(";")}else if("theme"in n){const l=zs(n.theme,n);s=Ou(e,t,n);const d=e.getTheme(n.theme);r=Gn(d.bg,l),i=Gn(d.fg,l),a=d.name,u=Ri(s)}else throw new An("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:r,themeName:a,rootStyle:o,grammarState:u}}function rx(e,t,n,r){const i={content:e.content,explanation:e.explanation,offset:e.offset},s=t.map(u=>ff(e.variants[u])),a=new Set(s.flatMap(u=>Object.keys(u))),o={};return s.forEach((u,l)=>{for(const d of a){const c=u[d]||"inherit";if(l===0&&r)o[d]=c;else{const m=d==="color"?"":d==="background-color"?"-bg":`-${d}`,p=n+t[l]+(d==="color"?"":m);o[p]=c}}}),i.htmlStyle=o,i}function Ws(e,t,n,r={meta:{},options:n,codeToHast:(i,s)=>Ws(e,i,s),codeToTokens:(i,s)=>Vs(e,i,s)}){let i=t;for(const p of $s(n))i=p.preprocess?.call(r,i,n)||i;let{tokens:s,fg:a,bg:o,themeName:u,rootStyle:l,grammarState:d}=Vs(e,i,n);const{mergeWhitespaces:c=!0}=n;c===!0?s=sx(s):c==="never"&&(s=ax(s));const m={...r,get source(){return i}};for(const p of $s(n))s=p.tokens?.call(m,s)||s;return ix(s,{...n,fg:a,bg:o,themeName:u,rootStyle:l},m,d)}function ix(e,t,n,r=Ri(e)){const i=$s(t),s=[],a={type:"root",children:[]},{structure:o="classic",tabindex:u="0"}=t;let l={type:"element",tagName:"pre",properties:{class:`shiki ${t.themeName||""}`,style:t.rootStyle||`background-color:${t.bg};color:${t.fg}`,...u!==!1&&u!=null?{tabindex:u.toString()}:{},...Object.fromEntries(Array.from(Object.entries(t.meta||{})).filter(([g])=>!g.startsWith("_")))},children:[]},d={type:"element",tagName:"code",properties:{},children:s};const c=[],m={...n,structure:o,addClassToHast:df,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return l},get code(){return d},get lines(){return c}};if(e.forEach((g,b)=>{b&&(o==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):o==="classic"&&s.push({type:"text",value:`
27
+ `}));let T={type:"element",tagName:"span",properties:{class:"line"},children:[]},y=0;for(const C of g){let S={type:"element",tagName:"span",properties:{...C.htmlAttrs},children:[{type:"text",value:C.content}]};C.htmlStyle;const N=ME(C.htmlStyle||ff(C));N&&(S.properties.style=N);for(const D of i)S=D?.span?.call(m,S,b+1,y,T,C)||S;o==="inline"?a.children.push(S):o==="classic"&&T.children.push(S),y+=C.content.length}if(o==="classic"){for(const C of i)T=C?.line?.call(m,T,b+1)||T;c.push(T),s.push(T)}}),o==="classic"){for(const g of i)d=g?.code?.call(m,d)||d;l.children.push(d);for(const g of i)l=g?.pre?.call(m,l)||l;a.children.push(l)}let p=a;for(const g of i)p=g?.root?.call(m,p)||p;return r&&Ta(p,r),p}function sx(e){return e.map(t=>{const n=[];let r="",i=0;return t.forEach((s,a)=>{const u=!(s.fontStyle&&s.fontStyle&Tn.Underline);u&&s.content.match(/^\s+$/)&&t[a+1]?(i||(i=s.offset),r+=s.content):r?(u?n.push({...s,offset:i,content:r+s.content}):n.push({content:r,offset:i},s),i=0,r=""):n.push(s)}),n})}function ax(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,i,s,a]=r;if(!i&&!a)return n;const o=[{...n,offset:n.offset+i.length,content:s}];return i&&o.unshift({content:i,offset:n.offset}),a&&o.push({content:a,offset:n.offset+i.length+s.length}),o}))}function ox(e,t,n){const r={meta:{},options:n,codeToHast:(s,a)=>Ws(e,s,a),codeToTokens:(s,a)=>Vs(e,s,a)};let i=NE(Ws(e,t,n,r));for(const s of $s(n))i=s.postprocess?.call(r,i,n)||i;return i}const Cc={light:"#333333",dark:"#bbbbbb"},Sc={light:"#fffffe",dark:"#1e1e1e"},Ac="__shiki_resolved";function Fu(e){if(e?.[Ac])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const o=t.settings?t.settings.find(u=>!u.name&&!u.scope):void 0;o?.settings?.foreground&&(r=o.settings.foreground),o?.settings?.background&&(n=o.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?Cc.light:Cc.dark),n||(n=t.type==="light"?Sc.light:Sc.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const s=new Map;function a(o){if(s.has(o))return s.get(o);i+=1;const u=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${u}`]?a(o):(s.set(o,u),u)}t.settings=t.settings.map(o=>{const u=o.settings?.foreground&&!o.settings.foreground.startsWith("#"),l=o.settings?.background&&!o.settings.background.startsWith("#");if(!u&&!l)return o;const d={...o,settings:{...o.settings}};if(u){const c=a(o.settings.foreground);t.colorReplacements[c]=o.settings.foreground,d.settings.foreground=c}if(l){const c=a(o.settings.background);t.colorReplacements[c]=o.settings.background,d.settings.background=c}return d});for(const o of Object.keys(t.colors||{}))if((o==="editor.foreground"||o==="editor.background"||o.startsWith("terminal.ansi"))&&!t.colors[o]?.startsWith("#")){const u=a(t.colors[o]);t.colorReplacements[u]=t.colors[o],t.colors[o]=u}return Object.defineProperty(t,Ac,{enumerable:!1,writable:!1,value:!0}),t}async function bf(e){return Array.from(new Set((await Promise.all(e.filter(t=>!lf(t)).map(async t=>await hf(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function Ef(e){return(await Promise.all(e.map(async n=>cf(n)?null:Fu(await hf(n))))).filter(n=>!!n)}class ux extends C2{constructor(t,n,r,i={}){super(t),this._resolver=t,this._themes=n,this._langs=r,this._alias=i,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=Fu(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=Fs.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){if(this._alias[t]){const n=new Set([t]);for(;this._alias[t];){if(t=this._alias[t],n.has(t))throw new _t(`Circular alias \`${Array.from(n).join(" -> ")} -> ${t}\``);n.add(t)}}return this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const r={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const i=this.loadGrammarWithConfiguration(t.scopeName,1,r);if(i.name=t.name,this._resolvedGrammars.set(t.name,i),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,n.size)for(const s of n)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const i of t)this.resolveEmbeddedLanguages(i);const n=Array.from(this._langGraph.entries()),r=n.filter(([i,s])=>!s);if(r.length){const i=n.filter(([s,a])=>a&&a.embeddedLangs?.some(o=>r.map(([u])=>u).includes(o))).filter(s=>!r.includes(s));throw new _t(`Missing languages ${r.map(([s])=>`\`${s}\``).join(", ")}, required by ${i.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[i,s]of n)this._resolver.addLanguage(s);for(const[i,s]of n)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){if(this._langMap.set(t.name,t),this._langGraph.set(t.name,t),t.embeddedLangs)for(const n of t.embeddedLangs)this._langGraph.set(n,this._langMap.get(n))}}class lx{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let i=1;i<=n.length;i++){const s=n.slice(0,i).join(".");r=[...r,...this._injections.get(s)||[]]}return r}}let ti=0;function cx(e){ti+=1,e.warnings!==!1&&ti>=10&&ti%10===0&&console.warn(`[Shiki] ${ti} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new _t("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Fu),i=new lx(e.engine,n),s=new ux(i,r,n,e.langAlias);let a;function o(C){T();const S=s.getGrammar(typeof C=="string"?C:C.name);if(!S)throw new _t(`Language \`${C}\` not found, you may need to load it first`);return S}function u(C){if(C==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};T();const S=s.getTheme(C);if(!S)throw new _t(`Theme \`${C}\` not found, you may need to load it first`);return S}function l(C){T();const S=u(C);a!==C&&(s.setTheme(S),a=C);const N=s.getColorMap();return{theme:S,colorMap:N}}function d(){return T(),s.getLoadedThemes()}function c(){return T(),s.getLoadedLanguages()}function m(...C){T(),s.loadLanguages(C.flat(1))}async function p(...C){return m(await bf(C))}function g(...C){T();for(const S of C.flat(1))s.loadTheme(S)}async function b(...C){return T(),g(await Ef(C))}function T(){if(t)throw new _t("Shiki instance has been disposed")}function y(){t||(t=!0,s.dispose(),ti-=1)}return{setTheme:l,getTheme:u,getLanguage:o,getLoadedThemes:d,getLoadedLanguages:c,loadLanguage:p,loadLanguageSync:m,loadTheme:b,loadThemeSync:g,dispose:y,[Symbol.dispose]:y}}async function dx(e={}){e.loadWasm;const[t,n,r]=await Promise.all([Ef(e.themes||[]),bf(e.langs||[]),e.engine||Ph(e.loadWasm||Fb())]);return cx({...e,themes:t,langs:n,engine:r})}async function hx(e={}){const t=await dx(e);return{getLastGrammarState:(...n)=>QE(t,...n),codeToTokensBase:(n,r)=>Ou(t,n,r),codeToTokensWithThemes:(n,r)=>gf(t,n,r),codeToTokens:(n,r)=>Vs(t,n,r),codeToHast:(n,r)=>Ws(t,n,r),codeToHtml:(n,r)=>ox(t,n,r),...t,getInternalContext:()=>t}}function fx(e,t,n){let r,i,s;{const o=e;r=o.langs,i=o.themes,s=o.engine}async function a(o){function u(p){if(typeof p=="string"){if(lf(p))return[];const g=r[p];if(!g)throw new An(`Language \`${p}\` is not included in this bundle. You may want to load it from external source.`);return g}return p}function l(p){if(cf(p))return"none";if(typeof p=="string"){const g=i[p];if(!g)throw new An(`Theme \`${p}\` is not included in this bundle. You may want to load it from external source.`);return g}return p}const d=(o.themes??[]).map(p=>l(p)),c=(o.langs??[]).map(p=>u(p)),m=await hx({engine:o.engine??s(),...o,themes:d,langs:c});return{...m,loadLanguage(...p){return m.loadLanguage(...p.map(u))},loadTheme(...p){return m.loadTheme(...p.map(l))}}}return a}const px=fx({langs:gb,themes:Eb,engine:()=>Ph(Promise.resolve().then(()=>require("./wasm-Dw4u1m6u.cjs")))}),Za={scopeName:"source.malloy",patterns:[{include:"#malloy-language"}],repository:{"malloy-language":{patterns:[{include:"#sql-string"},{include:"#comments"},{include:"#tags"},{include:"#strings"},{include:"#numbers"},{include:"#keywords"},{include:"#properties"},{include:"#functions"},{include:"#datetimes"},{include:"#identifiers-quoted"},{include:"#types"},{include:"#constants"},{include:"#timeframes"},{include:"#identifiers-unquoted"}]},"malloy-matched":{begin:"{",end:"}",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"malloy-in-sql":{begin:"%{",name:"source.malloy-in-sql",end:"}%?",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"sql-string":{patterns:[{begin:'(\\b[A-Za-z_][A-Za-z_0-9]*)(\\s*\\.\\s*)(sql)(\\s*\\(\\s*)(""")',end:'"""',beginCaptures:{1:{name:"variable.other"},3:{name:"keyword.control.sql"},5:{name:"punctuation.sql-block.open"}},endCaptures:{0:{name:"punctuation.sql-block.close"}},name:"source.sql",patterns:[{include:"#malloy-in-sql"},{include:"source.sql"}]}]},functions:{patterns:[{match:"(?i)\\b(count)(\\s*\\()(distinct)",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.function.modifier"}}},{match:"(?i)\\b(AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE|UNGROUPED)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(!)(timestamp|number|string|boolean|date)?(\\s*\\()",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.type"}}}]},datetimes:{patterns:[{match:"(?i)@[0-9]{4}-[0-9]{2}-[0-9]{2}[ T][0-9]{2}:[0-9]{2}((:[0-9]{2})(([\\.,][0-9]+)(\\[[A-Za-z_/]+\\])?)?)?",name:"constant.numeric.timestamp"},{match:"(?i)@[0-9]{4}(-Q[1-4]|-[0-9]{2}(-[0-9]{2}(-WK)?)?)?",name:"constant.numeric.date"}]},"identifiers-quoted":{patterns:[{match:"`[^`]*`",name:"variable.other.quoted"}]},"identifiers-unquoted":{patterns:[{match:"(?i)\\b[A-Za-z_][A-Za-z_0-9]*\\b",name:"variable.other"}]},timeframes:{patterns:[{match:"(?i)\\b((year|quarter|month|week|day|hour|minute|second)s?)\\b",name:"keyword.other.timeframe"},{match:"(?i)\\b(day_of_year|day_of_month)\\b",name:"keyword.other.timeframe"}]},comments:{patterns:[{begin:"/\\*",end:"\\*/",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"comment.block"},{begin:"//",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{begin:"--",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-hyphen"}]},tags:{patterns:[{match:"##\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:'#"',end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{match:"#\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:"#\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"##\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"#",end:"\\n",beginCaptures:{0:{name:"string.quoted"}},name:"string.quoted"}],repository:{"tag-values":{name:"support.type.property-name.json",match:'(-)?((?:[^\\s=#]+)|(?:"[^#]+"))(?:\\s*(=)\\s*((?:[^\\s=#]+)|(?:"[^#]+")))?',captures:{1:{name:"keyword.control.negate"},2:{name:"support.type.property-name.json"},3:{name:"keyword.operator.comparison.ts"},4:{name:"string.quoted"}}}}},strings:{patterns:[{begin:"'",end:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.single",patterns:[{include:"#escapes"}]},{begin:'"',end:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.double",patterns:[{include:"#escapes"}]},{begin:'"""',end:'"""',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.triple"},{begin:"(?i)[r|/]'",end:"'",name:"string.regexp",patterns:[{include:"#regex-escapes"}]}],repository:{escapes:{name:"constant.character.escape",match:"\\\\(u[A-Fa-f0-9]{4}|.)",captures:{0:{name:"constant.character.escape"}}},"regex-escapes":{name:"constant.character.escape",match:"\\\\.",captures:{0:{name:"constant.character.escape"}}}}},numbers:{match:"(?i)(\\b((0|[1-9][0-9]*)(E[+-]?[0-9]+|\\.[0-9]*)?)|\\.[0-9]+)",name:"constant.numeric"},constants:{patterns:[{match:"(?i)\\bnull\\b",name:"constant.language.null"},{match:"(?i)\\btrue\\b",name:"constant.language.true"},{match:"(?i)\\bfalse\\b",name:"constant.language.false"}]},types:{patterns:[{match:"(?i)\\bstring\\b",name:"entity.name.type.string"},{match:"(?i)\\bnumber\\b",name:"entity.name.type.number"},{match:"(?i)\\bdate\\b",name:"entity.name.type.date"},{match:"(?i)\\btimestamp\\b",name:"entity.name.type.timestamp"},{match:"(?i)\\bboolean\\b",name:"entity.name.type.boolean"}]},properties:{patterns:[{match:"(?i)\\baccept\\b",name:"keyword.control.accept"},{match:"(?i)\\bselect\\b",name:"keyword.control.select"},{match:"(?i)\\bconnection\\b",name:"keyword.control.connection"},{match:"(?i)\\brun\\b",name:"keyword.control.run"},{match:"(?i)\\bextend\\b",name:"keyword.control.extend"},{match:"(?i)\\brefine\\b",name:"keyword.control.refine"},{match:"(?i)\\baggregate\\b",name:"keyword.control.aggregate"},{match:"(?i)\\bsample\\b",name:"keyword.control.sample"},{match:"(?i)\\bcalculate\\b",name:"keyword.control.calculate"},{match:"(?i)\\btimezone\\b",name:"keyword.control.timezone"},{match:"(?i)\\bdimension\\b",name:"keyword.control.dimension"},{match:"(?i)\\bexcept\\b",name:"keyword.control.except"},{match:"(?i)\\bsource\\b",name:"keyword.control.source"},{match:"(?i)\\bgroup_by\\b",name:"keyword.control.group_by"},{match:"(?i)\\bhaving\\b",name:"keyword.control.having"},{match:"(?i)\\bindex\\b",name:"keyword.control.index"},{match:"(?i)\\bjoin_one\\b",name:"keyword.control.join_one"},{match:"(?i)\\bwith\\b",name:"keyword.control.with"},{match:"(?i)\\bjoin_many\\b",name:"keyword.control.join_many"},{match:"(?i)\\bjoin_cross\\b",name:"keyword.control.join_cross"},{match:"(?i)\\blimit\\b",name:"keyword.control.limit"},{match:"(?i)\\bmeasure\\b",name:"keyword.control.measure"},{match:"(?i)\\bnest\\b",name:"keyword.control.nest"},{match:"(?i)\\border_by\\b",name:"keyword.control.order_by"},{match:"(?i)\\bpartition_by\\b",name:"keyword.control.partition_by"},{match:"(?i)\\bprimary_key\\b",name:"keyword.control.primary_key"},{match:"(?i)\\bproject\\b",name:"keyword.control.project"},{match:"(?i)\\bquery\\b",name:"keyword.control.query"},{match:"(?i)\\brename\\b",name:"keyword.control.rename"},{match:"(?i)\\btop\\b",name:"keyword.control.top"},{match:"(?i)\\bview\\b",name:"keyword.control.view"},{match:"(?i)\\bwhere\\b",name:"keyword.control.where"},{match:"(?i)\\bdeclare\\b",name:"keyword.control.declare"}]},keywords:{patterns:[{match:"(?i)\\bis\\b",name:"keyword.control.is"},{match:"(?i)\\bon\\b",name:"keyword.control.on"},{match:"(?i)\\bnot\\b",name:"keyword.other.not"},{match:"(?i)\\bor\\b",name:"keyword.other.or"},{match:"(?i)\\bdesc\\b",name:"keyword.control.desc"},{match:"(?i)\\bby\\b",name:"keyword.control.by"},{match:"(?i)\\band\\b",name:"keyword.other.and"},{match:"(?i)\\basc\\b",name:"keyword.control.asc"},{match:"(?i)\\bfor\\b",name:"keyword.other.for"},{match:"(?i)\\belse\\b",name:"keyword.other.else"},{match:"(?i)\\bto\\b",name:"keyword.other.to"},{match:"(?i)\\bwhen\\b",name:"keyword.other.when"},{match:"(?i)\\bpick\\b",name:"keyword.other.pick"},{match:"(?i)\\bimport\\b",name:"keyword.control.import"}]}}},mx={...Za,patterns:[...Za.patterns,{include:"#docvar"}],repository:{...Za.repository,docvar:{patterns:[{match:"\\<\\<[^(\\>\\>)]*\\>\\>",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"markup.italic.markdown"}]}}},gx={name:"Malloy SQL",scopeName:"source.malloy-sql",patterns:[{include:"#malloysql-sql"}],repository:{"malloysql-sql":{beginCaptures:{0:{name:"entity.other.attribute.malloy-sql"},1:{name:"entity.other.attribute.malloy-sql"},3:{name:"comment.line.double-slash"}},name:"meta.embedded.block.malloysql.sql",patterns:[{include:"#comments"},{begin:"%{",end:"}%",beginCaptures:{0:{name:"punctuation.definition.malloy-sql"}},endCaptures:{0:{name:"punctuation.definition.malloy-sql"}},name:"meta.embedded.block.malloy",patterns:[{include:"source.malloy"}]},{include:"source.sql"}]},comments:{patterns:[{begin:"/\\*",end:"\\*/",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"comment.block"},{begin:"//",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{begin:"--",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-hyphen"}]}}},xf="catppuccin-latte",bx=px({themes:[xf],langs:["sql","json","typescript",{name:"malloy",scopeName:"source.malloy",embeddedLangs:["sql"],...mx},{name:"malloysql",scopeName:"source.malloy-sql",embeddedLangs:["sql"],...gx}]});async function nr(e,t){return(await bx).codeToHtml(e,{lang:t,theme:xf})}const ut=x.styled(x.Card)({display:"flex",flexDirection:"column",height:"100%"}),Ut=x.styled(x.CardContent)({display:"flex",flexDirection:"column",padding:"10px",flexGrow:1}),Mu=x.styled(x.CardMedia)({padding:"10px"}),Ex=x.styled("div")({height:"100%"});x.styled("div")({height:"30px",backgroundColor:"rgba(225, 240, 255, 1)",display:"flex",padding:"4px",alignItems:"center"});const yf=x.styled("div")({height:"75vh",width:"100%",overflowY:"auto"});x.styled("div")({position:"relative",height:"100%",flex:"0 0 auto"});function gt({error:e,context:t}){const n=e.data?.message||"Unknown Error";return h.jsxs(h.Fragment,{children:[t&&h.jsx(x.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:t}),h.jsx("pre",{style:{whiteSpace:"pre-wrap",color:"red",padding:"10px",margin:"auto"},children:n})]})}function bt({text:e,size:t=20,color:n="primary",thickness:r=3.6,centered:i=!0,spacing:s=2,textVariant:a="body2"}){const o=h.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:s},children:[h.jsx(x.CircularProgress,{size:t,color:n,thickness:r}),e&&h.jsx(x.Typography,{variant:a,color:"text.secondary",children:e})]});return i?h.jsx(x.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",width:"100%"},children:o}):o}const xx=Oe([h.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14z"},"0"),h.jsx("path",{d:"M7 12h2v5H7zm8-5h2v10h-2zm-4 7h2v3h-2zm0-4h2v2h-2z"},"1")]),Ge="http://localhost/api/v0".replace(/\/+$/,"");class jn{constructor(t,n=Ge,r=Ve){this.basePath=n,this.axios=r,t&&(this.configuration=t,this.basePath=t.basePath??n)}configuration}class yx extends Error{constructor(t,n){super(n),this.field=t,this.name="RequiredError"}}const et={},tt="https://example.com",Ae=function(e,t,n){if(n==null)throw new yx(t,`Required parameter ${t} was null or undefined when calling ${e}.`)};function qo(e,t,n=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(r=>qo(e,r,n)):Object.keys(t).forEach(r=>qo(e,t[r],`${n}${n!==""?".":""}${r}`)):e.has(n)?e.append(n,t):e.set(n,t))}const nt=function(e,...t){const n=new URLSearchParams(e.search);qo(n,t),e.search=n.toString()},rt=function(e){return e.pathname+e.search+e.hash},it=function(e,t,n,r){return(i=t,s=n)=>{const a={...e.options,url:(i.defaults.baseURL?"":r?.basePath??s)+e.url};return i.request(a)}},Tx=function(e){return{getConnection:async(t,n,r={})=>{Ae("getConnection","projectName",t),Ae("getConnection","connectionName",n);const i="/projects/{projectName}/connections/{connectionName}".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),s=new URL(i,tt);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...r},u={};nt(s,{});let d=a&&a.headers?a.headers:{};return o.headers={...u,...d,...r.headers},{url:rt(s),options:o}},getQuerydata:async(t,n,r,i,s={})=>{Ae("getQuerydata","projectName",t),Ae("getQuerydata","connectionName",n);const a="/projects/{projectName}/connections/{connectionName}/queryData".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),o=new URL(a,tt);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...s},d={},c={};r!==void 0&&(c.sqlStatement=r),i!==void 0&&(c.options=i),nt(o,c);let m=u&&u.headers?u.headers:{};return l.headers={...d,...m,...s.headers},{url:rt(o),options:l}},getSqlsource:async(t,n,r,i={})=>{Ae("getSqlsource","projectName",t),Ae("getSqlsource","connectionName",n);const s="/projects/{projectName}/connections/{connectionName}/sqlSource".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={},d={};r!==void 0&&(d.sqlStatement=r),nt(a,d);let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}},getTablesource:async(t,n,r,i,s={})=>{Ae("getTablesource","projectName",t),Ae("getTablesource","connectionName",n);const a="/projects/{projectName}/connections/{connectionName}/tableSource".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),o=new URL(a,tt);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...s},d={},c={};r!==void 0&&(c.tableKey=r),i!==void 0&&(c.tablePath=i),nt(o,c);let m=u&&u.headers?u.headers:{};return l.headers={...d,...m,...s.headers},{url:rt(o),options:l}},getTemporarytable:async(t,n,r,i={})=>{Ae("getTemporarytable","projectName",t),Ae("getTemporarytable","connectionName",n);const s="/projects/{projectName}/connections/{connectionName}/temporaryTable".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={},d={};r!==void 0&&(d.sqlStatement=r),nt(a,d);let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}},getTest:async(t,n,r={})=>{Ae("getTest","projectName",t),Ae("getTest","connectionName",n);const i="/projects/{projectName}/connections/{connectionName}/test".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),s=new URL(i,tt);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...r},u={};nt(s,{});let d=a&&a.headers?a.headers:{};return o.headers={...u,...d,...r.headers},{url:rt(s),options:o}},listConnections:async(t,n={})=>{Ae("listConnections","projectName",t);const r="/projects/{projectName}/connections".replace("{projectName}",encodeURIComponent(String(t))),i=new URL(r,tt);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...n},o={};nt(i,{});let l=s&&s.headers?s.headers:{};return a.headers={...o,...l,...n.headers},{url:rt(i),options:a}},listSchemas:async(t,n,r={})=>{Ae("listSchemas","projectName",t),Ae("listSchemas","connectionName",n);const i="/projects/{projectName}/connections/{connectionName}/schemas".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),s=new URL(i,tt);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...r},u={};nt(s,{});let d=a&&a.headers?a.headers:{};return o.headers={...u,...d,...r.headers},{url:rt(s),options:o}},listTables:async(t,n,r,i={})=>{Ae("listTables","projectName",t),Ae("listTables","connectionName",n),Ae("listTables","schemaName",r);const s="/projects/{projectName}/connections/{connectionName}/schemas/{schemaName}/tables".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))).replace("{schemaName}",encodeURIComponent(String(r))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={};nt(a,{});let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}}}},pn=function(e){const t=Tx(e);return{async getConnection(n,r,i){const s=await t.getConnection(n,r,i),a=e?.serverIndex??0,o=et["ConnectionsApi.getConnection"]?.[a]?.url;return(u,l)=>it(s,Ve,Ge,e)(u,o||l)},async getQuerydata(n,r,i,s,a){const o=await t.getQuerydata(n,r,i,s,a),u=e?.serverIndex??0,l=et["ConnectionsApi.getQuerydata"]?.[u]?.url;return(d,c)=>it(o,Ve,Ge,e)(d,l||c)},async getSqlsource(n,r,i,s){const a=await t.getSqlsource(n,r,i,s),o=e?.serverIndex??0,u=et["ConnectionsApi.getSqlsource"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)},async getTablesource(n,r,i,s,a){const o=await t.getTablesource(n,r,i,s,a),u=e?.serverIndex??0,l=et["ConnectionsApi.getTablesource"]?.[u]?.url;return(d,c)=>it(o,Ve,Ge,e)(d,l||c)},async getTemporarytable(n,r,i,s){const a=await t.getTemporarytable(n,r,i,s),o=e?.serverIndex??0,u=et["ConnectionsApi.getTemporarytable"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)},async getTest(n,r,i){const s=await t.getTest(n,r,i),a=e?.serverIndex??0,o=et["ConnectionsApi.getTest"]?.[a]?.url;return(u,l)=>it(s,Ve,Ge,e)(u,o||l)},async listConnections(n,r){const i=await t.listConnections(n,r),s=e?.serverIndex??0,a=et["ConnectionsApi.listConnections"]?.[s]?.url;return(o,u)=>it(i,Ve,Ge,e)(o,a||u)},async listSchemas(n,r,i){const s=await t.listSchemas(n,r,i),a=e?.serverIndex??0,o=et["ConnectionsApi.listSchemas"]?.[a]?.url;return(u,l)=>it(s,Ve,Ge,e)(u,o||l)},async listTables(n,r,i,s){const a=await t.listTables(n,r,i,s),o=e?.serverIndex??0,u=et["ConnectionsApi.listTables"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)}}};class Tf extends jn{getConnection(t,n,r){return pn(this.configuration).getConnection(t,n,r).then(i=>i(this.axios,this.basePath))}getQuerydata(t,n,r,i,s){return pn(this.configuration).getQuerydata(t,n,r,i,s).then(a=>a(this.axios,this.basePath))}getSqlsource(t,n,r,i){return pn(this.configuration).getSqlsource(t,n,r,i).then(s=>s(this.axios,this.basePath))}getTablesource(t,n,r,i,s){return pn(this.configuration).getTablesource(t,n,r,i,s).then(a=>a(this.axios,this.basePath))}getTemporarytable(t,n,r,i){return pn(this.configuration).getTemporarytable(t,n,r,i).then(s=>s(this.axios,this.basePath))}getTest(t,n,r){return pn(this.configuration).getTest(t,n,r).then(i=>i(this.axios,this.basePath))}listConnections(t,n){return pn(this.configuration).listConnections(t,n).then(r=>r(this.axios,this.basePath))}listSchemas(t,n,r){return pn(this.configuration).listSchemas(t,n,r).then(i=>i(this.axios,this.basePath))}listTables(t,n,r,i){return pn(this.configuration).listTables(t,n,r,i).then(s=>s(this.axios,this.basePath))}}const Cx=function(e){return{listDatabases:async(t,n,r,i={})=>{Ae("listDatabases","projectName",t),Ae("listDatabases","packageName",n);const s="/projects/{projectName}/packages/{packageName}/databases".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={},d={};r!==void 0&&(d.versionId=r),nt(a,d);let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}}}},Sx=function(e){const t=Cx(e);return{async listDatabases(n,r,i,s){const a=await t.listDatabases(n,r,i,s),o=e?.serverIndex??0,u=et["DatabasesApi.listDatabases"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)}}};class Ax extends jn{listDatabases(t,n,r,i){return Sx(this.configuration).listDatabases(t,n,r,i).then(s=>s(this.axios,this.basePath))}}const kx=function(e){return{getModel:async(t,n,r,i,s={})=>{Ae("getModel","projectName",t),Ae("getModel","packageName",n),Ae("getModel","path",r);const a="/projects/{projectName}/packages/{packageName}/models/{path}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))).replace("{path}",encodeURIComponent(String(r))),o=new URL(a,tt);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...s},d={},c={};i!==void 0&&(c.versionId=i),nt(o,c);let m=u&&u.headers?u.headers:{};return l.headers={...d,...m,...s.headers},{url:rt(o),options:l}},listModels:async(t,n,r,i={})=>{Ae("listModels","projectName",t),Ae("listModels","packageName",n);const s="/projects/{projectName}/packages/{packageName}/models".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={},d={};r!==void 0&&(d.versionId=r),nt(a,d);let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}}}},kc=function(e){const t=kx(e);return{async getModel(n,r,i,s,a){const o=await t.getModel(n,r,i,s,a),u=e?.serverIndex??0,l=et["ModelsApi.getModel"]?.[u]?.url;return(d,c)=>it(o,Ve,Ge,e)(d,l||c)},async listModels(n,r,i,s){const a=await t.listModels(n,r,i,s),o=e?.serverIndex??0,u=et["ModelsApi.listModels"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)}}};class Ca extends jn{getModel(t,n,r,i,s){return kc(this.configuration).getModel(t,n,r,i,s).then(a=>a(this.axios,this.basePath))}listModels(t,n,r,i){return kc(this.configuration).listModels(t,n,r,i).then(s=>s(this.axios,this.basePath))}}const Ix=function(e){return{getNotebook:async(t,n,r,i,s={})=>{Ae("getNotebook","projectName",t),Ae("getNotebook","packageName",n),Ae("getNotebook","path",r);const a="/projects/{projectName}/packages/{packageName}/notebooks/{path}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))).replace("{path}",encodeURIComponent(String(r))),o=new URL(a,tt);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...s},d={},c={};i!==void 0&&(c.versionId=i),nt(o,c);let m=u&&u.headers?u.headers:{};return l.headers={...d,...m,...s.headers},{url:rt(o),options:l}},listNotebooks:async(t,n,r,i={})=>{Ae("listNotebooks","projectName",t),Ae("listNotebooks","packageName",n);const s="/projects/{projectName}/packages/{packageName}/notebooks".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={},d={};r!==void 0&&(d.versionId=r),nt(a,d);let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}}}},Ic=function(e){const t=Ix(e);return{async getNotebook(n,r,i,s,a){const o=await t.getNotebook(n,r,i,s,a),u=e?.serverIndex??0,l=et["NotebooksApi.getNotebook"]?.[u]?.url;return(d,c)=>it(o,Ve,Ge,e)(d,l||c)},async listNotebooks(n,r,i,s){const a=await t.listNotebooks(n,r,i,s),o=e?.serverIndex??0,u=et["NotebooksApi.listNotebooks"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)}}};class Cf extends jn{getNotebook(t,n,r,i,s){return Ic(this.configuration).getNotebook(t,n,r,i,s).then(a=>a(this.axios,this.basePath))}listNotebooks(t,n,r,i){return Ic(this.configuration).listNotebooks(t,n,r,i).then(s=>s(this.axios,this.basePath))}}const _x=function(e){return{getPackage:async(t,n,r,i,s={})=>{Ae("getPackage","projectName",t),Ae("getPackage","packageName",n);const a="/projects/{projectName}/packages/{packageName}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),o=new URL(a,tt);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...s},d={},c={};r!==void 0&&(c.versionId=r),i!==void 0&&(c.reload=i),nt(o,c);let m=u&&u.headers?u.headers:{};return l.headers={...d,...m,...s.headers},{url:rt(o),options:l}},listPackages:async(t,n={})=>{Ae("listPackages","projectName",t);const r="/projects/{projectName}/packages".replace("{projectName}",encodeURIComponent(String(t))),i=new URL(r,tt);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...n},o={};nt(i,{});let l=s&&s.headers?s.headers:{};return a.headers={...o,...l,...n.headers},{url:rt(i),options:a}}}},_c=function(e){const t=_x(e);return{async getPackage(n,r,i,s,a){const o=await t.getPackage(n,r,i,s,a),u=e?.serverIndex??0,l=et["PackagesApi.getPackage"]?.[u]?.url;return(d,c)=>it(o,Ve,Ge,e)(d,l||c)},async listPackages(n,r){const i=await t.listPackages(n,r),s=e?.serverIndex??0,a=et["PackagesApi.listPackages"]?.[s]?.url;return(o,u)=>it(i,Ve,Ge,e)(o,a||u)}}};class Sf extends jn{getPackage(t,n,r,i,s){return _c(this.configuration).getPackage(t,n,r,i,s).then(a=>a(this.axios,this.basePath))}listPackages(t,n){return _c(this.configuration).listPackages(t,n).then(r=>r(this.axios,this.basePath))}}const vx=function(e){return{getProject:async(t,n,r={})=>{Ae("getProject","projectName",t);const i="/projects/{projectName}".replace("{projectName}",encodeURIComponent(String(t))),s=new URL(i,tt);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...r},u={},l={};n!==void 0&&(l.reload=n),nt(s,l);let d=a&&a.headers?a.headers:{};return o.headers={...u,...d,...r.headers},{url:rt(s),options:o}},listProjects:async(t={})=>{const n="/projects",r=new URL(n,tt);let i;e&&(i=e.baseOptions);const s={method:"GET",...i,...t},a={};nt(r,{});let u=i&&i.headers?i.headers:{};return s.headers={...a,...u,...t.headers},{url:rt(r),options:s}}}},vc=function(e){const t=vx(e);return{async getProject(n,r,i){const s=await t.getProject(n,r,i),a=e?.serverIndex??0,o=et["ProjectsApi.getProject"]?.[a]?.url;return(u,l)=>it(s,Ve,Ge,e)(u,o||l)},async listProjects(n){const r=await t.listProjects(n),i=e?.serverIndex??0,s=et["ProjectsApi.listProjects"]?.[i]?.url;return(a,o)=>it(r,Ve,Ge,e)(a,s||o)}}};class Af extends jn{getProject(t,n,r){return vc(this.configuration).getProject(t,n,r).then(i=>i(this.axios,this.basePath))}listProjects(t){return vc(this.configuration).listProjects(t).then(n=>n(this.axios,this.basePath))}}const Dx=function(e){return{executeQuery:async(t,n,r,i,s,a,o,u={})=>{Ae("executeQuery","projectName",t),Ae("executeQuery","packageName",n),Ae("executeQuery","path",r);const l="/projects/{projectName}/packages/{packageName}/queryResults/{path}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))).replace("{path}",encodeURIComponent(String(r))),d=new URL(l,tt);let c;e&&(c=e.baseOptions);const m={method:"GET",...c,...u},p={},g={};i!==void 0&&(g.query=i),s!==void 0&&(g.sourceName=s),a!==void 0&&(g.queryName=a),o!==void 0&&(g.versionId=o),nt(d,g);let b=c&&c.headers?c.headers:{};return m.headers={...p,...b,...u.headers},{url:rt(d),options:m}}}},wx=function(e){const t=Dx(e);return{async executeQuery(n,r,i,s,a,o,u,l){const d=await t.executeQuery(n,r,i,s,a,o,u,l),c=e?.serverIndex??0,m=et["QueryresultsApi.executeQuery"]?.[c]?.url;return(p,g)=>it(d,Ve,Ge,e)(p,m||g)}}};class Bu extends jn{executeQuery(t,n,r,i,s,a,o,u){return wx(this.configuration).executeQuery(t,n,r,i,s,a,o,u).then(l=>l(this.axios,this.basePath))}}const Nx=function(e){return{listSchedules:async(t,n,r,i={})=>{Ae("listSchedules","projectName",t),Ae("listSchedules","packageName",n);const s="/projects/{projectName}/packages/{packageName}/schedules".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={},d={};r!==void 0&&(d.versionId=r),nt(a,d);let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}}}},Px=function(e){const t=Nx(e);return{async listSchedules(n,r,i,s){const a=await t.listSchedules(n,r,i,s),o=e?.serverIndex??0,u=et["SchedulesApi.listSchedules"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)}}};class Rx extends jn{listSchedules(t,n,r,i){return Px(this.configuration).listSchedules(t,n,r,i).then(s=>s(this.axios,this.basePath))}}class Et{apiKey;username;password;accessToken;basePath;serverIndex;baseOptions;formDataCtor;constructor(t={}){this.apiKey=t.apiKey,this.username=t.username,this.password=t.password,this.accessToken=t.accessToken,this.basePath=t.basePath,this.serverIndex=t.serverIndex,this.baseOptions={...t.baseOptions,headers:{...t.baseOptions?.headers}},this.formDataCtor=t.formDataCtor}isJsonMime(t){const n=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return t!==null&&(n.test(t)||t.toLowerCase()==="application/json-patch+json")}}const kf=P.createContext(void 0),ju=({projectName:e,packageName:t,versionId:n,children:r})=>h.jsx(kf.Provider,{value:{projectName:e,packageName:t,versionId:n},children:r});function pt(e=!0){const t=P.useContext(kf);if(!t&&e)throw new Error("usePackage must be used within a PackageProvider");return t}const If=new pu.QueryClient({defaultOptions:{queries:{retry:!1,throwOnError:!1},mutations:{retry:!1,throwOnError:!1}}}),Hu=async(e,t)=>{const n=t?await t():void 0,r=n?{Authorization:`Bearer ${n}`}:{};return{baseURL:e,withCredentials:!!n,headers:r}};function xt(e){const{server:t,getAccessToken:n}=ka(),r={...e,queryKey:[...e.queryKey,t],queryFn:async()=>{try{const i=await Hu(t,n);return await e.queryFn(i)}catch(i){if(i&&typeof i=="object"&&"response"in i){const s=i;if(s.response?.data){const a=new Error(s.response.data.message||s.message);throw a.status=s.response.status,a.data=s.response.data,a}}throw i}},retry:!1,throwOnError:!1};return pu.useQuery(r,If)}function Lx(e){const{server:t,getAccessToken:n}=ka(),r={...e,mutationFn:async i=>{try{const s=await Hu(t,n);return await e.mutationFn(i,s)}catch(s){if(s&&typeof s=="object"&&"response"in s){const a=s;if(a.response?.data){const o=new Error(a.response.data.message||a.message);throw o.status=a.response.status,o.data=a.response.data,o}}throw s}},retry:!1,throwOnError:!1};return pu.useMutation(r,If)}const Ox=P.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-DW6glKC-.cjs"))),Fx=new Bu(new Et);function Uu(e){const{optionalProjectName:t,optionalPackageName:n}=e;if(!t||!n)throw new Error("Project and Package name must be provided for query embedding.");return JSON.stringify({...e})}function Mx({embeddedQueryResult:e}){const{modelPath:t,query:n,sourceName:r,queryName:i,optionalProjectName:s,optionalPackageName:a,optionalVersionId:o}=JSON.parse(e);if(!t||!n&&(!i||!r)||typeof t!="string")throw new Error("Invalid embedded query result: "+e);return h.jsx(zu,{modelPath:t,query:n,sourceName:r,queryName:i,optionalProjectName:s,optionalPackageName:a,optionalVersionId:o})}function zu({modelPath:e,query:t,sourceName:n,queryName:r,optionalProjectName:i,optionalPackageName:s,optionalVersionId:a}){const o=pt(!1),u=i||o?.projectName,l=s||o?.packageName,d=a||o?.versionId;if(!u||!l)throw new Error("No project or package name provided. Must be set in props or via PackageProvider");const{data:c,isSuccess:m,isError:p,error:g}=xt({queryKey:["queryResult",u,l,e,d,t,n,r],queryFn:b=>Fx.executeQuery(u,l,e,t,n,r,d,b)});return h.jsxs(h.Fragment,{children:[!m&&!p&&h.jsx(bt,{text:"Fetching Query Results..."}),m&&h.jsx(P.Suspense,{fallback:h.jsx("div",{children:"Loading..."}),children:h.jsx(Ox,{result:c.data.result})}),p&&h.jsx(gt,{context:`${u} > ${l} > ${e}`,error:g})]})}const _f=Oe(h.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"})),Bx=P.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-DW6glKC-.cjs")));function vf({result:e,minHeight:t,maxHeight:n}){const[r,i]=P.useState(!1),[s,a]=P.useState(0),[o,u]=P.useState(!1),l=P.useRef(null),d=P.useRef(null),[c,m]=P.useState(void 0),[p,g]=P.useState(!1),b=P.useCallback(()=>{const N=r;i(!r),N&&d.current&&setTimeout(()=>{d.current?.scrollIntoView({behavior:"smooth",block:"start"})},100)},[r]),T=P.useCallback(N=>{a(N)},[]);if(P.useEffect(()=>{if(p){u(!0);return}if(s===0){u(!1);return}const N=t-20,D=s>N;s<N&&m(s+20),u(D)},[s,p,t]),!e)return null;const y=h.jsx(bt,{text:"Loading...",centered:!0,size:32}),C=p?r?n-40:t-40:void 0,S=c?{minHeight:`${c}px`,height:"100%"}:{height:"100%"};return h.jsx(h.Fragment,{children:h.jsxs(x.Box,{ref:d,sx:{position:"relative",minHeight:`${t}px`,maxHeight:`${r?n:t}px`,border:"0px",borderRadius:0,overflow:"hidden",display:"flex",flexDirection:"column",...S},children:[h.jsx(x.Box,{ref:l,sx:{flex:1,overflow:r?"auto":"hidden",p:0,pb:o?"40px":1},children:e&&h.jsx(P.Suspense,{fallback:y,children:h.jsx(Bx,{result:e,height:C,isFillElement:N=>{g(N)},onSizeChange:T})})||y}),o&&h.jsx(x.Box,{sx:{position:"absolute",bottom:0,left:0,right:0,height:"32px",backgroundColor:"rgba(255,255,255,0.75)",display:"flex",alignItems:"center",justifyContent:"center"},children:h.jsx(x.IconButton,{size:"small",onClick:b,sx:{color:"text.secondary","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},title:r?"Collapse to original size":"Expand to full size",children:r?h.jsx(Ns.ExpandLess,{sx:{fontSize:30}}):h.jsx(Ns.ExpandMore,{sx:{fontSize:30}})})})]})})}const jx=`
28
28
  .code-display pre {
29
29
  margin: 0;
30
30
  padding: 0;
31
31
  }
32
- `;function Bx({cell:e,notebookPath:t,expandCodeCell:n,hideCodeCellIcon:r,expandEmbedding:i,hideEmbeddingIcon:s}){const[a,o]=N.useState(n),[u,l]=N.useState(i),[d,c]=N.useState(),[m,p]=N.useState(),[g,b]=N.useState(!1),{packageName:T,projectName:y}=pt(),C=Uu({modelPath:t,query:e.text,optionalPackageName:T,optionalProjectName:y});return N.useEffect(()=>{e.type==="code"&&nr(e.text,"malloy").then(S=>{c(S)})},[e]),N.useEffect(()=>{nr(C,"typescript").then(S=>{p(S)})},[C]),e.type==="markdown"&&h.jsx(ut,{variant:"outlined",children:h.jsx(Ut,{children:h.jsx(mu,{children:e.text})})})||e.type==="code"&&h.jsxs(ut,{variant:"outlined",sx:{height:"auto"},children:[(!r||!s&&e.result)&&h.jsxs(x.Stack,{sx:{flexDirection:"row",justifyContent:"space-between",ml:"8px"},children:[h.jsxs(x.Stack,{sx:{flexDirection:"row"},children:[e.newSources&&e.newSources.length>0&&h.jsx(x.Typography,{variant:"overline",children:h.jsx("b",{children:"Data source"})}),e.result&&h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Results"})]}),h.jsx(x.Stack,{sx:{flexDirection:"row"},children:h.jsxs(x.CardActions,{sx:{padding:"0px 8px 0px 8px",mb:"auto",mt:"auto"},children:[e.newSources&&e.newSources.length>0&&h.jsx(x.Tooltip,{title:"Explore Data Sources",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{b(!g),l(!1),o(!1)},children:h.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M3 3h18v18H3V3zm2 2v14h14V5H5zm2 2h10v2H7V7zm0 4h10v2H7v-2zm0 4h10v2H7v-2z",fill:"currentColor"})})})}),!r&&h.jsx(x.Tooltip,{title:a?"Hide Code":"View Code",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{o(!a)},children:h.jsx(_f,{})})}),!s&&e.result&&h.jsx(x.Tooltip,{title:u?"Hide Embedding":"View Embedding",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{l(!u)},children:h.jsx($i,{})})})]})})]}),h.jsx(x.Collapse,{in:u,timeout:"auto",unmountOnExit:!0,children:h.jsxs(x.Stack,{sx:{p:"8px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[h.jsx(x.Typography,{component:"div",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:m}}),h.jsx(x.Tooltip,{title:"Copy Embeddable Code",children:h.jsx(x.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(C)},children:h.jsx(ma,{})})})]})}),h.jsxs(x.Collapse,{in:a,timeout:"auto",unmountOnExit:!0,children:[h.jsx("style",{children:Mx}),h.jsx(x.Stack,{sx:{mx:"8px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:h.jsx("div",{className:"code-display",style:{fontSize:"12px",width:"800px",border:"1px solid rgb(220,220,220)"},dangerouslySetInnerHTML:{__html:d}})})]}),h.jsx(x.Collapse,{in:g,timeout:"auto",unmountOnExit:!0,sx:{p:"5px"},children:h.jsx(Zu,{sourceAndPaths:e.newSources.map(S=>({sourceInfo:JSON.parse(S),modelPath:t}))})}),e.result&&!g&&h.jsx(h.Fragment,{children:h.jsx(vf,{result:e.result,minHeight:300,maxHeight:700})})]})}const jx=new Cf(new Et);function Df({notebookPath:e,expandResults:t,hideResultIcons:n,expandEmbeddings:r,hideEmbeddingIcons:i}){const[s,a]=N.useState(!1),[o,u]=N.useState(),{projectName:l,packageName:d,versionId:c}=pt(),m=Hx(e,!0);N.useEffect(()=>{nr(m,"typescript").then(y=>{u(y)})},[s,m]);const{data:p,isSuccess:g,isError:b,error:T}=xt({queryKey:["notebook",l,d,e,c],queryFn:async y=>(await jx.getNotebook(l,d,e,c,y)).data});return h.jsxs(ut,{variant:"outlined",children:[h.jsxs(Ut,{children:[h.jsxs(x.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Notebook"}),!i&&h.jsx(x.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:h.jsx(x.Tooltip,{title:s?"Hide Embedding":"View Embedding",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{a(!s)},children:h.jsx($i,{})})})})]}),h.jsx(x.Collapse,{in:s,timeout:"auto",unmountOnExit:!0,children:h.jsxs(x.Stack,{sx:{borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[h.jsx(x.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:h.jsx("div",{dangerouslySetInnerHTML:{__html:o}})}),h.jsx(x.Tooltip,{title:"Copy Embeddable Code",children:h.jsx(x.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(m)},children:h.jsx(ma,{})})})]})})]}),h.jsx(Mu,{children:h.jsxs(x.Stack,{spacing:2,component:"section",children:[!g&&!b&&h.jsx(bt,{text:"Fetching Notebook..."}),g&&p.notebookCells?.map((y,C)=>h.jsx(Bx,{cell:y,notebookPath:e,expandCodeCell:t,hideCodeCellIcon:n,expandEmbedding:r,hideEmbeddingIcon:i},C)),b&&T.status===404&&h.jsxs(x.Typography,{variant:"body2",children:[h.jsx("code",{children:`${l} > ${d} > ${e}`})," ","not found."]}),b&&T.status!==404&&h.jsx(gt,{error:T,context:`${l} > ${d} > ${e}`})]})})]})}function Hx(e,t){return`<Notebook
32
+ `;function Hx({cell:e,notebookPath:t,expandCodeCell:n,hideCodeCellIcon:r,expandEmbedding:i,hideEmbeddingIcon:s}){const[a,o]=P.useState(n),[u,l]=P.useState(i),[d,c]=P.useState(),[m,p]=P.useState(),[g,b]=P.useState(!1),{packageName:T,projectName:y}=pt(),C=Uu({modelPath:t,query:e.text,optionalPackageName:T,optionalProjectName:y});return P.useEffect(()=>{e.type==="code"&&nr(e.text,"malloy").then(S=>{c(S)})},[e]),P.useEffect(()=>{nr(C,"typescript").then(S=>{p(S)})},[C]),e.type==="markdown"&&h.jsx(ut,{variant:"outlined",children:h.jsx(Ut,{children:h.jsx(mu,{children:e.text})})})||e.type==="code"&&h.jsxs(ut,{variant:"outlined",sx:{height:"auto"},children:[(!r||!s&&e.result)&&h.jsxs(x.Stack,{sx:{flexDirection:"row",justifyContent:"space-between",ml:"8px"},children:[h.jsxs(x.Stack,{sx:{flexDirection:"row"},children:[e.newSources&&e.newSources.length>0&&h.jsx(x.Typography,{variant:"overline",children:h.jsx("b",{children:"Data source"})}),e.result&&h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Results"})]}),h.jsx(x.Stack,{sx:{flexDirection:"row"},children:h.jsxs(x.CardActions,{sx:{padding:"0px 8px 0px 8px",mb:"auto",mt:"auto"},children:[e.newSources&&e.newSources.length>0&&h.jsx(x.Tooltip,{title:"Explore Data Sources",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{b(!g),l(!1),o(!1)},children:h.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M3 3h18v18H3V3zm2 2v14h14V5H5zm2 2h10v2H7V7zm0 4h10v2H7v-2zm0 4h10v2H7v-2z",fill:"currentColor"})})})}),!r&&h.jsx(x.Tooltip,{title:a?"Hide Code":"View Code",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{o(!a)},children:h.jsx(_f,{})})}),!s&&e.result&&h.jsx(x.Tooltip,{title:u?"Hide Embedding":"View Embedding",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{l(!u)},children:h.jsx($i,{})})})]})})]}),h.jsx(x.Collapse,{in:u,timeout:"auto",unmountOnExit:!0,children:h.jsxs(x.Stack,{sx:{p:"8px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[h.jsx(x.Typography,{component:"div",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:m}}),h.jsx(x.Tooltip,{title:"Copy Embeddable Code",children:h.jsx(x.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(C)},children:h.jsx(ma,{})})})]})}),h.jsxs(x.Collapse,{in:a,timeout:"auto",unmountOnExit:!0,children:[h.jsx("style",{children:jx}),h.jsx(x.Stack,{sx:{mx:"8px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:h.jsx("div",{className:"code-display",style:{fontSize:"12px",width:"800px",border:"1px solid rgb(220,220,220)"},dangerouslySetInnerHTML:{__html:d}})})]}),h.jsx(x.Collapse,{in:g,timeout:"auto",unmountOnExit:!0,sx:{p:"5px"},children:h.jsx(Ju,{sourceAndPaths:e.newSources.map(S=>({sourceInfo:JSON.parse(S),modelPath:t}))})}),e.result&&!g&&h.jsx(h.Fragment,{children:h.jsx(vf,{result:e.result,minHeight:300,maxHeight:700})})]})}const Ux=new Cf(new Et);function Df({notebookPath:e,expandResults:t,hideResultIcons:n,expandEmbeddings:r,hideEmbeddingIcons:i}){const[s,a]=P.useState(!1),[o,u]=P.useState(),{projectName:l,packageName:d,versionId:c}=pt(),m=zx(e,!0);P.useEffect(()=>{nr(m,"typescript").then(y=>{u(y)})},[s,m]);const{data:p,isSuccess:g,isError:b,error:T}=xt({queryKey:["notebook",l,d,e,c],queryFn:async y=>(await Ux.getNotebook(l,d,e,c,y)).data});return h.jsxs(ut,{variant:"outlined",children:[h.jsxs(Ut,{children:[h.jsxs(x.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Notebook"}),!i&&h.jsx(x.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:h.jsx(x.Tooltip,{title:s?"Hide Embedding":"View Embedding",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{a(!s)},children:h.jsx($i,{})})})})]}),h.jsx(x.Collapse,{in:s,timeout:"auto",unmountOnExit:!0,children:h.jsxs(x.Stack,{sx:{borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[h.jsx(x.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:h.jsx("div",{dangerouslySetInnerHTML:{__html:o}})}),h.jsx(x.Tooltip,{title:"Copy Embeddable Code",children:h.jsx(x.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(m)},children:h.jsx(ma,{})})})]})})]}),h.jsx(Mu,{children:h.jsxs(x.Stack,{spacing:2,component:"section",children:[!g&&!b&&h.jsx(bt,{text:"Fetching Notebook..."}),g&&p.notebookCells?.map((y,C)=>h.jsx(Hx,{cell:y,notebookPath:e,expandCodeCell:t,hideCodeCellIcon:n,expandEmbedding:r,hideEmbeddingIcon:i},C)),b&&T.status===404&&h.jsxs(x.Typography,{variant:"body2",children:[h.jsx("code",{children:`${l} > ${d} > ${e}`})," ","not found."]}),b&&T.status!==404&&h.jsx(gt,{error:T,context:`${l} > ${d} > ${e}`})]})})]})}function zx(e,t){return`<Notebook
33
33
  notebookPath="${e}"
34
34
  expandCodeCells={${t}}
35
- />`}const wf=Me(h.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"})),Ux=new Sf(new Et);function zx(){const{projectName:e,packageName:t,versionId:n}=pt(),{data:r,isSuccess:i,isError:s,error:a}=xt({queryKey:["package",e,t,n],queryFn:o=>Ux.getPackage(e,t,n,!1,o)});return h.jsx(ut,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Ut,{children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Package Config"}),h.jsx(x.Divider,{}),h.jsx(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:h.jsxs(x.List,{dense:!0,disablePadding:!0,children:[h.jsx(x.ListItem,{dense:!0,disablePadding:!0,children:h.jsx(x.ListItemText,{primary:"Name",primaryTypographyProps:{fontWeight:"500"},secondary:t})}),!i&&!s&&h.jsx(x.ListItem,{children:h.jsx(bt,{text:"Fetching Package Metadata..."})}),i&&(r.data&&h.jsx(x.ListItem,{dense:!0,disablePadding:!0,children:h.jsx(x.ListItemText,{primary:"Description",primaryTypographyProps:{fontWeight:"500"},secondary:r.data.description})})||h.jsxs(x.ListItem,{disablePadding:!0,dense:!0,sx:{mt:"20px"},children:[h.jsx(wf,{sx:{color:"grey.600",mr:"10px"}}),h.jsx(x.ListItemText,{primary:"No package manifest"})]})),s&&h.jsx(gt,{error:a,context:`${e} > ${t} > ${n}`})]})})]})})}const $x=new Tf(new Et);function qx({connection:e}){return h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:h.jsx(x.Typography,{variant:"body2",children:e.name})}),h.jsx(x.TableCell,{children:h.jsx(x.Typography,{variant:"body2",children:e.type})})]},e.name)}function Vx(){const{projectName:e}=pt(),{data:t,isSuccess:n,isError:r,error:i}=xt({queryKey:["connections",e],queryFn:s=>$x.listConnections(e,s)});return h.jsx(ut,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Ut,{children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Database Connections"}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!n&&!r&&h.jsx(x.Typography,{variant:"body2",sx:{m:"auto"},children:"Fetching Connections..."}),n&&t.data.length>0&&h.jsx(x.Table,{size:"small",children:h.jsxs(x.TableBody,{children:[h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:h.jsx(x.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Connection Name"})}),h.jsx(x.TableCell,{children:h.jsx(x.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Type"})})]}),t.data.map(s=>h.jsx(qx,{connection:s},s.name))]})}),n&&t.data.length===0&&h.jsx(x.Typography,{variant:"body2",children:"No Connections"}),r&&h.jsx(gt,{error:i,context:`${e} > Connections`})]})]})})}const Wx=new Cx(new Et);function Gx(){const{projectName:e,packageName:t,versionId:n}=pt(),[r,i]=N.useState(!1),[s,a]=N.useState(null),o=g=>{a(g),i(!0)},u=()=>{i(!1),a(null)},{data:l,isError:d,error:c,isSuccess:m}=xt({queryKey:["databases",e,t,n],queryFn:g=>Wx.listDatabases(e,t,n,g)}),p=g=>g>=1024*1024*1024*1024?`${(g/(1024*1024*1024)).toFixed(2)} T`:g>=1024*1024*1024?`${(g/(1024*1024*1024)).toFixed(2)} G`:g>=1024*1024?`${(g/(1024*1024)).toFixed(2)} M`:`${(g/1024).toFixed(2)} K`;return h.jsxs(h.Fragment,{children:[h.jsx(ut,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Ut,{children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Embedded Databases"}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!m&&!d&&h.jsx(bt,{text:"Fetching Databases..."}),d&&h.jsx(gt,{error:c,context:`${e} > ${t} > Databases`}),m&&l.data.length>0&&h.jsxs(x.Table,{size:"small",children:[h.jsx(x.TableHead,{children:h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:"Name"}),h.jsx(x.TableCell,{align:"right",children:"Rows"})]})}),h.jsx(x.TableBody,{children:l.data.map(g=>h.jsxs(x.TableRow,{onClick:()=>o(g),sx:{cursor:"pointer"},children:[h.jsx(x.TableCell,{component:"th",scope:"row",children:g.path}),h.jsx(x.TableCell,{align:"right",children:p(g.info.rowCount)})]},g.path))})]}),m&&l.data.length===0&&h.jsx(x.Typography,{variant:"body2",sx:{m:"auto"},children:"No databases found"})]})]})}),h.jsxs(x.Dialog,{open:r,onClose:u,maxWidth:"sm",fullWidth:!0,children:[h.jsx(x.DialogTitle,{children:s?.path}),h.jsx(x.DialogContent,{children:s?.info?.columns&&h.jsx(x.TableContainer,{children:h.jsxs(x.Table,{size:"small",children:[h.jsx(x.TableHead,{children:h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:"Column"}),h.jsx(x.TableCell,{children:"Type"})]})}),h.jsx(x.TableBody,{children:s.info.columns.map(g=>h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{component:"th",scope:"row",children:g.name}),h.jsx(x.TableCell,{children:g.type})]},g.name))})]})})})]})]})}function Cn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function le(){return le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},le.apply(null,arguments)}function Yx(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Ls(t.components[n].defaultProps,r)}const Kx=Au();function Qx(e=Kx){return lg(e)}function Xx({props:e,name:t,defaultTheme:n,themeId:r}){let i=Qx(n);return i=i[r]||i,Yx({theme:i,name:t,props:e})}function Zx({props:e,name:t}){return Xx({props:e,name:t,defaultTheme:ku,themeId:Iu})}function Vo(){return Vo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vo.apply(null,arguments)}function Pf(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Wo(e,t){return Wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Wo(e,t)}function Nf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Wo(e,t)}const Dc={disabled:!1},Gs=N.createContext(null);var Jx=function(t){return t.scrollTop},fi="unmounted",Vn="exited",Wn="entering",yr="entered",Go="exiting",_n=function(e){Nf(t,e);function t(r,i){var s;s=e.call(this,r,i)||this;var a=i,o=a&&!a.isMounting?r.enter:r.appear,u;return s.appearStatus=null,r.in?o?(u=Vn,s.appearStatus=Wn):u=yr:r.unmountOnExit||r.mountOnEnter?u=fi:u=Vn,s.state={status:u},s.nextCallback=null,s}t.getDerivedStateFromProps=function(i,s){var a=i.in;return a&&s.status===fi?{status:Vn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var s=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Wn&&a!==yr&&(s=Wn):(a===Wn||a===yr)&&(s=Go)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,s,a,o;return s=a=o=i,i!=null&&typeof i!="number"&&(s=i.exit,a=i.enter,o=i.appear!==void 0?i.appear:a),{exit:s,enter:a,appear:o}},n.updateStatus=function(i,s){if(i===void 0&&(i=!1),s!==null)if(this.cancelNextCallback(),s===Wn){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:ns.findDOMNode(this);a&&Jx(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Vn&&this.setState({status:fi})},n.performEnter=function(i){var s=this,a=this.props.enter,o=this.context?this.context.isMounting:i,u=this.props.nodeRef?[o]:[ns.findDOMNode(this),o],l=u[0],d=u[1],c=this.getTimeouts(),m=o?c.appear:c.enter;if(!i&&!a||Dc.disabled){this.safeSetState({status:yr},function(){s.props.onEntered(l)});return}this.props.onEnter(l,d),this.safeSetState({status:Wn},function(){s.props.onEntering(l,d),s.onTransitionEnd(m,function(){s.safeSetState({status:yr},function(){s.props.onEntered(l,d)})})})},n.performExit=function(){var i=this,s=this.props.exit,a=this.getTimeouts(),o=this.props.nodeRef?void 0:ns.findDOMNode(this);if(!s||Dc.disabled){this.safeSetState({status:Vn},function(){i.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:Go},function(){i.props.onExiting(o),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Vn},function(){i.props.onExited(o)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,s){s=this.setNextCallback(s),this.setState(i,s)},n.setNextCallback=function(i){var s=this,a=!0;return this.nextCallback=function(o){a&&(a=!1,s.nextCallback=null,i(o))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,s){this.setNextCallback(s);var a=this.props.nodeRef?this.props.nodeRef.current:ns.findDOMNode(this),o=i==null&&!this.props.addEndListener;if(!a||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],l=u[0],d=u[1];this.props.addEndListener(l,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===fi)return null;var s=this.props,a=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var o=Pf(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return N.createElement(Gs.Provider,{value:null},typeof a=="function"?a(i,o):N.cloneElement(N.Children.only(a),o))},t}(N.Component);_n.contextType=Gs;_n.propTypes={};function mr(){}_n.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:mr,onEntering:mr,onEntered:mr,onExit:mr,onExiting:mr,onExited:mr};_n.UNMOUNTED=fi;_n.EXITED=Vn;_n.ENTERING=Wn;_n.ENTERED=yr;_n.EXITING=Go;function ey(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $u(e,t){var n=function(s){return t&&N.isValidElement(s)?t(s):s},r=Object.create(null);return e&&N.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function ty(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}var r=Object.create(null),i=[];for(var s in e)s in t?i.length&&(r[s]=i,i=[]):i.push(s);var a,o={};for(var u in t){if(r[u])for(a=0;a<r[u].length;a++){var l=r[u][a];o[r[u][a]]=n(l)}o[u]=n(u)}for(a=0;a<i.length;a++)o[i[a]]=n(i[a]);return o}function Kn(e,t,n){return n[t]!=null?n[t]:e.props[t]}function ny(e,t){return $u(e.children,function(n){return N.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:Kn(n,"appear",e),enter:Kn(n,"enter",e),exit:Kn(n,"exit",e)})})}function ry(e,t,n){var r=$u(e.children),i=ty(t,r);return Object.keys(i).forEach(function(s){var a=i[s];if(N.isValidElement(a)){var o=s in t,u=s in r,l=t[s],d=N.isValidElement(l)&&!l.props.in;u&&(!o||d)?i[s]=N.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:Kn(a,"exit",e),enter:Kn(a,"enter",e)}):!u&&o&&!d?i[s]=N.cloneElement(a,{in:!1}):u&&o&&N.isValidElement(l)&&(i[s]=N.cloneElement(a,{onExited:n.bind(null,a),in:l.props.in,exit:Kn(a,"exit",e),enter:Kn(a,"enter",e)}))}}),i}var iy=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},sy={component:"div",childFactory:function(t){return t}},qu=function(e){Nf(t,e);function t(r,i){var s;s=e.call(this,r,i)||this;var a=s.handleExited.bind(ey(s));return s.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},s}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(i,s){var a=s.children,o=s.handleExited,u=s.firstRender;return{children:u?ny(i,o):ry(i,a,o),firstRender:!1}},n.handleExited=function(i,s){var a=$u(this.props.children);i.key in a||(i.props.onExited&&i.props.onExited(s),this.mounted&&this.setState(function(o){var u=Vo({},o.children);return delete u[i.key],{children:u}}))},n.render=function(){var i=this.props,s=i.component,a=i.childFactory,o=Pf(i,["component","childFactory"]),u=this.state.contextValue,l=iy(this.state.children).map(a);return delete o.appear,delete o.enter,delete o.exit,s===null?N.createElement(Gs.Provider,{value:u},l):N.createElement(Gs.Provider,{value:u},N.createElement(s,o,l))},t}(N.Component);qu.propTypes={};qu.defaultProps=sy;const wc={};function Rf(e,t){const n=$.useRef(wc);return n.current===wc&&(n.current=e(t)),n}const ay=[];function oy(e){$.useEffect(e,ay)}class Vu{static create(){return new Vu}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Lf(){const e=Rf(Vu.create).current;return oy(e.disposeEffect),e}function Pc(e,t){const{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:i.transitionDelay}}function uy(e){return Mr("MuiCollapse",e)}jr("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const ly=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Hi(r,uy,n)},cy=Be("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(vu(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),dy=Be("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),hy=Be("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Li=$.forwardRef(function(t,n){const r=Br({props:t,name:"MuiCollapse"}),{addEndListener:i,children:s,className:a,collapsedSize:o="0px",component:u,easing:l,in:d,onEnter:c,onEntered:m,onEntering:p,onExit:g,onExited:b,onExiting:T,orientation:y="vertical",style:C,timeout:S=Ih.standard,TransitionComponent:P=_n,...D}=r,w={...r,orientation:y,collapsedSize:o},B=ly(w),V=Kg(),Q=Lf(),E=$.useRef(null),L=$.useRef(),O=typeof o=="number"?`${o}px`:o,z=y==="horizontal",M=z?"width":"height",J=$.useRef(null),oe=Os(n,J),he=q=>re=>{if(q){const te=J.current;re===void 0?q(te):q(te,re)}},fe=()=>E.current?E.current[z?"clientWidth":"clientHeight"]:0,G=he((q,re)=>{E.current&&z&&(E.current.style.position="absolute"),q.style[M]=O,c&&c(q,re)}),_=he((q,re)=>{const te=fe();E.current&&z&&(E.current.style.position="");const{duration:we,easing:ne}=Pc({style:C,timeout:S,easing:l},{mode:"enter"});if(S==="auto"){const U=V.transitions.getAutoHeightDuration(te);q.style.transitionDuration=`${U}ms`,L.current=U}else q.style.transitionDuration=typeof we=="string"?we:`${we}ms`;q.style[M]=`${te}px`,q.style.transitionTimingFunction=ne,p&&p(q,re)}),Ee=he((q,re)=>{q.style[M]="auto",m&&m(q,re)}),ue=he(q=>{q.style[M]=`${fe()}px`,g&&g(q)}),I=he(b),de=he(q=>{const re=fe(),{duration:te,easing:we}=Pc({style:C,timeout:S,easing:l},{mode:"exit"});if(S==="auto"){const ne=V.transitions.getAutoHeightDuration(re);q.style.transitionDuration=`${ne}ms`,L.current=ne}else q.style.transitionDuration=typeof te=="string"?te:`${te}ms`;q.style[M]=O,q.style.transitionTimingFunction=we,T&&T(q)}),pe=q=>{S==="auto"&&Q.start(L.current||0,q),i&&i(J.current,q)};return h.jsx(P,{in:d,onEnter:G,onEntered:Ee,onEntering:_,onExit:ue,onExited:I,onExiting:de,addEndListener:pe,nodeRef:J,timeout:S==="auto"?null:S,...D,children:(q,{ownerState:re,...te})=>h.jsx(cy,{as:u,className:Ye(B.root,a,{entered:B.entered,exited:!d&&O==="0px"&&B.hidden}[q]),style:{[z?"minWidth":"minHeight"]:O,...C},ref:oe,ownerState:{...w,state:q},...te,children:h.jsx(dy,{ownerState:{...w,state:q},className:B.wrapper,ref:E,children:h.jsx(hy,{ownerState:{...w,state:q},className:B.wrapperInner,children:s})})})})});Li&&(Li.muiSupportAuto=!0);const fy=$.createContext(void 0);function py(){return $.useContext(fy)}function Nc(e){try{return e.matches(":focus-visible")}catch{}return!1}class Ys{static create(){return new Ys}static use(){const t=Rf(Ys.create).current,[n,r]=$.useState(!1);return t.shouldMount=n,t.setShouldMount=r,$.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=gy(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function my(){return Ys.use()}function gy(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function by(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:s,rippleSize:a,in:o,onExited:u,timeout:l}=e,[d,c]=$.useState(!1),m=Ye(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-(a/2)+s,left:-(a/2)+i},g=Ye(n.child,d&&n.childLeaving,r&&n.childPulsate);return!o&&!d&&c(!0),$.useEffect(()=>{if(!o&&u!=null){const b=setTimeout(u,l);return()=>{clearTimeout(b)}}},[u,o,l]),h.jsx("span",{className:m,style:p,children:h.jsx("span",{className:g})})}const Wt=jr("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Yo=550,Ey=80,xy=We.keyframes`
35
+ />`}const wf=Oe(h.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"})),$x=new Sf(new Et);function qx(){const{projectName:e,packageName:t,versionId:n}=pt(),{data:r,isSuccess:i,isError:s,error:a}=xt({queryKey:["package",e,t,n],queryFn:o=>$x.getPackage(e,t,n,!1,o)});return h.jsx(ut,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Ut,{children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Package Config"}),h.jsx(x.Divider,{}),h.jsx(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:h.jsxs(x.List,{dense:!0,disablePadding:!0,children:[h.jsx(x.ListItem,{dense:!0,disablePadding:!0,children:h.jsx(x.ListItemText,{primary:"Name",primaryTypographyProps:{fontWeight:"500"},secondary:t})}),!i&&!s&&h.jsx(x.ListItem,{children:h.jsx(bt,{text:"Fetching Package Metadata..."})}),i&&(r.data&&h.jsx(x.ListItem,{dense:!0,disablePadding:!0,children:h.jsx(x.ListItemText,{primary:"Description",primaryTypographyProps:{fontWeight:"500"},secondary:r.data.description})})||h.jsxs(x.ListItem,{disablePadding:!0,dense:!0,sx:{mt:"20px"},children:[h.jsx(wf,{sx:{color:"grey.600",mr:"10px"}}),h.jsx(x.ListItemText,{primary:"No package manifest"})]})),s&&h.jsx(gt,{error:a,context:`${e} > ${t} > ${n}`})]})})]})})}const Vx=Oe(h.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"})),Wx=new Af(new Et);function Gx(){const{projectName:e}=$r(),{data:t,isSuccess:n,isError:r,error:i}=xt({queryKey:["about",e],queryFn:s=>Wx.getProject(e,!1,s)});return h.jsxs(h.Fragment,{children:[!n&&!r&&h.jsx(bt,{text:"Fetching About..."}),n&&t.data?.readme&&h.jsxs(ut,{variant:"outlined",sx:{p:2},children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",sx:{mb:1},children:"Readme"}),h.jsx(ut,{sx:{p:1},children:h.jsx(mu,{children:t.data.readme})})]}),r&&h.jsx(gt,{error:i,context:`${e} > About`})]})}const Yx=new Sf(new Et);function Nf({navigate:e}){const{projectName:t}=$r(),{data:n,isSuccess:r,isError:i,error:s}=xt({queryKey:["packages",t],queryFn:a=>Yx.listPackages(t,a)});return h.jsxs(h.Fragment,{children:[!r&&!i&&h.jsx(bt,{text:"Fetching Packages..."}),r&&h.jsxs(ut,{variant:"outlined",sx:{p:2},children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",sx:{mb:1},children:"Packages"}),h.jsx(x.Grid,{container:!0,spacing:2,columns:12,children:n.data.sort((a,o)=>a.name.localeCompare(o.name)).map(a=>{const o=a.resource.replace("/api/v0/projects","").replace("/packages","");return h.jsx(x.Grid,{size:{xs:12,sm:12,md:12,lg:4},children:h.jsx(ut,{variant:"outlined",sx:{cursor:"pointer",transition:"all 0.2s ease-in-out","&:hover":{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",transform:"translateY(-2px)"}},onClick:u=>e(o,u),children:h.jsxs(Ut,{children:[h.jsx(x.Typography,{variant:"overline",color:"primary.main",children:a.name}),h.jsx(x.Box,{sx:{maxHeight:"120px",overflowY:"auto"},children:h.jsx(x.Typography,{variant:"body2",children:a.description})})]})})},a.name)})})]}),i&&h.jsx(gt,{error:s,context:`${t} > Packages`})]})}const Pf=P.createContext(void 0);function $r(){const e=P.useContext(Pf);if(!e)throw new Error("useProject must be used within a ProjectProvider");return e}function Rf({children:e,projectName:t}){return h.jsx(Pf.Provider,{value:{projectName:t},children:e})}function Kx({navigate:e}){return h.jsxs(x.Grid,{container:!0,spacing:2,columns:12,children:[h.jsx(x.Grid,{size:{xs:12,md:12},children:h.jsx(Nf,{navigate:e})}),h.jsx(x.Grid,{size:{xs:12,md:12},children:h.jsx(Gx,{})})]})}const $u=new Tf(new Et);function Lf({connectionName:e}){const{projectName:t}=$r(),[n,r]=P.useState(void 0),[i,s]=P.useState(null),[a,o]=P.useState(!1),{data:u,isSuccess:l,isError:d,error:c,isLoading:m}=xt({queryKey:["tablePath",t,e],queryFn:p=>$u.listSchemas(t,e,p)});return h.jsxs(x.Grid,{container:!0,spacing:2,children:[h.jsx(x.Grid,{size:{xs:12,md:6},children:h.jsxs(x.Paper,{sx:{p:2},children:[h.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1},children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Table Paths"}),h.jsx(x.FormControlLabel,{control:h.jsx(x.Switch,{checked:a,onChange:p=>o(p.target.checked)}),label:"Hidden Schemas"})]}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{mt:"10px",maxHeight:"600px",overflowY:"auto"},children:[m&&h.jsx(bt,{text:"Fetching Table Paths..."}),d&&h.jsx(gt,{error:c,context:`${t} > ${e}`}),l&&u.data.length===0&&h.jsx(x.Typography,{variant:"body2",children:"No Schemas"}),l&&u.data.length>0&&h.jsx(x.List,{dense:!0,disablePadding:!0,children:u.data.filter(({isHidden:p})=>a||!p).sort((p,g)=>p.isDefault===g.isDefault?0:p.isDefault?-1:1).map(p=>h.jsx(x.ListItemButton,{selected:i===p.name,onClick:()=>s(p.name),children:h.jsx(x.ListItemText,{primary:p.name})},p.name))})]})]})}),h.jsx(x.Grid,{size:{xs:12,md:6},children:i&&h.jsx(x.Paper,{sx:{p:2},children:h.jsx(Xx,{connectionName:e,schemaName:i,onTableClick:p=>{r(p)}})})}),n&&h.jsx(Qx,{connectionName:e,schemaName:i,tableName:n,onClose:()=>r(void 0)})]})}function Qx({connectionName:e,schemaName:t,tableName:n,onClose:r}){const{projectName:i}=$r(),{data:s,isSuccess:a,isError:o,error:u,isLoading:l}=xt({queryKey:["tablePathSchema",i,e,t,n],queryFn:d=>$u.getTablesource(i,e,n,`${t}.${n}`,d)});return a&&s&&console.log(s),h.jsxs(x.Dialog,{open:!0,onClose:r,maxWidth:"sm",fullWidth:!0,children:[h.jsxs(x.DialogTitle,{children:[h.jsxs(x.Typography,{fontSize:"large",variant:"body2",fontFamily:"monospace",component:"span",style:{textTransform:"uppercase"},children:[t,".",n]}),h.jsx(x.IconButton,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8},children:h.jsx(x.Box,{sx:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:"X"})})]}),h.jsxs(x.DialogContent,{children:[l&&h.jsx(bt,{text:"Fetching Table Details..."}),o&&h.jsx(gt,{error:u,context:`${i} > ${e} > ${t}.${n}`}),a&&s&&h.jsx(x.TableContainer,{children:h.jsxs(x.Table,{size:"small",sx:{"& .MuiTableCell-root":{padding:"10px"}},children:[h.jsx(x.TableHead,{children:h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:"NAME"}),h.jsx(x.TableCell,{children:"TYPE"})]})}),h.jsx(x.TableBody,{children:s.data.columns?.map(d=>h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:d.name}),h.jsx(x.TableCell,{children:d.type})]},d.name))})]})})]})]})}function Xx({connectionName:e,schemaName:t,onTableClick:n}){const{projectName:r}=$r(),{data:i,isSuccess:s,isError:a,error:o,isLoading:u}=xt({queryKey:["tablesInSchema",r,e,t],queryFn:l=>$u.listTables(r,e,t,l)});return h.jsxs(h.Fragment,{children:[h.jsxs(x.Typography,{variant:"overline",fontWeight:"bold",children:["Tables in ",t]}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{mt:"10px",maxHeight:"600px",overflowY:"auto"},children:[u&&h.jsx(bt,{text:"Fetching Tables..."}),a&&h.jsx(gt,{error:o,context:`${r} > ${e} > ${t}`}),s&&i.data.length===0&&h.jsx(x.Typography,{variant:"body2",children:"No Tables"}),s&&i.data.length>0&&h.jsx(x.List,{dense:!0,disablePadding:!0,children:i.data.map(l=>h.jsx(x.ListItemButton,{onClick:()=>n(l),children:h.jsx(x.ListItemText,{primary:l})},l))})]})]})}const Zx=new Tf(new Et);function Jx({connection:e,onClick:t}){return h.jsxs(x.TableRow,{onClick:t,sx:{cursor:"pointer","&:hover":{backgroundColor:"action.hover"}},children:[h.jsx(x.TableCell,{children:h.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[h.jsx(x.Typography,{variant:"body2",children:e.name}),h.jsx(Vx,{sx:{fontSize:"1rem",color:"action.active",opacity:.7}})]})}),h.jsx(x.TableCell,{children:h.jsx(x.Typography,{variant:"body2",children:e.type})})]},e.name)}function ey(){const{projectName:e}=pt(),[t,n]=P.useState(null),{data:r,isSuccess:i,isError:s,error:a}=xt({queryKey:["connections",e],queryFn:l=>Zx.listConnections(e,l)}),o=l=>{n(l)},u=()=>{n(null)};return h.jsxs(Rf,{projectName:e,children:[h.jsx(ut,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Ut,{children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Database Connections"}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!i&&!s&&h.jsx(x.Typography,{variant:"body2",sx:{m:"auto"},children:"Fetching Connections..."}),i&&r.data.length>0&&h.jsx(x.Table,{size:"small",children:h.jsxs(x.TableBody,{children:[h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:h.jsx(x.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Connection Name"})}),h.jsx(x.TableCell,{children:h.jsx(x.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Type"})})]}),r.data.map(l=>h.jsx(Jx,{connection:l,onClick:()=>o(l.name)},l.name))]})}),i&&r.data.length===0&&h.jsx(x.Typography,{variant:"body2",children:"No Connections"}),s&&h.jsx(gt,{error:a,context:`${e} > Connections`})]})]})}),h.jsxs(x.Dialog,{open:t!==null,onClose:u,maxWidth:"lg",fullWidth:!0,children:[h.jsxs(x.DialogTitle,{children:["Connection Explorer: ",t,h.jsx(x.IconButton,{"aria-label":"close",onClick:u,sx:{position:"absolute",right:8,top:8},children:h.jsx(x.Box,{sx:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:"X"})})]}),h.jsx(x.DialogContent,{children:t&&h.jsx(Lf,{connectionName:t})})]})]})}const ty=new Ax(new Et);function ny(){const{projectName:e,packageName:t,versionId:n}=pt(),[r,i]=P.useState(!1),[s,a]=P.useState(null),o=g=>{a(g),i(!0)},u=()=>{i(!1),a(null)},{data:l,isError:d,error:c,isSuccess:m}=xt({queryKey:["databases",e,t,n],queryFn:g=>ty.listDatabases(e,t,n,g)}),p=g=>g>=1024*1024*1024*1024?`${(g/(1024*1024*1024)).toFixed(2)} T`:g>=1024*1024*1024?`${(g/(1024*1024*1024)).toFixed(2)} G`:g>=1024*1024?`${(g/(1024*1024)).toFixed(2)} M`:`${(g/1024).toFixed(2)} K`;return h.jsxs(h.Fragment,{children:[h.jsx(ut,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Ut,{children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Embedded Databases"}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!m&&!d&&h.jsx(bt,{text:"Fetching Databases..."}),d&&h.jsx(gt,{error:c,context:`${e} > ${t} > Databases`}),m&&l.data.length>0&&h.jsxs(x.Table,{size:"small",children:[h.jsx(x.TableHead,{children:h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:"Name"}),h.jsx(x.TableCell,{align:"right",children:"Rows"})]})}),h.jsx(x.TableBody,{children:l.data.map(g=>h.jsxs(x.TableRow,{onClick:()=>o(g),sx:{cursor:"pointer"},children:[h.jsx(x.TableCell,{component:"th",scope:"row",children:g.path}),h.jsx(x.TableCell,{align:"right",children:p(g.info.rowCount)})]},g.path))})]}),m&&l.data.length===0&&h.jsx(x.Typography,{variant:"body2",sx:{m:"auto"},children:"No databases found"})]})]})}),h.jsxs(x.Dialog,{open:r,onClose:u,maxWidth:"sm",fullWidth:!0,children:[h.jsx(x.DialogTitle,{children:s?.path}),h.jsx(x.DialogContent,{children:s?.info?.columns&&h.jsx(x.TableContainer,{children:h.jsxs(x.Table,{size:"small",children:[h.jsx(x.TableHead,{children:h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:"Column"}),h.jsx(x.TableCell,{children:"Type"})]})}),h.jsx(x.TableBody,{children:s.info.columns.map(g=>h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{component:"th",scope:"row",children:g.name}),h.jsx(x.TableCell,{children:g.type})]},g.name))})]})})})]})]})}function Cn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function le(){return le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},le.apply(null,arguments)}function ry(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Ls(t.components[n].defaultProps,r)}const iy=Au();function sy(e=iy){return dg(e)}function ay({props:e,name:t,defaultTheme:n,themeId:r}){let i=sy(n);return i=i[r]||i,ry({theme:i,name:t,props:e})}function oy({props:e,name:t}){return ay({props:e,name:t,defaultTheme:ku,themeId:Iu})}function Vo(){return Vo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vo.apply(null,arguments)}function Of(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Wo(e,t){return Wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Wo(e,t)}function Ff(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Wo(e,t)}const Dc={disabled:!1},Gs=P.createContext(null);var uy=function(t){return t.scrollTop},fi="unmounted",Vn="exited",Wn="entering",yr="entered",Go="exiting",_n=function(e){Ff(t,e);function t(r,i){var s;s=e.call(this,r,i)||this;var a=i,o=a&&!a.isMounting?r.enter:r.appear,u;return s.appearStatus=null,r.in?o?(u=Vn,s.appearStatus=Wn):u=yr:r.unmountOnExit||r.mountOnEnter?u=fi:u=Vn,s.state={status:u},s.nextCallback=null,s}t.getDerivedStateFromProps=function(i,s){var a=i.in;return a&&s.status===fi?{status:Vn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var s=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Wn&&a!==yr&&(s=Wn):(a===Wn||a===yr)&&(s=Go)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,s,a,o;return s=a=o=i,i!=null&&typeof i!="number"&&(s=i.exit,a=i.enter,o=i.appear!==void 0?i.appear:a),{exit:s,enter:a,appear:o}},n.updateStatus=function(i,s){if(i===void 0&&(i=!1),s!==null)if(this.cancelNextCallback(),s===Wn){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:ns.findDOMNode(this);a&&uy(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Vn&&this.setState({status:fi})},n.performEnter=function(i){var s=this,a=this.props.enter,o=this.context?this.context.isMounting:i,u=this.props.nodeRef?[o]:[ns.findDOMNode(this),o],l=u[0],d=u[1],c=this.getTimeouts(),m=o?c.appear:c.enter;if(!i&&!a||Dc.disabled){this.safeSetState({status:yr},function(){s.props.onEntered(l)});return}this.props.onEnter(l,d),this.safeSetState({status:Wn},function(){s.props.onEntering(l,d),s.onTransitionEnd(m,function(){s.safeSetState({status:yr},function(){s.props.onEntered(l,d)})})})},n.performExit=function(){var i=this,s=this.props.exit,a=this.getTimeouts(),o=this.props.nodeRef?void 0:ns.findDOMNode(this);if(!s||Dc.disabled){this.safeSetState({status:Vn},function(){i.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:Go},function(){i.props.onExiting(o),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Vn},function(){i.props.onExited(o)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,s){s=this.setNextCallback(s),this.setState(i,s)},n.setNextCallback=function(i){var s=this,a=!0;return this.nextCallback=function(o){a&&(a=!1,s.nextCallback=null,i(o))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,s){this.setNextCallback(s);var a=this.props.nodeRef?this.props.nodeRef.current:ns.findDOMNode(this),o=i==null&&!this.props.addEndListener;if(!a||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],l=u[0],d=u[1];this.props.addEndListener(l,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===fi)return null;var s=this.props,a=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var o=Of(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return P.createElement(Gs.Provider,{value:null},typeof a=="function"?a(i,o):P.cloneElement(P.Children.only(a),o))},t}(P.Component);_n.contextType=Gs;_n.propTypes={};function mr(){}_n.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:mr,onEntering:mr,onEntered:mr,onExit:mr,onExiting:mr,onExited:mr};_n.UNMOUNTED=fi;_n.EXITED=Vn;_n.ENTERING=Wn;_n.ENTERED=yr;_n.EXITING=Go;function ly(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qu(e,t){var n=function(s){return t&&P.isValidElement(s)?t(s):s},r=Object.create(null);return e&&P.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function cy(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}var r=Object.create(null),i=[];for(var s in e)s in t?i.length&&(r[s]=i,i=[]):i.push(s);var a,o={};for(var u in t){if(r[u])for(a=0;a<r[u].length;a++){var l=r[u][a];o[r[u][a]]=n(l)}o[u]=n(u)}for(a=0;a<i.length;a++)o[i[a]]=n(i[a]);return o}function Kn(e,t,n){return n[t]!=null?n[t]:e.props[t]}function dy(e,t){return qu(e.children,function(n){return P.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:Kn(n,"appear",e),enter:Kn(n,"enter",e),exit:Kn(n,"exit",e)})})}function hy(e,t,n){var r=qu(e.children),i=cy(t,r);return Object.keys(i).forEach(function(s){var a=i[s];if(P.isValidElement(a)){var o=s in t,u=s in r,l=t[s],d=P.isValidElement(l)&&!l.props.in;u&&(!o||d)?i[s]=P.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:Kn(a,"exit",e),enter:Kn(a,"enter",e)}):!u&&o&&!d?i[s]=P.cloneElement(a,{in:!1}):u&&o&&P.isValidElement(l)&&(i[s]=P.cloneElement(a,{onExited:n.bind(null,a),in:l.props.in,exit:Kn(a,"exit",e),enter:Kn(a,"enter",e)}))}}),i}var fy=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},py={component:"div",childFactory:function(t){return t}},Vu=function(e){Ff(t,e);function t(r,i){var s;s=e.call(this,r,i)||this;var a=s.handleExited.bind(ly(s));return s.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},s}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(i,s){var a=s.children,o=s.handleExited,u=s.firstRender;return{children:u?dy(i,o):hy(i,a,o),firstRender:!1}},n.handleExited=function(i,s){var a=qu(this.props.children);i.key in a||(i.props.onExited&&i.props.onExited(s),this.mounted&&this.setState(function(o){var u=Vo({},o.children);return delete u[i.key],{children:u}}))},n.render=function(){var i=this.props,s=i.component,a=i.childFactory,o=Of(i,["component","childFactory"]),u=this.state.contextValue,l=fy(this.state.children).map(a);return delete o.appear,delete o.enter,delete o.exit,s===null?P.createElement(Gs.Provider,{value:u},l):P.createElement(Gs.Provider,{value:u},P.createElement(s,o,l))},t}(P.Component);Vu.propTypes={};Vu.defaultProps=py;const wc={};function Mf(e,t){const n=$.useRef(wc);return n.current===wc&&(n.current=e(t)),n}const my=[];function gy(e){$.useEffect(e,my)}class Wu{static create(){return new Wu}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Bf(){const e=Mf(Wu.create).current;return gy(e.disposeEffect),e}function Nc(e,t){const{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:i.transitionDelay}}function by(e){return Mr("MuiCollapse",e)}jr("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Ey=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Hi(r,by,n)},xy=Be("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(vu(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),yy=Be("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Ty=Be("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Li=$.forwardRef(function(t,n){const r=Br({props:t,name:"MuiCollapse"}),{addEndListener:i,children:s,className:a,collapsedSize:o="0px",component:u,easing:l,in:d,onEnter:c,onEntered:m,onEntering:p,onExit:g,onExited:b,onExiting:T,orientation:y="vertical",style:C,timeout:S=Ih.standard,TransitionComponent:N=_n,...D}=r,w={...r,orientation:y,collapsedSize:o},B=Ey(w),V=Xg(),Q=Bf(),E=$.useRef(null),L=$.useRef(),O=typeof o=="number"?`${o}px`:o,z=y==="horizontal",M=z?"width":"height",J=$.useRef(null),oe=Os(n,J),he=q=>re=>{if(q){const te=J.current;re===void 0?q(te):q(te,re)}},fe=()=>E.current?E.current[z?"clientWidth":"clientHeight"]:0,G=he((q,re)=>{E.current&&z&&(E.current.style.position="absolute"),q.style[M]=O,c&&c(q,re)}),_=he((q,re)=>{const te=fe();E.current&&z&&(E.current.style.position="");const{duration:we,easing:ne}=Nc({style:C,timeout:S,easing:l},{mode:"enter"});if(S==="auto"){const U=V.transitions.getAutoHeightDuration(te);q.style.transitionDuration=`${U}ms`,L.current=U}else q.style.transitionDuration=typeof we=="string"?we:`${we}ms`;q.style[M]=`${te}px`,q.style.transitionTimingFunction=ne,p&&p(q,re)}),Ee=he((q,re)=>{q.style[M]="auto",m&&m(q,re)}),ue=he(q=>{q.style[M]=`${fe()}px`,g&&g(q)}),I=he(b),de=he(q=>{const re=fe(),{duration:te,easing:we}=Nc({style:C,timeout:S,easing:l},{mode:"exit"});if(S==="auto"){const ne=V.transitions.getAutoHeightDuration(re);q.style.transitionDuration=`${ne}ms`,L.current=ne}else q.style.transitionDuration=typeof te=="string"?te:`${te}ms`;q.style[M]=O,q.style.transitionTimingFunction=we,T&&T(q)}),pe=q=>{S==="auto"&&Q.start(L.current||0,q),i&&i(J.current,q)};return h.jsx(N,{in:d,onEnter:G,onEntered:Ee,onEntering:_,onExit:ue,onExited:I,onExiting:de,addEndListener:pe,nodeRef:J,timeout:S==="auto"?null:S,...D,children:(q,{ownerState:re,...te})=>h.jsx(xy,{as:u,className:Ye(B.root,a,{entered:B.entered,exited:!d&&O==="0px"&&B.hidden}[q]),style:{[z?"minWidth":"minHeight"]:O,...C},ref:oe,ownerState:{...w,state:q},...te,children:h.jsx(yy,{ownerState:{...w,state:q},className:B.wrapper,ref:E,children:h.jsx(Ty,{ownerState:{...w,state:q},className:B.wrapperInner,children:s})})})})});Li&&(Li.muiSupportAuto=!0);const Cy=$.createContext(void 0);function Sy(){return $.useContext(Cy)}function Pc(e){try{return e.matches(":focus-visible")}catch{}return!1}class Ys{static create(){return new Ys}static use(){const t=Mf(Ys.create).current,[n,r]=$.useState(!1);return t.shouldMount=n,t.setShouldMount=r,$.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=ky(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function Ay(){return Ys.use()}function ky(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function Iy(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:s,rippleSize:a,in:o,onExited:u,timeout:l}=e,[d,c]=$.useState(!1),m=Ye(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-(a/2)+s,left:-(a/2)+i},g=Ye(n.child,d&&n.childLeaving,r&&n.childPulsate);return!o&&!d&&c(!0),$.useEffect(()=>{if(!o&&u!=null){const b=setTimeout(u,l);return()=>{clearTimeout(b)}}},[u,o,l]),h.jsx("span",{className:m,style:p,children:h.jsx("span",{className:g})})}const Wt=jr("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Yo=550,_y=80,vy=We.keyframes`
36
36
  0% {
37
37
  transform: scale(0);
38
38
  opacity: 0.1;
@@ -42,7 +42,7 @@ export default theme;`}function Po(e={},...t){const{breakpoints:n,mixins:r={},sp
42
42
  transform: scale(1);
43
43
  opacity: 0.3;
44
44
  }
45
- `,yy=We.keyframes`
45
+ `,Dy=We.keyframes`
46
46
  0% {
47
47
  opacity: 1;
48
48
  }
@@ -50,7 +50,7 @@ export default theme;`}function Po(e={},...t){const{breakpoints:n,mixins:r={},sp
50
50
  100% {
51
51
  opacity: 0;
52
52
  }
53
- `,Ty=We.keyframes`
53
+ `,wy=We.keyframes`
54
54
  0% {
55
55
  transform: scale(1);
56
56
  }
@@ -62,14 +62,14 @@ export default theme;`}function Po(e={},...t){const{breakpoints:n,mixins:r={},sp
62
62
  100% {
63
63
  transform: scale(1);
64
64
  }
65
- `,Cy=Be("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Sy=Be(by,{name:"MuiTouchRipple",slot:"Ripple"})`
65
+ `,Ny=Be("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Py=Be(Iy,{name:"MuiTouchRipple",slot:"Ripple"})`
66
66
  opacity: 0;
67
67
  position: absolute;
68
68
 
69
69
  &.${Wt.rippleVisible} {
70
70
  opacity: 0.3;
71
71
  transform: scale(1);
72
- animation-name: ${xy};
72
+ animation-name: ${vy};
73
73
  animation-duration: ${Yo}ms;
74
74
  animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
75
75
  }
@@ -89,7 +89,7 @@ export default theme;`}function Po(e={},...t){const{breakpoints:n,mixins:r={},sp
89
89
 
90
90
  & .${Wt.childLeaving} {
91
91
  opacity: 0;
92
- animation-name: ${yy};
92
+ animation-name: ${Dy};
93
93
  animation-duration: ${Yo}ms;
94
94
  animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
95
95
  }
@@ -99,95 +99,95 @@ export default theme;`}function Po(e={},...t){const{breakpoints:n,mixins:r={},sp
99
99
  /* @noflip */
100
100
  left: 0px;
101
101
  top: 0;
102
- animation-name: ${Ty};
102
+ animation-name: ${wy};
103
103
  animation-duration: 2500ms;
104
104
  animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
105
105
  animation-iteration-count: infinite;
106
106
  animation-delay: 200ms;
107
107
  }
108
- `,Ay=$.forwardRef(function(t,n){const r=Br({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:s={},className:a,...o}=r,[u,l]=$.useState([]),d=$.useRef(0),c=$.useRef(null);$.useEffect(()=>{c.current&&(c.current(),c.current=null)},[u]);const m=$.useRef(!1),p=Lf(),g=$.useRef(null),b=$.useRef(null),T=$.useCallback(P=>{const{pulsate:D,rippleX:w,rippleY:B,rippleSize:V,cb:Q}=P;l(E=>[...E,h.jsx(Sy,{classes:{ripple:Ye(s.ripple,Wt.ripple),rippleVisible:Ye(s.rippleVisible,Wt.rippleVisible),ripplePulsate:Ye(s.ripplePulsate,Wt.ripplePulsate),child:Ye(s.child,Wt.child),childLeaving:Ye(s.childLeaving,Wt.childLeaving),childPulsate:Ye(s.childPulsate,Wt.childPulsate)},timeout:Yo,pulsate:D,rippleX:w,rippleY:B,rippleSize:V},d.current)]),d.current+=1,c.current=Q},[s]),y=$.useCallback((P={},D={},w=()=>{})=>{const{pulsate:B=!1,center:V=i||D.pulsate,fakeElement:Q=!1}=D;if(P?.type==="mousedown"&&m.current){m.current=!1;return}P?.type==="touchstart"&&(m.current=!0);const E=Q?null:b.current,L=E?E.getBoundingClientRect():{width:0,height:0,left:0,top:0};let O,z,M;if(V||P===void 0||P.clientX===0&&P.clientY===0||!P.clientX&&!P.touches)O=Math.round(L.width/2),z=Math.round(L.height/2);else{const{clientX:J,clientY:oe}=P.touches&&P.touches.length>0?P.touches[0]:P;O=Math.round(J-L.left),z=Math.round(oe-L.top)}if(V)M=Math.sqrt((2*L.width**2+L.height**2)/3),M%2===0&&(M+=1);else{const J=Math.max(Math.abs((E?E.clientWidth:0)-O),O)*2+2,oe=Math.max(Math.abs((E?E.clientHeight:0)-z),z)*2+2;M=Math.sqrt(J**2+oe**2)}P?.touches?g.current===null&&(g.current=()=>{T({pulsate:B,rippleX:O,rippleY:z,rippleSize:M,cb:w})},p.start(Ey,()=>{g.current&&(g.current(),g.current=null)})):T({pulsate:B,rippleX:O,rippleY:z,rippleSize:M,cb:w})},[i,T,p]),C=$.useCallback(()=>{y({},{pulsate:!0})},[y]),S=$.useCallback((P,D)=>{if(p.clear(),P?.type==="touchend"&&g.current){g.current(),g.current=null,p.start(0,()=>{S(P,D)});return}g.current=null,l(w=>w.length>0?w.slice(1):w),c.current=D},[p]);return $.useImperativeHandle(n,()=>({pulsate:C,start:y,stop:S}),[C,y,S]),h.jsx(Cy,{className:Ye(Wt.root,s.root,a),ref:b,...o,children:h.jsx(qu,{component:null,exit:!0,children:u})})});function ky(e){return Mr("MuiButtonBase",e)}const Iy=jr("MuiButtonBase",["root","disabled","focusVisible"]),_y=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,a=Hi({root:["root",t&&"disabled",n&&"focusVisible"]},ky,i);return n&&r&&(a.root+=` ${r}`),a},vy=Be("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Iy.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Dy=$.forwardRef(function(t,n){const r=Br({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:s=!1,children:a,className:o,component:u="button",disabled:l=!1,disableRipple:d=!1,disableTouchRipple:c=!1,focusRipple:m=!1,focusVisibleClassName:p,LinkComponent:g="a",onBlur:b,onClick:T,onContextMenu:y,onDragLeave:C,onFocus:S,onFocusVisible:P,onKeyDown:D,onKeyUp:w,onMouseDown:B,onMouseLeave:V,onMouseUp:Q,onTouchEnd:E,onTouchMove:L,onTouchStart:O,tabIndex:z=0,TouchRippleProps:M,touchRippleRef:J,type:oe,...he}=r,fe=$.useRef(null),G=my(),_=Os(G.ref,J),[Ee,ue]=$.useState(!1);l&&Ee&&ue(!1),$.useImperativeHandle(i,()=>({focusVisible:()=>{ue(!0),fe.current.focus()}}),[]);const I=G.shouldMount&&!d&&!l;$.useEffect(()=>{Ee&&m&&!d&&G.pulsate()},[d,m,Ee,G]);const de=mn(G,"start",B,c),pe=mn(G,"stop",y,c),q=mn(G,"stop",C,c),re=mn(G,"stop",Q,c),te=mn(G,"stop",se=>{Ee&&se.preventDefault(),V&&V(se)},c),we=mn(G,"start",O,c),ne=mn(G,"stop",E,c),U=mn(G,"stop",L,c),xe=mn(G,"stop",se=>{Nc(se.target)||ue(!1),b&&b(se)},!1),je=xs(se=>{fe.current||(fe.current=se.currentTarget),Nc(se.target)&&(ue(!0),P&&P(se)),S&&S(se)}),ce=()=>{const se=fe.current;return u&&u!=="button"&&!(se.tagName==="A"&&se.href)},zt=xs(se=>{m&&!se.repeat&&Ee&&se.key===" "&&G.stop(se,()=>{G.start(se)}),se.target===se.currentTarget&&ce()&&se.key===" "&&se.preventDefault(),D&&D(se),se.target===se.currentTarget&&ce()&&se.key==="Enter"&&!l&&(se.preventDefault(),T&&T(se))}),yt=xs(se=>{m&&se.key===" "&&Ee&&!se.defaultPrevented&&G.stop(se,()=>{G.pulsate(se)}),w&&w(se),T&&se.target===se.currentTarget&&ce()&&se.key===" "&&!se.defaultPrevented&&T(se)});let Ce=u;Ce==="button"&&(he.href||he.to)&&(Ce=g);const st={};Ce==="button"?(st.type=oe===void 0?"button":oe,st.disabled=l):(!he.href&&!he.to&&(st.role="button"),l&&(st["aria-disabled"]=l));const at=Os(n,fe),Xe={...r,centerRipple:s,component:u,disabled:l,disableRipple:d,disableTouchRipple:c,focusRipple:m,tabIndex:z,focusVisible:Ee},rn=_y(Xe);return h.jsxs(vy,{as:Ce,className:Ye(rn.root,o),ownerState:Xe,onBlur:xe,onClick:T,onContextMenu:pe,onFocus:je,onKeyDown:zt,onKeyUp:yt,onMouseDown:de,onMouseLeave:te,onMouseUp:re,onDragLeave:q,onTouchEnd:ne,onTouchMove:U,onTouchStart:we,ref:at,tabIndex:l?-1:z,type:oe,...st,...he,children:[a,I?h.jsx(Ay,{ref:_,center:s,...M}):null]})});function mn(e,t,n,r=!1){return xs(i=>(n&&n(i),r||e[t](i),!0))}function wy(e){return Mr("PrivateSwitchBase",e)}jr("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);function Py(e){return typeof e=="string"}function Ny(e,t,n){return e===void 0||Py(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Ry(e,t,n){return typeof e=="function"?e(t,n):e}function Ly(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Rc(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function Oy(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:s}=e;if(!t){const p=Ye(n?.className,s,i?.className,r?.className),g={...n?.style,...i?.style,...r?.style},b={...n,...i,...r};return p.length>0&&(b.className=p),Object.keys(g).length>0&&(b.style=g),{props:b,internalRef:void 0}}const a=Ly({...i,...r}),o=Rc(r),u=Rc(i),l=t(a),d=Ye(l?.className,n?.className,s,i?.className,r?.className),c={...l?.style,...n?.style,...i?.style,...r?.style},m={...l,...n,...u,...o};return d.length>0&&(m.className=d),Object.keys(c).length>0&&(m.style=c),{props:m,internalRef:l.ref}}function Ko(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:s,internalForwardedProps:a,shouldForwardComponentProp:o=!1,...u}=t,{component:l,slots:d={[e]:void 0},slotProps:c={[e]:void 0},...m}=s,p=d[e]||r,g=Ry(c[e],i),{props:{component:b,...T},internalRef:y}=Oy({className:n,...u,externalForwardedProps:e==="root"?m:void 0,externalSlotProps:g}),C=Os(y,g?.ref,t.ref),S=e==="root"?b||l:b,P=Ny(p,{...e==="root"&&!l&&!d[e]&&a,...e!=="root"&&!d[e]&&a,...T,...S&&!o&&{as:S},...S&&o&&{component:S},ref:C},i);return[p,P]}const Fy=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,s={root:["root",n&&"checked",r&&"disabled",i&&`edge${tn(i)}`],input:["input"]};return Hi(s,wy,t)},My=Be(Dy)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),By=Be("input",{shouldForwardProp:_u})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),jy=$.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:s,defaultChecked:a,disabled:o,disableFocusRipple:u=!1,edge:l=!1,icon:d,id:c,inputProps:m,inputRef:p,name:g,onBlur:b,onChange:T,onFocus:y,readOnly:C,required:S=!1,tabIndex:P,type:D,value:w,slots:B={},slotProps:V={},...Q}=t,[E,L]=lb({controlled:i,default:!!a}),O=py(),z=pe=>{y&&y(pe),O&&O.onFocus&&O.onFocus(pe)},M=pe=>{b&&b(pe),O&&O.onBlur&&O.onBlur(pe)},J=pe=>{if(pe.nativeEvent.defaultPrevented)return;const q=pe.target.checked;L(q),T&&T(pe,q)};let oe=o;O&&typeof oe>"u"&&(oe=O.disabled);const he=D==="checkbox"||D==="radio",fe={...t,checked:E,disabled:oe,disableFocusRipple:u,edge:l},G=Fy(fe),_={slots:B,slotProps:{input:m,...V}},[Ee,ue]=Ko("root",{ref:n,elementType:My,className:G.root,shouldForwardComponentProp:!0,externalForwardedProps:{..._,component:"span",...Q},getSlotProps:pe=>({...pe,onFocus:q=>{pe.onFocus?.(q),z(q)},onBlur:q=>{pe.onBlur?.(q),M(q)}}),ownerState:fe,additionalProps:{centerRipple:!0,focusRipple:!u,disabled:oe,role:void 0,tabIndex:null}}),[I,de]=Ko("input",{ref:p,elementType:By,className:G.input,externalForwardedProps:_,getSlotProps:pe=>({...pe,onChange:q=>{pe.onChange?.(q),J(q)}}),ownerState:fe,additionalProps:{autoFocus:r,checked:i,defaultChecked:a,disabled:oe,id:he?c:void 0,name:g,readOnly:C,required:S,tabIndex:P,type:D,...D==="checkbox"&&w===void 0?{}:{value:w}}});return h.jsxs(Ee,{...ue,children:[h.jsx(I,{...de}),E?s:d]})}),Hy=Me(h.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),Uy=Me(h.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),zy=Me(h.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}));function $y(e){return Mr("MuiCheckbox",e)}const Ja=jr("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);function qy(e){return typeof e.main=="string"}function Vy(e,t=[]){if(!qy(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Lc(e=[]){return([,t])=>t&&Vy(t,e)}const Wy=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,s={root:["root",n&&"indeterminate",`color${tn(r)}`,`size${tn(i)}`]},a=Hi(s,$y,t);return{...t,...a}},Gy=Be(jy,{shouldForwardProp:e=>_u(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${tn(n.size)}`],n.color!=="default"&&t[`color${tn(n.color)}`]]}})(vu(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:wo(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Lc()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:wo(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Lc()).map(([t])=>({props:{color:t},style:{[`&.${Ja.checked}, &.${Ja.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${Ja.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),Yy=h.jsx(Uy,{}),Ky=h.jsx(Hy,{}),Qy=h.jsx(zy,{}),Of=$.forwardRef(function(t,n){const r=Br({props:t,name:"MuiCheckbox"}),{checkedIcon:i=Yy,color:s="primary",icon:a=Ky,indeterminate:o=!1,indeterminateIcon:u=Qy,inputProps:l,size:d="medium",disableRipple:c=!1,className:m,slots:p={},slotProps:g={},...b}=r,T=o?u:a,y=o?u:i,C={...r,disableRipple:c,color:s,indeterminate:o,size:d},S=Wy(C),P=g.input??l,[D,w]=Ko("root",{ref:n,elementType:Gy,className:Ye(S.root,m),shouldForwardComponentProp:!0,externalForwardedProps:{slots:p,slotProps:g,...b},ownerState:C,additionalProps:{type:"checkbox",icon:$.cloneElement(T,{fontSize:T.props.fontSize??d}),checkedIcon:$.cloneElement(y,{fontSize:y.props.fontSize??d}),disableRipple:c,slots:p,slotProps:{input:db(typeof P=="function"?P(C):P,{"data-indeterminate":o})}}});return h.jsx(D,{...w,classes:S})});function Rr(...e){const t=$.useRef(void 0),n=$.useCallback(r=>{const i=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const a=s,o=a(r);return typeof o=="function"?o:()=>{a(null)}}return s.current=r,()=>{s.current=null}});return()=>{i.forEach(s=>s?.())}},e);return $.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function Xy(e){return typeof e=="string"}function Zy(e,t,n){return e===void 0||Xy(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Vt(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Oc(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function Jy(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:s}=e;if(!t){const p=Ye(n?.className,s,i?.className,r?.className),g={...n?.style,...i?.style,...r?.style},b={...n,...i,...r};return p.length>0&&(b.className=p),Object.keys(g).length>0&&(b.style=g),{props:b,internalRef:void 0}}const a=Vt({...i,...r}),o=Oc(r),u=Oc(i),l=t(a),d=Ye(l?.className,n?.className,s,i?.className,r?.className),c={...l?.style,...n?.style,...i?.style,...r?.style},m={...l,...n,...u,...o};return d.length>0&&(m.className=d),Object.keys(c).length>0&&(m.style=c),{props:m,internalRef:l.ref}}function En(e,t,n){return typeof e=="function"?e(t,n):e}function Qn(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...s}=e,a=i?{}:En(n,r),{props:o,internalRef:u}=Jy({...s,externalSlotProps:a}),l=Rr(u,a?.ref,e.additionalProps?.ref);return Zy(t,{...o,ref:l},r)}function Ff(e,t,n=void 0){const r={};for(const i in e){const s=e[i];let a="",o=!0;for(let u=0;u<s.length;u+=1){const l=s[u];l&&(a+=(o===!0?"":" ")+t(l),o=!1,n&&n[l]&&(a+=" "+n[l]))}r[i]=a}return r}function Mf(e){return Zx}const Bf=$.createContext(null);function e3(e){const{value:t,children:n}=e;return h.jsx(Bf.Provider,{value:t,children:t.wrapRoot({children:n,instance:t.instance})})}const or=()=>{const e=$.useContext(Bf);if(e==null)throw new Error(["MUI X: Could not find the Tree View context.","It looks like you rendered your component outside of a SimpleTreeView or RichTreeView parent component.","This can also happen if you are bundling multiple versions of the Tree View."].join(`
109
- `));return e},t3=({props:e})=>{const{instance:t}=or(),{label:n,itemId:r}=e,[i,s]=$.useState(n),a=t.isItemBeingEdited(r);return $.useEffect(()=>{a||s(n)},[a,n]),{propsEnhancers:{labelInput:({externalEventHandlers:o,interactions:u})=>t.isItemEditable(r)?{value:i??"","data-element":"labelInput",onChange:p=>{o.onChange?.(p),s(p.target.value)},onKeyDown:p=>{if(o.onKeyDown?.(p),p.defaultMuiPrevented)return;const g=p.target;p.key==="Enter"&&g.value?u.handleSaveItemLabel(p,g.value):p.key==="Escape"&&u.handleCancelItemLabelEditing(p)},onBlur:p=>{o.onBlur?.(p),!p.defaultMuiPrevented&&p.target.value&&u.handleSaveItemLabel(p,p.target.value)},autoFocus:!0,type:"text"}:{}}}},Qt=({instance:e,state:t,setState:n,params:r})=>{const i=$.useRef(t.editedItemId),s=c=>i.current===c,a=c=>{n(m=>le({},m,{editedItemId:c})),i.current=c},o=c=>c===t.editedItemId,u=!!r.isItemEditable,l=c=>{if(c==null||!u)return!1;const m=e.getItem(c);return m?typeof r.isItemEditable=="function"?r.isItemEditable(m):!!r.isItemEditable:!1},d=(c,m)=>{if(!m)throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.","The label of an item cannot be empty.",c].join(`
110
- `));n(p=>{const g=p.items.itemMetaMap[c];return g.label!==m?le({},p,{items:le({},p.items,{itemMetaMap:le({},p.items.itemMetaMap,{[c]:le({},g,{label:m})})})}):p}),r.onItemLabelChange&&r.onItemLabelChange(c,m)};return{instance:{setEditedItemId:a,isItemBeingEdited:o,updateItemLabel:d,isItemEditable:l,isTreeViewEditable:u,isItemBeingEditedRef:s},publicAPI:{updateItemLabel:d}}};Qt.itemPlugin=t3;Qt.getDefaultizedParams=({params:e,experimentalFeatures:t})=>{const n=t?.labelEditing;return le({},e,{isItemEditable:n?e.isItemEditable??!1:!1})};Qt.getInitialState=()=>({editedItemId:null});Qt.params={onItemLabelChange:!0,isItemEditable:!0};const Zn=(e,t)=>e.getAvailablePlugins().has(t),jf=e=>Array.isArray(e)?e.length>0&&e.some(jf):!!e,n3=({itemId:e,children:t})=>{const{instance:n,selection:{multiSelect:r},publicAPI:i}=or(),s={expandable:jf(t),expanded:n.isItemExpanded(e),focused:n.isItemFocused(e),selected:n.isItemSelected(e),disabled:n.isItemDisabled(e),editing:n?.isItemBeingEdited?n?.isItemBeingEdited(e):!1,editable:n.isItemEditable?n.isItemEditable(e):!1},a=p=>{if(s.disabled)return;s.focused||n.focusItem(p,e);const g=r&&(p.shiftKey||p.ctrlKey||p.metaKey);s.expandable&&!(g&&n.isItemExpanded(e))&&n.toggleItemExpansion(p,e)},o=p=>{if(s.disabled)return;s.focused||n.focusItem(p,e),r&&(p.shiftKey||p.ctrlKey||p.metaKey)?p.shiftKey?n.expandSelectionRange(p,e):n.selectItem({event:p,itemId:e,keepExistingSelection:!0}):n.selectItem({event:p,itemId:e,shouldBeSelected:!0})},u=p=>{const g=p.nativeEvent.shiftKey;r&&g?n.expandSelectionRange(p,e):n.selectItem({event:p,itemId:e,keepExistingSelection:r,shouldBeSelected:p.target.checked})},l=()=>{Zn(n,Qt)&&n.isItemEditable(e)&&(n.isItemBeingEdited(e)?n.setEditedItemId(null):n.setEditedItemId(e))};return{interactions:{handleExpansion:a,handleSelection:o,handleCheckboxSelection:u,toggleItemEditing:l,handleSaveItemLabel:(p,g)=>{Zn(n,Qt)&&n.isItemBeingEditedRef(e)&&(n.updateItemLabel(e,g),l(),n.focusItem(p,e))},handleCancelItemLabelEditing:p=>{Zn(n,Qt)&&n.isItemBeingEditedRef(e)&&(l(),n.focusItem(p,e))}},status:s,publicAPI:i}},Wu=$.createContext(()=>-1),Hf=(e,t)=>{let n=t.length-1;for(;n>=0&&!e.isItemNavigable(t[n]);)n-=1;if(n!==-1)return t[n]},Uf=(e,t)=>{const n=e.getItemMeta(t),r=e.getItemOrderedChildrenIds(n.parentId),i=e.getItemIndex(t);if(i===0)return n.parentId;let s=i-1;for(;!e.isItemNavigable(r[s])&&s>=0;)s-=1;if(s===-1)return n.parentId==null?null:Uf(e,n.parentId);let a=r[s],o=Hf(e,e.getItemOrderedChildrenIds(a));for(;e.isItemExpanded(a)&&o!=null;)a=o,o=e.getItemOrderedChildrenIds(a).find(e.isItemNavigable);return a},Cs=(e,t)=>{if(e.isItemExpanded(t)){const r=e.getItemOrderedChildrenIds(t).find(e.isItemNavigable);if(r!=null)return r}let n=e.getItemMeta(t);for(;n!=null;){const r=e.getItemOrderedChildrenIds(n.parentId),i=e.getItemIndex(n.id);if(i<r.length-1){let s=i+1;for(;!e.isItemNavigable(r[s])&&s<r.length-1;)s+=1;if(e.isItemNavigable(r[s]))return r[s]}n=e.getItemMeta(n.parentId)}return null},zf=e=>{let t=null;for(;t==null||e.isItemExpanded(t);){const n=e.getItemOrderedChildrenIds(t),r=Hf(e,n);if(r==null)return t;t=r}return t},Oi=e=>e.getItemOrderedChildrenIds(null).find(e.isItemNavigable),$f=(e,t,n)=>{if(t===n)return[t,n];const r=e.getItemMeta(t),i=e.getItemMeta(n);if(r.parentId===i.id||i.parentId===r.id)return i.parentId===r.id?[r.id,i.id]:[i.id,r.id];const s=[r.id],a=[i.id];let o=r.parentId,u=i.parentId,l=a.indexOf(o)!==-1,d=s.indexOf(u)!==-1,c=!0,m=!0;for(;!d&&!l;)c&&(s.push(o),l=a.indexOf(o)!==-1,c=o!==null,!l&&c&&(o=e.getItemMeta(o).parentId)),m&&!l&&(a.push(u),d=s.indexOf(u)!==-1,m=u!==null,!d&&m&&(u=e.getItemMeta(u).parentId));const p=l?o:u,g=e.getItemOrderedChildrenIds(p),b=s[s.indexOf(p)-1],T=a[a.indexOf(p)-1];return g.indexOf(b)<g.indexOf(T)?[t,n]:[n,t]},r3=(e,t,n)=>{const r=u=>{if(e.isItemExpandable(u)&&e.isItemExpanded(u))return e.getItemOrderedChildrenIds(u)[0];let l=e.getItemMeta(u);for(;l!=null;){const d=e.getItemOrderedChildrenIds(l.parentId),c=e.getItemIndex(l.id);if(c<d.length-1)return d[c+1];l=e.getItemMeta(l.parentId)}throw new Error("Invalid range")},[i,s]=$f(e,t,n),a=[i];let o=i;for(;o!==s;)o=r(o),e.isItemDisabled(o)||a.push(o);return a},i3=e=>{let t=Oi(e);const n=[];for(;t!=null;)n.push(t),t=Cs(e,t);return n},Fi=(e,t)=>t!==e.closest('*[role="treeitem"]');let Fc=0;const s3=()=>(Fc+=1,`mui-tree-view-${Fc}`),Gu=({id:e,treeId:t="",itemId:n})=>e??`${t}-${n}`,a3=e=>{const{runItemPlugins:t,items:{onItemClick:n,disabledItemsFocusable:r,indentationAtItemLevel:i},selection:{disableSelection:s,checkboxSelection:a},expansion:{expansionTrigger:o},treeId:u,instance:l,publicAPI:d}=or(),c=$.useContext(Wu),{id:m,itemId:p,label:g,children:b,rootRef:T}=e,{rootRef:y,contentRef:C,propsEnhancers:S}=t(e),{interactions:P,status:D}=n3({itemId:p,children:b}),w=$.useRef(null),B=$.useRef(null),V=Rr(T,y,w),Q=Rr(C,B),E=$.useRef(null),L=Gu({itemId:p,treeId:u,id:m}),O=l.canItemBeTabbed(p)?0:-1,z={rootRefObject:w,contentRefObject:B,interactions:P},M=ne=>U=>{if(ne.onFocus?.(U),U.defaultMuiPrevented)return;const xe=!D.disabled||r;!D.focused&&xe&&U.currentTarget===U.target&&l.focusItem(U,p)},J=ne=>U=>{if(ne.onBlur?.(U),U.defaultMuiPrevented)return;const xe=l.getItemDOMElement(p);D.editing||U.relatedTarget&&Fi(U.relatedTarget,xe)&&(U.target&&U.target?.dataset?.element==="labelInput"&&Fi(U.target,xe)||U.relatedTarget?.dataset?.element==="labelInput")||l.removeFocusedItem()},oe=ne=>U=>{ne.onKeyDown?.(U),!(U.defaultMuiPrevented||U.target?.dataset?.element==="labelInput")&&l.handleItemKeyDown(U,p)},he=ne=>U=>{ne.onDoubleClick?.(U),!U.defaultMuiPrevented&&P.toggleItemEditing()},fe=ne=>U=>{ne.onClick?.(U),n?.(U,p),!(U.defaultMuiPrevented||E.current?.contains(U.target))&&(o==="content"&&P.handleExpansion(U),a||P.handleSelection(U))},G=ne=>U=>{ne.onMouseDown?.(U),!U.defaultMuiPrevented&&(U.shiftKey||U.ctrlKey||U.metaKey||D.disabled)&&U.preventDefault()},_=ne=>U=>{ne.onChange?.(U),!U.defaultMuiPrevented&&(s||D.disabled||P.handleCheckboxSelection(U))},Ee=ne=>U=>{ne.onClick?.(U),!U.defaultMuiPrevented&&o==="iconContainer"&&P.handleExpansion(U)};return{getRootProps:(ne={})=>{const U=le({},Vt(e),Vt(ne));let xe;D.selected?xe=!0:s||D.disabled?xe=void 0:xe=!1;const je=le({},U,{ref:V,role:"treeitem",tabIndex:O,id:L,"aria-expanded":D.expandable?D.expanded:void 0,"aria-selected":xe,"aria-disabled":D.disabled||void 0},ne,{onFocus:M(U),onBlur:J(U),onKeyDown:oe(U)});i&&(je.style={"--TreeView-itemDepth":typeof c=="function"?c(p):c});const ce=S.root?.(le({},z,{externalEventHandlers:U}))??{};return le({},je,ce)},getContentProps:(ne={})=>{const U=Vt(ne),xe=le({},U,ne,{ref:Q,onClick:fe(U),onMouseDown:G(U),status:D});i&&(xe.indentationAtItemLevel=!0);const je=S.content?.(le({},z,{externalEventHandlers:U}))??{};return le({},xe,je)},getGroupTransitionProps:(ne={})=>{const U=Vt(ne),xe=le({},U,{unmountOnExit:!0,component:"ul",role:"group",in:D.expanded,children:b},ne);return i&&(xe.indentationAtItemLevel=!0),xe},getIconContainerProps:(ne={})=>{const U=Vt(ne);return le({},U,ne,{onClick:Ee(U)})},getCheckboxProps:(ne={})=>{const U=Vt(ne);return le({},U,{visible:a,ref:E,checked:D.selected,disabled:s||D.disabled,tabIndex:-1},ne,{onChange:_(U)})},getLabelProps:(ne={})=>{const U=le({},Vt(ne)),xe=le({},U,{children:g},ne,{onDoubleClick:he(U)});return l.isTreeViewEditable&&(xe.editable=D.editable),xe},getLabelInputProps:(ne={})=>{const U=Vt(ne),xe=S.labelInput?.({rootRefObject:w,contentRefObject:B,externalEventHandlers:U,interactions:P})??{};return le({},ne,xe)},getDragAndDropOverlayProps:(ne={})=>{const U=Vt(ne),xe=S.dragAndDropOverlay?.(le({},z,{externalEventHandlers:U}))??{};return le({},ne,xe)},rootRef:V,status:D,publicAPI:d}},o3=a3;function qf(e){const{instance:t,items:{onItemClick:n},selection:{multiSelect:r,checkboxSelection:i,disableSelection:s},expansion:{expansionTrigger:a}}=or(),o=t.isItemExpandable(e),u=t.isItemExpanded(e),l=t.isItemFocused(e),d=t.isItemSelected(e),c=t.isItemDisabled(e),m=t?.isItemBeingEdited?t?.isItemBeingEdited(e):!1,p=t.isItemEditable?t.isItemEditable(e):!1,g=D=>{if(!c){l||t.focusItem(D,e);const w=r&&(D.shiftKey||D.ctrlKey||D.metaKey);o&&!(w&&t.isItemExpanded(e))&&t.toggleItemExpansion(D,e)}},b=D=>{c||(l||t.focusItem(D,e),r&&(D.shiftKey||D.ctrlKey||D.metaKey)?D.shiftKey?t.expandSelectionRange(D,e):t.selectItem({event:D,itemId:e,keepExistingSelection:!0}):t.selectItem({event:D,itemId:e,shouldBeSelected:!0}))},T=D=>{if(s||c)return;const w=D.nativeEvent.shiftKey;r&&w?t.expandSelectionRange(D,e):t.selectItem({event:D,itemId:e,keepExistingSelection:r,shouldBeSelected:D.target.checked})},y=D=>{(D.shiftKey||D.ctrlKey||D.metaKey||c)&&D.preventDefault()},C=()=>{Zn(t,Qt)&&t.isItemEditable(e)&&(t.isItemBeingEdited(e)?t.setEditedItemId(null):t.setEditedItemId(e))};return{disabled:c,expanded:u,selected:d,focused:l,editable:p,editing:m,disableSelection:s,checkboxSelection:i,handleExpansion:g,handleSelection:b,handleCheckboxSelection:T,handleContentClick:n,preventSelection:y,expansionTrigger:a,toggleItemEditing:C,handleSaveItemLabel:(D,w)=>{Zn(t,Qt)&&t.isItemBeingEditedRef(e)&&(t.updateItemLabel(e,w),C(),t.focusItem(D,e))},handleCancelItemLabelEditing:D=>{Zn(t,Qt)&&t.isItemBeingEditedRef(e)&&(C(),t.focusItem(D,e))}}}const u3=Be("div",{name:"MuiTreeItem2DragAndDropOverlay",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>We.shouldForwardProp(e)&&e!=="action"})(({theme:e})=>({position:"absolute",left:0,display:"flex",top:0,bottom:0,right:0,pointerEvents:"none",variants:[{props:{action:"make-child"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderRadius:e.shape.borderRadius,backgroundColor:e.vars?`rgba(${e.vars.palette.primary.darkChannel} / ${e.vars.palette.action.focusOpacity})`:We.alpha(e.palette.primary.dark,e.palette.action.focusOpacity)}},{props:{action:"reorder-above"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderTop:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:"reorder-below"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:"move-to-parent"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * calc(var(--TreeView-itemDepth) - 1))",borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}}]}));function l3(e){return e.action==null?null:h.jsx(u3,le({},e))}const c3=Be("input",{name:"MuiTreeItem2",slot:"LabelInput",overridesResolver:(e,t)=>t.labelInput})(({theme:e})=>le({},e.typography.body1,{width:"100%",backgroundColor:e.palette.background.paper,borderRadius:e.shape.borderRadius,border:"none",padding:"0 2px",boxSizing:"border-box","&:focus":{outline:`1px solid ${e.palette.primary.main}`}})),d3=["classes","className","displayIcon","expansionIcon","icon","label","itemId","onClick","onMouseDown","dragAndDropOverlayProps","labelInputProps"],Vf=$.forwardRef(function(t,n){const{classes:r,className:i,displayIcon:s,expansionIcon:a,icon:o,label:u,itemId:l,onClick:d,onMouseDown:c,dragAndDropOverlayProps:m,labelInputProps:p}=t,g=Cn(t,d3),{disabled:b,expanded:T,selected:y,focused:C,editing:S,editable:P,disableSelection:D,checkboxSelection:w,handleExpansion:B,handleSelection:V,handleCheckboxSelection:Q,handleContentClick:E,preventSelection:L,expansionTrigger:O,toggleItemEditing:z}=qf(l),M=o||a||s,J=$.useRef(null),oe=G=>{L(G),c&&c(G)},he=G=>{E?.(G,l),!J.current?.contains(G.target)&&(O==="content"&&B(G),w||V(G),d&&d(G))},fe=G=>{G.defaultMuiPrevented||z()};return h.jsxs("div",le({},g,{className:Ye(r.root,i,T&&r.expanded,y&&r.selected,C&&r.focused,b&&r.disabled,S&&r.editing,P&&r.editable),onClick:he,onMouseDown:oe,ref:n,children:[h.jsx("div",{className:r.iconContainer,children:M}),w&&h.jsx(Of,{className:r.checkbox,checked:y,onChange:Q,disabled:b||D,ref:J,tabIndex:-1}),S?h.jsx(c3,le({},p,{className:r.labelInput})):h.jsx("div",le({className:r.label},P&&{onDoubleClick:fe},{children:u})),m&&h.jsx(l3,le({},m))]}))}),Mc=e=>e,h3=()=>{let e=Mc;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Mc}}},f3=h3(),p3={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Yu(e,t,n="Mui"){const r=p3[t];return r?`${n}-${r}`:`${f3.generate(e)}-${t}`}function Wf(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Yu(e,i,n)}),r}function m3(e){return Yu("MuiTreeItem",e)}const gn=Wf("MuiTreeItem",["root","groupTransition","content","expanded","selected","focused","disabled","iconContainer","label","checkbox","labelInput","editable","editing","dragAndDropOverlay"]),Gf=Me(h.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),Yf=Me(h.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}));function Ku(e){const{children:t,itemId:n}=e,{wrapItem:r,instance:i}=or();return r({children:t,itemId:n,instance:i})}Ku.propTypes={children:Ul.node,itemId:Ul.string.isRequired};const g3=["children","className","slots","slotProps","ContentComponent","ContentProps","itemId","id","label","onClick","onMouseDown","onFocus","onBlur","onKeyDown"],b3=["ownerState"],E3=["ownerState"],x3=["ownerState"],y3=Mf(),T3=e=>{const{classes:t}=e;return Ff({root:["root"],content:["content"],expanded:["expanded"],selected:["selected"],focused:["focused"],disabled:["disabled"],iconContainer:["iconContainer"],checkbox:["checkbox"],label:["label"],labelInput:["labelInput"],editing:["editing"],editable:["editable"],groupTransition:["groupTransition"]},m3,t)},C3=Be("li",{name:"MuiTreeItem",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),S3=Be(Vf,{name:"MuiTreeItem",slot:"Content",overridesResolver:(e,t)=>[t.content,t.iconContainer&&{[`& .${gn.iconContainer}`]:t.iconContainer},t.label&&{[`& .${gn.label}`]:t.label}],shouldForwardProp:e=>Mn(e)&&e!=="indentationAtItemLevel"})(({theme:e})=>({padding:e.spacing(.5,1),borderRadius:e.shape.borderRadius,width:"100%",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",gap:e.spacing(1),cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${gn.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"},[`&.${gn.focused}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${gn.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${gn.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`& .${gn.iconContainer}`]:{width:16,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}},[`& .${gn.label}`]:le({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative"},e.typography.body1),[`& .${gn.checkbox}`]:{padding:0},variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:`calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`}}]})),A3=Be(Li,{name:"MuiTreeItem",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition,shouldForwardProp:e=>Mn(e)&&e!=="indentationAtItemLevel"})({margin:0,padding:0,paddingLeft:"var(--TreeView-itemChildrenIndentation)",variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:0}}]}),k3=$.forwardRef(function(t,n){const{icons:r,runItemPlugins:i,items:{disabledItemsFocusable:s,indentationAtItemLevel:a},selection:{disableSelection:o},expansion:{expansionTrigger:u},treeId:l,instance:d}=or(),c=$.useContext(Wu),m=y3({props:t,name:"MuiTreeItem"}),{children:p,className:g,slots:b,slotProps:T,ContentComponent:y=Vf,ContentProps:C,itemId:S,id:P,label:D,onClick:w,onMouseDown:B,onBlur:V,onKeyDown:Q}=m,E=Cn(m,g3),{expanded:L,focused:O,selected:z,disabled:M,editing:J,handleExpansion:oe,handleCancelItemLabelEditing:he,handleSaveItemLabel:fe}=qf(S),{contentRef:G,rootRef:_,propsEnhancers:Ee}=i(m),ue=$.useRef(null),I=$.useRef(null),de=Rr(n,_,ue),pe=Rr(C?.ref,G,I),q={expandIcon:b?.expandIcon??r.slots.expandIcon??Gf,collapseIcon:b?.collapseIcon??r.slots.collapseIcon??Yf,endIcon:b?.endIcon??r.slots.endIcon,icon:b?.icon,groupTransition:b?.groupTransition},re=ae=>Array.isArray(ae)?ae.length>0&&ae.some(re):!!ae,te=re(p),we=le({},m,{expanded:L,focused:O,selected:z,disabled:M,indentationAtItemLevel:a}),ne=T3(we),U=q.groupTransition??void 0,xe=Qn({elementType:U,ownerState:{},externalSlotProps:T?.groupTransition,additionalProps:le({unmountOnExit:!0,in:L,component:"ul",role:"group"},a?{indentationAtItemLevel:!0}:{}),className:ne.groupTransition}),je=ae=>{u==="iconContainer"&&oe(ae)},ce=L?q.collapseIcon:q.expandIcon,zt=Qn({elementType:ce,ownerState:{},externalSlotProps:ae=>L?le({},En(r.slotProps.collapseIcon,ae),En(T?.collapseIcon,ae)):le({},En(r.slotProps.expandIcon,ae),En(T?.expandIcon,ae)),additionalProps:{onClick:je}}),yt=Cn(zt,b3),Ce=te&&ce?h.jsx(ce,le({},yt)):null,st=te?void 0:q.endIcon,at=Qn({elementType:st,ownerState:{},externalSlotProps:ae=>te?{}:le({},En(r.slotProps.endIcon,ae),En(T?.endIcon,ae))}),Xe=Cn(at,E3),rn=st?h.jsx(st,le({},Xe)):null,se=q.icon,Xr=Qn({elementType:se,ownerState:{},externalSlotProps:T?.icon}),Zr=Cn(Xr,x3),ze=se?h.jsx(se,le({},Zr)):null;let H;z?H=!0:o||M?H=void 0:H=!1;function ee(ae){!O&&(!M||s)&&ae.currentTarget===ae.target&&d.focusItem(ae,S)}function ge(ae){V?.(ae),!(J||ae.relatedTarget&&Fi(ae.relatedTarget,ue.current)&&(ae.target&&ae.target?.dataset?.element==="labelInput"&&Fi(ae.target,ue.current)||ae.relatedTarget?.dataset?.element==="labelInput"))&&d.removeFocusedItem()}const Se=ae=>{Q?.(ae),ae.target?.dataset?.element!=="labelInput"&&d.handleItemKeyDown(ae,S)},ve=Gu({itemId:S,treeId:l,id:P}),Tt=d.canItemBeTabbed(S)?0:-1,ct={rootRefObject:ue,contentRefObject:I,interactions:{handleSaveItemLabel:fe,handleCancelItemLabelEditing:he}},wt=Ee.root?.(le({},ct,{externalEventHandlers:Vt(E)}))??{},$t=Ee.content?.(le({},ct,{externalEventHandlers:Vt(C)}))??{},K=Ee.dragAndDropOverlay?.(le({},ct,{externalEventHandlers:{}}))??{},ie=Ee.labelInput?.(le({},ct,{externalEventHandlers:{}}))??{};return h.jsx(Ku,{itemId:S,children:h.jsxs(C3,le({className:Ye(ne.root,g),role:"treeitem","aria-expanded":te?L:void 0,"aria-selected":H,"aria-disabled":M||void 0,id:ve,tabIndex:Tt},E,{ownerState:we,onFocus:ee,onBlur:ge,onKeyDown:Se,ref:de,style:a?le({},E.style,{"--TreeView-itemDepth":typeof c=="function"?c(S):c}):E.style},wt,{children:[h.jsx(S3,le({as:y,classes:{root:ne.content,expanded:ne.expanded,selected:ne.selected,focused:ne.focused,disabled:ne.disabled,editable:ne.editable,editing:ne.editing,iconContainer:ne.iconContainer,label:ne.label,labelInput:ne.labelInput,checkbox:ne.checkbox},label:D,itemId:S,onClick:w,onMouseDown:B,icon:ze,expansionIcon:Ce,displayIcon:rn,ownerState:we},C,$t,K.action==null?{}:{dragAndDropOverlayProps:K},ie.value==null?{}:{labelInputProps:ie},{ref:pe})),p&&h.jsx(A3,le({as:U},xe,{children:p}))]}))})});function I3(e){const{slots:t,slotProps:n,status:r}=e,i=or(),s=le({},i.icons.slots,{expandIcon:i.icons.slots.expandIcon??Gf,collapseIcon:i.icons.slots.collapseIcon??Yf}),a=i.icons.slotProps;let o;t?.icon?o="icon":r.expandable?r.expanded?o="collapseIcon":o="expandIcon":o="endIcon";const u=t?.[o]??s[o],l=Qn({elementType:u,externalSlotProps:d=>le({},En(a[o],d),En(n?.[o],d)),ownerState:{}});return u?h.jsx(u,le({},l)):null}const _3=["visible"],v3=Be("li",{name:"MuiTreeItem2",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),D3=Be("div",{name:"MuiTreeItem2",slot:"Content",overridesResolver:(e,t)=>t.content,shouldForwardProp:e=>Mn(e)&&e!=="status"&&e!=="indentationAtItemLevel"})(({theme:e})=>({padding:e.spacing(.5,1),borderRadius:e.shape.borderRadius,width:"100%",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",gap:e.spacing(1),cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:`calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`}},{props:({status:t})=>t.disabled,style:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"}},{props:({status:t})=>t.focused,style:{backgroundColor:(e.vars||e).palette.action.focus}},{props:({status:t})=>t.selected,style:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},{props:({status:t})=>t.selected&&t.focused,style:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}]})),w3=Be("div",{name:"MuiTreeItem2",slot:"Label",overridesResolver:(e,t)=>t.label,shouldForwardProp:e=>Mn(e)&&e!=="editable"})(({theme:e})=>le({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative",overflow:"hidden"},e.typography.body1,{variants:[{props:({editable:t})=>t,style:{paddingLeft:"2px"}}]})),P3=Be("div",{name:"MuiTreeItem2",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})({width:16,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}});Be(Li,{name:"MuiTreeItem2",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition,shouldForwardProp:e=>Mn(e)&&e!=="indentationAtItemLevel"})({margin:0,padding:0,paddingLeft:"var(--TreeView-itemChildrenIndentation)",variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:0}}]});Be($.forwardRef((e,t)=>{const{visible:n}=e,r=Cn(e,_3);return n?h.jsx(Of,le({},r,{ref:t})):null}),{name:"MuiTreeItem2",slot:"Checkbox",overridesResolver:(e,t)=>t.checkbox})({padding:0});function N3(e){return Yu("MuiRichTreeView",e)}Wf("MuiRichTreeView",["root"]);const R3=(e,t)=>{const n=$.useRef({}),[r,i]=$.useState(()=>{const a={};return e.forEach(o=>{o.models&&Object.entries(o.models).forEach(([u,l])=>{n.current[u]={isControlled:t[u]!==void 0,getDefaultValue:l.getDefaultValue},a[u]=l.getDefaultValue(t)})}),a});return Object.fromEntries(Object.entries(n.current).map(([a,o])=>{const u=t[a]??r[a];return[a,{value:u,setControlledValue:l=>{o.isControlled||i(d=>le({},d,{[a]:l}))}}]}))};class L3{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,n,r={}){let i=this.events[t];i||(i={highPriority:new Map,regular:new Map},this.events[t]=i),r.isFirst?i.highPriority.set(n,!0):i.regular.set(n,!0)}removeListener(t,n){this.events[t]&&(this.events[t].regular.delete(n),this.events[t].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(t,...n){const r=this.events[t];if(!r)return;const i=Array.from(r.highPriority.keys()),s=Array.from(r.regular.keys());for(let a=i.length-1;a>=0;a-=1){const o=i[a];r.highPriority.has(o)&&o.apply(this,n)}for(let a=0;a<s.length;a+=1){const o=s[a];r.regular.has(o)&&o.apply(this,n)}}once(t,n){const r=this;this.on(t,function i(...s){r.removeListener(t,i),n.apply(r,s)})}}const O3=e=>e.isPropagationStopped!==void 0,Kf=()=>{const[e]=$.useState(()=>new L3),t=$.useCallback((...r)=>{const[i,s,a={}]=r;a.defaultMuiPrevented=!1,!(O3(a)&&a.isPropagationStopped())&&e.emit(i,s,a)},[e]),n=$.useCallback((r,i)=>(e.on(r,i),()=>{e.removeListener(r,i)}),[e]);return{instance:{$$publishEvent:t,$$subscribeEvent:n}}};Kf.params={};const Qf=({plugins:e})=>{const t=new Set(e);return{instance:{getAvailablePlugins:()=>t}}};Qf.params={};const Qu=({params:e,state:t,setState:n})=>{$.useEffect(()=>{n(i=>i.id.treeId===e.id&&i.id.treeId!==void 0?i:le({},i,{id:le({},i.id,{treeId:e.id??s3()})}))},[n,e.id]);const r=e.id??t.id.treeId;return{getRootProps:()=>({id:r}),contextValue:{treeId:r}}};Qu.params={id:!0};Qu.getInitialState=({id:e})=>({id:{treeId:e??void 0}});const F3=[Kf,Qf,Qu],M3=["slots","slotProps","apiRef","experimentalFeatures"],B3=e=>{let{props:{slots:t,slotProps:n,apiRef:r,experimentalFeatures:i},plugins:s}=e,a=Cn(e.props,M3);const o={};s.forEach(m=>{Object.assign(o,m.params)});const u={},l={};Object.keys(a).forEach(m=>{const p=a[m];o[m]?u[m]=p:l[m]=p});const d=i??{},c=s.reduce((m,p)=>p.getDefaultizedParams?p.getDefaultizedParams({params:m,experimentalFeatures:d}):m,u);return{apiRef:r,forwardedProps:l,pluginParams:c,slots:t??{},slotProps:n??{},experimentalFeatures:d}},j3=({plugins:e,instance:t,publicAPI:n,rootRef:r})=>({runItemPlugins:o=>{let u=null,l=null;const d=[],c={};e.forEach(g=>{if(!g.itemPlugin)return;const b=g.itemPlugin({props:o,rootRef:u,contentRef:l});b?.rootRef&&(u=b.rootRef),b?.contentRef&&(l=b.contentRef),b?.propsEnhancers&&(d.push(b.propsEnhancers),Object.keys(b.propsEnhancers).forEach(T=>{c[T]=!0}))});const m=g=>b=>{const T={};return d.forEach(y=>{const C=y[g];C!=null&&Object.assign(T,C(b))}),T},p=Object.fromEntries(Object.keys(c).map(g=>[g,m(g)]));return{contentRef:l,rootRef:u,propsEnhancers:p}},wrapItem:({itemId:o,children:u})=>{let l=u;for(let d=e.length-1;d>=0;d-=1){const c=e[d];c.wrapItem&&(l=c.wrapItem({itemId:o,children:l,instance:t}))}return l},wrapRoot:({children:o})=>{let u=o;for(let l=e.length-1;l>=0;l-=1){const d=e[l];d.wrapRoot&&(u=d.wrapRoot({children:u,instance:t}))}return u},instance:t,rootRef:r,publicAPI:n});function H3(e){const t=$.useRef({});return e?(e.current==null&&(e.current={}),e.current):t.current}const U3=({plugins:e,rootRef:t,props:n})=>{const r=[...F3,...e],{pluginParams:i,forwardedProps:s,apiRef:a,experimentalFeatures:o,slots:u,slotProps:l}=B3({plugins:r,props:n}),d=R3(r,i),m=$.useRef({}).current,p=H3(a),g=$.useRef(null),b=Rr(g,t),T=j3({plugins:r,instance:m,publicAPI:p,rootRef:g}),[y,C]=$.useState(()=>{const w={};return r.forEach(B=>{B.getInitialState&&Object.assign(w,B.getInitialState(i))}),w}),S=[],P=w=>{const B=w({instance:m,params:i,slots:u,slotProps:l,experimentalFeatures:o,state:y,setState:C,rootRef:g,models:d,plugins:r});B.getRootProps&&S.push(B.getRootProps),B.publicAPI&&Object.assign(p,B.publicAPI),B.instance&&Object.assign(m,B.instance),B.contextValue&&Object.assign(T,B.contextValue)};return r.forEach(P),{getRootProps:(w={})=>{const B=le({role:"tree"},s,w,{ref:b});return S.forEach(V=>{Object.assign(B,V(w))}),B},rootRef:b,contextValue:T,instance:m}},z3=(e,t,n)=>{e.$$publishEvent(t,n)},Cr="__TREE_VIEW_ROOT_PARENT_ID__",$3=e=>{const t={};return e.forEach((n,r)=>{t[n]=r}),t},q3=["children"],Xf=({items:e,isItemDisabled:t,getItemLabel:n,getItemId:r})=>{const i={},s={},a={[Cr]:[]},o=(l,d,c)=>{const m=r?r(l):l.id;if(m==null)throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.","An item was provided without id in the `items` prop:",JSON.stringify(l)].join(`
108
+ `,Ry=$.forwardRef(function(t,n){const r=Br({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:s={},className:a,...o}=r,[u,l]=$.useState([]),d=$.useRef(0),c=$.useRef(null);$.useEffect(()=>{c.current&&(c.current(),c.current=null)},[u]);const m=$.useRef(!1),p=Bf(),g=$.useRef(null),b=$.useRef(null),T=$.useCallback(N=>{const{pulsate:D,rippleX:w,rippleY:B,rippleSize:V,cb:Q}=N;l(E=>[...E,h.jsx(Py,{classes:{ripple:Ye(s.ripple,Wt.ripple),rippleVisible:Ye(s.rippleVisible,Wt.rippleVisible),ripplePulsate:Ye(s.ripplePulsate,Wt.ripplePulsate),child:Ye(s.child,Wt.child),childLeaving:Ye(s.childLeaving,Wt.childLeaving),childPulsate:Ye(s.childPulsate,Wt.childPulsate)},timeout:Yo,pulsate:D,rippleX:w,rippleY:B,rippleSize:V},d.current)]),d.current+=1,c.current=Q},[s]),y=$.useCallback((N={},D={},w=()=>{})=>{const{pulsate:B=!1,center:V=i||D.pulsate,fakeElement:Q=!1}=D;if(N?.type==="mousedown"&&m.current){m.current=!1;return}N?.type==="touchstart"&&(m.current=!0);const E=Q?null:b.current,L=E?E.getBoundingClientRect():{width:0,height:0,left:0,top:0};let O,z,M;if(V||N===void 0||N.clientX===0&&N.clientY===0||!N.clientX&&!N.touches)O=Math.round(L.width/2),z=Math.round(L.height/2);else{const{clientX:J,clientY:oe}=N.touches&&N.touches.length>0?N.touches[0]:N;O=Math.round(J-L.left),z=Math.round(oe-L.top)}if(V)M=Math.sqrt((2*L.width**2+L.height**2)/3),M%2===0&&(M+=1);else{const J=Math.max(Math.abs((E?E.clientWidth:0)-O),O)*2+2,oe=Math.max(Math.abs((E?E.clientHeight:0)-z),z)*2+2;M=Math.sqrt(J**2+oe**2)}N?.touches?g.current===null&&(g.current=()=>{T({pulsate:B,rippleX:O,rippleY:z,rippleSize:M,cb:w})},p.start(_y,()=>{g.current&&(g.current(),g.current=null)})):T({pulsate:B,rippleX:O,rippleY:z,rippleSize:M,cb:w})},[i,T,p]),C=$.useCallback(()=>{y({},{pulsate:!0})},[y]),S=$.useCallback((N,D)=>{if(p.clear(),N?.type==="touchend"&&g.current){g.current(),g.current=null,p.start(0,()=>{S(N,D)});return}g.current=null,l(w=>w.length>0?w.slice(1):w),c.current=D},[p]);return $.useImperativeHandle(n,()=>({pulsate:C,start:y,stop:S}),[C,y,S]),h.jsx(Ny,{className:Ye(Wt.root,s.root,a),ref:b,...o,children:h.jsx(Vu,{component:null,exit:!0,children:u})})});function Ly(e){return Mr("MuiButtonBase",e)}const Oy=jr("MuiButtonBase",["root","disabled","focusVisible"]),Fy=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,a=Hi({root:["root",t&&"disabled",n&&"focusVisible"]},Ly,i);return n&&r&&(a.root+=` ${r}`),a},My=Be("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Oy.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),By=$.forwardRef(function(t,n){const r=Br({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:s=!1,children:a,className:o,component:u="button",disabled:l=!1,disableRipple:d=!1,disableTouchRipple:c=!1,focusRipple:m=!1,focusVisibleClassName:p,LinkComponent:g="a",onBlur:b,onClick:T,onContextMenu:y,onDragLeave:C,onFocus:S,onFocusVisible:N,onKeyDown:D,onKeyUp:w,onMouseDown:B,onMouseLeave:V,onMouseUp:Q,onTouchEnd:E,onTouchMove:L,onTouchStart:O,tabIndex:z=0,TouchRippleProps:M,touchRippleRef:J,type:oe,...he}=r,fe=$.useRef(null),G=Ay(),_=Os(G.ref,J),[Ee,ue]=$.useState(!1);l&&Ee&&ue(!1),$.useImperativeHandle(i,()=>({focusVisible:()=>{ue(!0),fe.current.focus()}}),[]);const I=G.shouldMount&&!d&&!l;$.useEffect(()=>{Ee&&m&&!d&&G.pulsate()},[d,m,Ee,G]);const de=mn(G,"start",B,c),pe=mn(G,"stop",y,c),q=mn(G,"stop",C,c),re=mn(G,"stop",Q,c),te=mn(G,"stop",se=>{Ee&&se.preventDefault(),V&&V(se)},c),we=mn(G,"start",O,c),ne=mn(G,"stop",E,c),U=mn(G,"stop",L,c),xe=mn(G,"stop",se=>{Pc(se.target)||ue(!1),b&&b(se)},!1),je=xs(se=>{fe.current||(fe.current=se.currentTarget),Pc(se.target)&&(ue(!0),N&&N(se)),S&&S(se)}),ce=()=>{const se=fe.current;return u&&u!=="button"&&!(se.tagName==="A"&&se.href)},zt=xs(se=>{m&&!se.repeat&&Ee&&se.key===" "&&G.stop(se,()=>{G.start(se)}),se.target===se.currentTarget&&ce()&&se.key===" "&&se.preventDefault(),D&&D(se),se.target===se.currentTarget&&ce()&&se.key==="Enter"&&!l&&(se.preventDefault(),T&&T(se))}),yt=xs(se=>{m&&se.key===" "&&Ee&&!se.defaultPrevented&&G.stop(se,()=>{G.pulsate(se)}),w&&w(se),T&&se.target===se.currentTarget&&ce()&&se.key===" "&&!se.defaultPrevented&&T(se)});let Ce=u;Ce==="button"&&(he.href||he.to)&&(Ce=g);const st={};Ce==="button"?(st.type=oe===void 0?"button":oe,st.disabled=l):(!he.href&&!he.to&&(st.role="button"),l&&(st["aria-disabled"]=l));const at=Os(n,fe),Xe={...r,centerRipple:s,component:u,disabled:l,disableRipple:d,disableTouchRipple:c,focusRipple:m,tabIndex:z,focusVisible:Ee},rn=Fy(Xe);return h.jsxs(My,{as:Ce,className:Ye(rn.root,o),ownerState:Xe,onBlur:xe,onClick:T,onContextMenu:pe,onFocus:je,onKeyDown:zt,onKeyUp:yt,onMouseDown:de,onMouseLeave:te,onMouseUp:re,onDragLeave:q,onTouchEnd:ne,onTouchMove:U,onTouchStart:we,ref:at,tabIndex:l?-1:z,type:oe,...st,...he,children:[a,I?h.jsx(Ry,{ref:_,center:s,...M}):null]})});function mn(e,t,n,r=!1){return xs(i=>(n&&n(i),r||e[t](i),!0))}function jy(e){return Mr("PrivateSwitchBase",e)}jr("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);function Hy(e){return typeof e=="string"}function Uy(e,t,n){return e===void 0||Hy(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function zy(e,t,n){return typeof e=="function"?e(t,n):e}function $y(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Rc(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function qy(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:s}=e;if(!t){const p=Ye(n?.className,s,i?.className,r?.className),g={...n?.style,...i?.style,...r?.style},b={...n,...i,...r};return p.length>0&&(b.className=p),Object.keys(g).length>0&&(b.style=g),{props:b,internalRef:void 0}}const a=$y({...i,...r}),o=Rc(r),u=Rc(i),l=t(a),d=Ye(l?.className,n?.className,s,i?.className,r?.className),c={...l?.style,...n?.style,...i?.style,...r?.style},m={...l,...n,...u,...o};return d.length>0&&(m.className=d),Object.keys(c).length>0&&(m.style=c),{props:m,internalRef:l.ref}}function Ko(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:s,internalForwardedProps:a,shouldForwardComponentProp:o=!1,...u}=t,{component:l,slots:d={[e]:void 0},slotProps:c={[e]:void 0},...m}=s,p=d[e]||r,g=zy(c[e],i),{props:{component:b,...T},internalRef:y}=qy({className:n,...u,externalForwardedProps:e==="root"?m:void 0,externalSlotProps:g}),C=Os(y,g?.ref,t.ref),S=e==="root"?b||l:b,N=Uy(p,{...e==="root"&&!l&&!d[e]&&a,...e!=="root"&&!d[e]&&a,...T,...S&&!o&&{as:S},...S&&o&&{component:S},ref:C},i);return[p,N]}const Vy=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,s={root:["root",n&&"checked",r&&"disabled",i&&`edge${tn(i)}`],input:["input"]};return Hi(s,jy,t)},Wy=Be(By)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),Gy=Be("input",{shouldForwardProp:_u})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Yy=$.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:s,defaultChecked:a,disabled:o,disableFocusRipple:u=!1,edge:l=!1,icon:d,id:c,inputProps:m,inputRef:p,name:g,onBlur:b,onChange:T,onFocus:y,readOnly:C,required:S=!1,tabIndex:N,type:D,value:w,slots:B={},slotProps:V={},...Q}=t,[E,L]=db({controlled:i,default:!!a}),O=Sy(),z=pe=>{y&&y(pe),O&&O.onFocus&&O.onFocus(pe)},M=pe=>{b&&b(pe),O&&O.onBlur&&O.onBlur(pe)},J=pe=>{if(pe.nativeEvent.defaultPrevented)return;const q=pe.target.checked;L(q),T&&T(pe,q)};let oe=o;O&&typeof oe>"u"&&(oe=O.disabled);const he=D==="checkbox"||D==="radio",fe={...t,checked:E,disabled:oe,disableFocusRipple:u,edge:l},G=Vy(fe),_={slots:B,slotProps:{input:m,...V}},[Ee,ue]=Ko("root",{ref:n,elementType:Wy,className:G.root,shouldForwardComponentProp:!0,externalForwardedProps:{..._,component:"span",...Q},getSlotProps:pe=>({...pe,onFocus:q=>{pe.onFocus?.(q),z(q)},onBlur:q=>{pe.onBlur?.(q),M(q)}}),ownerState:fe,additionalProps:{centerRipple:!0,focusRipple:!u,disabled:oe,role:void 0,tabIndex:null}}),[I,de]=Ko("input",{ref:p,elementType:Gy,className:G.input,externalForwardedProps:_,getSlotProps:pe=>({...pe,onChange:q=>{pe.onChange?.(q),J(q)}}),ownerState:fe,additionalProps:{autoFocus:r,checked:i,defaultChecked:a,disabled:oe,id:he?c:void 0,name:g,readOnly:C,required:S,tabIndex:N,type:D,...D==="checkbox"&&w===void 0?{}:{value:w}}});return h.jsxs(Ee,{...ue,children:[h.jsx(I,{...de}),E?s:d]})}),Ky=Oe(h.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),Qy=Oe(h.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),Xy=Oe(h.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}));function Zy(e){return Mr("MuiCheckbox",e)}const Ja=jr("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);function Jy(e){return typeof e.main=="string"}function e3(e,t=[]){if(!Jy(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Lc(e=[]){return([,t])=>t&&e3(t,e)}const t3=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,s={root:["root",n&&"indeterminate",`color${tn(r)}`,`size${tn(i)}`]},a=Hi(s,Zy,t);return{...t,...a}},n3=Be(Yy,{shouldForwardProp:e=>_u(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${tn(n.size)}`],n.color!=="default"&&t[`color${tn(n.color)}`]]}})(vu(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:wo(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Lc()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:wo(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Lc()).map(([t])=>({props:{color:t},style:{[`&.${Ja.checked}, &.${Ja.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${Ja.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),r3=h.jsx(Qy,{}),i3=h.jsx(Ky,{}),s3=h.jsx(Xy,{}),jf=$.forwardRef(function(t,n){const r=Br({props:t,name:"MuiCheckbox"}),{checkedIcon:i=r3,color:s="primary",icon:a=i3,indeterminate:o=!1,indeterminateIcon:u=s3,inputProps:l,size:d="medium",disableRipple:c=!1,className:m,slots:p={},slotProps:g={},...b}=r,T=o?u:a,y=o?u:i,C={...r,disableRipple:c,color:s,indeterminate:o,size:d},S=t3(C),N=g.input??l,[D,w]=Ko("root",{ref:n,elementType:n3,className:Ye(S.root,m),shouldForwardComponentProp:!0,externalForwardedProps:{slots:p,slotProps:g,...b},ownerState:C,additionalProps:{type:"checkbox",icon:$.cloneElement(T,{fontSize:T.props.fontSize??d}),checkedIcon:$.cloneElement(y,{fontSize:y.props.fontSize??d}),disableRipple:c,slots:p,slotProps:{input:fb(typeof N=="function"?N(C):N,{"data-indeterminate":o})}}});return h.jsx(D,{...w,classes:S})});function Rr(...e){const t=$.useRef(void 0),n=$.useCallback(r=>{const i=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const a=s,o=a(r);return typeof o=="function"?o:()=>{a(null)}}return s.current=r,()=>{s.current=null}});return()=>{i.forEach(s=>s?.())}},e);return $.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function a3(e){return typeof e=="string"}function o3(e,t,n){return e===void 0||a3(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Vt(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Oc(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function u3(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:s}=e;if(!t){const p=Ye(n?.className,s,i?.className,r?.className),g={...n?.style,...i?.style,...r?.style},b={...n,...i,...r};return p.length>0&&(b.className=p),Object.keys(g).length>0&&(b.style=g),{props:b,internalRef:void 0}}const a=Vt({...i,...r}),o=Oc(r),u=Oc(i),l=t(a),d=Ye(l?.className,n?.className,s,i?.className,r?.className),c={...l?.style,...n?.style,...i?.style,...r?.style},m={...l,...n,...u,...o};return d.length>0&&(m.className=d),Object.keys(c).length>0&&(m.style=c),{props:m,internalRef:l.ref}}function En(e,t,n){return typeof e=="function"?e(t,n):e}function Qn(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...s}=e,a=i?{}:En(n,r),{props:o,internalRef:u}=u3({...s,externalSlotProps:a}),l=Rr(u,a?.ref,e.additionalProps?.ref);return o3(t,{...o,ref:l},r)}function Hf(e,t,n=void 0){const r={};for(const i in e){const s=e[i];let a="",o=!0;for(let u=0;u<s.length;u+=1){const l=s[u];l&&(a+=(o===!0?"":" ")+t(l),o=!1,n&&n[l]&&(a+=" "+n[l]))}r[i]=a}return r}function Uf(e){return oy}const zf=$.createContext(null);function l3(e){const{value:t,children:n}=e;return h.jsx(zf.Provider,{value:t,children:t.wrapRoot({children:n,instance:t.instance})})}const or=()=>{const e=$.useContext(zf);if(e==null)throw new Error(["MUI X: Could not find the Tree View context.","It looks like you rendered your component outside of a SimpleTreeView or RichTreeView parent component.","This can also happen if you are bundling multiple versions of the Tree View."].join(`
109
+ `));return e},c3=({props:e})=>{const{instance:t}=or(),{label:n,itemId:r}=e,[i,s]=$.useState(n),a=t.isItemBeingEdited(r);return $.useEffect(()=>{a||s(n)},[a,n]),{propsEnhancers:{labelInput:({externalEventHandlers:o,interactions:u})=>t.isItemEditable(r)?{value:i??"","data-element":"labelInput",onChange:p=>{o.onChange?.(p),s(p.target.value)},onKeyDown:p=>{if(o.onKeyDown?.(p),p.defaultMuiPrevented)return;const g=p.target;p.key==="Enter"&&g.value?u.handleSaveItemLabel(p,g.value):p.key==="Escape"&&u.handleCancelItemLabelEditing(p)},onBlur:p=>{o.onBlur?.(p),!p.defaultMuiPrevented&&p.target.value&&u.handleSaveItemLabel(p,p.target.value)},autoFocus:!0,type:"text"}:{}}}},Qt=({instance:e,state:t,setState:n,params:r})=>{const i=$.useRef(t.editedItemId),s=c=>i.current===c,a=c=>{n(m=>le({},m,{editedItemId:c})),i.current=c},o=c=>c===t.editedItemId,u=!!r.isItemEditable,l=c=>{if(c==null||!u)return!1;const m=e.getItem(c);return m?typeof r.isItemEditable=="function"?r.isItemEditable(m):!!r.isItemEditable:!1},d=(c,m)=>{if(!m)throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.","The label of an item cannot be empty.",c].join(`
110
+ `));n(p=>{const g=p.items.itemMetaMap[c];return g.label!==m?le({},p,{items:le({},p.items,{itemMetaMap:le({},p.items.itemMetaMap,{[c]:le({},g,{label:m})})})}):p}),r.onItemLabelChange&&r.onItemLabelChange(c,m)};return{instance:{setEditedItemId:a,isItemBeingEdited:o,updateItemLabel:d,isItemEditable:l,isTreeViewEditable:u,isItemBeingEditedRef:s},publicAPI:{updateItemLabel:d}}};Qt.itemPlugin=c3;Qt.getDefaultizedParams=({params:e,experimentalFeatures:t})=>{const n=t?.labelEditing;return le({},e,{isItemEditable:n?e.isItemEditable??!1:!1})};Qt.getInitialState=()=>({editedItemId:null});Qt.params={onItemLabelChange:!0,isItemEditable:!0};const Zn=(e,t)=>e.getAvailablePlugins().has(t),$f=e=>Array.isArray(e)?e.length>0&&e.some($f):!!e,d3=({itemId:e,children:t})=>{const{instance:n,selection:{multiSelect:r},publicAPI:i}=or(),s={expandable:$f(t),expanded:n.isItemExpanded(e),focused:n.isItemFocused(e),selected:n.isItemSelected(e),disabled:n.isItemDisabled(e),editing:n?.isItemBeingEdited?n?.isItemBeingEdited(e):!1,editable:n.isItemEditable?n.isItemEditable(e):!1},a=p=>{if(s.disabled)return;s.focused||n.focusItem(p,e);const g=r&&(p.shiftKey||p.ctrlKey||p.metaKey);s.expandable&&!(g&&n.isItemExpanded(e))&&n.toggleItemExpansion(p,e)},o=p=>{if(s.disabled)return;s.focused||n.focusItem(p,e),r&&(p.shiftKey||p.ctrlKey||p.metaKey)?p.shiftKey?n.expandSelectionRange(p,e):n.selectItem({event:p,itemId:e,keepExistingSelection:!0}):n.selectItem({event:p,itemId:e,shouldBeSelected:!0})},u=p=>{const g=p.nativeEvent.shiftKey;r&&g?n.expandSelectionRange(p,e):n.selectItem({event:p,itemId:e,keepExistingSelection:r,shouldBeSelected:p.target.checked})},l=()=>{Zn(n,Qt)&&n.isItemEditable(e)&&(n.isItemBeingEdited(e)?n.setEditedItemId(null):n.setEditedItemId(e))};return{interactions:{handleExpansion:a,handleSelection:o,handleCheckboxSelection:u,toggleItemEditing:l,handleSaveItemLabel:(p,g)=>{Zn(n,Qt)&&n.isItemBeingEditedRef(e)&&(n.updateItemLabel(e,g),l(),n.focusItem(p,e))},handleCancelItemLabelEditing:p=>{Zn(n,Qt)&&n.isItemBeingEditedRef(e)&&(l(),n.focusItem(p,e))}},status:s,publicAPI:i}},Gu=$.createContext(()=>-1),qf=(e,t)=>{let n=t.length-1;for(;n>=0&&!e.isItemNavigable(t[n]);)n-=1;if(n!==-1)return t[n]},Vf=(e,t)=>{const n=e.getItemMeta(t),r=e.getItemOrderedChildrenIds(n.parentId),i=e.getItemIndex(t);if(i===0)return n.parentId;let s=i-1;for(;!e.isItemNavigable(r[s])&&s>=0;)s-=1;if(s===-1)return n.parentId==null?null:Vf(e,n.parentId);let a=r[s],o=qf(e,e.getItemOrderedChildrenIds(a));for(;e.isItemExpanded(a)&&o!=null;)a=o,o=e.getItemOrderedChildrenIds(a).find(e.isItemNavigable);return a},Cs=(e,t)=>{if(e.isItemExpanded(t)){const r=e.getItemOrderedChildrenIds(t).find(e.isItemNavigable);if(r!=null)return r}let n=e.getItemMeta(t);for(;n!=null;){const r=e.getItemOrderedChildrenIds(n.parentId),i=e.getItemIndex(n.id);if(i<r.length-1){let s=i+1;for(;!e.isItemNavigable(r[s])&&s<r.length-1;)s+=1;if(e.isItemNavigable(r[s]))return r[s]}n=e.getItemMeta(n.parentId)}return null},Wf=e=>{let t=null;for(;t==null||e.isItemExpanded(t);){const n=e.getItemOrderedChildrenIds(t),r=qf(e,n);if(r==null)return t;t=r}return t},Oi=e=>e.getItemOrderedChildrenIds(null).find(e.isItemNavigable),Gf=(e,t,n)=>{if(t===n)return[t,n];const r=e.getItemMeta(t),i=e.getItemMeta(n);if(r.parentId===i.id||i.parentId===r.id)return i.parentId===r.id?[r.id,i.id]:[i.id,r.id];const s=[r.id],a=[i.id];let o=r.parentId,u=i.parentId,l=a.indexOf(o)!==-1,d=s.indexOf(u)!==-1,c=!0,m=!0;for(;!d&&!l;)c&&(s.push(o),l=a.indexOf(o)!==-1,c=o!==null,!l&&c&&(o=e.getItemMeta(o).parentId)),m&&!l&&(a.push(u),d=s.indexOf(u)!==-1,m=u!==null,!d&&m&&(u=e.getItemMeta(u).parentId));const p=l?o:u,g=e.getItemOrderedChildrenIds(p),b=s[s.indexOf(p)-1],T=a[a.indexOf(p)-1];return g.indexOf(b)<g.indexOf(T)?[t,n]:[n,t]},h3=(e,t,n)=>{const r=u=>{if(e.isItemExpandable(u)&&e.isItemExpanded(u))return e.getItemOrderedChildrenIds(u)[0];let l=e.getItemMeta(u);for(;l!=null;){const d=e.getItemOrderedChildrenIds(l.parentId),c=e.getItemIndex(l.id);if(c<d.length-1)return d[c+1];l=e.getItemMeta(l.parentId)}throw new Error("Invalid range")},[i,s]=Gf(e,t,n),a=[i];let o=i;for(;o!==s;)o=r(o),e.isItemDisabled(o)||a.push(o);return a},f3=e=>{let t=Oi(e);const n=[];for(;t!=null;)n.push(t),t=Cs(e,t);return n},Fi=(e,t)=>t!==e.closest('*[role="treeitem"]');let Fc=0;const p3=()=>(Fc+=1,`mui-tree-view-${Fc}`),Yu=({id:e,treeId:t="",itemId:n})=>e??`${t}-${n}`,m3=e=>{const{runItemPlugins:t,items:{onItemClick:n,disabledItemsFocusable:r,indentationAtItemLevel:i},selection:{disableSelection:s,checkboxSelection:a},expansion:{expansionTrigger:o},treeId:u,instance:l,publicAPI:d}=or(),c=$.useContext(Gu),{id:m,itemId:p,label:g,children:b,rootRef:T}=e,{rootRef:y,contentRef:C,propsEnhancers:S}=t(e),{interactions:N,status:D}=d3({itemId:p,children:b}),w=$.useRef(null),B=$.useRef(null),V=Rr(T,y,w),Q=Rr(C,B),E=$.useRef(null),L=Yu({itemId:p,treeId:u,id:m}),O=l.canItemBeTabbed(p)?0:-1,z={rootRefObject:w,contentRefObject:B,interactions:N},M=ne=>U=>{if(ne.onFocus?.(U),U.defaultMuiPrevented)return;const xe=!D.disabled||r;!D.focused&&xe&&U.currentTarget===U.target&&l.focusItem(U,p)},J=ne=>U=>{if(ne.onBlur?.(U),U.defaultMuiPrevented)return;const xe=l.getItemDOMElement(p);D.editing||U.relatedTarget&&Fi(U.relatedTarget,xe)&&(U.target&&U.target?.dataset?.element==="labelInput"&&Fi(U.target,xe)||U.relatedTarget?.dataset?.element==="labelInput")||l.removeFocusedItem()},oe=ne=>U=>{ne.onKeyDown?.(U),!(U.defaultMuiPrevented||U.target?.dataset?.element==="labelInput")&&l.handleItemKeyDown(U,p)},he=ne=>U=>{ne.onDoubleClick?.(U),!U.defaultMuiPrevented&&N.toggleItemEditing()},fe=ne=>U=>{ne.onClick?.(U),n?.(U,p),!(U.defaultMuiPrevented||E.current?.contains(U.target))&&(o==="content"&&N.handleExpansion(U),a||N.handleSelection(U))},G=ne=>U=>{ne.onMouseDown?.(U),!U.defaultMuiPrevented&&(U.shiftKey||U.ctrlKey||U.metaKey||D.disabled)&&U.preventDefault()},_=ne=>U=>{ne.onChange?.(U),!U.defaultMuiPrevented&&(s||D.disabled||N.handleCheckboxSelection(U))},Ee=ne=>U=>{ne.onClick?.(U),!U.defaultMuiPrevented&&o==="iconContainer"&&N.handleExpansion(U)};return{getRootProps:(ne={})=>{const U=le({},Vt(e),Vt(ne));let xe;D.selected?xe=!0:s||D.disabled?xe=void 0:xe=!1;const je=le({},U,{ref:V,role:"treeitem",tabIndex:O,id:L,"aria-expanded":D.expandable?D.expanded:void 0,"aria-selected":xe,"aria-disabled":D.disabled||void 0},ne,{onFocus:M(U),onBlur:J(U),onKeyDown:oe(U)});i&&(je.style={"--TreeView-itemDepth":typeof c=="function"?c(p):c});const ce=S.root?.(le({},z,{externalEventHandlers:U}))??{};return le({},je,ce)},getContentProps:(ne={})=>{const U=Vt(ne),xe=le({},U,ne,{ref:Q,onClick:fe(U),onMouseDown:G(U),status:D});i&&(xe.indentationAtItemLevel=!0);const je=S.content?.(le({},z,{externalEventHandlers:U}))??{};return le({},xe,je)},getGroupTransitionProps:(ne={})=>{const U=Vt(ne),xe=le({},U,{unmountOnExit:!0,component:"ul",role:"group",in:D.expanded,children:b},ne);return i&&(xe.indentationAtItemLevel=!0),xe},getIconContainerProps:(ne={})=>{const U=Vt(ne);return le({},U,ne,{onClick:Ee(U)})},getCheckboxProps:(ne={})=>{const U=Vt(ne);return le({},U,{visible:a,ref:E,checked:D.selected,disabled:s||D.disabled,tabIndex:-1},ne,{onChange:_(U)})},getLabelProps:(ne={})=>{const U=le({},Vt(ne)),xe=le({},U,{children:g},ne,{onDoubleClick:he(U)});return l.isTreeViewEditable&&(xe.editable=D.editable),xe},getLabelInputProps:(ne={})=>{const U=Vt(ne),xe=S.labelInput?.({rootRefObject:w,contentRefObject:B,externalEventHandlers:U,interactions:N})??{};return le({},ne,xe)},getDragAndDropOverlayProps:(ne={})=>{const U=Vt(ne),xe=S.dragAndDropOverlay?.(le({},z,{externalEventHandlers:U}))??{};return le({},ne,xe)},rootRef:V,status:D,publicAPI:d}},g3=m3;function Yf(e){const{instance:t,items:{onItemClick:n},selection:{multiSelect:r,checkboxSelection:i,disableSelection:s},expansion:{expansionTrigger:a}}=or(),o=t.isItemExpandable(e),u=t.isItemExpanded(e),l=t.isItemFocused(e),d=t.isItemSelected(e),c=t.isItemDisabled(e),m=t?.isItemBeingEdited?t?.isItemBeingEdited(e):!1,p=t.isItemEditable?t.isItemEditable(e):!1,g=D=>{if(!c){l||t.focusItem(D,e);const w=r&&(D.shiftKey||D.ctrlKey||D.metaKey);o&&!(w&&t.isItemExpanded(e))&&t.toggleItemExpansion(D,e)}},b=D=>{c||(l||t.focusItem(D,e),r&&(D.shiftKey||D.ctrlKey||D.metaKey)?D.shiftKey?t.expandSelectionRange(D,e):t.selectItem({event:D,itemId:e,keepExistingSelection:!0}):t.selectItem({event:D,itemId:e,shouldBeSelected:!0}))},T=D=>{if(s||c)return;const w=D.nativeEvent.shiftKey;r&&w?t.expandSelectionRange(D,e):t.selectItem({event:D,itemId:e,keepExistingSelection:r,shouldBeSelected:D.target.checked})},y=D=>{(D.shiftKey||D.ctrlKey||D.metaKey||c)&&D.preventDefault()},C=()=>{Zn(t,Qt)&&t.isItemEditable(e)&&(t.isItemBeingEdited(e)?t.setEditedItemId(null):t.setEditedItemId(e))};return{disabled:c,expanded:u,selected:d,focused:l,editable:p,editing:m,disableSelection:s,checkboxSelection:i,handleExpansion:g,handleSelection:b,handleCheckboxSelection:T,handleContentClick:n,preventSelection:y,expansionTrigger:a,toggleItemEditing:C,handleSaveItemLabel:(D,w)=>{Zn(t,Qt)&&t.isItemBeingEditedRef(e)&&(t.updateItemLabel(e,w),C(),t.focusItem(D,e))},handleCancelItemLabelEditing:D=>{Zn(t,Qt)&&t.isItemBeingEditedRef(e)&&(C(),t.focusItem(D,e))}}}const b3=Be("div",{name:"MuiTreeItem2DragAndDropOverlay",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>We.shouldForwardProp(e)&&e!=="action"})(({theme:e})=>({position:"absolute",left:0,display:"flex",top:0,bottom:0,right:0,pointerEvents:"none",variants:[{props:{action:"make-child"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderRadius:e.shape.borderRadius,backgroundColor:e.vars?`rgba(${e.vars.palette.primary.darkChannel} / ${e.vars.palette.action.focusOpacity})`:We.alpha(e.palette.primary.dark,e.palette.action.focusOpacity)}},{props:{action:"reorder-above"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderTop:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:"reorder-below"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:"move-to-parent"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * calc(var(--TreeView-itemDepth) - 1))",borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}}]}));function E3(e){return e.action==null?null:h.jsx(b3,le({},e))}const x3=Be("input",{name:"MuiTreeItem2",slot:"LabelInput",overridesResolver:(e,t)=>t.labelInput})(({theme:e})=>le({},e.typography.body1,{width:"100%",backgroundColor:e.palette.background.paper,borderRadius:e.shape.borderRadius,border:"none",padding:"0 2px",boxSizing:"border-box","&:focus":{outline:`1px solid ${e.palette.primary.main}`}})),y3=["classes","className","displayIcon","expansionIcon","icon","label","itemId","onClick","onMouseDown","dragAndDropOverlayProps","labelInputProps"],Kf=$.forwardRef(function(t,n){const{classes:r,className:i,displayIcon:s,expansionIcon:a,icon:o,label:u,itemId:l,onClick:d,onMouseDown:c,dragAndDropOverlayProps:m,labelInputProps:p}=t,g=Cn(t,y3),{disabled:b,expanded:T,selected:y,focused:C,editing:S,editable:N,disableSelection:D,checkboxSelection:w,handleExpansion:B,handleSelection:V,handleCheckboxSelection:Q,handleContentClick:E,preventSelection:L,expansionTrigger:O,toggleItemEditing:z}=Yf(l),M=o||a||s,J=$.useRef(null),oe=G=>{L(G),c&&c(G)},he=G=>{E?.(G,l),!J.current?.contains(G.target)&&(O==="content"&&B(G),w||V(G),d&&d(G))},fe=G=>{G.defaultMuiPrevented||z()};return h.jsxs("div",le({},g,{className:Ye(r.root,i,T&&r.expanded,y&&r.selected,C&&r.focused,b&&r.disabled,S&&r.editing,N&&r.editable),onClick:he,onMouseDown:oe,ref:n,children:[h.jsx("div",{className:r.iconContainer,children:M}),w&&h.jsx(jf,{className:r.checkbox,checked:y,onChange:Q,disabled:b||D,ref:J,tabIndex:-1}),S?h.jsx(x3,le({},p,{className:r.labelInput})):h.jsx("div",le({className:r.label},N&&{onDoubleClick:fe},{children:u})),m&&h.jsx(E3,le({},m))]}))}),Mc=e=>e,T3=()=>{let e=Mc;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Mc}}},C3=T3(),S3={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Ku(e,t,n="Mui"){const r=S3[t];return r?`${n}-${r}`:`${C3.generate(e)}-${t}`}function Qf(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Ku(e,i,n)}),r}function A3(e){return Ku("MuiTreeItem",e)}const gn=Qf("MuiTreeItem",["root","groupTransition","content","expanded","selected","focused","disabled","iconContainer","label","checkbox","labelInput","editable","editing","dragAndDropOverlay"]),Xf=Oe(h.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),Zf=Oe(h.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}));function Qu(e){const{children:t,itemId:n}=e,{wrapItem:r,instance:i}=or();return r({children:t,itemId:n,instance:i})}Qu.propTypes={children:Ul.node,itemId:Ul.string.isRequired};const k3=["children","className","slots","slotProps","ContentComponent","ContentProps","itemId","id","label","onClick","onMouseDown","onFocus","onBlur","onKeyDown"],I3=["ownerState"],_3=["ownerState"],v3=["ownerState"],D3=Uf(),w3=e=>{const{classes:t}=e;return Hf({root:["root"],content:["content"],expanded:["expanded"],selected:["selected"],focused:["focused"],disabled:["disabled"],iconContainer:["iconContainer"],checkbox:["checkbox"],label:["label"],labelInput:["labelInput"],editing:["editing"],editable:["editable"],groupTransition:["groupTransition"]},A3,t)},N3=Be("li",{name:"MuiTreeItem",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),P3=Be(Kf,{name:"MuiTreeItem",slot:"Content",overridesResolver:(e,t)=>[t.content,t.iconContainer&&{[`& .${gn.iconContainer}`]:t.iconContainer},t.label&&{[`& .${gn.label}`]:t.label}],shouldForwardProp:e=>Mn(e)&&e!=="indentationAtItemLevel"})(({theme:e})=>({padding:e.spacing(.5,1),borderRadius:e.shape.borderRadius,width:"100%",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",gap:e.spacing(1),cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${gn.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"},[`&.${gn.focused}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${gn.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${gn.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`& .${gn.iconContainer}`]:{width:16,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}},[`& .${gn.label}`]:le({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative"},e.typography.body1),[`& .${gn.checkbox}`]:{padding:0},variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:`calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`}}]})),R3=Be(Li,{name:"MuiTreeItem",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition,shouldForwardProp:e=>Mn(e)&&e!=="indentationAtItemLevel"})({margin:0,padding:0,paddingLeft:"var(--TreeView-itemChildrenIndentation)",variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:0}}]}),L3=$.forwardRef(function(t,n){const{icons:r,runItemPlugins:i,items:{disabledItemsFocusable:s,indentationAtItemLevel:a},selection:{disableSelection:o},expansion:{expansionTrigger:u},treeId:l,instance:d}=or(),c=$.useContext(Gu),m=D3({props:t,name:"MuiTreeItem"}),{children:p,className:g,slots:b,slotProps:T,ContentComponent:y=Kf,ContentProps:C,itemId:S,id:N,label:D,onClick:w,onMouseDown:B,onBlur:V,onKeyDown:Q}=m,E=Cn(m,k3),{expanded:L,focused:O,selected:z,disabled:M,editing:J,handleExpansion:oe,handleCancelItemLabelEditing:he,handleSaveItemLabel:fe}=Yf(S),{contentRef:G,rootRef:_,propsEnhancers:Ee}=i(m),ue=$.useRef(null),I=$.useRef(null),de=Rr(n,_,ue),pe=Rr(C?.ref,G,I),q={expandIcon:b?.expandIcon??r.slots.expandIcon??Xf,collapseIcon:b?.collapseIcon??r.slots.collapseIcon??Zf,endIcon:b?.endIcon??r.slots.endIcon,icon:b?.icon,groupTransition:b?.groupTransition},re=ae=>Array.isArray(ae)?ae.length>0&&ae.some(re):!!ae,te=re(p),we=le({},m,{expanded:L,focused:O,selected:z,disabled:M,indentationAtItemLevel:a}),ne=w3(we),U=q.groupTransition??void 0,xe=Qn({elementType:U,ownerState:{},externalSlotProps:T?.groupTransition,additionalProps:le({unmountOnExit:!0,in:L,component:"ul",role:"group"},a?{indentationAtItemLevel:!0}:{}),className:ne.groupTransition}),je=ae=>{u==="iconContainer"&&oe(ae)},ce=L?q.collapseIcon:q.expandIcon,zt=Qn({elementType:ce,ownerState:{},externalSlotProps:ae=>L?le({},En(r.slotProps.collapseIcon,ae),En(T?.collapseIcon,ae)):le({},En(r.slotProps.expandIcon,ae),En(T?.expandIcon,ae)),additionalProps:{onClick:je}}),yt=Cn(zt,I3),Ce=te&&ce?h.jsx(ce,le({},yt)):null,st=te?void 0:q.endIcon,at=Qn({elementType:st,ownerState:{},externalSlotProps:ae=>te?{}:le({},En(r.slotProps.endIcon,ae),En(T?.endIcon,ae))}),Xe=Cn(at,_3),rn=st?h.jsx(st,le({},Xe)):null,se=q.icon,Xr=Qn({elementType:se,ownerState:{},externalSlotProps:T?.icon}),Zr=Cn(Xr,v3),ze=se?h.jsx(se,le({},Zr)):null;let H;z?H=!0:o||M?H=void 0:H=!1;function ee(ae){!O&&(!M||s)&&ae.currentTarget===ae.target&&d.focusItem(ae,S)}function ge(ae){V?.(ae),!(J||ae.relatedTarget&&Fi(ae.relatedTarget,ue.current)&&(ae.target&&ae.target?.dataset?.element==="labelInput"&&Fi(ae.target,ue.current)||ae.relatedTarget?.dataset?.element==="labelInput"))&&d.removeFocusedItem()}const Se=ae=>{Q?.(ae),ae.target?.dataset?.element!=="labelInput"&&d.handleItemKeyDown(ae,S)},ve=Yu({itemId:S,treeId:l,id:N}),Tt=d.canItemBeTabbed(S)?0:-1,ct={rootRefObject:ue,contentRefObject:I,interactions:{handleSaveItemLabel:fe,handleCancelItemLabelEditing:he}},wt=Ee.root?.(le({},ct,{externalEventHandlers:Vt(E)}))??{},$t=Ee.content?.(le({},ct,{externalEventHandlers:Vt(C)}))??{},K=Ee.dragAndDropOverlay?.(le({},ct,{externalEventHandlers:{}}))??{},ie=Ee.labelInput?.(le({},ct,{externalEventHandlers:{}}))??{};return h.jsx(Qu,{itemId:S,children:h.jsxs(N3,le({className:Ye(ne.root,g),role:"treeitem","aria-expanded":te?L:void 0,"aria-selected":H,"aria-disabled":M||void 0,id:ve,tabIndex:Tt},E,{ownerState:we,onFocus:ee,onBlur:ge,onKeyDown:Se,ref:de,style:a?le({},E.style,{"--TreeView-itemDepth":typeof c=="function"?c(S):c}):E.style},wt,{children:[h.jsx(P3,le({as:y,classes:{root:ne.content,expanded:ne.expanded,selected:ne.selected,focused:ne.focused,disabled:ne.disabled,editable:ne.editable,editing:ne.editing,iconContainer:ne.iconContainer,label:ne.label,labelInput:ne.labelInput,checkbox:ne.checkbox},label:D,itemId:S,onClick:w,onMouseDown:B,icon:ze,expansionIcon:Ce,displayIcon:rn,ownerState:we},C,$t,K.action==null?{}:{dragAndDropOverlayProps:K},ie.value==null?{}:{labelInputProps:ie},{ref:pe})),p&&h.jsx(R3,le({as:U},xe,{children:p}))]}))})});function O3(e){const{slots:t,slotProps:n,status:r}=e,i=or(),s=le({},i.icons.slots,{expandIcon:i.icons.slots.expandIcon??Xf,collapseIcon:i.icons.slots.collapseIcon??Zf}),a=i.icons.slotProps;let o;t?.icon?o="icon":r.expandable?r.expanded?o="collapseIcon":o="expandIcon":o="endIcon";const u=t?.[o]??s[o],l=Qn({elementType:u,externalSlotProps:d=>le({},En(a[o],d),En(n?.[o],d)),ownerState:{}});return u?h.jsx(u,le({},l)):null}const F3=["visible"],M3=Be("li",{name:"MuiTreeItem2",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),B3=Be("div",{name:"MuiTreeItem2",slot:"Content",overridesResolver:(e,t)=>t.content,shouldForwardProp:e=>Mn(e)&&e!=="status"&&e!=="indentationAtItemLevel"})(({theme:e})=>({padding:e.spacing(.5,1),borderRadius:e.shape.borderRadius,width:"100%",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",gap:e.spacing(1),cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:`calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`}},{props:({status:t})=>t.disabled,style:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"}},{props:({status:t})=>t.focused,style:{backgroundColor:(e.vars||e).palette.action.focus}},{props:({status:t})=>t.selected,style:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},{props:({status:t})=>t.selected&&t.focused,style:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}]})),j3=Be("div",{name:"MuiTreeItem2",slot:"Label",overridesResolver:(e,t)=>t.label,shouldForwardProp:e=>Mn(e)&&e!=="editable"})(({theme:e})=>le({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative",overflow:"hidden"},e.typography.body1,{variants:[{props:({editable:t})=>t,style:{paddingLeft:"2px"}}]})),H3=Be("div",{name:"MuiTreeItem2",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})({width:16,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}});Be(Li,{name:"MuiTreeItem2",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition,shouldForwardProp:e=>Mn(e)&&e!=="indentationAtItemLevel"})({margin:0,padding:0,paddingLeft:"var(--TreeView-itemChildrenIndentation)",variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:0}}]});Be($.forwardRef((e,t)=>{const{visible:n}=e,r=Cn(e,F3);return n?h.jsx(jf,le({},r,{ref:t})):null}),{name:"MuiTreeItem2",slot:"Checkbox",overridesResolver:(e,t)=>t.checkbox})({padding:0});function U3(e){return Ku("MuiRichTreeView",e)}Qf("MuiRichTreeView",["root"]);const z3=(e,t)=>{const n=$.useRef({}),[r,i]=$.useState(()=>{const a={};return e.forEach(o=>{o.models&&Object.entries(o.models).forEach(([u,l])=>{n.current[u]={isControlled:t[u]!==void 0,getDefaultValue:l.getDefaultValue},a[u]=l.getDefaultValue(t)})}),a});return Object.fromEntries(Object.entries(n.current).map(([a,o])=>{const u=t[a]??r[a];return[a,{value:u,setControlledValue:l=>{o.isControlled||i(d=>le({},d,{[a]:l}))}}]}))};class $3{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,n,r={}){let i=this.events[t];i||(i={highPriority:new Map,regular:new Map},this.events[t]=i),r.isFirst?i.highPriority.set(n,!0):i.regular.set(n,!0)}removeListener(t,n){this.events[t]&&(this.events[t].regular.delete(n),this.events[t].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(t,...n){const r=this.events[t];if(!r)return;const i=Array.from(r.highPriority.keys()),s=Array.from(r.regular.keys());for(let a=i.length-1;a>=0;a-=1){const o=i[a];r.highPriority.has(o)&&o.apply(this,n)}for(let a=0;a<s.length;a+=1){const o=s[a];r.regular.has(o)&&o.apply(this,n)}}once(t,n){const r=this;this.on(t,function i(...s){r.removeListener(t,i),n.apply(r,s)})}}const q3=e=>e.isPropagationStopped!==void 0,Jf=()=>{const[e]=$.useState(()=>new $3),t=$.useCallback((...r)=>{const[i,s,a={}]=r;a.defaultMuiPrevented=!1,!(q3(a)&&a.isPropagationStopped())&&e.emit(i,s,a)},[e]),n=$.useCallback((r,i)=>(e.on(r,i),()=>{e.removeListener(r,i)}),[e]);return{instance:{$$publishEvent:t,$$subscribeEvent:n}}};Jf.params={};const ep=({plugins:e})=>{const t=new Set(e);return{instance:{getAvailablePlugins:()=>t}}};ep.params={};const Xu=({params:e,state:t,setState:n})=>{$.useEffect(()=>{n(i=>i.id.treeId===e.id&&i.id.treeId!==void 0?i:le({},i,{id:le({},i.id,{treeId:e.id??p3()})}))},[n,e.id]);const r=e.id??t.id.treeId;return{getRootProps:()=>({id:r}),contextValue:{treeId:r}}};Xu.params={id:!0};Xu.getInitialState=({id:e})=>({id:{treeId:e??void 0}});const V3=[Jf,ep,Xu],W3=["slots","slotProps","apiRef","experimentalFeatures"],G3=e=>{let{props:{slots:t,slotProps:n,apiRef:r,experimentalFeatures:i},plugins:s}=e,a=Cn(e.props,W3);const o={};s.forEach(m=>{Object.assign(o,m.params)});const u={},l={};Object.keys(a).forEach(m=>{const p=a[m];o[m]?u[m]=p:l[m]=p});const d=i??{},c=s.reduce((m,p)=>p.getDefaultizedParams?p.getDefaultizedParams({params:m,experimentalFeatures:d}):m,u);return{apiRef:r,forwardedProps:l,pluginParams:c,slots:t??{},slotProps:n??{},experimentalFeatures:d}},Y3=({plugins:e,instance:t,publicAPI:n,rootRef:r})=>({runItemPlugins:o=>{let u=null,l=null;const d=[],c={};e.forEach(g=>{if(!g.itemPlugin)return;const b=g.itemPlugin({props:o,rootRef:u,contentRef:l});b?.rootRef&&(u=b.rootRef),b?.contentRef&&(l=b.contentRef),b?.propsEnhancers&&(d.push(b.propsEnhancers),Object.keys(b.propsEnhancers).forEach(T=>{c[T]=!0}))});const m=g=>b=>{const T={};return d.forEach(y=>{const C=y[g];C!=null&&Object.assign(T,C(b))}),T},p=Object.fromEntries(Object.keys(c).map(g=>[g,m(g)]));return{contentRef:l,rootRef:u,propsEnhancers:p}},wrapItem:({itemId:o,children:u})=>{let l=u;for(let d=e.length-1;d>=0;d-=1){const c=e[d];c.wrapItem&&(l=c.wrapItem({itemId:o,children:l,instance:t}))}return l},wrapRoot:({children:o})=>{let u=o;for(let l=e.length-1;l>=0;l-=1){const d=e[l];d.wrapRoot&&(u=d.wrapRoot({children:u,instance:t}))}return u},instance:t,rootRef:r,publicAPI:n});function K3(e){const t=$.useRef({});return e?(e.current==null&&(e.current={}),e.current):t.current}const Q3=({plugins:e,rootRef:t,props:n})=>{const r=[...V3,...e],{pluginParams:i,forwardedProps:s,apiRef:a,experimentalFeatures:o,slots:u,slotProps:l}=G3({plugins:r,props:n}),d=z3(r,i),m=$.useRef({}).current,p=K3(a),g=$.useRef(null),b=Rr(g,t),T=Y3({plugins:r,instance:m,publicAPI:p,rootRef:g}),[y,C]=$.useState(()=>{const w={};return r.forEach(B=>{B.getInitialState&&Object.assign(w,B.getInitialState(i))}),w}),S=[],N=w=>{const B=w({instance:m,params:i,slots:u,slotProps:l,experimentalFeatures:o,state:y,setState:C,rootRef:g,models:d,plugins:r});B.getRootProps&&S.push(B.getRootProps),B.publicAPI&&Object.assign(p,B.publicAPI),B.instance&&Object.assign(m,B.instance),B.contextValue&&Object.assign(T,B.contextValue)};return r.forEach(N),{getRootProps:(w={})=>{const B=le({role:"tree"},s,w,{ref:b});return S.forEach(V=>{Object.assign(B,V(w))}),B},rootRef:b,contextValue:T,instance:m}},X3=(e,t,n)=>{e.$$publishEvent(t,n)},Cr="__TREE_VIEW_ROOT_PARENT_ID__",Z3=e=>{const t={};return e.forEach((n,r)=>{t[n]=r}),t},J3=["children"],tp=({items:e,isItemDisabled:t,getItemLabel:n,getItemId:r})=>{const i={},s={},a={[Cr]:[]},o=(l,d,c)=>{const m=r?r(l):l.id;if(m==null)throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.","An item was provided without id in the `items` prop:",JSON.stringify(l)].join(`
111
111
  `));if(i[m]!=null)throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.",`Two items were provided with the same id in the \`items\` prop: "${m}"`].join(`
112
112
  `));const p=n?n(l):l.label;if(p==null)throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.","Alternatively, you can use the `getItemLabel` prop to specify a custom label for each item.","An item was provided without label in the `items` prop:",JSON.stringify(l)].join(`
113
- `));i[m]={id:m,label:p,parentId:c,idAttribute:void 0,expandable:!!l.children?.length,disabled:t?t(l):!1,depth:d},s[m]=l;const g=c??Cr;a[g]||(a[g]=[]),a[g].push(m),l.children?.forEach(b=>o(b,d+1,m))};e.forEach(l=>o(l,0,null));const u={};return Object.keys(a).forEach(l=>{u[l]=$3(a[l])}),{itemMetaMap:i,itemMap:s,itemOrderedChildrenIds:a,itemChildrenIndexes:u}},Ki=({instance:e,params:t,state:n,setState:r,experimentalFeatures:i})=>{const s=$.useCallback(y=>n.items.itemMetaMap[y],[n.items.itemMetaMap]),a=$.useCallback(y=>n.items.itemMap[y],[n.items.itemMap]),o=$.useCallback(()=>{const y=C=>{const S=n.items.itemMap[C],P=Cn(S,q3),D=n.items.itemOrderedChildrenIds[C];return D&&(P.children=D.map(y)),P};return n.items.itemOrderedChildrenIds[Cr].map(y)},[n.items.itemMap,n.items.itemOrderedChildrenIds]),u=$.useCallback(y=>{if(y==null)return!1;let C=e.getItemMeta(y);if(!C)return!1;if(C.disabled)return!0;for(;C.parentId!=null;)if(C=e.getItemMeta(C.parentId),C.disabled)return!0;return!1},[e]),l=$.useCallback(y=>{const C=e.getItemMeta(y).parentId??Cr;return n.items.itemChildrenIndexes[C][y]},[e,n.items.itemChildrenIndexes]),d=$.useCallback(y=>n.items.itemOrderedChildrenIds[y??Cr]??[],[n.items.itemOrderedChildrenIds]),c=y=>{const C=e.getItemMeta(y);return C==null?null:document.getElementById(Gu({treeId:n.id.treeId,itemId:y,id:C.idAttribute}))},m=y=>t.disabledItemsFocusable?!0:!e.isItemDisabled(y),p=$.useRef(!1),g=$.useCallback(()=>{p.current=!0},[]),b=$.useCallback(()=>p.current,[]);return $.useEffect(()=>{e.areItemUpdatesPrevented()||r(y=>{const C=Xf({items:t.items,isItemDisabled:t.isItemDisabled,getItemId:t.getItemId,getItemLabel:t.getItemLabel});return Object.values(y.items.itemMetaMap).forEach(S=>{C.itemMetaMap[S.id]||z3(e,"removeItem",{id:S.id})}),le({},y,{items:C})})},[e,r,t.items,t.isItemDisabled,t.getItemId,t.getItemLabel]),{getRootProps:()=>({style:{"--TreeView-itemChildrenIndentation":typeof t.itemChildrenIndentation=="number"?`${t.itemChildrenIndentation}px`:t.itemChildrenIndentation}}),publicAPI:{getItem:a,getItemDOMElement:c,getItemTree:o,getItemOrderedChildrenIds:d},instance:{getItemMeta:s,getItem:a,getItemTree:o,getItemsToRender:()=>{const y=C=>{const S=n.items.itemMetaMap[C];return{label:S.label,itemId:S.id,id:S.idAttribute,children:n.items.itemOrderedChildrenIds[C]?.map(y)}};return n.items.itemOrderedChildrenIds[Cr].map(y)},getItemIndex:l,getItemDOMElement:c,getItemOrderedChildrenIds:d,isItemDisabled:u,isItemNavigable:m,preventItemUpdates:g,areItemUpdatesPrevented:b},contextValue:{items:{onItemClick:t.onItemClick,disabledItemsFocusable:t.disabledItemsFocusable,indentationAtItemLevel:i.indentationAtItemLevel??!1}}}};Ki.getInitialState=e=>({items:Xf({items:e.items,isItemDisabled:e.isItemDisabled,getItemId:e.getItemId,getItemLabel:e.getItemLabel})});Ki.getDefaultizedParams=({params:e})=>le({},e,{disabledItemsFocusable:e.disabledItemsFocusable??!1,itemChildrenIndentation:e.itemChildrenIndentation??"12px"});Ki.wrapRoot=({children:e,instance:t})=>h.jsx(Wu.Provider,{value:n=>t.getItemMeta(n)?.depth??0,children:e});Ki.params={disabledItemsFocusable:!0,items:!0,isItemDisabled:!0,getItemLabel:!0,getItemId:!0,onItemClick:!0,itemChildrenIndentation:!0};const V3=typeof window<"u"?$.useLayoutEffect:$.useEffect;function _r(e){const t=$.useRef(e);return V3(()=>{t.current=e}),$.useRef((...n)=>(0,t.current)(...n)).current}const Sa=({instance:e,params:t,models:n})=>{const r=$.useMemo(()=>{const c=new Map;return n.expandedItems.value.forEach(m=>{c.set(m,!0)}),c},[n.expandedItems.value]),i=(c,m)=>{t.onExpandedItemsChange?.(c,m),n.expandedItems.setControlledValue(m)},s=$.useCallback(c=>r.has(c),[r]),a=$.useCallback(c=>!!e.getItemMeta(c)?.expandable,[e]),o=_r((c,m)=>{const p=e.isItemExpanded(m);e.setItemExpansion(c,m,!p)}),u=_r((c,m,p)=>{if(e.isItemExpanded(m)===p)return;let b;p?b=[m].concat(n.expandedItems.value):b=n.expandedItems.value.filter(T=>T!==m),t.onItemExpansionToggle&&t.onItemExpansionToggle(c,m,p),i(c,b)}),l=(c,m)=>{const p=e.getItemMeta(m),b=e.getItemOrderedChildrenIds(p.parentId).filter(y=>e.isItemExpandable(y)&&!e.isItemExpanded(y)),T=n.expandedItems.value.concat(b);b.length>0&&(t.onItemExpansionToggle&&b.forEach(y=>{t.onItemExpansionToggle(c,y,!0)}),i(c,T))},d=$.useMemo(()=>t.expansionTrigger?t.expansionTrigger:e.isTreeViewEditable?"iconContainer":"content",[t.expansionTrigger,e.isTreeViewEditable]);return{publicAPI:{setItemExpansion:u},instance:{isItemExpanded:s,isItemExpandable:a,setItemExpansion:u,toggleItemExpansion:o,expandAllSiblings:l},contextValue:{expansion:{expansionTrigger:d}}}};Sa.models={expandedItems:{getDefaultValue:e=>e.defaultExpandedItems}};const W3=[];Sa.getDefaultizedParams=({params:e})=>le({},e,{defaultExpandedItems:e.defaultExpandedItems??W3});Sa.params={expandedItems:!0,defaultExpandedItems:!0,onExpandedItemsChange:!0,onItemExpansionToggle:!0,expansionTrigger:!0};const Ss=e=>Array.isArray(e)?e:e!=null?[e]:[],eo=e=>{const t={};return e.forEach(n=>{t[n]=!0}),t},Aa=({instance:e,params:t,models:n})=>{const r=$.useRef(null),i=$.useRef({}),s=$.useMemo(()=>{const b=new Map;return Array.isArray(n.selectedItems.value)?n.selectedItems.value.forEach(T=>{b.set(T,!0)}):n.selectedItems.value!=null&&b.set(n.selectedItems.value,!0),b},[n.selectedItems.value]),a=(b,T)=>{if(t.onItemSelectionToggle)if(t.multiSelect){const y=T.filter(S=>!e.isItemSelected(S)),C=n.selectedItems.value.filter(S=>!T.includes(S));y.forEach(S=>{t.onItemSelectionToggle(b,S,!0)}),C.forEach(S=>{t.onItemSelectionToggle(b,S,!1)})}else T!==n.selectedItems.value&&(n.selectedItems.value!=null&&t.onItemSelectionToggle(b,n.selectedItems.value,!1),T!=null&&t.onItemSelectionToggle(b,T,!0));t.onSelectedItemsChange&&t.onSelectedItemsChange(b,T),n.selectedItems.setControlledValue(T)},o=b=>s.has(b),u=({event:b,itemId:T,keepExistingSelection:y=!1,shouldBeSelected:C})=>{if(t.disableSelection)return;let S;if(y){const P=Ss(n.selectedItems.value),D=e.isItemSelected(T);D&&(C===!1||C==null)?S=P.filter(w=>w!==T):!D&&(C===!0||C==null)?S=[T].concat(P):S=P}else C===!1||C==null&&e.isItemSelected(T)?S=t.multiSelect?[]:null:S=t.multiSelect?[T]:T;a(b,S),r.current=T,i.current={}},l=(b,[T,y])=>{if(t.disableSelection||!t.multiSelect)return;let C=Ss(n.selectedItems.value).slice();Object.keys(i.current).length>0&&(C=C.filter(w=>!i.current[w]));const S=eo(C),P=r3(e,T,y),D=P.filter(w=>!S[w]);C=C.concat(D),a(b,C),i.current=eo(P)};return{getRootProps:()=>({"aria-multiselectable":t.multiSelect}),publicAPI:{selectItem:u},instance:{isItemSelected:o,selectItem:u,selectAllNavigableItems:b=>{if(t.disableSelection||!t.multiSelect)return;const T=i3(e);a(b,T),i.current=eo(T)},expandSelectionRange:(b,T)=>{if(r.current!=null){const[y,C]=$f(e,T,r.current);l(b,[y,C])}},selectRangeFromStartToItem:(b,T)=>{l(b,[Oi(e),T])},selectRangeFromItemToEnd:(b,T)=>{l(b,[T,zf(e)])},selectItemFromArrowNavigation:(b,T,y)=>{if(t.disableSelection||!t.multiSelect)return;let C=Ss(n.selectedItems.value).slice();Object.keys(i.current).length===0?(C.push(y),i.current={[T]:!0,[y]:!0}):(i.current[T]||(i.current={}),i.current[y]?(C=C.filter(S=>S!==T),delete i.current[T]):(C.push(y),i.current[y]=!0)),a(b,C)}},contextValue:{selection:{multiSelect:t.multiSelect,checkboxSelection:t.checkboxSelection,disableSelection:t.disableSelection}}}};Aa.models={selectedItems:{getDefaultValue:e=>e.defaultSelectedItems}};const G3=[];Aa.getDefaultizedParams=({params:e})=>le({},e,{disableSelection:e.disableSelection??!1,multiSelect:e.multiSelect??!1,checkboxSelection:e.checkboxSelection??!1,defaultSelectedItems:e.defaultSelectedItems??(e.multiSelect?G3:null)});Aa.params={disableSelection:!0,multiSelect:!0,checkboxSelection:!0,defaultSelectedItems:!0,selectedItems:!0,onSelectedItemsChange:!0,onItemSelectionToggle:!0};function Y3(e){return e&&e.ownerDocument||document}const Bc=1e3;class K3{constructor(t=Bc){this.timeouts=new Map,this.cleanupTimeout=Bc,this.cleanupTimeout=t}register(t,n,r){this.timeouts||(this.timeouts=new Map);const i=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,i)}unregister(t){const n=this.timeouts.get(t.cleanupToken);n&&(this.timeouts.delete(t.cleanupToken),clearTimeout(n))}reset(){this.timeouts&&(this.timeouts.forEach((t,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}}class Q3{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,n,r){this.registry.register(t,n,r)}unregister(t){this.registry.unregister(t)}reset(){}}class X3{}function Z3(e){let t=0;return function(r,i,s){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new Q3:new K3);const[a]=$.useState(new X3),o=$.useRef(null),u=$.useRef(void 0);u.current=s;const l=$.useRef(null);if(!o.current&&u.current){const d=(c,m)=>{m.defaultMuiPrevented||u.current?.(c,m)};o.current=r.$$subscribeEvent(i,d),t+=1,l.current={cleanupToken:t},e.registry.register(a,()=>{o.current?.(),o.current=null,l.current=null},l.current)}else!u.current&&o.current&&(o.current(),o.current=null,l.current&&(e.registry.unregister(l.current),l.current=null));$.useEffect(()=>{if(!o.current&&u.current){const d=(c,m)=>{m.defaultMuiPrevented||u.current?.(c,m)};o.current=r.$$subscribeEvent(i,d)}return l.current&&e.registry&&(e.registry.unregister(l.current),l.current=null),()=>{o.current?.(),o.current=null}},[r,i])}}const J3={registry:null},eT=Z3(J3),Zf=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?Zf(t.shadowRoot):t:null},tT=(e,t)=>{let n=Ss(t).find(r=>{if(!e.isItemNavigable(r))return!1;const i=e.getItemMeta(r);return i&&(i.parentId==null||e.isItemExpanded(i.parentId))});return n==null&&(n=Oi(e)),n},Xu=({instance:e,params:t,state:n,setState:r,models:i,rootRef:s})=>{const a=tT(e,i.selectedItems.value),o=_r(T=>{const y=typeof T=="function"?T(n.focusedItemId):T;n.focusedItemId!==y&&r(C=>le({},C,{focusedItemId:y}))}),u=$.useCallback(()=>!!s.current&&s.current.contains(Zf(Y3(s.current))),[s]),l=$.useCallback(T=>n.focusedItemId===T&&u(),[n.focusedItemId,u]),d=T=>{const y=e.getItemMeta(T);return y&&(y.parentId==null||e.isItemExpanded(y.parentId))},c=(T,y)=>{const C=e.getItemDOMElement(y);C&&C.focus(),o(y),t.onItemFocus&&t.onItemFocus(T,y)},m=_r((T,y)=>{d(y)&&c(T,y)}),p=_r(()=>{if(n.focusedItemId==null)return;if(e.getItemMeta(n.focusedItemId)){const y=e.getItemDOMElement(n.focusedItemId);y&&y.blur()}o(null)}),g=T=>T===a;eT(e,"removeItem",({id:T})=>{n.focusedItemId===T&&c(null,a)});const b=T=>y=>{T.onFocus?.(y),!y.defaultMuiPrevented&&y.target===y.currentTarget&&c(y,a)};return{getRootProps:T=>({onFocus:b(T)}),publicAPI:{focusItem:m},instance:{isItemFocused:l,canItemBeTabbed:g,focusItem:m,removeFocusedItem:p}}};Xu.getInitialState=()=>({focusedItemId:null});Xu.params={onItemFocus:!0};function nT(e){return!!e&&e.length===1&&!!e.match(/\S/)}const Jf=({instance:e,params:t,state:n})=>{const r=dg(),i=$.useRef({}),s=_r(d=>{i.current=d(i.current)});$.useEffect(()=>{if(e.areItemUpdatesPrevented())return;const d={},c=m=>{d[m.id]=m.label.substring(0,1).toLowerCase()};Object.values(n.items.itemMetaMap).forEach(c),i.current=d},[n.items.itemMetaMap,t.getItemId,e]);const a=(d,c)=>{const m=c.toLowerCase(),p=y=>{const C=Cs(e,y);return C===null?Oi(e):C};let g=null,b=p(d);const T={};for(;g==null&&!T[b];)i.current[b]===m?g=b:(T[b]=!0,b=p(b));return g},o=d=>!t.disableSelection&&!e.isItemDisabled(d),u=d=>!e.isItemDisabled(d)&&e.isItemExpandable(d);return{instance:{updateFirstCharMap:s,handleItemKeyDown:(d,c)=>{if(d.defaultMuiPrevented||d.altKey||Fi(d.target,d.currentTarget))return;const m=d.ctrlKey||d.metaKey,p=d.key;switch(!0){case(p===" "&&o(c)):{d.preventDefault(),t.multiSelect&&d.shiftKey?e.expandSelectionRange(d,c):e.selectItem({event:d,itemId:c,keepExistingSelection:t.multiSelect,shouldBeSelected:t.multiSelect?void 0:!0});break}case p==="Enter":{Zn(e,Qt)&&e.isItemEditable(c)&&!e.isItemBeingEdited(c)?e.setEditedItemId(c):u(c)?(e.toggleItemExpansion(d,c),d.preventDefault()):o(c)&&(t.multiSelect?(d.preventDefault(),e.selectItem({event:d,itemId:c,keepExistingSelection:!0})):e.isItemSelected(c)||(e.selectItem({event:d,itemId:c}),d.preventDefault()));break}case p==="ArrowDown":{const g=Cs(e,c);g&&(d.preventDefault(),e.focusItem(d,g),t.multiSelect&&d.shiftKey&&o(g)&&e.selectItemFromArrowNavigation(d,c,g));break}case p==="ArrowUp":{const g=Uf(e,c);g&&(d.preventDefault(),e.focusItem(d,g),t.multiSelect&&d.shiftKey&&o(g)&&e.selectItemFromArrowNavigation(d,c,g));break}case(p==="ArrowRight"&&!r||p==="ArrowLeft"&&r):{if(m)return;if(e.isItemExpanded(c)){const g=Cs(e,c);g&&(e.focusItem(d,g),d.preventDefault())}else u(c)&&(e.toggleItemExpansion(d,c),d.preventDefault());break}case(p==="ArrowLeft"&&!r||p==="ArrowRight"&&r):{if(m)return;if(u(c)&&e.isItemExpanded(c))e.toggleItemExpansion(d,c),d.preventDefault();else{const g=e.getItemMeta(c).parentId;g&&(e.focusItem(d,g),d.preventDefault())}break}case p==="Home":{o(c)&&t.multiSelect&&m&&d.shiftKey?e.selectRangeFromStartToItem(d,c):e.focusItem(d,Oi(e)),d.preventDefault();break}case p==="End":{o(c)&&t.multiSelect&&m&&d.shiftKey?e.selectRangeFromItemToEnd(d,c):e.focusItem(d,zf(e)),d.preventDefault();break}case p==="*":{e.expandAllSiblings(d,c),d.preventDefault();break}case(String.fromCharCode(d.keyCode)==="A"&&m&&t.multiSelect&&!t.disableSelection):{e.selectAllNavigableItems(d),d.preventDefault();break}case(!m&&!d.shiftKey&&nT(p)):{const g=a(c,p);g!=null&&(e.focusItem(d,g),d.preventDefault());break}}}}}};Jf.params={};const ep=({slots:e,slotProps:t})=>({contextValue:{icons:{slots:{collapseIcon:e.collapseIcon,expandIcon:e.expandIcon,endIcon:e.endIcon},slotProps:{collapseIcon:t.collapseIcon,expandIcon:t.expandIcon,endIcon:t.endIcon}}}});ep.params={};const rT=[Ki,Sa,Aa,Xu,Jf,ep,Qt],iT=["ownerState"];function sT({slots:e,slotProps:t,label:n,id:r,itemId:i,itemsToRender:s}){const a=e?.item??k3,o=Qn({elementType:a,externalSlotProps:t?.item,additionalProps:{itemId:i,id:r,label:n},ownerState:{itemId:i,label:n}}),u=Cn(o,iT),l=$.useMemo(()=>s?h.jsx(tp,{itemsToRender:s,slots:e,slotProps:t}):null,[s,e,t]);return h.jsx(a,le({},u,{children:l}))}function tp(e){const{itemsToRender:t,slots:n,slotProps:r}=e;return h.jsx($.Fragment,{children:t.map(i=>h.jsx(sT,{slots:n,slotProps:r,label:i.label,id:i.id,itemId:i.itemId,itemsToRender:i.children},i.itemId))})}const aT=Mf(),oT=e=>{const{classes:t}=e;return Ff({root:["root"]},N3,t)},uT=Be("ul",{name:"MuiRichTreeView",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,margin:0,listStyle:"none",outline:0,position:"relative"}),lT=$.forwardRef(function(t,n){const r=aT({props:t,name:"MuiRichTreeView"}),{getRootProps:i,contextValue:s,instance:a}=U3({plugins:rT,rootRef:n,props:r}),{slots:o,slotProps:u}=r,l=oT(r),d=o?.root??uT,c=Qn({elementType:d,externalSlotProps:u?.root,className:l.root,getSlotProps:i,ownerState:r});return h.jsx(e3,{value:s,children:h.jsx(d,le({},c,{children:h.jsx(tp,{slots:o,slotProps:u,itemsToRender:a.getItemsToRender()})}))})}),cT=Me(h.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"})),dT=Me([h.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),h.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),hT=Me(h.jsx("path",{d:"M19 15v4H5v-4zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1M7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5M19 5v4H5V5zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1M7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5"})),fT=Me(h.jsx("path",{d:"M15 4v2h3v12h-3v2h5V4zM4 20h5v-2H6V6h3V4H4z"}));function np({items:e,defaultExpandedItems:t,navigate:n}){return h.jsx(lT,{items:ET(e,n),defaultExpandedItems:t,slots:{item:bT}})}const pT=gh.animated(Li);function mT(e){const t=gh.useSpring({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return h.jsx(pT,{style:t,...e})}function gT({item:e,...t}){const n=h.jsxs(w3,{...t,sx:{display:"flex",alignItems:"center",color:e.error?"error.main":"grey.600"},children:[e.fileType==="directory"&&h.jsx(cT,{})||e.fileType==="notebook"&&h.jsx(dT,{})||e.fileType==="model"&&h.jsx(fT,{})||e.fileType=="database"&&h.jsx(hT,{})||h.jsx(wf,{}),h.jsx(x.Typography,{variant:"body2",sx:{marginLeft:"5px"},color:e.error?"error.main":e.link?"primary.main":"grey.600",children:e.label})]});return e.error?h.jsx(x.Tooltip,{title:e.error,placement:"right",children:n}):n}const bT=$.forwardRef(function(t,n){const{id:r,itemId:i,label:s,children:a,disabled:o,...u}=t,{getRootProps:l,getContentProps:d,getLabelProps:c,getIconContainerProps:m,getGroupTransitionProps:p,status:g,publicAPI:b}=o3({id:r,itemId:i,children:a,label:s,disabled:o,rootRef:n}),T=b.getItem(i);return g.selected=!1,g.focused=!1,h.jsx(Ku,{itemId:i,children:h.jsxs(v3,{...l(u),children:[h.jsxs(D3,{...d(),...T.link&&{onClick:y=>T.link(y)},sx:{pointerEvents:!T.selectable&&"none"},children:[h.jsx(P3,{...m(),children:h.jsx(I3,{status:g})}),h.jsx(gT,{...c({item:T})})]}),a&&h.jsx(mT,{...p()})]})})});function ET(e,t){const n=new Map;return e.map(r=>{let i=n;const s=r.path.split("/");s.forEach((a,o)=>{o===s.length-1?i.set(a,r):(i.has(a)||i.set(a,new Map),i=i.get(a))})}),rp(n,"",t)}function rp(e,t,n){const r=[];return e.forEach((i,s)=>{const a=s.endsWith(".malloy")&&"model"||s.endsWith(".malloynb")&&"notebook"||s.endsWith(".parquet")&&"database"||"unknown";if(a!=="unknown"){const o=i;r.push({id:t+s,label:s,fileType:a,link:a==="model"||a==="notebook"?u=>n(t+s,u):void 0,selectable:a==="model"||a==="notebook",error:"error"in o?o.error:void 0})}else t+=`${s}/`,r.push({id:t,label:s,fileType:"directory",selectable:!0,link:void 0,children:rp(i,t,n)})}),r}const xT=new Ca(new Et),yT=["notebooks/","models/"];function ip({navigate:e}){const{projectName:t,packageName:n,versionId:r}=pt(),{data:i,isError:s,error:a,isSuccess:o}=xt({queryKey:["models",t,n,r],queryFn:u=>xT.listModels(t,n,r,u)});return h.jsx(ut,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Ut,{children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Semantic Models"}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!o&&!s&&h.jsx(bt,{text:"Fetching Models..."}),s&&h.jsx(gt,{error:a,context:`${t} > ${n} > Models`}),o&&i.data.length>0&&h.jsx(np,{items:i.data.sort((u,l)=>u.path.localeCompare(l.path)),navigate:e,defaultExpandedItems:yT}),o&&i.data.length===0&&h.jsx(x.Typography,{variant:"body2",children:"No models found"})]})]})})}const TT=new Cf(new Et),CT=["notebooks/"];function ST({navigate:e}){const{projectName:t,packageName:n,versionId:r}=pt(),{data:i,isError:s,error:a,isSuccess:o}=xt({queryKey:["notebooks",t,n,r],queryFn:u=>TT.listNotebooks(t,n,r,u)});return h.jsx(ut,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Ut,{children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Notebooks"}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!o&&!s&&h.jsx(bt,{text:"Fetching Notebooks..."}),s&&h.jsx(gt,{error:a,context:`${t} > ${n} > Notebooks`}),o&&i.data.length>0&&h.jsx(np,{items:i.data.sort((u,l)=>u.path.localeCompare(l.path)),defaultExpandedItems:CT,navigate:e}),o&&i.data.length===0&&h.jsx(x.Typography,{variant:"body2",children:"No notebooks found"})]})]})})}const AT=new Px(new Et);function kT(){const{projectName:e,packageName:t,versionId:n}=pt(),{data:r,isError:i,isLoading:s,error:a}=xt({queryKey:["schedules",e,t,n],queryFn:o=>AT.listSchedules(e,t,n,o)});return s?h.jsx(bt,{text:"Fetching Schedules..."}):i?h.jsx(gt,{error:a,context:`${e} > ${t} > Schedules`}):r.data.length?h.jsx(ut,{variant:"outlined",sx:{padding:"10px",width:"100%"},children:h.jsxs(Ut,{children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Scheduler"}),h.jsx(x.Divider,{}),h.jsx(x.Box,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:h.jsx(x.TableContainer,{component:x.Paper,children:h.jsxs(x.Table,{sx:{minWidth:300},size:"small",children:[h.jsx(x.TableHead,{children:h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{align:"left",children:"Resource"}),h.jsx(x.TableCell,{align:"left",children:"Schedule"}),h.jsx(x.TableCell,{align:"left",children:"Action"}),h.jsx(x.TableCell,{align:"left",children:"Connection"}),h.jsx(x.TableCell,{align:"left",children:"Last Run"}),h.jsx(x.TableCell,{align:"left",children:"Status"})]})}),h.jsx(x.TableBody,{children:r.data.map(o=>h.jsxs(x.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[h.jsx(x.TableCell,{align:"left",children:o.resource}),h.jsx(x.TableCell,{align:"left",children:o.schedule}),h.jsx(x.TableCell,{align:"left",children:o.action}),h.jsx(x.TableCell,{align:"left",children:o.connection}),h.jsx(x.TableCell,{align:"left",children:o.lastRunTime?new Date(o.lastRunTime).toLocaleString():"n/a"}),h.jsx(x.TableCell,{align:"left",children:o.lastRunStatus})]},o.resource))})]})})})]})}):null}const IT="README.malloynb";function _T({navigate:e}){return e||(e=t=>{window.location.href=t}),h.jsxs(x.Grid,{container:!0,spacing:2,columns:12,children:[h.jsx(x.Grid,{size:{xs:12,md:4},children:h.jsx(zx,{})}),h.jsx(x.Grid,{size:{xs:12,md:4},children:h.jsx(ST,{navigate:e})}),h.jsx(x.Grid,{size:{xs:12,md:4},children:h.jsx(ip,{navigate:e})}),h.jsx(x.Grid,{size:{xs:12,md:6},children:h.jsx(Gx,{})}),h.jsx(x.Grid,{size:{xs:12,md:6},children:h.jsx(Vx,{})}),h.jsx(x.Grid,{size:{xs:12,md:12},children:h.jsx(kT,{})}),h.jsx(x.Grid,{size:{xs:12,md:12},children:h.jsx(Df,{notebookPath:IT,hideEmbeddingIcons:!0})})]})}const vT=x.styled(x.Card)({display:"flex",flexDirection:"column",height:"100%"});function DT({modelPath:e,sourceName:t,queryName:n,expandResult:r,hideResultIcon:i,expandEmbedding:s,hideEmbeddingIcon:a,noView:o,annotations:u}){const[l,d]=N.useState(r),[c,m]=N.useState(s),[p,g]=N.useState(),[b,T]=N.useState(),{packageName:y,projectName:C}=pt(),S=Uu({modelPath:e,sourceName:t,queryName:n,optionalPackageName:y,optionalProjectName:C});return N.useEffect(()=>{nr(S,"typescript").then(P=>{g(P)})},[c,S]),N.useEffect(()=>{if(u&&u.length>0){const P=u.map(D=>`// ${D}`).join(`
114
- `);nr(P,"typescript").then(D=>{T(D)})}},[u]),h.jsx(h.Fragment,{children:h.jsxs(vT,{variant:"outlined",sx:{padding:"0px 10px 0px 10px",borderRadius:"0px"},children:[h.jsxs(x.Stack,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%"},children:[h.jsx(x.Typography,{variant:"subtitle2",sx:{mt:"auto",mb:"auto"},children:`${o?"":"View >"} ${n}`}),h.jsxs(x.CardActions,{sx:{padding:"0px"},children:[!i&&h.jsx(x.Tooltip,{title:l?"Hide Results":"Show Results",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{d(!l)},children:h.jsx(bx,{})})}),!a&&h.jsx(x.Tooltip,{title:c?"Hide Sharing":"Show Sharing",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{m(!c)},children:h.jsx($i,{})})})]})]}),h.jsxs(x.Collapse,{in:c,timeout:"auto",unmountOnExit:!0,children:[h.jsx(x.Divider,{}),h.jsxs(x.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[h.jsx(x.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:h.jsx("div",{dangerouslySetInnerHTML:{__html:p}})}),h.jsx(x.Tooltip,{title:"Copy Embeddable Code",children:h.jsx(x.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(S)},children:h.jsx(ma,{})})})]})]}),h.jsxs(x.Collapse,{in:l,timeout:"auto",unmountOnExit:!0,children:[h.jsx(x.Divider,{sx:{mb:"4px"}}),b&&h.jsxs(h.Fragment,{children:[h.jsx(x.Stack,{sx:{borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:h.jsx(x.Typography,{fontSize:"12px",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:h.jsx("div",{className:"content",dangerouslySetInnerHTML:{__html:b}})})}),h.jsx(x.Divider,{sx:{mb:"4px"}})]}),h.jsx(x.CardContent,{children:h.jsx(zu,{modelPath:e,sourceName:t,queryName:n})})]})]})})}const wT=new Bu(new Et),PT=Be(We.Box)(({theme:e})=>({display:"flex",flexWrap:"wrap",gap:e.spacing(.5),borderBottom:`1px solid ${e.palette.divider}`,minHeight:36})),NT=Be(x.Button)(({theme:e,selected:t})=>({minHeight:36,padding:e.spacing(.5,2),borderRadius:e.shape.borderRadius,background:t?e.palette.action.selected:"none",color:t?e.palette.primary.main:e.palette.text.primary,fontWeight:t?600:400,border:t?`1px solid ${e.palette.primary.main}`:"1px solid transparent",boxShadow:t?e.shadows[1]:"none",textTransform:"uppercase","&:hover":{background:e.palette.action.hover,border:`1px solid ${e.palette.primary.light}`}}));function Zu({sourceAndPaths:e,existingQuery:t,existingSourceName:n,onQueryChange:r,onSourceChange:i}){const[s,a]=N.useState(n?e.findIndex(l=>l.sourceInfo.name===n):0),[o,u]=N.useState(t||bi());return N.useEffect(()=>{i&&i(s)},[s,i]),h.jsxs(ut,{variant:"outlined",children:[h.jsx(Ut,{children:h.jsx(We.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:e.length>0&&h.jsx(PT,{children:e.map((l,d)=>h.jsx(NT,{selected:s===d,onClick:()=>a(d),children:l.sourceInfo.name||`Source ${d+1}`},l.sourceInfo.name||d))})})}),h.jsx(Mu,{children:h.jsxs(We.Stack,{spacing:2,component:"section",children:[h.jsx(Ju,{sourceAndPath:e[s],existingQuery:o,onChange:l=>{u(l),r&&r(l)}}),h.jsx(We.Box,{height:"5px"})]})})]})}function bi(){return{query:void 0,malloyQuery:void 0,malloyResult:void 0}}function RT({sourceAndPath:e,onChange:t,existingQuery:n,explorerComponents:r,QueryBuilder:i}){const[s,a]=N.useState(n||bi()),[o,u]=N.useState([]),{MalloyExplorerProvider:l,QueryPanel:d,ResizableCollapsiblePanel:c,ResultPanel:m,SourcePanel:p}=r;N.useEffect(()=>{t&&t(s)},[t,s]);const{projectName:g,packageName:b,versionId:T}=pt(),y=Nx({mutationFn:(D,w)=>{const B=new i.ASTQuery({source:e.sourceInfo,query:s?.malloyQuery}).toMalloy();return a({...s,query:B}),wT.executeQuery(g,b,e.modelPath,B,void 0,void 0,T,w)},onSuccess:D=>{if(D){const w=JSON.parse(D.data.result);a({...s,malloyResult:w})}}}),[C,S]=N.useState(e.sourceInfo.name);N.useEffect(()=>{C!==e.sourceInfo.name&&(S(e.sourceInfo.name),a(bi()))},[e,C]);const P=N.useCallback(D=>{a({...s,malloyQuery:D,malloyResult:void 0})},[s]);return C!==e.sourceInfo.name?h.jsx("div",{children:"Loading..."}):h.jsx(yf,{children:h.jsx(l,{source:e.sourceInfo,query:s?.malloyQuery,onQueryChange:P,focusedNestViewPath:o,onFocusedNestViewPathChange:u,onDrill:D=>{console.info(D)},children:h.jsxs("div",{style:{display:"flex",height:"100%",overflowY:"auto"},children:[h.jsx(c,{isInitiallyExpanded:!0,initialWidth:180,minWidth:180,icon:"database",title:e.sourceInfo.name,children:h.jsx(p,{onRefresh:()=>a(bi())})}),h.jsx(c,{isInitiallyExpanded:!0,initialWidth:280,minWidth:280,icon:"filterSliders",title:"Query",children:h.jsx(d,{runQuery:()=>{y.mutate()}})}),h.jsx(m,{source:e.sourceInfo,draftQuery:s?.malloyQuery,setDraftQuery:D=>a({...s,malloyQuery:D}),submittedQuery:s?.malloyQuery?{executionState:y.isPending?"running":"finished",response:{result:s.malloyResult},query:s.malloyQuery,queryResolutionStartMillis:Date.now(),onCancel:y.reset}:void 0,options:{showRawQuery:!0}})]})})},e.sourceInfo.name)}function Ju(e){const[t,n]=N.useState(null),[r,i]=N.useState(null),[s,a]=N.useState(!0);return N.useEffect(()=>{let o=!0;return Promise.all([import("@malloydata/malloy-explorer"),import("@malloydata/malloy-query-builder")]).then(([u,l])=>{o&&(n(u),i(l),a(!1))}).catch(u=>{console.error("Failed to load Malloy components:",u),o&&a(!1)}),()=>{o=!1}},[]),s||!t||!r?h.jsx(gx,{children:h.jsx(yf,{children:h.jsx("div",{style:{alignItems:"center",justifyContent:"center",height:"200px",color:"#666"},children:"Loading explorer..."})})}):h.jsx(RT,{...e,explorerComponents:t,QueryBuilder:r})}const LT=new Ca(new Et);function el(e,t){const{projectName:n,packageName:r,versionId:i}=pt(),s=t||i;return xt({queryKey:["package",n,r,e,s],queryFn:async a=>(await LT.getModel(n,r,e,s,a)).data})}function sp({modelPath:e,versionId:t,expandResults:n,hideResultIcons:r,expandEmbeddings:i,hideEmbeddingIcons:s,onChange:a}){const[o,u]=N.useState(0),{data:l,isError:d,isLoading:c,error:m}=el(e,t);return c?h.jsx(bt,{text:"Fetching Model..."}):d?(console.log("error",m),h.jsx(gt,{error:m,context:`ModelExplorer > ${e}`})):h.jsxs(x.Stack,{spacing:2,component:"section",children:[Array.isArray(l.sourceInfos)&&l.sourceInfos.length>0&&h.jsx(x.Stack,{sx:{flexDirection:"row",justifyContent:"flex-start"},children:h.jsx(x.Tabs,{value:o,onChange:(p,g)=>u(g),variant:"scrollable",scrollButtons:"auto",sx:{borderBottom:1,borderColor:"divider",minHeight:36},children:l.sourceInfos.map((p,g)=>{let b;try{b=JSON.parse(p)}catch{b={name:String(g)}}return h.jsx(x.Tab,{label:b.name||`Source ${g+1}`,sx:{minHeight:36}},b.name||g)})})}),Array.isArray(l.sourceInfos)&&l.sourceInfos.length>0&&h.jsx(Ju,{sourceAndPath:{modelPath:e,sourceInfo:JSON.parse(l.sourceInfos[o])},onChange:a}),l.queries?.length>0&&h.jsxs(ut,{variant:"outlined",sx:{padding:"0px 10px 0px 10px"},children:[h.jsx(Ut,{sx:{p:"10px"},children:h.jsx(x.Typography,{variant:"subtitle1",children:"Named Queries"})}),h.jsx(x.Stack,{spacing:1,component:"section",children:l.queries.map(p=>h.jsx(DT,{modelPath:e,queryName:p.name,expandResult:n,hideResultIcon:r,expandEmbedding:i,hideEmbeddingIcon:s,noView:!0,annotations:p.annotations},p.name))}),h.jsx(x.Box,{height:"10px"})]}),h.jsx(x.Box,{height:"5px"})]})}function OT({modelPath:e,versionId:t,expandResults:n,hideResultIcons:r,expandEmbeddings:i,hideEmbeddingIcons:s,onChange:a}){const[o,u]=N.useState(!1),[l,d]=N.useState(),{isError:c,isLoading:m,error:p}=el(e,t),g=FT(e);return N.useEffect(()=>{nr(g,"typescript").then(b=>{d(b)})},[o,g]),m?h.jsx(bt,{text:"Fetching Model..."}):c?(console.log("error",p),h.jsx(gt,{error:p,context:`Model > ${e}`})):h.jsxs(ut,{variant:"outlined",children:[h.jsxs(Ut,{children:[h.jsx(x.Stack,{sx:{flexDirection:"row",justifyContent:"flex-end"},children:!s&&h.jsx(x.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:h.jsx(x.Tooltip,{title:o?"Hide Embedding":"View Embedding",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{u(!o)},children:h.jsx($i,{})})})})}),h.jsxs(x.Collapse,{in:o,timeout:"auto",unmountOnExit:!0,children:[h.jsx(x.Divider,{}),h.jsxs(x.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[h.jsx(x.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:h.jsx("div",{dangerouslySetInnerHTML:{__html:l}})}),h.jsx(x.Tooltip,{title:"Copy Embeddable Code",children:h.jsx(x.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(g)},children:h.jsx(ma,{})})})]})]}),h.jsx(x.Divider,{})]}),h.jsx(sp,{modelPath:e,versionId:t,expandResults:n,hideResultIcons:r,expandEmbeddings:i,hideEmbeddingIcons:s,onChange:a})]})}function FT(e){return`<Model
113
+ `));i[m]={id:m,label:p,parentId:c,idAttribute:void 0,expandable:!!l.children?.length,disabled:t?t(l):!1,depth:d},s[m]=l;const g=c??Cr;a[g]||(a[g]=[]),a[g].push(m),l.children?.forEach(b=>o(b,d+1,m))};e.forEach(l=>o(l,0,null));const u={};return Object.keys(a).forEach(l=>{u[l]=Z3(a[l])}),{itemMetaMap:i,itemMap:s,itemOrderedChildrenIds:a,itemChildrenIndexes:u}},Ki=({instance:e,params:t,state:n,setState:r,experimentalFeatures:i})=>{const s=$.useCallback(y=>n.items.itemMetaMap[y],[n.items.itemMetaMap]),a=$.useCallback(y=>n.items.itemMap[y],[n.items.itemMap]),o=$.useCallback(()=>{const y=C=>{const S=n.items.itemMap[C],N=Cn(S,J3),D=n.items.itemOrderedChildrenIds[C];return D&&(N.children=D.map(y)),N};return n.items.itemOrderedChildrenIds[Cr].map(y)},[n.items.itemMap,n.items.itemOrderedChildrenIds]),u=$.useCallback(y=>{if(y==null)return!1;let C=e.getItemMeta(y);if(!C)return!1;if(C.disabled)return!0;for(;C.parentId!=null;)if(C=e.getItemMeta(C.parentId),C.disabled)return!0;return!1},[e]),l=$.useCallback(y=>{const C=e.getItemMeta(y).parentId??Cr;return n.items.itemChildrenIndexes[C][y]},[e,n.items.itemChildrenIndexes]),d=$.useCallback(y=>n.items.itemOrderedChildrenIds[y??Cr]??[],[n.items.itemOrderedChildrenIds]),c=y=>{const C=e.getItemMeta(y);return C==null?null:document.getElementById(Yu({treeId:n.id.treeId,itemId:y,id:C.idAttribute}))},m=y=>t.disabledItemsFocusable?!0:!e.isItemDisabled(y),p=$.useRef(!1),g=$.useCallback(()=>{p.current=!0},[]),b=$.useCallback(()=>p.current,[]);return $.useEffect(()=>{e.areItemUpdatesPrevented()||r(y=>{const C=tp({items:t.items,isItemDisabled:t.isItemDisabled,getItemId:t.getItemId,getItemLabel:t.getItemLabel});return Object.values(y.items.itemMetaMap).forEach(S=>{C.itemMetaMap[S.id]||X3(e,"removeItem",{id:S.id})}),le({},y,{items:C})})},[e,r,t.items,t.isItemDisabled,t.getItemId,t.getItemLabel]),{getRootProps:()=>({style:{"--TreeView-itemChildrenIndentation":typeof t.itemChildrenIndentation=="number"?`${t.itemChildrenIndentation}px`:t.itemChildrenIndentation}}),publicAPI:{getItem:a,getItemDOMElement:c,getItemTree:o,getItemOrderedChildrenIds:d},instance:{getItemMeta:s,getItem:a,getItemTree:o,getItemsToRender:()=>{const y=C=>{const S=n.items.itemMetaMap[C];return{label:S.label,itemId:S.id,id:S.idAttribute,children:n.items.itemOrderedChildrenIds[C]?.map(y)}};return n.items.itemOrderedChildrenIds[Cr].map(y)},getItemIndex:l,getItemDOMElement:c,getItemOrderedChildrenIds:d,isItemDisabled:u,isItemNavigable:m,preventItemUpdates:g,areItemUpdatesPrevented:b},contextValue:{items:{onItemClick:t.onItemClick,disabledItemsFocusable:t.disabledItemsFocusable,indentationAtItemLevel:i.indentationAtItemLevel??!1}}}};Ki.getInitialState=e=>({items:tp({items:e.items,isItemDisabled:e.isItemDisabled,getItemId:e.getItemId,getItemLabel:e.getItemLabel})});Ki.getDefaultizedParams=({params:e})=>le({},e,{disabledItemsFocusable:e.disabledItemsFocusable??!1,itemChildrenIndentation:e.itemChildrenIndentation??"12px"});Ki.wrapRoot=({children:e,instance:t})=>h.jsx(Gu.Provider,{value:n=>t.getItemMeta(n)?.depth??0,children:e});Ki.params={disabledItemsFocusable:!0,items:!0,isItemDisabled:!0,getItemLabel:!0,getItemId:!0,onItemClick:!0,itemChildrenIndentation:!0};const eT=typeof window<"u"?$.useLayoutEffect:$.useEffect;function _r(e){const t=$.useRef(e);return eT(()=>{t.current=e}),$.useRef((...n)=>(0,t.current)(...n)).current}const Sa=({instance:e,params:t,models:n})=>{const r=$.useMemo(()=>{const c=new Map;return n.expandedItems.value.forEach(m=>{c.set(m,!0)}),c},[n.expandedItems.value]),i=(c,m)=>{t.onExpandedItemsChange?.(c,m),n.expandedItems.setControlledValue(m)},s=$.useCallback(c=>r.has(c),[r]),a=$.useCallback(c=>!!e.getItemMeta(c)?.expandable,[e]),o=_r((c,m)=>{const p=e.isItemExpanded(m);e.setItemExpansion(c,m,!p)}),u=_r((c,m,p)=>{if(e.isItemExpanded(m)===p)return;let b;p?b=[m].concat(n.expandedItems.value):b=n.expandedItems.value.filter(T=>T!==m),t.onItemExpansionToggle&&t.onItemExpansionToggle(c,m,p),i(c,b)}),l=(c,m)=>{const p=e.getItemMeta(m),b=e.getItemOrderedChildrenIds(p.parentId).filter(y=>e.isItemExpandable(y)&&!e.isItemExpanded(y)),T=n.expandedItems.value.concat(b);b.length>0&&(t.onItemExpansionToggle&&b.forEach(y=>{t.onItemExpansionToggle(c,y,!0)}),i(c,T))},d=$.useMemo(()=>t.expansionTrigger?t.expansionTrigger:e.isTreeViewEditable?"iconContainer":"content",[t.expansionTrigger,e.isTreeViewEditable]);return{publicAPI:{setItemExpansion:u},instance:{isItemExpanded:s,isItemExpandable:a,setItemExpansion:u,toggleItemExpansion:o,expandAllSiblings:l},contextValue:{expansion:{expansionTrigger:d}}}};Sa.models={expandedItems:{getDefaultValue:e=>e.defaultExpandedItems}};const tT=[];Sa.getDefaultizedParams=({params:e})=>le({},e,{defaultExpandedItems:e.defaultExpandedItems??tT});Sa.params={expandedItems:!0,defaultExpandedItems:!0,onExpandedItemsChange:!0,onItemExpansionToggle:!0,expansionTrigger:!0};const Ss=e=>Array.isArray(e)?e:e!=null?[e]:[],eo=e=>{const t={};return e.forEach(n=>{t[n]=!0}),t},Aa=({instance:e,params:t,models:n})=>{const r=$.useRef(null),i=$.useRef({}),s=$.useMemo(()=>{const b=new Map;return Array.isArray(n.selectedItems.value)?n.selectedItems.value.forEach(T=>{b.set(T,!0)}):n.selectedItems.value!=null&&b.set(n.selectedItems.value,!0),b},[n.selectedItems.value]),a=(b,T)=>{if(t.onItemSelectionToggle)if(t.multiSelect){const y=T.filter(S=>!e.isItemSelected(S)),C=n.selectedItems.value.filter(S=>!T.includes(S));y.forEach(S=>{t.onItemSelectionToggle(b,S,!0)}),C.forEach(S=>{t.onItemSelectionToggle(b,S,!1)})}else T!==n.selectedItems.value&&(n.selectedItems.value!=null&&t.onItemSelectionToggle(b,n.selectedItems.value,!1),T!=null&&t.onItemSelectionToggle(b,T,!0));t.onSelectedItemsChange&&t.onSelectedItemsChange(b,T),n.selectedItems.setControlledValue(T)},o=b=>s.has(b),u=({event:b,itemId:T,keepExistingSelection:y=!1,shouldBeSelected:C})=>{if(t.disableSelection)return;let S;if(y){const N=Ss(n.selectedItems.value),D=e.isItemSelected(T);D&&(C===!1||C==null)?S=N.filter(w=>w!==T):!D&&(C===!0||C==null)?S=[T].concat(N):S=N}else C===!1||C==null&&e.isItemSelected(T)?S=t.multiSelect?[]:null:S=t.multiSelect?[T]:T;a(b,S),r.current=T,i.current={}},l=(b,[T,y])=>{if(t.disableSelection||!t.multiSelect)return;let C=Ss(n.selectedItems.value).slice();Object.keys(i.current).length>0&&(C=C.filter(w=>!i.current[w]));const S=eo(C),N=h3(e,T,y),D=N.filter(w=>!S[w]);C=C.concat(D),a(b,C),i.current=eo(N)};return{getRootProps:()=>({"aria-multiselectable":t.multiSelect}),publicAPI:{selectItem:u},instance:{isItemSelected:o,selectItem:u,selectAllNavigableItems:b=>{if(t.disableSelection||!t.multiSelect)return;const T=f3(e);a(b,T),i.current=eo(T)},expandSelectionRange:(b,T)=>{if(r.current!=null){const[y,C]=Gf(e,T,r.current);l(b,[y,C])}},selectRangeFromStartToItem:(b,T)=>{l(b,[Oi(e),T])},selectRangeFromItemToEnd:(b,T)=>{l(b,[T,Wf(e)])},selectItemFromArrowNavigation:(b,T,y)=>{if(t.disableSelection||!t.multiSelect)return;let C=Ss(n.selectedItems.value).slice();Object.keys(i.current).length===0?(C.push(y),i.current={[T]:!0,[y]:!0}):(i.current[T]||(i.current={}),i.current[y]?(C=C.filter(S=>S!==T),delete i.current[T]):(C.push(y),i.current[y]=!0)),a(b,C)}},contextValue:{selection:{multiSelect:t.multiSelect,checkboxSelection:t.checkboxSelection,disableSelection:t.disableSelection}}}};Aa.models={selectedItems:{getDefaultValue:e=>e.defaultSelectedItems}};const nT=[];Aa.getDefaultizedParams=({params:e})=>le({},e,{disableSelection:e.disableSelection??!1,multiSelect:e.multiSelect??!1,checkboxSelection:e.checkboxSelection??!1,defaultSelectedItems:e.defaultSelectedItems??(e.multiSelect?nT:null)});Aa.params={disableSelection:!0,multiSelect:!0,checkboxSelection:!0,defaultSelectedItems:!0,selectedItems:!0,onSelectedItemsChange:!0,onItemSelectionToggle:!0};function rT(e){return e&&e.ownerDocument||document}const Bc=1e3;class iT{constructor(t=Bc){this.timeouts=new Map,this.cleanupTimeout=Bc,this.cleanupTimeout=t}register(t,n,r){this.timeouts||(this.timeouts=new Map);const i=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,i)}unregister(t){const n=this.timeouts.get(t.cleanupToken);n&&(this.timeouts.delete(t.cleanupToken),clearTimeout(n))}reset(){this.timeouts&&(this.timeouts.forEach((t,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}}class sT{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,n,r){this.registry.register(t,n,r)}unregister(t){this.registry.unregister(t)}reset(){}}class aT{}function oT(e){let t=0;return function(r,i,s){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new sT:new iT);const[a]=$.useState(new aT),o=$.useRef(null),u=$.useRef(void 0);u.current=s;const l=$.useRef(null);if(!o.current&&u.current){const d=(c,m)=>{m.defaultMuiPrevented||u.current?.(c,m)};o.current=r.$$subscribeEvent(i,d),t+=1,l.current={cleanupToken:t},e.registry.register(a,()=>{o.current?.(),o.current=null,l.current=null},l.current)}else!u.current&&o.current&&(o.current(),o.current=null,l.current&&(e.registry.unregister(l.current),l.current=null));$.useEffect(()=>{if(!o.current&&u.current){const d=(c,m)=>{m.defaultMuiPrevented||u.current?.(c,m)};o.current=r.$$subscribeEvent(i,d)}return l.current&&e.registry&&(e.registry.unregister(l.current),l.current=null),()=>{o.current?.(),o.current=null}},[r,i])}}const uT={registry:null},lT=oT(uT),np=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?np(t.shadowRoot):t:null},cT=(e,t)=>{let n=Ss(t).find(r=>{if(!e.isItemNavigable(r))return!1;const i=e.getItemMeta(r);return i&&(i.parentId==null||e.isItemExpanded(i.parentId))});return n==null&&(n=Oi(e)),n},Zu=({instance:e,params:t,state:n,setState:r,models:i,rootRef:s})=>{const a=cT(e,i.selectedItems.value),o=_r(T=>{const y=typeof T=="function"?T(n.focusedItemId):T;n.focusedItemId!==y&&r(C=>le({},C,{focusedItemId:y}))}),u=$.useCallback(()=>!!s.current&&s.current.contains(np(rT(s.current))),[s]),l=$.useCallback(T=>n.focusedItemId===T&&u(),[n.focusedItemId,u]),d=T=>{const y=e.getItemMeta(T);return y&&(y.parentId==null||e.isItemExpanded(y.parentId))},c=(T,y)=>{const C=e.getItemDOMElement(y);C&&C.focus(),o(y),t.onItemFocus&&t.onItemFocus(T,y)},m=_r((T,y)=>{d(y)&&c(T,y)}),p=_r(()=>{if(n.focusedItemId==null)return;if(e.getItemMeta(n.focusedItemId)){const y=e.getItemDOMElement(n.focusedItemId);y&&y.blur()}o(null)}),g=T=>T===a;lT(e,"removeItem",({id:T})=>{n.focusedItemId===T&&c(null,a)});const b=T=>y=>{T.onFocus?.(y),!y.defaultMuiPrevented&&y.target===y.currentTarget&&c(y,a)};return{getRootProps:T=>({onFocus:b(T)}),publicAPI:{focusItem:m},instance:{isItemFocused:l,canItemBeTabbed:g,focusItem:m,removeFocusedItem:p}}};Zu.getInitialState=()=>({focusedItemId:null});Zu.params={onItemFocus:!0};function dT(e){return!!e&&e.length===1&&!!e.match(/\S/)}const rp=({instance:e,params:t,state:n})=>{const r=fg(),i=$.useRef({}),s=_r(d=>{i.current=d(i.current)});$.useEffect(()=>{if(e.areItemUpdatesPrevented())return;const d={},c=m=>{d[m.id]=m.label.substring(0,1).toLowerCase()};Object.values(n.items.itemMetaMap).forEach(c),i.current=d},[n.items.itemMetaMap,t.getItemId,e]);const a=(d,c)=>{const m=c.toLowerCase(),p=y=>{const C=Cs(e,y);return C===null?Oi(e):C};let g=null,b=p(d);const T={};for(;g==null&&!T[b];)i.current[b]===m?g=b:(T[b]=!0,b=p(b));return g},o=d=>!t.disableSelection&&!e.isItemDisabled(d),u=d=>!e.isItemDisabled(d)&&e.isItemExpandable(d);return{instance:{updateFirstCharMap:s,handleItemKeyDown:(d,c)=>{if(d.defaultMuiPrevented||d.altKey||Fi(d.target,d.currentTarget))return;const m=d.ctrlKey||d.metaKey,p=d.key;switch(!0){case(p===" "&&o(c)):{d.preventDefault(),t.multiSelect&&d.shiftKey?e.expandSelectionRange(d,c):e.selectItem({event:d,itemId:c,keepExistingSelection:t.multiSelect,shouldBeSelected:t.multiSelect?void 0:!0});break}case p==="Enter":{Zn(e,Qt)&&e.isItemEditable(c)&&!e.isItemBeingEdited(c)?e.setEditedItemId(c):u(c)?(e.toggleItemExpansion(d,c),d.preventDefault()):o(c)&&(t.multiSelect?(d.preventDefault(),e.selectItem({event:d,itemId:c,keepExistingSelection:!0})):e.isItemSelected(c)||(e.selectItem({event:d,itemId:c}),d.preventDefault()));break}case p==="ArrowDown":{const g=Cs(e,c);g&&(d.preventDefault(),e.focusItem(d,g),t.multiSelect&&d.shiftKey&&o(g)&&e.selectItemFromArrowNavigation(d,c,g));break}case p==="ArrowUp":{const g=Vf(e,c);g&&(d.preventDefault(),e.focusItem(d,g),t.multiSelect&&d.shiftKey&&o(g)&&e.selectItemFromArrowNavigation(d,c,g));break}case(p==="ArrowRight"&&!r||p==="ArrowLeft"&&r):{if(m)return;if(e.isItemExpanded(c)){const g=Cs(e,c);g&&(e.focusItem(d,g),d.preventDefault())}else u(c)&&(e.toggleItemExpansion(d,c),d.preventDefault());break}case(p==="ArrowLeft"&&!r||p==="ArrowRight"&&r):{if(m)return;if(u(c)&&e.isItemExpanded(c))e.toggleItemExpansion(d,c),d.preventDefault();else{const g=e.getItemMeta(c).parentId;g&&(e.focusItem(d,g),d.preventDefault())}break}case p==="Home":{o(c)&&t.multiSelect&&m&&d.shiftKey?e.selectRangeFromStartToItem(d,c):e.focusItem(d,Oi(e)),d.preventDefault();break}case p==="End":{o(c)&&t.multiSelect&&m&&d.shiftKey?e.selectRangeFromItemToEnd(d,c):e.focusItem(d,Wf(e)),d.preventDefault();break}case p==="*":{e.expandAllSiblings(d,c),d.preventDefault();break}case(String.fromCharCode(d.keyCode)==="A"&&m&&t.multiSelect&&!t.disableSelection):{e.selectAllNavigableItems(d),d.preventDefault();break}case(!m&&!d.shiftKey&&dT(p)):{const g=a(c,p);g!=null&&(e.focusItem(d,g),d.preventDefault());break}}}}}};rp.params={};const ip=({slots:e,slotProps:t})=>({contextValue:{icons:{slots:{collapseIcon:e.collapseIcon,expandIcon:e.expandIcon,endIcon:e.endIcon},slotProps:{collapseIcon:t.collapseIcon,expandIcon:t.expandIcon,endIcon:t.endIcon}}}});ip.params={};const hT=[Ki,Sa,Aa,Zu,rp,ip,Qt],fT=["ownerState"];function pT({slots:e,slotProps:t,label:n,id:r,itemId:i,itemsToRender:s}){const a=e?.item??L3,o=Qn({elementType:a,externalSlotProps:t?.item,additionalProps:{itemId:i,id:r,label:n},ownerState:{itemId:i,label:n}}),u=Cn(o,fT),l=$.useMemo(()=>s?h.jsx(sp,{itemsToRender:s,slots:e,slotProps:t}):null,[s,e,t]);return h.jsx(a,le({},u,{children:l}))}function sp(e){const{itemsToRender:t,slots:n,slotProps:r}=e;return h.jsx($.Fragment,{children:t.map(i=>h.jsx(pT,{slots:n,slotProps:r,label:i.label,id:i.id,itemId:i.itemId,itemsToRender:i.children},i.itemId))})}const mT=Uf(),gT=e=>{const{classes:t}=e;return Hf({root:["root"]},U3,t)},bT=Be("ul",{name:"MuiRichTreeView",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,margin:0,listStyle:"none",outline:0,position:"relative"}),ET=$.forwardRef(function(t,n){const r=mT({props:t,name:"MuiRichTreeView"}),{getRootProps:i,contextValue:s,instance:a}=Q3({plugins:hT,rootRef:n,props:r}),{slots:o,slotProps:u}=r,l=gT(r),d=o?.root??bT,c=Qn({elementType:d,externalSlotProps:u?.root,className:l.root,getSlotProps:i,ownerState:r});return h.jsx(l3,{value:s,children:h.jsx(d,le({},c,{children:h.jsx(sp,{slots:o,slotProps:u,itemsToRender:a.getItemsToRender()})}))})}),xT=Oe(h.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"})),yT=Oe([h.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),h.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),TT=Oe(h.jsx("path",{d:"M19 15v4H5v-4zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1M7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5M19 5v4H5V5zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1M7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5"})),CT=Oe(h.jsx("path",{d:"M15 4v2h3v12h-3v2h5V4zM4 20h5v-2H6V6h3V4H4z"}));function ap({items:e,defaultExpandedItems:t,navigate:n}){return h.jsx(ET,{items:_T(e,n),defaultExpandedItems:t,slots:{item:IT}})}const ST=gh.animated(Li);function AT(e){const t=gh.useSpring({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return h.jsx(ST,{style:t,...e})}function kT({item:e,...t}){const n=h.jsxs(j3,{...t,sx:{display:"flex",alignItems:"center",color:e.error?"error.main":"grey.600"},children:[e.fileType==="directory"&&h.jsx(xT,{})||e.fileType==="notebook"&&h.jsx(yT,{})||e.fileType==="model"&&h.jsx(CT,{})||e.fileType=="database"&&h.jsx(TT,{})||h.jsx(wf,{}),h.jsx(x.Typography,{variant:"body2",sx:{marginLeft:"5px"},color:e.error?"error.main":e.link?"primary.main":"grey.600",children:e.label})]});return e.error?h.jsx(x.Tooltip,{title:e.error,placement:"right",children:n}):n}const IT=$.forwardRef(function(t,n){const{id:r,itemId:i,label:s,children:a,disabled:o,...u}=t,{getRootProps:l,getContentProps:d,getLabelProps:c,getIconContainerProps:m,getGroupTransitionProps:p,status:g,publicAPI:b}=g3({id:r,itemId:i,children:a,label:s,disabled:o,rootRef:n}),T=b.getItem(i);return g.selected=!1,g.focused=!1,h.jsx(Qu,{itemId:i,children:h.jsxs(M3,{...l(u),children:[h.jsxs(B3,{...d(),...T.link&&{onClick:y=>T.link(y)},sx:{pointerEvents:!T.selectable&&"none"},children:[h.jsx(H3,{...m(),children:h.jsx(O3,{status:g})}),h.jsx(kT,{...c({item:T})})]}),a&&h.jsx(AT,{...p()})]})})});function _T(e,t){const n=new Map;return e.map(r=>{let i=n;const s=r.path.split("/");s.forEach((a,o)=>{o===s.length-1?i.set(a,r):(i.has(a)||i.set(a,new Map),i=i.get(a))})}),op(n,"",t)}function op(e,t,n){const r=[];return e.forEach((i,s)=>{const a=s.endsWith(".malloy")&&"model"||s.endsWith(".malloynb")&&"notebook"||s.endsWith(".parquet")&&"database"||"unknown";if(a!=="unknown"){const o=i;r.push({id:t+s,label:s,fileType:a,link:a==="model"||a==="notebook"?u=>n(t+s,u):void 0,selectable:a==="model"||a==="notebook",error:"error"in o?o.error:void 0})}else t+=`${s}/`,r.push({id:t,label:s,fileType:"directory",selectable:!0,link:void 0,children:op(i,t,n)})}),r}const vT=new Ca(new Et),DT=["notebooks/","models/"];function up({navigate:e}){const{projectName:t,packageName:n,versionId:r}=pt(),{data:i,isError:s,error:a,isSuccess:o}=xt({queryKey:["models",t,n,r],queryFn:u=>vT.listModels(t,n,r,u)});return h.jsx(ut,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Ut,{children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Semantic Models"}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!o&&!s&&h.jsx(bt,{text:"Fetching Models..."}),s&&h.jsx(gt,{error:a,context:`${t} > ${n} > Models`}),o&&i.data.length>0&&h.jsx(ap,{items:i.data.sort((u,l)=>u.path.localeCompare(l.path)),navigate:e,defaultExpandedItems:DT}),o&&i.data.length===0&&h.jsx(x.Typography,{variant:"body2",children:"No models found"})]})]})})}const wT=new Cf(new Et),NT=["notebooks/"];function PT({navigate:e}){const{projectName:t,packageName:n,versionId:r}=pt(),{data:i,isError:s,error:a,isSuccess:o}=xt({queryKey:["notebooks",t,n,r],queryFn:u=>wT.listNotebooks(t,n,r,u)});return h.jsx(ut,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Ut,{children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Notebooks"}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!o&&!s&&h.jsx(bt,{text:"Fetching Notebooks..."}),s&&h.jsx(gt,{error:a,context:`${t} > ${n} > Notebooks`}),o&&i.data.length>0&&h.jsx(ap,{items:i.data.sort((u,l)=>u.path.localeCompare(l.path)),defaultExpandedItems:NT,navigate:e}),o&&i.data.length===0&&h.jsx(x.Typography,{variant:"body2",children:"No notebooks found"})]})]})})}const RT=new Rx(new Et);function LT(){const{projectName:e,packageName:t,versionId:n}=pt(),{data:r,isError:i,isLoading:s,error:a}=xt({queryKey:["schedules",e,t,n],queryFn:o=>RT.listSchedules(e,t,n,o)});return s?h.jsx(bt,{text:"Fetching Schedules..."}):i?h.jsx(gt,{error:a,context:`${e} > ${t} > Schedules`}):r.data.length?h.jsx(ut,{variant:"outlined",sx:{padding:"10px",width:"100%"},children:h.jsxs(Ut,{children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Scheduler"}),h.jsx(x.Divider,{}),h.jsx(x.Box,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:h.jsx(x.TableContainer,{component:x.Paper,children:h.jsxs(x.Table,{sx:{minWidth:300},size:"small",children:[h.jsx(x.TableHead,{children:h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{align:"left",children:"Resource"}),h.jsx(x.TableCell,{align:"left",children:"Schedule"}),h.jsx(x.TableCell,{align:"left",children:"Action"}),h.jsx(x.TableCell,{align:"left",children:"Connection"}),h.jsx(x.TableCell,{align:"left",children:"Last Run"}),h.jsx(x.TableCell,{align:"left",children:"Status"})]})}),h.jsx(x.TableBody,{children:r.data.map(o=>h.jsxs(x.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[h.jsx(x.TableCell,{align:"left",children:o.resource}),h.jsx(x.TableCell,{align:"left",children:o.schedule}),h.jsx(x.TableCell,{align:"left",children:o.action}),h.jsx(x.TableCell,{align:"left",children:o.connection}),h.jsx(x.TableCell,{align:"left",children:o.lastRunTime?new Date(o.lastRunTime).toLocaleString():"n/a"}),h.jsx(x.TableCell,{align:"left",children:o.lastRunStatus})]},o.resource))})]})})})]})}):null}const OT="README.malloynb";function FT({navigate:e}){return e||(e=t=>{window.location.href=t}),h.jsxs(x.Grid,{container:!0,spacing:2,columns:12,children:[h.jsx(x.Grid,{size:{xs:12,md:4},children:h.jsx(qx,{})}),h.jsx(x.Grid,{size:{xs:12,md:4},children:h.jsx(PT,{navigate:e})}),h.jsx(x.Grid,{size:{xs:12,md:4},children:h.jsx(up,{navigate:e})}),h.jsx(x.Grid,{size:{xs:12,md:6},children:h.jsx(ny,{})}),h.jsx(x.Grid,{size:{xs:12,md:6},children:h.jsx(ey,{})}),h.jsx(x.Grid,{size:{xs:12,md:12},children:h.jsx(LT,{})}),h.jsx(x.Grid,{size:{xs:12,md:12},children:h.jsx(Df,{notebookPath:OT,hideEmbeddingIcons:!0})})]})}const MT=x.styled(x.Card)({display:"flex",flexDirection:"column",height:"100%"});function BT({modelPath:e,sourceName:t,queryName:n,expandResult:r,hideResultIcon:i,expandEmbedding:s,hideEmbeddingIcon:a,noView:o,annotations:u}){const[l,d]=P.useState(r),[c,m]=P.useState(s),[p,g]=P.useState(),[b,T]=P.useState(),{packageName:y,projectName:C}=pt(),S=Uu({modelPath:e,sourceName:t,queryName:n,optionalPackageName:y,optionalProjectName:C});return P.useEffect(()=>{nr(S,"typescript").then(N=>{g(N)})},[c,S]),P.useEffect(()=>{if(u&&u.length>0){const N=u.map(D=>`// ${D}`).join(`
114
+ `);nr(N,"typescript").then(D=>{T(D)})}},[u]),h.jsx(h.Fragment,{children:h.jsxs(MT,{variant:"outlined",sx:{padding:"0px 10px 0px 10px",borderRadius:"0px"},children:[h.jsxs(x.Stack,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%"},children:[h.jsx(x.Typography,{variant:"subtitle2",sx:{mt:"auto",mb:"auto"},children:`${o?"":"View >"} ${n}`}),h.jsxs(x.CardActions,{sx:{padding:"0px"},children:[!i&&h.jsx(x.Tooltip,{title:l?"Hide Results":"Show Results",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{d(!l)},children:h.jsx(xx,{})})}),!a&&h.jsx(x.Tooltip,{title:c?"Hide Sharing":"Show Sharing",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{m(!c)},children:h.jsx($i,{})})})]})]}),h.jsxs(x.Collapse,{in:c,timeout:"auto",unmountOnExit:!0,children:[h.jsx(x.Divider,{}),h.jsxs(x.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[h.jsx(x.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:h.jsx("div",{dangerouslySetInnerHTML:{__html:p}})}),h.jsx(x.Tooltip,{title:"Copy Embeddable Code",children:h.jsx(x.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(S)},children:h.jsx(ma,{})})})]})]}),h.jsxs(x.Collapse,{in:l,timeout:"auto",unmountOnExit:!0,children:[h.jsx(x.Divider,{sx:{mb:"4px"}}),b&&h.jsxs(h.Fragment,{children:[h.jsx(x.Stack,{sx:{borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:h.jsx(x.Typography,{fontSize:"12px",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:h.jsx("div",{className:"content",dangerouslySetInnerHTML:{__html:b}})})}),h.jsx(x.Divider,{sx:{mb:"4px"}})]}),h.jsx(x.CardContent,{children:h.jsx(zu,{modelPath:e,sourceName:t,queryName:n})})]})]})})}const jT=new Bu(new Et),HT=Be(We.Box)(({theme:e})=>({display:"flex",flexWrap:"wrap",gap:e.spacing(.5),borderBottom:`1px solid ${e.palette.divider}`,minHeight:36})),UT=Be(x.Button)(({theme:e,selected:t})=>({minHeight:36,padding:e.spacing(.5,2),borderRadius:e.shape.borderRadius,background:t?e.palette.action.selected:"none",color:t?e.palette.primary.main:e.palette.text.primary,fontWeight:t?600:400,border:t?`1px solid ${e.palette.primary.main}`:"1px solid transparent",boxShadow:t?e.shadows[1]:"none",textTransform:"uppercase","&:hover":{background:e.palette.action.hover,border:`1px solid ${e.palette.primary.light}`}}));function Ju({sourceAndPaths:e,existingQuery:t,existingSourceName:n,onQueryChange:r,onSourceChange:i}){const[s,a]=P.useState(n?e.findIndex(l=>l.sourceInfo.name===n):0),[o,u]=P.useState(t||bi());return P.useEffect(()=>{i&&i(s)},[s,i]),h.jsxs(ut,{variant:"outlined",children:[h.jsx(Ut,{children:h.jsx(We.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:e.length>0&&h.jsx(HT,{children:e.map((l,d)=>h.jsx(UT,{selected:s===d,onClick:()=>a(d),children:l.sourceInfo.name||`Source ${d+1}`},l.sourceInfo.name||d))})})}),h.jsx(Mu,{children:h.jsxs(We.Stack,{spacing:2,component:"section",children:[h.jsx(el,{sourceAndPath:e[s],existingQuery:o,onChange:l=>{u(l),r&&r(l)}}),h.jsx(We.Box,{height:"5px"})]})})]})}function bi(){return{query:void 0,malloyQuery:void 0,malloyResult:void 0}}function zT({sourceAndPath:e,onChange:t,existingQuery:n,explorerComponents:r,QueryBuilder:i}){const[s,a]=P.useState(n||bi()),[o,u]=P.useState([]),{MalloyExplorerProvider:l,QueryPanel:d,ResizableCollapsiblePanel:c,ResultPanel:m,SourcePanel:p}=r;P.useEffect(()=>{t&&t(s)},[t,s]);const{projectName:g,packageName:b,versionId:T}=pt(),y=Lx({mutationFn:(D,w)=>{const B=new i.ASTQuery({source:e.sourceInfo,query:s?.malloyQuery}).toMalloy();return a({...s,query:B}),jT.executeQuery(g,b,e.modelPath,B,void 0,void 0,T,w)},onSuccess:D=>{if(D){const w=JSON.parse(D.data.result);a({...s,malloyResult:w})}}}),[C,S]=P.useState(e.sourceInfo.name);P.useEffect(()=>{C!==e.sourceInfo.name&&(S(e.sourceInfo.name),a(bi()))},[e,C]);const N=P.useCallback(D=>{a({...s,malloyQuery:D,malloyResult:void 0})},[s]);return C!==e.sourceInfo.name?h.jsx("div",{children:"Loading..."}):h.jsx(yf,{children:h.jsx(l,{source:e.sourceInfo,query:s?.malloyQuery,onQueryChange:N,focusedNestViewPath:o,onFocusedNestViewPathChange:u,onDrill:D=>{console.info(D)},children:h.jsxs("div",{style:{display:"flex",height:"100%",overflowY:"auto"},children:[h.jsx(c,{isInitiallyExpanded:!0,initialWidth:180,minWidth:180,icon:"database",title:e.sourceInfo.name,children:h.jsx(p,{onRefresh:()=>a(bi())})}),h.jsx(c,{isInitiallyExpanded:!0,initialWidth:280,minWidth:280,icon:"filterSliders",title:"Query",children:h.jsx(d,{runQuery:()=>{y.mutate()}})}),h.jsx(m,{source:e.sourceInfo,draftQuery:s?.malloyQuery,setDraftQuery:D=>a({...s,malloyQuery:D}),submittedQuery:s?.malloyQuery?{executionState:y.isPending?"running":"finished",response:{result:s.malloyResult},query:s.malloyQuery,queryResolutionStartMillis:Date.now(),onCancel:y.reset}:void 0,options:{showRawQuery:!0}})]})})},e.sourceInfo.name)}function el(e){const[t,n]=P.useState(null),[r,i]=P.useState(null),[s,a]=P.useState(!0);return P.useEffect(()=>{let o=!0;return Promise.all([import("@malloydata/malloy-explorer"),import("@malloydata/malloy-query-builder")]).then(([u,l])=>{o&&(n(u),i(l),a(!1))}).catch(u=>{console.error("Failed to load Malloy components:",u),o&&a(!1)}),()=>{o=!1}},[]),s||!t||!r?h.jsx(Ex,{children:h.jsx(yf,{children:h.jsx("div",{style:{alignItems:"center",justifyContent:"center",height:"200px",color:"#666"},children:"Loading explorer..."})})}):h.jsx(zT,{...e,explorerComponents:t,QueryBuilder:r})}const $T=new Ca(new Et);function tl(e,t){const{projectName:n,packageName:r,versionId:i}=pt(),s=t||i;return xt({queryKey:["package",n,r,e,s],queryFn:async a=>(await $T.getModel(n,r,e,s,a)).data})}function lp({modelPath:e,versionId:t,expandResults:n,hideResultIcons:r,expandEmbeddings:i,hideEmbeddingIcons:s,onChange:a}){const[o,u]=P.useState(0),{data:l,isError:d,isLoading:c,error:m}=tl(e,t);return c?h.jsx(bt,{text:"Fetching Model..."}):d?(console.log("error",m),h.jsx(gt,{error:m,context:`ModelExplorer > ${e}`})):h.jsxs(x.Stack,{spacing:2,component:"section",children:[Array.isArray(l.sourceInfos)&&l.sourceInfos.length>0&&h.jsx(x.Stack,{sx:{flexDirection:"row",justifyContent:"flex-start"},children:h.jsx(x.Tabs,{value:o,onChange:(p,g)=>u(g),variant:"scrollable",scrollButtons:"auto",sx:{borderBottom:1,borderColor:"divider",minHeight:36},children:l.sourceInfos.map((p,g)=>{let b;try{b=JSON.parse(p)}catch{b={name:String(g)}}return h.jsx(x.Tab,{label:b.name||`Source ${g+1}`,sx:{minHeight:36}},b.name||g)})})}),Array.isArray(l.sourceInfos)&&l.sourceInfos.length>0&&h.jsx(el,{sourceAndPath:{modelPath:e,sourceInfo:JSON.parse(l.sourceInfos[o])},onChange:a}),l.queries?.length>0&&h.jsxs(ut,{variant:"outlined",sx:{padding:"0px 10px 0px 10px"},children:[h.jsx(Ut,{sx:{p:"10px"},children:h.jsx(x.Typography,{variant:"subtitle1",children:"Named Queries"})}),h.jsx(x.Stack,{spacing:1,component:"section",children:l.queries.map(p=>h.jsx(BT,{modelPath:e,queryName:p.name,expandResult:n,hideResultIcon:r,expandEmbedding:i,hideEmbeddingIcon:s,noView:!0,annotations:p.annotations},p.name))}),h.jsx(x.Box,{height:"10px"})]}),h.jsx(x.Box,{height:"5px"})]})}function qT({modelPath:e,versionId:t,expandResults:n,hideResultIcons:r,expandEmbeddings:i,hideEmbeddingIcons:s,onChange:a}){const[o,u]=P.useState(!1),[l,d]=P.useState(),{isError:c,isLoading:m,error:p}=tl(e,t),g=VT(e);return P.useEffect(()=>{nr(g,"typescript").then(b=>{d(b)})},[o,g]),m?h.jsx(bt,{text:"Fetching Model..."}):c?(console.log("error",p),h.jsx(gt,{error:p,context:`Model > ${e}`})):h.jsxs(ut,{variant:"outlined",children:[h.jsxs(Ut,{children:[h.jsx(x.Stack,{sx:{flexDirection:"row",justifyContent:"flex-end"},children:!s&&h.jsx(x.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:h.jsx(x.Tooltip,{title:o?"Hide Embedding":"View Embedding",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{u(!o)},children:h.jsx($i,{})})})})}),h.jsxs(x.Collapse,{in:o,timeout:"auto",unmountOnExit:!0,children:[h.jsx(x.Divider,{}),h.jsxs(x.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[h.jsx(x.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:h.jsx("div",{dangerouslySetInnerHTML:{__html:l}})}),h.jsx(x.Tooltip,{title:"Copy Embeddable Code",children:h.jsx(x.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(g)},children:h.jsx(ma,{})})})]})]}),h.jsx(x.Divider,{})]}),h.jsx(lp,{modelPath:e,versionId:t,expandResults:n,hideResultIcons:r,expandEmbeddings:i,hideEmbeddingIcons:s,onChange:a})]})}function VT(e){return`<Model
115
115
  modelPath="${e}"
116
116
  accessToken={accessToken}
117
- />`}const MT=Me(h.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),gr=We.createStack({createStyledComponent:Be("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Br({props:e,name:"MuiStack"})});function tl(){const e=bh.useNavigate();return(t,n)=>{if(!n||!n.metaKey&&!n.ctrlKey&&!n.shiftKey&&n.button!==1){e(t);return}const r=new URL(t,window.location.href).href;(n.metaKey||n.ctrlKey||n.button===1||n.shiftKey)&&window.open(r,"_blank")}}class vr{constructor(t,n,r){this.workbookData=r,this.workbookStorage=t,this.packageContext=n,this.workbookData?this.isSaved=!0:(this.workbookData={models:[],cells:[],workbookPath:void 0},this.isSaved=!1)}isSaved;workbookStorage;packageContext;getWorkbookData(){return this.workbookData}getWorkbookPath(){return this.workbookData.workbookPath}async renameWorkbook(t){if(this.workbookData.workbookPath.path!==t)try{await this.workbookStorage.moveWorkbook(this.packageContext,this.workbookData.workbookPath,{path:t,workspace:this.workbookData.workbookPath.workspace})}catch{}return this.workbookData.workbookPath.path=t,this.isSaved=!1,await this.saveWorkbook()}getCells(){return this.workbookData.cells}deleteCell(t){return this.workbookData.cells=[...this.workbookData.cells.slice(0,t),...this.workbookData.cells.slice(t+1)],this.isSaved=!1,this}insertCell(t,n){return this.workbookData.cells=[...this.workbookData.cells.slice(0,t),n,...this.workbookData.cells.slice(t)],this.isSaved=!1,this}setCell(t,n){return this.workbookData.cells[t]=n,this.isSaved=!1,this}setModels(t){return this.workbookData.models=t,this.isSaved=!1,this}getModels(){return this.workbookData.models}updateWorkbookData(t){return this.workbookData=t,this.isSaved=!1,this}async saveWorkbook(){if(!this.isSaved){if(!this.workbookData.workbookPath)throw new Error("Workbook path is not set");await this.workbookStorage.saveWorkbook(this.packageContext,this.workbookData.workbookPath,JSON.stringify(this.workbookData)),this.isSaved=!0}return new vr(this.workbookStorage,this.packageContext,this.workbookData)}toMalloyWorkbook(){return this.workbookData.cells.map(t=>t.isMarkdown?`>>>markdown
117
+ />`}const WT=Oe(h.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),gr=We.createStack({createStyledComponent:Be("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Br({props:e,name:"MuiStack"})});function nl(){const e=bh.useNavigate();return(t,n)=>{if(!n||!n.metaKey&&!n.ctrlKey&&!n.shiftKey&&n.button!==1){e(t);return}const r=new URL(t,window.location.href).href;(n.metaKey||n.ctrlKey||n.button===1||n.shiftKey)&&window.open(r,"_blank")}}class vr{constructor(t,n,r){this.workbookData=r,this.workbookStorage=t,this.packageContext=n,this.workbookData?this.isSaved=!0:(this.workbookData={models:[],cells:[],workbookPath:void 0},this.isSaved=!1)}isSaved;workbookStorage;packageContext;getWorkbookData(){return this.workbookData}getWorkbookPath(){return this.workbookData.workbookPath}async renameWorkbook(t){if(this.workbookData.workbookPath.path!==t)try{await this.workbookStorage.moveWorkbook(this.packageContext,this.workbookData.workbookPath,{path:t,workspace:this.workbookData.workbookPath.workspace})}catch{}return this.workbookData.workbookPath.path=t,this.isSaved=!1,await this.saveWorkbook()}getCells(){return this.workbookData.cells}deleteCell(t){return this.workbookData.cells=[...this.workbookData.cells.slice(0,t),...this.workbookData.cells.slice(t+1)],this.isSaved=!1,this}insertCell(t,n){return this.workbookData.cells=[...this.workbookData.cells.slice(0,t),n,...this.workbookData.cells.slice(t)],this.isSaved=!1,this}setCell(t,n){return this.workbookData.cells[t]=n,this.isSaved=!1,this}setModels(t){return this.workbookData.models=t,this.isSaved=!1,this}getModels(){return this.workbookData.models}updateWorkbookData(t){return this.workbookData=t,this.isSaved=!1,this}async saveWorkbook(){if(!this.isSaved){if(!this.workbookData.workbookPath)throw new Error("Workbook path is not set");await this.workbookStorage.saveWorkbook(this.packageContext,this.workbookData.workbookPath,JSON.stringify(this.workbookData)),this.isSaved=!0}return new vr(this.workbookStorage,this.packageContext,this.workbookData)}toMalloyWorkbook(){return this.workbookData.cells.map(t=>t.isMarkdown?`>>>markdown
118
118
  `+t.value:`>>>malloy
119
119
  import {${t.sourceName}}" from '${t.modelPath}'"
120
120
  `+t.value+`
121
121
  `).join(`
122
- `)}static newWorkbook(t,n){return new vr(t,n,void 0)}static async loadWorkbook(t,n,r){let i;console.log("loadWorkbook",r);try{const s=await t.getWorkbook(n,r);s&&(i=JSON.parse(s))}catch{i={models:[],cells:[],workbookPath:r}}return new vr(t,n,i)}}const ap=N.createContext(void 0),BT=({server:e=`${window.location.protocol}//${window.location.host}/api/v0`,getAccessToken:t,children:n})=>{const r={server:e,getAccessToken:t};return h.jsx(ap.Provider,{value:r,children:n})},ka=()=>{const e=N.useContext(ap);if(e===void 0)throw new Error("useServer must be used within a ServerProvider");return e},ls=Me(h.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),jc=Me(h.jsx("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"}));function De(){return De=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},De.apply(null,arguments)}function Ks(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Sn(){return Sn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sn.apply(null,arguments)}function jT(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}const HT=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,UT=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zT={};function Hc(e,t){return(zT.jsx?UT:HT).test(e)}var br={},to,Uc;function $T(){if(Uc)return to;Uc=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
123
- `,l="/",d="*",c="",m="comment",p="declaration";to=function(b,T){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];T=T||{};var y=1,C=1;function S(z){var M=z.match(t);M&&(y+=M.length);var J=z.lastIndexOf(u);C=~J?z.length-J:C+z.length}function P(){var z={line:y,column:C};return function(M){return M.position=new D(z),V(),M}}function D(z){this.start=z,this.end={line:y,column:C},this.source=T.source}D.prototype.content=b;function w(z){var M=new Error(T.source+":"+y+":"+C+": "+z);if(M.reason=z,M.filename=T.source,M.line=y,M.column=C,M.source=b,!T.silent)throw M}function B(z){var M=z.exec(b);if(M){var J=M[0];return S(J),b=b.slice(J.length),M}}function V(){B(n)}function Q(z){var M;for(z=z||[];M=E();)M!==!1&&z.push(M);return z}function E(){var z=P();if(!(l!=b.charAt(0)||d!=b.charAt(1))){for(var M=2;c!=b.charAt(M)&&(d!=b.charAt(M)||l!=b.charAt(M+1));)++M;if(M+=2,c===b.charAt(M-1))return w("End of comment missing");var J=b.slice(2,M-2);return C+=2,S(J),b=b.slice(M),C+=2,z({type:m,comment:J})}}function L(){var z=P(),M=B(r);if(M){if(E(),!B(i))return w("property missing ':'");var J=B(s),oe=z({type:p,property:g(M[0].replace(e,c)),value:J?g(J[0].replace(e,c)):c});return B(a),oe}}function O(){var z=[];Q(z);for(var M;M=L();)M!==!1&&(z.push(M),Q(z));return z}return V(),O()};function g(b){return b?b.replace(o,c):c}return to}var zc;function qT(){if(zc)return br;zc=1;var e=br&&br.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(br,"__esModule",{value:!0}),br.default=n;var t=e($T());function n(r,i){var s=null;if(!r||typeof r!="string")return s;var a=(0,t.default)(r),o=typeof i=="function";return a.forEach(function(u){if(u.type==="declaration"){var l=u.property,d=u.value;o?i(l,d,u):d&&(s=s||{},s[l]=d)}}),s}return br}var ni={},$c;function VT(){if($c)return ni;$c=1,Object.defineProperty(ni,"__esModule",{value:!0}),ni.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(l){return!l||n.test(l)||e.test(l)},a=function(l,d){return d.toUpperCase()},o=function(l,d){return"".concat(d,"-")},u=function(l,d){return d===void 0&&(d={}),s(l)?l:(l=l.toLowerCase(),d.reactCompat?l=l.replace(i,o):l=l.replace(r,o),l.replace(t,a))};return ni.camelCase=u,ni}var ri,qc;function WT(){if(qc)return ri;qc=1;var e=ri&&ri.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(qT()),n=VT();function r(i,s){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(o,u){o&&u&&(a[(0,n.camelCase)(o,s)]=u)}),a}return r.default=r,ri=r,ri}var GT=WT();const YT=sa(GT),Ia=op("end"),cn=op("start");function op(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 KT(e){const t=cn(e),n=Ia(e);if(t&&n)return{start:t,end:n}}function Ei(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Vc(e.position):"start"in e||"end"in e?Vc(e):"line"in e||"column"in e?Qo(e):""}function Qo(e){return Wc(e&&e.line)+":"+Wc(e&&e.column)}function Vc(e){return Qo(e&&e.start)+"-"+Qo(e&&e.end)}function Wc(e){return e&&typeof e=="number"?e:1}class At extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?s.ruleId=r:(s.source=r.slice(0,u),s.ruleId=r.slice(u+1))}if(!s.place&&s.ancestors&&s.ancestors){const u=s.ancestors[s.ancestors.length-1];u&&(s.place=u.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.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=Ei(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual,this.expected,this.note,this.url}}At.prototype.file="";At.prototype.name="";At.prototype.reason="";At.prototype.message="";At.prototype.stack="";At.prototype.column=void 0;At.prototype.line=void 0;At.prototype.ancestors=void 0;At.prototype.cause=void 0;At.prototype.fatal=void 0;At.prototype.place=void 0;At.prototype.ruleId=void 0;At.prototype.source=void 0;const nl={}.hasOwnProperty,QT=new Map,XT=/[A-Z]/g,ZT=new Set(["table","tbody","thead","tfoot","tr"]),JT=new Set(["td","th"]),up="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function eC(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=uC(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=oC(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"?In:Ur,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=lp(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function lp(e,t,n){if(t.type==="element")return tC(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return nC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return iC(e,t,n);if(t.type==="mdxjsEsm")return rC(e,t);if(t.type==="root")return sC(e,t,n);if(t.type==="text")return aC(e,t)}function tC(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=In,e.schema=i),e.ancestors.push(t);const s=dp(e,t.tagName,!1),a=lC(e,t);let o=il(e,t);return ZT.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!Yi(u):!0})),cp(e,a,s,t),rl(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function nC(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)}Mi(e,t.position)}function rC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Mi(e,t.position)}function iC(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=In,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:dp(e,t.name,!0),a=cC(e,t),o=il(e,t);return cp(e,a,s,t),rl(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function sC(e,t,n){const r={};return rl(r,il(e,t)),e.create(t,e.Fragment,r,n)}function aC(e,t){return t.value}function cp(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function rl(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function oC(e,t,n){return r;function r(i,s,a,o){const l=Array.isArray(a.children)?n:t;return o?l(s,a,o):l(s,a)}}function uC(e,t){return n;function n(r,i,s,a){const o=Array.isArray(s.children),u=cn(r);return t(i,s,a,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function lC(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&nl.call(t.properties,i)){const s=dC(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&JT.has(t.tagName)?r=o:n[a]=o}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function cC(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Mi(e,t.position);else{const i=r.name;let s;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,s=e.evaluater.evaluateExpression(o.expression)}else Mi(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function il(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:QT;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const u=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(u){const l=i.get(u)||0;a=u+"-"+l,i.set(u,l+1)}}const o=lp(e,s,a);o!==void 0&&n.push(o)}return n}function dC(e,t,n){const r=Gi(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ea(n):xa(n)),r.property==="style"){let i=typeof n=="object"?n:hC(e,String(n));return e.stylePropertyNameCase==="css"&&(i=fC(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?A2[r.property]||r.property:r.attribute,n]}}function hC(e,t){try{return YT(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new At("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=up+"#cannot-parse-style-attribute",i}}function dp(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const o=Hc(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=a}else r=Hc(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return nl.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Mi(e)}function Mi(e,t){const n=new At("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=up+"#cannot-handle-mdx-estrees-without-createevaluater",n}function fC(e){const t={};let n;for(n in e)nl.call(e,n)&&(t[pC(n)]=e[n]);return t}function pC(e){let t=e.replace(XT,mC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function mC(e){return"-"+e.toLowerCase()}const no={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},gC={};function sl(e,t){const n=gC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return hp(e,r,i)}function hp(e,t,n){if(bC(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Gc(e.children,t,n)}return Array.isArray(e)?Gc(e,t,n):""}function Gc(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=hp(e[i],t,n);return r.join("")}function bC(e){return!!(e&&typeof e=="object")}const Yc=document.createElement("i");function al(e){const t="&"+e+";";Yc.innerHTML=t;const n=Yc.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ht(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?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);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function Yt(e,t){return e.length>0?(Ht(e,e.length,0,t),e):t}const Kc={}.hasOwnProperty;function fp(e){const t={};let n=-1;for(;++n<e.length;)EC(t,e[n]);return t}function EC(e,t){let n;for(n in t){const i=(Kc.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){Kc.call(i,a)||(i[a]=[]);const o=s[a];xC(i[a],Array.isArray(o)?o:o?[o]:[])}}}function xC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ht(e,0,0,r)}function pp(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&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 en(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vt=Hn(/[A-Za-z]/),St=Hn(/[\dA-Za-z]/),yC=Hn(/[#-'*+\--9=?A-Z^-~]/);function Qs(e){return e!==null&&(e<32||e===127)}const Xo=Hn(/\d/),TC=Hn(/[\dA-Fa-f]/),CC=Hn(/[!-/:-@[-`{-~]/);function me(e){return e!==null&&e<-2}function Le(e){return e!==null&&(e<0||e===32)}function Ie(e){return e===-2||e===-1||e===32}const _a=Hn(/\p{P}|\p{S}/u),rr=Hn(/\s/);function Hn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function $r(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&St(e.charCodeAt(n+1))&&St(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);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 _e(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(u){return Ie(u)?(e.enter(n),o(u)):t(u)}function o(u){return Ie(u)&&s++<i?(e.consume(u),o):(e.exit(n),t(u))}}const SC={tokenize:AC};function AC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),_e(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return me(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const kC={tokenize:IC},Qc={tokenize:_C};function IC(e){const t=this,n=[];let r=0,i,s,a;return o;function o(S){if(r<n.length){const P=n[r];return t.containerState=P[1],e.attempt(P[0].continuation,u,l)(S)}return l(S)}function u(S){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&C();const P=t.events.length;let D=P,w;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){w=t.events[D][1].end;break}y(r);let B=P;for(;B<t.events.length;)t.events[B][1].end={...w},B++;return Ht(t.events,D+1,0,t.events.slice(P)),t.events.length=B,l(S)}return o(S)}function l(S){if(r===n.length){if(!i)return m(S);if(i.currentConstruct&&i.currentConstruct.concrete)return g(S);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Qc,d,c)(S)}function d(S){return i&&C(),y(r),m(S)}function c(S){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,g(S)}function m(S){return t.containerState={},e.attempt(Qc,p,g)(S)}function p(S){return r++,n.push([t.currentConstruct,t.containerState]),m(S)}function g(S){if(S===null){i&&C(),y(0),e.consume(S);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),b(S)}function b(S){if(S===null){T(e.exit("chunkFlow"),!0),y(0),e.consume(S);return}return me(S)?(e.consume(S),T(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(S),b)}function T(S,P){const D=t.sliceStream(S);if(P&&D.push(null),S.previous=s,s&&(s.next=S),s=S,i.defineSkip(S.start),i.write(D),t.parser.lazy[S.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<a&&(!i.events[w][1].end||i.events[w][1].end.offset>a))return;const B=t.events.length;let V=B,Q,E;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){if(Q){E=t.events[V][1].end;break}Q=!0}for(y(r),w=B;w<t.events.length;)t.events[w][1].end={...E},w++;Ht(t.events,V+1,0,t.events.slice(B)),t.events.length=w}}function y(S){let P=n.length;for(;P-- >S;){const D=n[P];t.containerState=D[1],D[0].exit.call(t,e)}n.length=S}function C(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function _C(e,t,n){return _e(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Lr(e){if(e===null||Le(e)||rr(e))return 1;if(_a(e))return 2}function va(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Zo={name:"attention",resolveAll:vC,tokenize:DC};function vC(e,t){let n=-1,r,i,s,a,o,u,l,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},m={...e[n][1].start};Xc(c,-u),Xc(m,u),a={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},o={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},s={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[n][1].start={...o.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Yt(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Yt(l,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),l=Yt(l,va(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Yt(l,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,l=Yt(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Ht(e,r-1,n-r+3,l),n=r+l.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function DC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Lr(r);let s;return a;function a(u){return s=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===s)return e.consume(u),o;const l=e.exit("attentionSequence"),d=Lr(u),c=!d||d===2&&i||n.includes(u),m=!i||i===2&&d||n.includes(r);return l._open=!!(s===42?c:c&&(i||!m)),l._close=!!(s===42?m:m&&(d||!c)),t(u)}}function Xc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const wC={name:"autolink",tokenize:PC};function PC(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(p){return vt(p)?(e.consume(p),a):p===64?n(p):l(p)}function a(p){return p===43||p===45||p===46||St(p)?(r=1,o(p)):l(p)}function o(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||St(p))&&r++<32?(e.consume(p),o):(r=0,l(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Qs(p)?n(p):(e.consume(p),u)}function l(p){return p===64?(e.consume(p),d):yC(p)?(e.consume(p),l):n(p)}function d(p){return St(p)?c(p):n(p)}function c(p){return p===46?(e.consume(p),r=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):m(p)}function m(p){if((p===45||St(p))&&r++<63){const g=p===45?m:c;return e.consume(p),g}return n(p)}}const Qi={partial:!0,tokenize:NC};function NC(e,t,n){return r;function r(s){return Ie(s)?_e(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||me(s)?t(s):n(s)}}const mp={continuation:{tokenize:LC},exit:OC,name:"blockQuote",tokenize:RC};function RC(e,t,n){const r=this;return i;function i(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return Ie(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function LC(e,t,n){const r=this;return i;function i(a){return Ie(a)?_e(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(mp,t,n)(a)}}function OC(e){e.exit("blockQuote")}const gp={name:"characterEscape",tokenize:FC};function FC(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return CC(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const bp={name:"characterReference",tokenize:MC};function MC(e,t,n){const r=this;let i=0,s,a;return o;function o(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),u}function u(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),s=31,a=St,d(c))}function l(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=TC,d):(e.enter("characterReferenceValue"),s=7,a=Xo,d(c))}function d(c){if(c===59&&i){const m=e.exit("characterReferenceValue");return a===St&&!al(r.sliceSerialize(m))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(c)&&i++<s?(e.consume(c),d):n(c)}}const Zc={partial:!0,tokenize:jC},Jc={concrete:!0,name:"codeFenced",tokenize:BC};function BC(e,t,n){const r=this,i={partial:!0,tokenize:D};let s=0,a=0,o;return u;function u(w){return l(w)}function l(w){const B=r.events[r.events.length-1];return s=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,o=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(w)}function d(w){return w===o?(a++,e.consume(w),d):a<3?n(w):(e.exit("codeFencedFenceSequence"),Ie(w)?_e(e,c,"whitespace")(w):c(w))}function c(w){return w===null||me(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(Zc,b,P)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(w))}function m(w){return w===null||me(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(w)):Ie(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_e(e,p,"whitespace")(w)):w===96&&w===o?n(w):(e.consume(w),m)}function p(w){return w===null||me(w)?c(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(w))}function g(w){return w===null||me(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(w)):w===96&&w===o?n(w):(e.consume(w),g)}function b(w){return e.attempt(i,P,T)(w)}function T(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),y}function y(w){return s>0&&Ie(w)?_e(e,C,"linePrefix",s+1)(w):C(w)}function C(w){return w===null||me(w)?e.check(Zc,b,P)(w):(e.enter("codeFlowValue"),S(w))}function S(w){return w===null||me(w)?(e.exit("codeFlowValue"),C(w)):(e.consume(w),S)}function P(w){return e.exit("codeFenced"),t(w)}function D(w,B,V){let Q=0;return E;function E(J){return w.enter("lineEnding"),w.consume(J),w.exit("lineEnding"),L}function L(J){return w.enter("codeFencedFence"),Ie(J)?_e(w,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(J):O(J)}function O(J){return J===o?(w.enter("codeFencedFenceSequence"),z(J)):V(J)}function z(J){return J===o?(Q++,w.consume(J),z):Q>=a?(w.exit("codeFencedFenceSequence"),Ie(J)?_e(w,M,"whitespace")(J):M(J)):V(J)}function M(J){return J===null||me(J)?(w.exit("codeFencedFence"),B(J)):V(J)}}}function jC(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"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const ro={name:"codeIndented",tokenize:UC},HC={partial:!0,tokenize:zC};function UC(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),_e(e,s,"linePrefix",5)(l)}function s(l){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(l):n(l)}function a(l){return l===null?u(l):me(l)?e.attempt(HC,a,u)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||me(l)?(e.exit("codeFlowValue"),a(l)):(e.consume(l),o)}function u(l){return e.exit("codeIndented"),t(l)}}function zC(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):me(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):_e(e,s,"linePrefix",5)(a)}function s(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):me(a)?i(a):n(a)}}const $C={name:"codeText",previous:VC,resolve:qC,tokenize:WC};function qC(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<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function VC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function WC(e,t,n){let r=0,i,s;return a;function a(c){return e.enter("codeText"),e.enter("codeTextSequence"),o(c)}function o(c){return c===96?(e.consume(c),r++,o):(e.exit("codeTextSequence"),u(c))}function u(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),u):c===96?(s=e.enter("codeTextSequence"),i=0,d(c)):me(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(c))}function l(c){return c===null||c===32||c===96||me(c)?(e.exit("codeTextData"),u(c)):(e.consume(c),l)}function d(c){return c===96?(e.consume(c),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(s.type="codeTextData",l(c))}}class GC{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=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 t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.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 s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&ii(this.left,r),s.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),ii(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ii(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<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ii(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ii(this.left,n.reverse())}}}function ii(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ep(e){const t={};let n=-1,r,i,s,a,o,u,l;const d=new GC(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,s=0,s<u.length&&u[s][1].type==="lineEndingBlank"&&(s+=2),s<u.length&&u[s][1].type==="content"))for(;++s<u.length&&u[s][1].type!=="content";)u[s][1].type==="chunkText"&&(u[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,YC(d,n)),n=t[n],l=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=d.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},o=d.slice(i,n),o.unshift(r),d.splice(i,n-i+1,o))}}return Ht(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!l}function YC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,u=[],l={};let d,c,m=-1,p=n,g=0,b=0;const T=[b];for(;p;){for(;e.get(++i)[1]!==p;);s.push(i),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),c&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++m<o.length;)o[m][0]==="exit"&&o[m-1][0]==="enter"&&o[m][1].type===o[m-1][1].type&&o[m][1].start.line!==o[m][1].end.line&&(b=m+1,T.push(b),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):T.pop(),m=T.length;m--;){const y=o.slice(T[m],T[m+1]),C=s.pop();u.push([C,C+y.length-1]),e.splice(C,2,y)}for(u.reverse(),m=-1;++m<u.length;)l[g+u[m][0]]=g+u[m][1],g+=u[m][1]-u[m][0]-1;return l}const KC={resolve:XC,tokenize:ZC},QC={partial:!0,tokenize:JC};function XC(e){return Ep(e),e}function ZC(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):me(o)?e.check(QC,a,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function JC(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),_e(e,s,"linePrefix")}function s(a){if(a===null||me(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function xp(e,t,n,r,i,s,a,o,u){const l=u||Number.POSITIVE_INFINITY;let d=0;return c;function c(y){return y===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(y),e.exit(s),m):y===null||y===32||y===41||Qs(y)?n(y):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),b(y))}function m(y){return y===62?(e.enter(s),e.consume(y),e.exit(s),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),m(y)):y===null||y===60||me(y)?n(y):(e.consume(y),y===92?g:p)}function g(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function b(y){return!d&&(y===null||y===41||Le(y))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(y)):d<l&&y===40?(e.consume(y),d++,b):y===41?(e.consume(y),d--,b):y===null||y===32||y===40||Qs(y)?n(y):(e.consume(y),y===92?T:b)}function T(y){return y===40||y===41||y===92?(e.consume(y),b):b(y)}}function yp(e,t,n,r,i,s){const a=this;let o=0,u;return l;function l(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(s),d}function d(p){return o>999||p===null||p===91||p===93&&!u||p===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(s),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):me(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||me(p)||o++>999?(e.exit("chunkString"),d(p)):(e.consume(p),u||(u=!Ie(p)),p===92?m:c)}function m(p){return p===91||p===92||p===93?(e.consume(p),o++,c):c(p)}}function Tp(e,t,n,r,i,s){let a;return o;function o(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),a=m===40?41:m,u):n(m)}function u(m){return m===a?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(s),l(m))}function l(m){return m===a?(e.exit(s),u(a)):m===null?n(m):me(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),_e(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===a||m===null||me(m)?(e.exit("chunkString"),l(m)):(e.consume(m),m===92?c:d)}function c(m){return m===a||m===92?(e.consume(m),d):d(m)}}function xi(e,t){let n;return r;function r(i){return me(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ie(i)?_e(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const e6={name:"definition",tokenize:n6},t6={partial:!0,tokenize:r6};function n6(e,t,n){const r=this;let i;return s;function s(p){return e.enter("definition"),a(p)}function a(p){return yp.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function o(p){return i=en(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return Le(p)?xi(e,l)(p):l(p)}function l(p){return xp(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(t6,c,c)(p)}function c(p){return Ie(p)?_e(e,m,"whitespace")(p):m(p)}function m(p){return p===null||me(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function r6(e,t,n){return r;function r(o){return Le(o)?xi(e,i)(o):n(o)}function i(o){return Tp(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return Ie(o)?_e(e,a,"whitespace")(o):a(o)}function a(o){return o===null||me(o)?t(o):n(o)}}const i6={name:"hardBreakEscape",tokenize:s6};function s6(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return me(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const a6={name:"headingAtx",resolve:o6,tokenize:u6};function o6(e,t){let n=e.length-2,r=3,i,s;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},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ht(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function u6(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),s(d)}function s(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||Le(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||me(d)?(e.exit("atxHeading"),t(d)):Ie(d)?_e(e,o,"whitespace")(d):(e.enter("atxHeadingText"),l(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),o(d))}function l(d){return d===null||d===35||Le(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),l)}}const l6=["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"],ed=["pre","script","style","textarea"],c6={concrete:!0,name:"htmlFlow",resolveTo:f6,tokenize:p6},d6={partial:!0,tokenize:g6},h6={partial:!0,tokenize:m6};function f6(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 p6(e,t,n){const r=this;let i,s,a,o,u;return l;function l(I){return d(I)}function d(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),c}function c(I){return I===33?(e.consume(I),m):I===47?(e.consume(I),s=!0,b):I===63?(e.consume(I),i=3,r.interrupt?t:_):vt(I)?(e.consume(I),a=String.fromCharCode(I),T):n(I)}function m(I){return I===45?(e.consume(I),i=2,p):I===91?(e.consume(I),i=5,o=0,g):vt(I)?(e.consume(I),i=4,r.interrupt?t:_):n(I)}function p(I){return I===45?(e.consume(I),r.interrupt?t:_):n(I)}function g(I){const de="CDATA[";return I===de.charCodeAt(o++)?(e.consume(I),o===de.length?r.interrupt?t:O:g):n(I)}function b(I){return vt(I)?(e.consume(I),a=String.fromCharCode(I),T):n(I)}function T(I){if(I===null||I===47||I===62||Le(I)){const de=I===47,pe=a.toLowerCase();return!de&&!s&&ed.includes(pe)?(i=1,r.interrupt?t(I):O(I)):l6.includes(a.toLowerCase())?(i=6,de?(e.consume(I),y):r.interrupt?t(I):O(I)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):s?C(I):S(I))}return I===45||St(I)?(e.consume(I),a+=String.fromCharCode(I),T):n(I)}function y(I){return I===62?(e.consume(I),r.interrupt?t:O):n(I)}function C(I){return Ie(I)?(e.consume(I),C):E(I)}function S(I){return I===47?(e.consume(I),E):I===58||I===95||vt(I)?(e.consume(I),P):Ie(I)?(e.consume(I),S):E(I)}function P(I){return I===45||I===46||I===58||I===95||St(I)?(e.consume(I),P):D(I)}function D(I){return I===61?(e.consume(I),w):Ie(I)?(e.consume(I),D):S(I)}function w(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),u=I,B):Ie(I)?(e.consume(I),w):V(I)}function B(I){return I===u?(e.consume(I),u=null,Q):I===null||me(I)?n(I):(e.consume(I),B)}function V(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||Le(I)?D(I):(e.consume(I),V)}function Q(I){return I===47||I===62||Ie(I)?S(I):n(I)}function E(I){return I===62?(e.consume(I),L):n(I)}function L(I){return I===null||me(I)?O(I):Ie(I)?(e.consume(I),L):n(I)}function O(I){return I===45&&i===2?(e.consume(I),oe):I===60&&i===1?(e.consume(I),he):I===62&&i===4?(e.consume(I),Ee):I===63&&i===3?(e.consume(I),_):I===93&&i===5?(e.consume(I),G):me(I)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(d6,ue,z)(I)):I===null||me(I)?(e.exit("htmlFlowData"),z(I)):(e.consume(I),O)}function z(I){return e.check(h6,M,ue)(I)}function M(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),J}function J(I){return I===null||me(I)?z(I):(e.enter("htmlFlowData"),O(I))}function oe(I){return I===45?(e.consume(I),_):O(I)}function he(I){return I===47?(e.consume(I),a="",fe):O(I)}function fe(I){if(I===62){const de=a.toLowerCase();return ed.includes(de)?(e.consume(I),Ee):O(I)}return vt(I)&&a.length<8?(e.consume(I),a+=String.fromCharCode(I),fe):O(I)}function G(I){return I===93?(e.consume(I),_):O(I)}function _(I){return I===62?(e.consume(I),Ee):I===45&&i===2?(e.consume(I),_):O(I)}function Ee(I){return I===null||me(I)?(e.exit("htmlFlowData"),ue(I)):(e.consume(I),Ee)}function ue(I){return e.exit("htmlFlow"),t(I)}}function m6(e,t,n){const r=this;return i;function i(a){return me(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function g6(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Qi,t,n)}}const b6={name:"htmlText",tokenize:E6};function E6(e,t,n){const r=this;let i,s,a;return o;function o(_){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(_),u}function u(_){return _===33?(e.consume(_),l):_===47?(e.consume(_),D):_===63?(e.consume(_),S):vt(_)?(e.consume(_),V):n(_)}function l(_){return _===45?(e.consume(_),d):_===91?(e.consume(_),s=0,g):vt(_)?(e.consume(_),C):n(_)}function d(_){return _===45?(e.consume(_),p):n(_)}function c(_){return _===null?n(_):_===45?(e.consume(_),m):me(_)?(a=c,he(_)):(e.consume(_),c)}function m(_){return _===45?(e.consume(_),p):c(_)}function p(_){return _===62?oe(_):_===45?m(_):c(_)}function g(_){const Ee="CDATA[";return _===Ee.charCodeAt(s++)?(e.consume(_),s===Ee.length?b:g):n(_)}function b(_){return _===null?n(_):_===93?(e.consume(_),T):me(_)?(a=b,he(_)):(e.consume(_),b)}function T(_){return _===93?(e.consume(_),y):b(_)}function y(_){return _===62?oe(_):_===93?(e.consume(_),y):b(_)}function C(_){return _===null||_===62?oe(_):me(_)?(a=C,he(_)):(e.consume(_),C)}function S(_){return _===null?n(_):_===63?(e.consume(_),P):me(_)?(a=S,he(_)):(e.consume(_),S)}function P(_){return _===62?oe(_):S(_)}function D(_){return vt(_)?(e.consume(_),w):n(_)}function w(_){return _===45||St(_)?(e.consume(_),w):B(_)}function B(_){return me(_)?(a=B,he(_)):Ie(_)?(e.consume(_),B):oe(_)}function V(_){return _===45||St(_)?(e.consume(_),V):_===47||_===62||Le(_)?Q(_):n(_)}function Q(_){return _===47?(e.consume(_),oe):_===58||_===95||vt(_)?(e.consume(_),E):me(_)?(a=Q,he(_)):Ie(_)?(e.consume(_),Q):oe(_)}function E(_){return _===45||_===46||_===58||_===95||St(_)?(e.consume(_),E):L(_)}function L(_){return _===61?(e.consume(_),O):me(_)?(a=L,he(_)):Ie(_)?(e.consume(_),L):Q(_)}function O(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),i=_,z):me(_)?(a=O,he(_)):Ie(_)?(e.consume(_),O):(e.consume(_),M)}function z(_){return _===i?(e.consume(_),i=void 0,J):_===null?n(_):me(_)?(a=z,he(_)):(e.consume(_),z)}function M(_){return _===null||_===34||_===39||_===60||_===61||_===96?n(_):_===47||_===62||Le(_)?Q(_):(e.consume(_),M)}function J(_){return _===47||_===62||Le(_)?Q(_):n(_)}function oe(_){return _===62?(e.consume(_),e.exit("htmlTextData"),e.exit("htmlText"),t):n(_)}function he(_){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),fe}function fe(_){return Ie(_)?_e(e,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):G(_)}function G(_){return e.enter("htmlTextData"),a(_)}}const ol={name:"labelEnd",resolveAll:C6,resolveTo:S6,tokenize:A6},x6={tokenize:k6},y6={tokenize:I6},T6={tokenize:_6};function C6(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Ht(e,0,e.length,n),e}function S6(e,t){let n=e.length,r=0,i,s,a,o;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const u={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},d={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",u,t],["enter",l,t]],o=Yt(o,e.slice(s+1,s+r+3)),o=Yt(o,[["enter",d,t]]),o=Yt(o,va(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),o=Yt(o,[["exit",d,t],e[a-2],e[a-1],["exit",l,t]]),o=Yt(o,e.slice(a+1)),o=Yt(o,[["exit",u,t]]),Ht(e,s,e.length,o),e}function A6(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return o;function o(m){return s?s._inactive?c(m):(a=r.parser.defined.includes(en(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),u):n(m)}function u(m){return m===40?e.attempt(x6,d,a?d:c)(m):m===91?e.attempt(y6,d,a?l:c)(m):a?d(m):c(m)}function l(m){return e.attempt(T6,d,c)(m)}function d(m){return t(m)}function c(m){return s._balanced=!0,n(m)}}function k6(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return Le(c)?xi(e,s)(c):s(c)}function s(c){return c===41?d(c):xp(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function a(c){return Le(c)?xi(e,u)(c):d(c)}function o(c){return n(c)}function u(c){return c===34||c===39||c===40?Tp(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):d(c)}function l(c){return Le(c)?xi(e,d)(c):d(c)}function d(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function I6(e,t,n){const r=this;return i;function i(o){return yp.call(r,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(en(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function _6(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const v6={name:"labelStartImage",resolveAll:ol.resolveAll,tokenize:D6};function D6(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),s}function s(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const w6={name:"labelStartLink",resolveAll:ol.resolveAll,tokenize:P6};function P6(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const io={name:"lineEnding",tokenize:N6};function N6(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),_e(e,t,"linePrefix")}}const As={name:"thematicBreak",tokenize:R6};function R6(e,t,n){let r=0,i;return s;function s(l){return e.enter("thematicBreak"),a(l)}function a(l){return i=l,o(l)}function o(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||me(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===i?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),Ie(l)?_e(e,o,"whitespace")(l):o(l))}}const Rt={continuation:{tokenize:M6},exit:j6,name:"list",tokenize:F6},L6={partial:!0,tokenize:H6},O6={partial:!0,tokenize:B6};function F6(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Xo(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(As,n,l)(p):l(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return Xo(p)&&++a<10?(e.consume(p),u):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),l(p)):n(p)}function l(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Qi,r.interrupt?n:d,e.attempt(L6,m,c))}function d(p){return r.containerState.initialBlankLine=!0,s++,m(p)}function c(p){return Ie(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),m):n(p)}function m(p){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function M6(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Qi,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,_e(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!Ie(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(O6,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,_e(e,e.attempt(Rt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function B6(e,t,n){const r=this;return _e(e,i,"listItemIndent",r.containerState.size+1);function i(s){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(s):n(s)}}function j6(e){e.exit(this.containerState.type)}function H6(e,t,n){const r=this;return _e(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!Ie(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const td={name:"setextUnderline",resolveTo:U6,tokenize:z6};function U6(e,t){let n=e.length,r,i,s;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),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function z6(e,t,n){const r=this;let i;return s;function s(l){let d=r.events.length,c;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){c=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=l,a(l)):n(l)}function a(l){return e.enter("setextHeadingLineSequence"),o(l)}function o(l){return l===i?(e.consume(l),o):(e.exit("setextHeadingLineSequence"),Ie(l)?_e(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||me(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const $6={tokenize:q6};function q6(e){const t=this,n=e.attempt(Qi,r,e.attempt(this.parser.constructs.flowInitial,i,_e(e,e.attempt(this.parser.constructs.flow,i,e.attempt(KC,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const V6={resolveAll:Sp()},W6=Cp("string"),G6=Cp("text");function Cp(e){return{resolveAll:Sp(e==="text"?Y6:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,o);return a;function a(d){return l(d)?s(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return l(d)?(n.exit("data"),s(d)):(n.consume(d),u)}function l(d){if(d===null)return!0;const c=i[d];let m=-1;if(c)for(;++m<c.length;){const p=c[m];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Sp(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function Y6(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,a=-1,o=0,u;for(;s--;){const l=i[s];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(l===-2)u=!0,o++;else if(l!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const l={type:n===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const K6={42:Rt,43:Rt,45:Rt,48:Rt,49:Rt,50:Rt,51:Rt,52:Rt,53:Rt,54:Rt,55:Rt,56:Rt,57:Rt,62:mp},Q6={91:e6},X6={[-2]:ro,[-1]:ro,32:ro},Z6={35:a6,42:As,45:[td,As],60:c6,61:td,95:As,96:Jc,126:Jc},J6={38:bp,92:gp},e4={[-5]:io,[-4]:io,[-3]:io,33:v6,38:bp,42:Zo,60:[wC,b6],91:w6,92:[i6,gp],93:ol,95:Zo,96:$C},t4={null:[Zo,V6]},n4={null:[42,95]},r4={null:[]},i4=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:n4,contentInitial:Q6,disable:r4,document:K6,flow:Z6,flowInitial:X6,insideSpan:t4,string:J6,text:e4},Symbol.toStringTag,{value:"Module"}));function s4(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let a=[],o=[];const u={attempt:B(D),check:B(w),consume:C,enter:S,exit:P,interrupt:B(w,{interrupt:!0})},l={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:e,previous:null,sliceSerialize:m,sliceStream:p,write:c};let d=t.tokenize.call(l,u);return t.resolveAll&&s.push(t),l;function c(L){return a=Yt(a,L),T(),a[a.length-1]!==null?[]:(V(t,0),l.events=va(s,l.events,l),l.events)}function m(L,O){return o4(p(L),O)}function p(L){return a4(a,L)}function g(){const{_bufferIndex:L,_index:O,line:z,column:M,offset:J}=r;return{_bufferIndex:L,_index:O,line:z,column:M,offset:J}}function b(L){i[L.line]=L.column,E()}function T(){let L;for(;r._index<a.length;){const O=a[r._index];if(typeof O=="string")for(L=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<O.length;)y(O.charCodeAt(r._bufferIndex));else y(O)}}function y(L){d=d(L)}function C(L){me(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,E()):L!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=L}function S(L,O){const z=O||{};return z.type=L,z.start=g(),l.events.push(["enter",z,l]),o.push(z),z}function P(L){const O=o.pop();return O.end=g(),l.events.push(["exit",O,l]),O}function D(L,O){V(L,O.from)}function w(L,O){O.restore()}function B(L,O){return z;function z(M,J,oe){let he,fe,G,_;return Array.isArray(M)?ue(M):"tokenize"in M?ue([M]):Ee(M);function Ee(q){return re;function re(te){const we=te!==null&&q[te],ne=te!==null&&q.null,U=[...Array.isArray(we)?we:we?[we]:[],...Array.isArray(ne)?ne:ne?[ne]:[]];return ue(U)(te)}}function ue(q){return he=q,fe=0,q.length===0?oe:I(q[fe])}function I(q){return re;function re(te){return _=Q(),G=q,q.partial||(l.currentConstruct=q),q.name&&l.parser.constructs.disable.null.includes(q.name)?pe():q.tokenize.call(O?Object.assign(Object.create(l),O):l,u,de,pe)(te)}}function de(q){return L(G,_),J}function pe(q){return _.restore(),++fe<he.length?I(he[fe]):oe}}}function V(L,O){L.resolveAll&&!s.includes(L)&&s.push(L),L.resolve&&Ht(l.events,O,l.events.length-O,L.resolve(l.events.slice(O),l)),L.resolveTo&&(l.events=L.resolveTo(l.events,l))}function Q(){const L=g(),O=l.previous,z=l.currentConstruct,M=l.events.length,J=Array.from(o);return{from:M,restore:oe};function oe(){r=L,l.previous=O,l.currentConstruct=z,l.events.length=M,o=J,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function a4(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function o4(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
122
+ `)}static newWorkbook(t,n){return new vr(t,n,void 0)}static async loadWorkbook(t,n,r){let i;console.log("loadWorkbook",r);try{const s=await t.getWorkbook(n,r);s&&(i=JSON.parse(s))}catch{i={models:[],cells:[],workbookPath:r}}return new vr(t,n,i)}}const cp=P.createContext(void 0),GT=({server:e=`${window.location.protocol}//${window.location.host}/api/v0`,getAccessToken:t,children:n})=>{const r={server:e,getAccessToken:t};return h.jsx(cp.Provider,{value:r,children:n})},ka=()=>{const e=P.useContext(cp);if(e===void 0)throw new Error("useServer must be used within a ServerProvider");return e},ls=Oe(h.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),jc=Oe(h.jsx("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"}));function De(){return De=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},De.apply(null,arguments)}function Ks(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Sn(){return Sn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sn.apply(null,arguments)}function YT(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}const KT=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,QT=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,XT={};function Hc(e,t){return(XT.jsx?QT:KT).test(e)}var br={},to,Uc;function ZT(){if(Uc)return to;Uc=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
123
+ `,l="/",d="*",c="",m="comment",p="declaration";to=function(b,T){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];T=T||{};var y=1,C=1;function S(z){var M=z.match(t);M&&(y+=M.length);var J=z.lastIndexOf(u);C=~J?z.length-J:C+z.length}function N(){var z={line:y,column:C};return function(M){return M.position=new D(z),V(),M}}function D(z){this.start=z,this.end={line:y,column:C},this.source=T.source}D.prototype.content=b;function w(z){var M=new Error(T.source+":"+y+":"+C+": "+z);if(M.reason=z,M.filename=T.source,M.line=y,M.column=C,M.source=b,!T.silent)throw M}function B(z){var M=z.exec(b);if(M){var J=M[0];return S(J),b=b.slice(J.length),M}}function V(){B(n)}function Q(z){var M;for(z=z||[];M=E();)M!==!1&&z.push(M);return z}function E(){var z=N();if(!(l!=b.charAt(0)||d!=b.charAt(1))){for(var M=2;c!=b.charAt(M)&&(d!=b.charAt(M)||l!=b.charAt(M+1));)++M;if(M+=2,c===b.charAt(M-1))return w("End of comment missing");var J=b.slice(2,M-2);return C+=2,S(J),b=b.slice(M),C+=2,z({type:m,comment:J})}}function L(){var z=N(),M=B(r);if(M){if(E(),!B(i))return w("property missing ':'");var J=B(s),oe=z({type:p,property:g(M[0].replace(e,c)),value:J?g(J[0].replace(e,c)):c});return B(a),oe}}function O(){var z=[];Q(z);for(var M;M=L();)M!==!1&&(z.push(M),Q(z));return z}return V(),O()};function g(b){return b?b.replace(o,c):c}return to}var zc;function JT(){if(zc)return br;zc=1;var e=br&&br.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(br,"__esModule",{value:!0}),br.default=n;var t=e(ZT());function n(r,i){var s=null;if(!r||typeof r!="string")return s;var a=(0,t.default)(r),o=typeof i=="function";return a.forEach(function(u){if(u.type==="declaration"){var l=u.property,d=u.value;o?i(l,d,u):d&&(s=s||{},s[l]=d)}}),s}return br}var ni={},$c;function eC(){if($c)return ni;$c=1,Object.defineProperty(ni,"__esModule",{value:!0}),ni.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(l){return!l||n.test(l)||e.test(l)},a=function(l,d){return d.toUpperCase()},o=function(l,d){return"".concat(d,"-")},u=function(l,d){return d===void 0&&(d={}),s(l)?l:(l=l.toLowerCase(),d.reactCompat?l=l.replace(i,o):l=l.replace(r,o),l.replace(t,a))};return ni.camelCase=u,ni}var ri,qc;function tC(){if(qc)return ri;qc=1;var e=ri&&ri.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(JT()),n=eC();function r(i,s){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(o,u){o&&u&&(a[(0,n.camelCase)(o,s)]=u)}),a}return r.default=r,ri=r,ri}var nC=tC();const rC=sa(nC),Ia=dp("end"),cn=dp("start");function dp(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 iC(e){const t=cn(e),n=Ia(e);if(t&&n)return{start:t,end:n}}function Ei(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Vc(e.position):"start"in e||"end"in e?Vc(e):"line"in e||"column"in e?Qo(e):""}function Qo(e){return Wc(e&&e.line)+":"+Wc(e&&e.column)}function Vc(e){return Qo(e&&e.start)+"-"+Qo(e&&e.end)}function Wc(e){return e&&typeof e=="number"?e:1}class At extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?s.ruleId=r:(s.source=r.slice(0,u),s.ruleId=r.slice(u+1))}if(!s.place&&s.ancestors&&s.ancestors){const u=s.ancestors[s.ancestors.length-1];u&&(s.place=u.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.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=Ei(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual,this.expected,this.note,this.url}}At.prototype.file="";At.prototype.name="";At.prototype.reason="";At.prototype.message="";At.prototype.stack="";At.prototype.column=void 0;At.prototype.line=void 0;At.prototype.ancestors=void 0;At.prototype.cause=void 0;At.prototype.fatal=void 0;At.prototype.place=void 0;At.prototype.ruleId=void 0;At.prototype.source=void 0;const rl={}.hasOwnProperty,sC=new Map,aC=/[A-Z]/g,oC=new Set(["table","tbody","thead","tfoot","tr"]),uC=new Set(["td","th"]),hp="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function lC(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=bC(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=gC(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"?In:Ur,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=fp(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function fp(e,t,n){if(t.type==="element")return cC(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return dC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return fC(e,t,n);if(t.type==="mdxjsEsm")return hC(e,t);if(t.type==="root")return pC(e,t,n);if(t.type==="text")return mC(e,t)}function cC(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=In,e.schema=i),e.ancestors.push(t);const s=mp(e,t.tagName,!1),a=EC(e,t);let o=sl(e,t);return oC.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!Yi(u):!0})),pp(e,a,s,t),il(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function dC(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)}Mi(e,t.position)}function hC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Mi(e,t.position)}function fC(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=In,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:mp(e,t.name,!0),a=xC(e,t),o=sl(e,t);return pp(e,a,s,t),il(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function pC(e,t,n){const r={};return il(r,sl(e,t)),e.create(t,e.Fragment,r,n)}function mC(e,t){return t.value}function pp(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function il(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function gC(e,t,n){return r;function r(i,s,a,o){const l=Array.isArray(a.children)?n:t;return o?l(s,a,o):l(s,a)}}function bC(e,t){return n;function n(r,i,s,a){const o=Array.isArray(s.children),u=cn(r);return t(i,s,a,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function EC(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&rl.call(t.properties,i)){const s=yC(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&uC.has(t.tagName)?r=o:n[a]=o}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function xC(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Mi(e,t.position);else{const i=r.name;let s;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,s=e.evaluater.evaluateExpression(o.expression)}else Mi(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function sl(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:sC;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const u=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(u){const l=i.get(u)||0;a=u+"-"+l,i.set(u,l+1)}}const o=fp(e,s,a);o!==void 0&&n.push(o)}return n}function yC(e,t,n){const r=Gi(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ea(n):xa(n)),r.property==="style"){let i=typeof n=="object"?n:TC(e,String(n));return e.stylePropertyNameCase==="css"&&(i=CC(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?I2[r.property]||r.property:r.attribute,n]}}function TC(e,t){try{return rC(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new At("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=hp+"#cannot-parse-style-attribute",i}}function mp(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const o=Hc(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=a}else r=Hc(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return rl.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Mi(e)}function Mi(e,t){const n=new At("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=hp+"#cannot-handle-mdx-estrees-without-createevaluater",n}function CC(e){const t={};let n;for(n in e)rl.call(e,n)&&(t[SC(n)]=e[n]);return t}function SC(e){let t=e.replace(aC,AC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function AC(e){return"-"+e.toLowerCase()}const no={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},kC={};function al(e,t){const n=kC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return gp(e,r,i)}function gp(e,t,n){if(IC(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Gc(e.children,t,n)}return Array.isArray(e)?Gc(e,t,n):""}function Gc(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=gp(e[i],t,n);return r.join("")}function IC(e){return!!(e&&typeof e=="object")}const Yc=document.createElement("i");function ol(e){const t="&"+e+";";Yc.innerHTML=t;const n=Yc.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ht(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?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);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function Yt(e,t){return e.length>0?(Ht(e,e.length,0,t),e):t}const Kc={}.hasOwnProperty;function bp(e){const t={};let n=-1;for(;++n<e.length;)_C(t,e[n]);return t}function _C(e,t){let n;for(n in t){const i=(Kc.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){Kc.call(i,a)||(i[a]=[]);const o=s[a];vC(i[a],Array.isArray(o)?o:o?[o]:[])}}}function vC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ht(e,0,0,r)}function Ep(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&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 en(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vt=Hn(/[A-Za-z]/),St=Hn(/[\dA-Za-z]/),DC=Hn(/[#-'*+\--9=?A-Z^-~]/);function Qs(e){return e!==null&&(e<32||e===127)}const Xo=Hn(/\d/),wC=Hn(/[\dA-Fa-f]/),NC=Hn(/[!-/:-@[-`{-~]/);function me(e){return e!==null&&e<-2}function Le(e){return e!==null&&(e<0||e===32)}function Ie(e){return e===-2||e===-1||e===32}const _a=Hn(/\p{P}|\p{S}/u),rr=Hn(/\s/);function Hn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function qr(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&St(e.charCodeAt(n+1))&&St(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);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 _e(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(u){return Ie(u)?(e.enter(n),o(u)):t(u)}function o(u){return Ie(u)&&s++<i?(e.consume(u),o):(e.exit(n),t(u))}}const PC={tokenize:RC};function RC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),_e(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return me(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const LC={tokenize:OC},Qc={tokenize:FC};function OC(e){const t=this,n=[];let r=0,i,s,a;return o;function o(S){if(r<n.length){const N=n[r];return t.containerState=N[1],e.attempt(N[0].continuation,u,l)(S)}return l(S)}function u(S){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&C();const N=t.events.length;let D=N,w;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){w=t.events[D][1].end;break}y(r);let B=N;for(;B<t.events.length;)t.events[B][1].end={...w},B++;return Ht(t.events,D+1,0,t.events.slice(N)),t.events.length=B,l(S)}return o(S)}function l(S){if(r===n.length){if(!i)return m(S);if(i.currentConstruct&&i.currentConstruct.concrete)return g(S);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Qc,d,c)(S)}function d(S){return i&&C(),y(r),m(S)}function c(S){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,g(S)}function m(S){return t.containerState={},e.attempt(Qc,p,g)(S)}function p(S){return r++,n.push([t.currentConstruct,t.containerState]),m(S)}function g(S){if(S===null){i&&C(),y(0),e.consume(S);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),b(S)}function b(S){if(S===null){T(e.exit("chunkFlow"),!0),y(0),e.consume(S);return}return me(S)?(e.consume(S),T(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(S),b)}function T(S,N){const D=t.sliceStream(S);if(N&&D.push(null),S.previous=s,s&&(s.next=S),s=S,i.defineSkip(S.start),i.write(D),t.parser.lazy[S.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<a&&(!i.events[w][1].end||i.events[w][1].end.offset>a))return;const B=t.events.length;let V=B,Q,E;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){if(Q){E=t.events[V][1].end;break}Q=!0}for(y(r),w=B;w<t.events.length;)t.events[w][1].end={...E},w++;Ht(t.events,V+1,0,t.events.slice(B)),t.events.length=w}}function y(S){let N=n.length;for(;N-- >S;){const D=n[N];t.containerState=D[1],D[0].exit.call(t,e)}n.length=S}function C(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function FC(e,t,n){return _e(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Lr(e){if(e===null||Le(e)||rr(e))return 1;if(_a(e))return 2}function va(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Zo={name:"attention",resolveAll:MC,tokenize:BC};function MC(e,t){let n=-1,r,i,s,a,o,u,l,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},m={...e[n][1].start};Xc(c,-u),Xc(m,u),a={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},o={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},s={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[n][1].start={...o.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Yt(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Yt(l,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),l=Yt(l,va(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Yt(l,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,l=Yt(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Ht(e,r-1,n-r+3,l),n=r+l.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function BC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Lr(r);let s;return a;function a(u){return s=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===s)return e.consume(u),o;const l=e.exit("attentionSequence"),d=Lr(u),c=!d||d===2&&i||n.includes(u),m=!i||i===2&&d||n.includes(r);return l._open=!!(s===42?c:c&&(i||!m)),l._close=!!(s===42?m:m&&(d||!c)),t(u)}}function Xc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const jC={name:"autolink",tokenize:HC};function HC(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(p){return vt(p)?(e.consume(p),a):p===64?n(p):l(p)}function a(p){return p===43||p===45||p===46||St(p)?(r=1,o(p)):l(p)}function o(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||St(p))&&r++<32?(e.consume(p),o):(r=0,l(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Qs(p)?n(p):(e.consume(p),u)}function l(p){return p===64?(e.consume(p),d):DC(p)?(e.consume(p),l):n(p)}function d(p){return St(p)?c(p):n(p)}function c(p){return p===46?(e.consume(p),r=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):m(p)}function m(p){if((p===45||St(p))&&r++<63){const g=p===45?m:c;return e.consume(p),g}return n(p)}}const Qi={partial:!0,tokenize:UC};function UC(e,t,n){return r;function r(s){return Ie(s)?_e(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||me(s)?t(s):n(s)}}const xp={continuation:{tokenize:$C},exit:qC,name:"blockQuote",tokenize:zC};function zC(e,t,n){const r=this;return i;function i(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return Ie(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function $C(e,t,n){const r=this;return i;function i(a){return Ie(a)?_e(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(xp,t,n)(a)}}function qC(e){e.exit("blockQuote")}const yp={name:"characterEscape",tokenize:VC};function VC(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return NC(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Tp={name:"characterReference",tokenize:WC};function WC(e,t,n){const r=this;let i=0,s,a;return o;function o(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),u}function u(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),s=31,a=St,d(c))}function l(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=wC,d):(e.enter("characterReferenceValue"),s=7,a=Xo,d(c))}function d(c){if(c===59&&i){const m=e.exit("characterReferenceValue");return a===St&&!ol(r.sliceSerialize(m))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(c)&&i++<s?(e.consume(c),d):n(c)}}const Zc={partial:!0,tokenize:YC},Jc={concrete:!0,name:"codeFenced",tokenize:GC};function GC(e,t,n){const r=this,i={partial:!0,tokenize:D};let s=0,a=0,o;return u;function u(w){return l(w)}function l(w){const B=r.events[r.events.length-1];return s=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,o=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(w)}function d(w){return w===o?(a++,e.consume(w),d):a<3?n(w):(e.exit("codeFencedFenceSequence"),Ie(w)?_e(e,c,"whitespace")(w):c(w))}function c(w){return w===null||me(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(Zc,b,N)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(w))}function m(w){return w===null||me(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(w)):Ie(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_e(e,p,"whitespace")(w)):w===96&&w===o?n(w):(e.consume(w),m)}function p(w){return w===null||me(w)?c(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(w))}function g(w){return w===null||me(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(w)):w===96&&w===o?n(w):(e.consume(w),g)}function b(w){return e.attempt(i,N,T)(w)}function T(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),y}function y(w){return s>0&&Ie(w)?_e(e,C,"linePrefix",s+1)(w):C(w)}function C(w){return w===null||me(w)?e.check(Zc,b,N)(w):(e.enter("codeFlowValue"),S(w))}function S(w){return w===null||me(w)?(e.exit("codeFlowValue"),C(w)):(e.consume(w),S)}function N(w){return e.exit("codeFenced"),t(w)}function D(w,B,V){let Q=0;return E;function E(J){return w.enter("lineEnding"),w.consume(J),w.exit("lineEnding"),L}function L(J){return w.enter("codeFencedFence"),Ie(J)?_e(w,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(J):O(J)}function O(J){return J===o?(w.enter("codeFencedFenceSequence"),z(J)):V(J)}function z(J){return J===o?(Q++,w.consume(J),z):Q>=a?(w.exit("codeFencedFenceSequence"),Ie(J)?_e(w,M,"whitespace")(J):M(J)):V(J)}function M(J){return J===null||me(J)?(w.exit("codeFencedFence"),B(J)):V(J)}}}function YC(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"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const ro={name:"codeIndented",tokenize:QC},KC={partial:!0,tokenize:XC};function QC(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),_e(e,s,"linePrefix",5)(l)}function s(l){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(l):n(l)}function a(l){return l===null?u(l):me(l)?e.attempt(KC,a,u)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||me(l)?(e.exit("codeFlowValue"),a(l)):(e.consume(l),o)}function u(l){return e.exit("codeIndented"),t(l)}}function XC(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):me(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):_e(e,s,"linePrefix",5)(a)}function s(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):me(a)?i(a):n(a)}}const ZC={name:"codeText",previous:e6,resolve:JC,tokenize:t6};function JC(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<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function e6(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function t6(e,t,n){let r=0,i,s;return a;function a(c){return e.enter("codeText"),e.enter("codeTextSequence"),o(c)}function o(c){return c===96?(e.consume(c),r++,o):(e.exit("codeTextSequence"),u(c))}function u(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),u):c===96?(s=e.enter("codeTextSequence"),i=0,d(c)):me(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(c))}function l(c){return c===null||c===32||c===96||me(c)?(e.exit("codeTextData"),u(c)):(e.consume(c),l)}function d(c){return c===96?(e.consume(c),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(s.type="codeTextData",l(c))}}class n6{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=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 t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.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 s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&ii(this.left,r),s.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),ii(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ii(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<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ii(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ii(this.left,n.reverse())}}}function ii(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Cp(e){const t={};let n=-1,r,i,s,a,o,u,l;const d=new n6(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,s=0,s<u.length&&u[s][1].type==="lineEndingBlank"&&(s+=2),s<u.length&&u[s][1].type==="content"))for(;++s<u.length&&u[s][1].type!=="content";)u[s][1].type==="chunkText"&&(u[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,r6(d,n)),n=t[n],l=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=d.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},o=d.slice(i,n),o.unshift(r),d.splice(i,n-i+1,o))}}return Ht(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!l}function r6(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,u=[],l={};let d,c,m=-1,p=n,g=0,b=0;const T=[b];for(;p;){for(;e.get(++i)[1]!==p;);s.push(i),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),c&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++m<o.length;)o[m][0]==="exit"&&o[m-1][0]==="enter"&&o[m][1].type===o[m-1][1].type&&o[m][1].start.line!==o[m][1].end.line&&(b=m+1,T.push(b),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):T.pop(),m=T.length;m--;){const y=o.slice(T[m],T[m+1]),C=s.pop();u.push([C,C+y.length-1]),e.splice(C,2,y)}for(u.reverse(),m=-1;++m<u.length;)l[g+u[m][0]]=g+u[m][1],g+=u[m][1]-u[m][0]-1;return l}const i6={resolve:a6,tokenize:o6},s6={partial:!0,tokenize:u6};function a6(e){return Cp(e),e}function o6(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):me(o)?e.check(s6,a,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function u6(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),_e(e,s,"linePrefix")}function s(a){if(a===null||me(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Sp(e,t,n,r,i,s,a,o,u){const l=u||Number.POSITIVE_INFINITY;let d=0;return c;function c(y){return y===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(y),e.exit(s),m):y===null||y===32||y===41||Qs(y)?n(y):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),b(y))}function m(y){return y===62?(e.enter(s),e.consume(y),e.exit(s),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),m(y)):y===null||y===60||me(y)?n(y):(e.consume(y),y===92?g:p)}function g(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function b(y){return!d&&(y===null||y===41||Le(y))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(y)):d<l&&y===40?(e.consume(y),d++,b):y===41?(e.consume(y),d--,b):y===null||y===32||y===40||Qs(y)?n(y):(e.consume(y),y===92?T:b)}function T(y){return y===40||y===41||y===92?(e.consume(y),b):b(y)}}function Ap(e,t,n,r,i,s){const a=this;let o=0,u;return l;function l(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(s),d}function d(p){return o>999||p===null||p===91||p===93&&!u||p===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(s),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):me(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||me(p)||o++>999?(e.exit("chunkString"),d(p)):(e.consume(p),u||(u=!Ie(p)),p===92?m:c)}function m(p){return p===91||p===92||p===93?(e.consume(p),o++,c):c(p)}}function kp(e,t,n,r,i,s){let a;return o;function o(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),a=m===40?41:m,u):n(m)}function u(m){return m===a?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(s),l(m))}function l(m){return m===a?(e.exit(s),u(a)):m===null?n(m):me(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),_e(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===a||m===null||me(m)?(e.exit("chunkString"),l(m)):(e.consume(m),m===92?c:d)}function c(m){return m===a||m===92?(e.consume(m),d):d(m)}}function xi(e,t){let n;return r;function r(i){return me(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ie(i)?_e(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const l6={name:"definition",tokenize:d6},c6={partial:!0,tokenize:h6};function d6(e,t,n){const r=this;let i;return s;function s(p){return e.enter("definition"),a(p)}function a(p){return Ap.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function o(p){return i=en(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return Le(p)?xi(e,l)(p):l(p)}function l(p){return Sp(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(c6,c,c)(p)}function c(p){return Ie(p)?_e(e,m,"whitespace")(p):m(p)}function m(p){return p===null||me(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function h6(e,t,n){return r;function r(o){return Le(o)?xi(e,i)(o):n(o)}function i(o){return kp(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return Ie(o)?_e(e,a,"whitespace")(o):a(o)}function a(o){return o===null||me(o)?t(o):n(o)}}const f6={name:"hardBreakEscape",tokenize:p6};function p6(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return me(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const m6={name:"headingAtx",resolve:g6,tokenize:b6};function g6(e,t){let n=e.length-2,r=3,i,s;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},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ht(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function b6(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),s(d)}function s(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||Le(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||me(d)?(e.exit("atxHeading"),t(d)):Ie(d)?_e(e,o,"whitespace")(d):(e.enter("atxHeadingText"),l(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),o(d))}function l(d){return d===null||d===35||Le(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),l)}}const E6=["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"],ed=["pre","script","style","textarea"],x6={concrete:!0,name:"htmlFlow",resolveTo:C6,tokenize:S6},y6={partial:!0,tokenize:k6},T6={partial:!0,tokenize:A6};function C6(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 S6(e,t,n){const r=this;let i,s,a,o,u;return l;function l(I){return d(I)}function d(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),c}function c(I){return I===33?(e.consume(I),m):I===47?(e.consume(I),s=!0,b):I===63?(e.consume(I),i=3,r.interrupt?t:_):vt(I)?(e.consume(I),a=String.fromCharCode(I),T):n(I)}function m(I){return I===45?(e.consume(I),i=2,p):I===91?(e.consume(I),i=5,o=0,g):vt(I)?(e.consume(I),i=4,r.interrupt?t:_):n(I)}function p(I){return I===45?(e.consume(I),r.interrupt?t:_):n(I)}function g(I){const de="CDATA[";return I===de.charCodeAt(o++)?(e.consume(I),o===de.length?r.interrupt?t:O:g):n(I)}function b(I){return vt(I)?(e.consume(I),a=String.fromCharCode(I),T):n(I)}function T(I){if(I===null||I===47||I===62||Le(I)){const de=I===47,pe=a.toLowerCase();return!de&&!s&&ed.includes(pe)?(i=1,r.interrupt?t(I):O(I)):E6.includes(a.toLowerCase())?(i=6,de?(e.consume(I),y):r.interrupt?t(I):O(I)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):s?C(I):S(I))}return I===45||St(I)?(e.consume(I),a+=String.fromCharCode(I),T):n(I)}function y(I){return I===62?(e.consume(I),r.interrupt?t:O):n(I)}function C(I){return Ie(I)?(e.consume(I),C):E(I)}function S(I){return I===47?(e.consume(I),E):I===58||I===95||vt(I)?(e.consume(I),N):Ie(I)?(e.consume(I),S):E(I)}function N(I){return I===45||I===46||I===58||I===95||St(I)?(e.consume(I),N):D(I)}function D(I){return I===61?(e.consume(I),w):Ie(I)?(e.consume(I),D):S(I)}function w(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),u=I,B):Ie(I)?(e.consume(I),w):V(I)}function B(I){return I===u?(e.consume(I),u=null,Q):I===null||me(I)?n(I):(e.consume(I),B)}function V(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||Le(I)?D(I):(e.consume(I),V)}function Q(I){return I===47||I===62||Ie(I)?S(I):n(I)}function E(I){return I===62?(e.consume(I),L):n(I)}function L(I){return I===null||me(I)?O(I):Ie(I)?(e.consume(I),L):n(I)}function O(I){return I===45&&i===2?(e.consume(I),oe):I===60&&i===1?(e.consume(I),he):I===62&&i===4?(e.consume(I),Ee):I===63&&i===3?(e.consume(I),_):I===93&&i===5?(e.consume(I),G):me(I)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(y6,ue,z)(I)):I===null||me(I)?(e.exit("htmlFlowData"),z(I)):(e.consume(I),O)}function z(I){return e.check(T6,M,ue)(I)}function M(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),J}function J(I){return I===null||me(I)?z(I):(e.enter("htmlFlowData"),O(I))}function oe(I){return I===45?(e.consume(I),_):O(I)}function he(I){return I===47?(e.consume(I),a="",fe):O(I)}function fe(I){if(I===62){const de=a.toLowerCase();return ed.includes(de)?(e.consume(I),Ee):O(I)}return vt(I)&&a.length<8?(e.consume(I),a+=String.fromCharCode(I),fe):O(I)}function G(I){return I===93?(e.consume(I),_):O(I)}function _(I){return I===62?(e.consume(I),Ee):I===45&&i===2?(e.consume(I),_):O(I)}function Ee(I){return I===null||me(I)?(e.exit("htmlFlowData"),ue(I)):(e.consume(I),Ee)}function ue(I){return e.exit("htmlFlow"),t(I)}}function A6(e,t,n){const r=this;return i;function i(a){return me(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function k6(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Qi,t,n)}}const I6={name:"htmlText",tokenize:_6};function _6(e,t,n){const r=this;let i,s,a;return o;function o(_){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(_),u}function u(_){return _===33?(e.consume(_),l):_===47?(e.consume(_),D):_===63?(e.consume(_),S):vt(_)?(e.consume(_),V):n(_)}function l(_){return _===45?(e.consume(_),d):_===91?(e.consume(_),s=0,g):vt(_)?(e.consume(_),C):n(_)}function d(_){return _===45?(e.consume(_),p):n(_)}function c(_){return _===null?n(_):_===45?(e.consume(_),m):me(_)?(a=c,he(_)):(e.consume(_),c)}function m(_){return _===45?(e.consume(_),p):c(_)}function p(_){return _===62?oe(_):_===45?m(_):c(_)}function g(_){const Ee="CDATA[";return _===Ee.charCodeAt(s++)?(e.consume(_),s===Ee.length?b:g):n(_)}function b(_){return _===null?n(_):_===93?(e.consume(_),T):me(_)?(a=b,he(_)):(e.consume(_),b)}function T(_){return _===93?(e.consume(_),y):b(_)}function y(_){return _===62?oe(_):_===93?(e.consume(_),y):b(_)}function C(_){return _===null||_===62?oe(_):me(_)?(a=C,he(_)):(e.consume(_),C)}function S(_){return _===null?n(_):_===63?(e.consume(_),N):me(_)?(a=S,he(_)):(e.consume(_),S)}function N(_){return _===62?oe(_):S(_)}function D(_){return vt(_)?(e.consume(_),w):n(_)}function w(_){return _===45||St(_)?(e.consume(_),w):B(_)}function B(_){return me(_)?(a=B,he(_)):Ie(_)?(e.consume(_),B):oe(_)}function V(_){return _===45||St(_)?(e.consume(_),V):_===47||_===62||Le(_)?Q(_):n(_)}function Q(_){return _===47?(e.consume(_),oe):_===58||_===95||vt(_)?(e.consume(_),E):me(_)?(a=Q,he(_)):Ie(_)?(e.consume(_),Q):oe(_)}function E(_){return _===45||_===46||_===58||_===95||St(_)?(e.consume(_),E):L(_)}function L(_){return _===61?(e.consume(_),O):me(_)?(a=L,he(_)):Ie(_)?(e.consume(_),L):Q(_)}function O(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),i=_,z):me(_)?(a=O,he(_)):Ie(_)?(e.consume(_),O):(e.consume(_),M)}function z(_){return _===i?(e.consume(_),i=void 0,J):_===null?n(_):me(_)?(a=z,he(_)):(e.consume(_),z)}function M(_){return _===null||_===34||_===39||_===60||_===61||_===96?n(_):_===47||_===62||Le(_)?Q(_):(e.consume(_),M)}function J(_){return _===47||_===62||Le(_)?Q(_):n(_)}function oe(_){return _===62?(e.consume(_),e.exit("htmlTextData"),e.exit("htmlText"),t):n(_)}function he(_){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),fe}function fe(_){return Ie(_)?_e(e,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):G(_)}function G(_){return e.enter("htmlTextData"),a(_)}}const ul={name:"labelEnd",resolveAll:N6,resolveTo:P6,tokenize:R6},v6={tokenize:L6},D6={tokenize:O6},w6={tokenize:F6};function N6(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Ht(e,0,e.length,n),e}function P6(e,t){let n=e.length,r=0,i,s,a,o;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const u={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},d={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",u,t],["enter",l,t]],o=Yt(o,e.slice(s+1,s+r+3)),o=Yt(o,[["enter",d,t]]),o=Yt(o,va(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),o=Yt(o,[["exit",d,t],e[a-2],e[a-1],["exit",l,t]]),o=Yt(o,e.slice(a+1)),o=Yt(o,[["exit",u,t]]),Ht(e,s,e.length,o),e}function R6(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return o;function o(m){return s?s._inactive?c(m):(a=r.parser.defined.includes(en(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),u):n(m)}function u(m){return m===40?e.attempt(v6,d,a?d:c)(m):m===91?e.attempt(D6,d,a?l:c)(m):a?d(m):c(m)}function l(m){return e.attempt(w6,d,c)(m)}function d(m){return t(m)}function c(m){return s._balanced=!0,n(m)}}function L6(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return Le(c)?xi(e,s)(c):s(c)}function s(c){return c===41?d(c):Sp(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function a(c){return Le(c)?xi(e,u)(c):d(c)}function o(c){return n(c)}function u(c){return c===34||c===39||c===40?kp(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):d(c)}function l(c){return Le(c)?xi(e,d)(c):d(c)}function d(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function O6(e,t,n){const r=this;return i;function i(o){return Ap.call(r,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(en(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function F6(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const M6={name:"labelStartImage",resolveAll:ul.resolveAll,tokenize:B6};function B6(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),s}function s(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const j6={name:"labelStartLink",resolveAll:ul.resolveAll,tokenize:H6};function H6(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const io={name:"lineEnding",tokenize:U6};function U6(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),_e(e,t,"linePrefix")}}const As={name:"thematicBreak",tokenize:z6};function z6(e,t,n){let r=0,i;return s;function s(l){return e.enter("thematicBreak"),a(l)}function a(l){return i=l,o(l)}function o(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||me(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===i?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),Ie(l)?_e(e,o,"whitespace")(l):o(l))}}const Rt={continuation:{tokenize:W6},exit:Y6,name:"list",tokenize:V6},$6={partial:!0,tokenize:K6},q6={partial:!0,tokenize:G6};function V6(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Xo(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(As,n,l)(p):l(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return Xo(p)&&++a<10?(e.consume(p),u):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),l(p)):n(p)}function l(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Qi,r.interrupt?n:d,e.attempt($6,m,c))}function d(p){return r.containerState.initialBlankLine=!0,s++,m(p)}function c(p){return Ie(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),m):n(p)}function m(p){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function W6(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Qi,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,_e(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!Ie(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(q6,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,_e(e,e.attempt(Rt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function G6(e,t,n){const r=this;return _e(e,i,"listItemIndent",r.containerState.size+1);function i(s){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(s):n(s)}}function Y6(e){e.exit(this.containerState.type)}function K6(e,t,n){const r=this;return _e(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!Ie(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const td={name:"setextUnderline",resolveTo:Q6,tokenize:X6};function Q6(e,t){let n=e.length,r,i,s;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),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function X6(e,t,n){const r=this;let i;return s;function s(l){let d=r.events.length,c;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){c=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=l,a(l)):n(l)}function a(l){return e.enter("setextHeadingLineSequence"),o(l)}function o(l){return l===i?(e.consume(l),o):(e.exit("setextHeadingLineSequence"),Ie(l)?_e(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||me(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const Z6={tokenize:J6};function J6(e){const t=this,n=e.attempt(Qi,r,e.attempt(this.parser.constructs.flowInitial,i,_e(e,e.attempt(this.parser.constructs.flow,i,e.attempt(i6,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const e4={resolveAll:_p()},t4=Ip("string"),n4=Ip("text");function Ip(e){return{resolveAll:_p(e==="text"?r4:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,o);return a;function a(d){return l(d)?s(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return l(d)?(n.exit("data"),s(d)):(n.consume(d),u)}function l(d){if(d===null)return!0;const c=i[d];let m=-1;if(c)for(;++m<c.length;){const p=c[m];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function _p(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function r4(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,a=-1,o=0,u;for(;s--;){const l=i[s];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(l===-2)u=!0,o++;else if(l!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const l={type:n===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const i4={42:Rt,43:Rt,45:Rt,48:Rt,49:Rt,50:Rt,51:Rt,52:Rt,53:Rt,54:Rt,55:Rt,56:Rt,57:Rt,62:xp},s4={91:l6},a4={[-2]:ro,[-1]:ro,32:ro},o4={35:m6,42:As,45:[td,As],60:x6,61:td,95:As,96:Jc,126:Jc},u4={38:Tp,92:yp},l4={[-5]:io,[-4]:io,[-3]:io,33:M6,38:Tp,42:Zo,60:[jC,I6],91:j6,92:[f6,yp],93:ul,95:Zo,96:ZC},c4={null:[Zo,e4]},d4={null:[42,95]},h4={null:[]},f4=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:d4,contentInitial:s4,disable:h4,document:i4,flow:o4,flowInitial:a4,insideSpan:c4,string:u4,text:l4},Symbol.toStringTag,{value:"Module"}));function p4(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let a=[],o=[];const u={attempt:B(D),check:B(w),consume:C,enter:S,exit:N,interrupt:B(w,{interrupt:!0})},l={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:e,previous:null,sliceSerialize:m,sliceStream:p,write:c};let d=t.tokenize.call(l,u);return t.resolveAll&&s.push(t),l;function c(L){return a=Yt(a,L),T(),a[a.length-1]!==null?[]:(V(t,0),l.events=va(s,l.events,l),l.events)}function m(L,O){return g4(p(L),O)}function p(L){return m4(a,L)}function g(){const{_bufferIndex:L,_index:O,line:z,column:M,offset:J}=r;return{_bufferIndex:L,_index:O,line:z,column:M,offset:J}}function b(L){i[L.line]=L.column,E()}function T(){let L;for(;r._index<a.length;){const O=a[r._index];if(typeof O=="string")for(L=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<O.length;)y(O.charCodeAt(r._bufferIndex));else y(O)}}function y(L){d=d(L)}function C(L){me(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,E()):L!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=L}function S(L,O){const z=O||{};return z.type=L,z.start=g(),l.events.push(["enter",z,l]),o.push(z),z}function N(L){const O=o.pop();return O.end=g(),l.events.push(["exit",O,l]),O}function D(L,O){V(L,O.from)}function w(L,O){O.restore()}function B(L,O){return z;function z(M,J,oe){let he,fe,G,_;return Array.isArray(M)?ue(M):"tokenize"in M?ue([M]):Ee(M);function Ee(q){return re;function re(te){const we=te!==null&&q[te],ne=te!==null&&q.null,U=[...Array.isArray(we)?we:we?[we]:[],...Array.isArray(ne)?ne:ne?[ne]:[]];return ue(U)(te)}}function ue(q){return he=q,fe=0,q.length===0?oe:I(q[fe])}function I(q){return re;function re(te){return _=Q(),G=q,q.partial||(l.currentConstruct=q),q.name&&l.parser.constructs.disable.null.includes(q.name)?pe():q.tokenize.call(O?Object.assign(Object.create(l),O):l,u,de,pe)(te)}}function de(q){return L(G,_),J}function pe(q){return _.restore(),++fe<he.length?I(he[fe]):oe}}}function V(L,O){L.resolveAll&&!s.includes(L)&&s.push(L),L.resolve&&Ht(l.events,O,l.events.length-O,L.resolve(l.events.slice(O),l)),L.resolveTo&&(l.events=L.resolveTo(l.events,l))}function Q(){const L=g(),O=l.previous,z=l.currentConstruct,M=l.events.length,J=Array.from(o);return{from:M,restore:oe};function oe(){r=L,l.previous=O,l.currentConstruct=z,l.events.length=M,o=J,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function m4(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function g4(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
124
124
  `;break}case-3:{a=`\r
125
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function u4(e){const r={constructs:fp([i4,...(e||{}).extensions||[]]),content:i(SC),defined:[],document:i(kC),flow:i($6),lazy:{},string:i(W6),text:i(G6)};return r;function i(s){return a;function a(o){return s4(r,s,o)}}}function l4(e){for(;!Ep(e););return e}const nd=/[\0\t\n\r]/g;function c4(){let e=1,t="",n=!0,r;return i;function i(s,a,o){const u=[];let l,d,c,m,p;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),c=0,t="",n&&(s.charCodeAt(0)===65279&&c++,n=void 0);c<s.length;){if(nd.lastIndex=c,l=nd.exec(s),m=l&&l.index!==void 0?l.index:s.length,p=s.charCodeAt(m),!l){t=s.slice(c);break}if(p===10&&c===m&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),c<m&&(u.push(s.slice(c,m)),e+=m-c),p){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}c=m+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const d4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function h4(e){return e.replace(d4,f4)}function f4(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return pp(n.slice(s?2:1),s?16:10)}return al(n)||e}const Ap={}.hasOwnProperty;function p4(e,t,n){return typeof t!="string"&&(n=t,t=void 0),m4(n)(l4(u4(n).document().write(c4()(e,t,!0))))}function m4(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(at),autolinkProtocol:Q,autolinkEmail:Q,atxHeading:s(zt),blockQuote:s(ne),characterEscape:Q,characterReference:Q,codeFenced:s(U),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(U,a),codeText:s(xe,a),codeTextData:Q,data:Q,codeFlowValue:Q,definition:s(je),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(ce),hardBreakEscape:s(yt),hardBreakTrailing:s(yt),htmlFlow:s(Ce,a),htmlFlowData:Q,htmlText:s(Ce,a),htmlTextData:Q,image:s(st),label:a,link:s(at),listItem:s(rn),listItemValue:m,listOrdered:s(Xe,c),listUnordered:s(Xe),paragraph:s(se),reference:I,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(zt),strong:s(Xr),thematicBreak:s(ze)},exit:{atxHeading:u(),atxHeadingSequence:D,autolink:u(),autolinkEmail:we,autolinkProtocol:te,blockQuote:u(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:q,characterReference:re,codeFenced:u(T),codeFencedFence:b,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:E,codeIndented:u(y),codeText:u(J),codeTextData:E,data:E,definition:u(),definitionDestinationString:P,definitionLabelString:C,definitionTitleString:S,emphasis:u(),hardBreakEscape:u(O),hardBreakTrailing:u(O),htmlFlow:u(z),htmlFlowData:E,htmlText:u(M),htmlTextData:E,image:u(he),label:G,labelText:fe,lineEnding:L,link:u(oe),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:de,resourceDestinationString:_,resourceTitleString:Ee,resource:ue,setextHeading:u(V),setextHeadingLineSequence:B,setextHeadingText:w,strong:u(),thematicBreak:u()}};kp(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(H){let ee={type:"root",children:[]};const ge={stack:[ee],tokenStack:[],config:t,enter:o,exit:l,buffer:a,resume:d,data:n},Se=[];let ve=-1;for(;++ve<H.length;)if(H[ve][1].type==="listOrdered"||H[ve][1].type==="listUnordered")if(H[ve][0]==="enter")Se.push(ve);else{const Tt=Se.pop();ve=i(H,Tt,ve)}for(ve=-1;++ve<H.length;){const Tt=t[H[ve][0]];Ap.call(Tt,H[ve][1].type)&&Tt[H[ve][1].type].call(Object.assign({sliceSerialize:H[ve][2].sliceSerialize},ge),H[ve][1])}if(ge.tokenStack.length>0){const Tt=ge.tokenStack[ge.tokenStack.length-1];(Tt[1]||rd).call(ge,void 0,Tt[0])}for(ee.position={start:Nn(H.length>0?H[0][1].start:{line:1,column:1,offset:0}),end:Nn(H.length>0?H[H.length-2][1].end:{line:1,column:1,offset:0})},ve=-1;++ve<t.transforms.length;)ee=t.transforms[ve](ee)||ee;return ee}function i(H,ee,ge){let Se=ee-1,ve=-1,Tt=!1,ct,wt,$t,K;for(;++Se<=ge;){const ie=H[Se];switch(ie[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ie[0]==="enter"?ve++:ve--,K=void 0;break}case"lineEndingBlank":{ie[0]==="enter"&&(ct&&!K&&!ve&&!$t&&($t=Se),K=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:K=void 0}if(!ve&&ie[0]==="enter"&&ie[1].type==="listItemPrefix"||ve===-1&&ie[0]==="exit"&&(ie[1].type==="listUnordered"||ie[1].type==="listOrdered")){if(ct){let ae=Se;for(wt=void 0;ae--;){const be=H[ae];if(be[1].type==="lineEnding"||be[1].type==="lineEndingBlank"){if(be[0]==="exit")continue;wt&&(H[wt][1].type="lineEndingBlank",Tt=!0),be[1].type="lineEnding",wt=ae}else if(!(be[1].type==="linePrefix"||be[1].type==="blockQuotePrefix"||be[1].type==="blockQuotePrefixWhitespace"||be[1].type==="blockQuoteMarker"||be[1].type==="listItemIndent"))break}$t&&(!wt||$t<wt)&&(ct._spread=!0),ct.end=Object.assign({},wt?H[wt][1].start:ie[1].end),H.splice(wt||Se,0,["exit",ct,ie[2]]),Se++,ge++}if(ie[1].type==="listItemPrefix"){const ae={type:"listItem",_spread:!1,start:Object.assign({},ie[1].start),end:void 0};ct=ae,H.splice(Se,0,["enter",ae,ie[2]]),Se++,ge++,$t=void 0,K=!0}}}return H[ee][1]._spread=Tt,ge}function s(H,ee){return ge;function ge(Se){o.call(this,H(Se),Se),ee&&ee.call(this,Se)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(H,ee,ge){this.stack[this.stack.length-1].children.push(H),this.stack.push(H),this.tokenStack.push([ee,ge||void 0]),H.position={start:Nn(ee.start),end:void 0}}function u(H){return ee;function ee(ge){H&&H.call(this,ge),l.call(this,ge)}}function l(H,ee){const ge=this.stack.pop(),Se=this.tokenStack.pop();if(Se)Se[0].type!==H.type&&(ee?ee.call(this,H,Se[0]):(Se[1]||rd).call(this,H,Se[0]));else throw new Error("Cannot close `"+H.type+"` ("+Ei({start:H.start,end:H.end})+"): it’s not open");ge.position.end=Nn(H.end)}function d(){return sl(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function m(H){if(this.data.expectingFirstListItemValue){const ee=this.stack[this.stack.length-2];ee.start=Number.parseInt(this.sliceSerialize(H),10),this.data.expectingFirstListItemValue=void 0}}function p(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.lang=H}function g(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.meta=H}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.value=H.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.value=H.replace(/(\r?\n|\r)$/g,"")}function C(H){const ee=this.resume(),ge=this.stack[this.stack.length-1];ge.label=ee,ge.identifier=en(this.sliceSerialize(H)).toLowerCase()}function S(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.title=H}function P(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.url=H}function D(H){const ee=this.stack[this.stack.length-1];if(!ee.depth){const ge=this.sliceSerialize(H).length;ee.depth=ge}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function B(H){const ee=this.stack[this.stack.length-1];ee.depth=this.sliceSerialize(H).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function Q(H){const ge=this.stack[this.stack.length-1].children;let Se=ge[ge.length-1];(!Se||Se.type!=="text")&&(Se=Zr(),Se.position={start:Nn(H.start),end:void 0},ge.push(Se)),this.stack.push(Se)}function E(H){const ee=this.stack.pop();ee.value+=this.sliceSerialize(H),ee.position.end=Nn(H.end)}function L(H){const ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ge=ee.children[ee.children.length-1];ge.position.end=Nn(H.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ee.type)&&(Q.call(this,H),E.call(this,H))}function O(){this.data.atHardBreak=!0}function z(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.value=H}function M(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.value=H}function J(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.value=H}function oe(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const ee=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=ee,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function he(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const ee=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=ee,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function fe(H){const ee=this.sliceSerialize(H),ge=this.stack[this.stack.length-2];ge.label=h4(ee),ge.identifier=en(ee).toLowerCase()}function G(){const H=this.stack[this.stack.length-1],ee=this.resume(),ge=this.stack[this.stack.length-1];if(this.data.inReference=!0,ge.type==="link"){const Se=H.children;ge.children=Se}else ge.alt=ee}function _(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.url=H}function Ee(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.title=H}function ue(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function de(H){const ee=this.resume(),ge=this.stack[this.stack.length-1];ge.label=ee,ge.identifier=en(this.sliceSerialize(H)).toLowerCase(),this.data.referenceType="full"}function pe(H){this.data.characterReferenceType=H.type}function q(H){const ee=this.sliceSerialize(H),ge=this.data.characterReferenceType;let Se;ge?(Se=pp(ee,ge==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Se=al(ee);const ve=this.stack[this.stack.length-1];ve.value+=Se}function re(H){const ee=this.stack.pop();ee.position.end=Nn(H.end)}function te(H){E.call(this,H);const ee=this.stack[this.stack.length-1];ee.url=this.sliceSerialize(H)}function we(H){E.call(this,H);const ee=this.stack[this.stack.length-1];ee.url="mailto:"+this.sliceSerialize(H)}function ne(){return{type:"blockquote",children:[]}}function U(){return{type:"code",lang:null,meta:null,value:""}}function xe(){return{type:"inlineCode",value:""}}function je(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ce(){return{type:"emphasis",children:[]}}function zt(){return{type:"heading",depth:0,children:[]}}function yt(){return{type:"break"}}function Ce(){return{type:"html",value:""}}function st(){return{type:"image",title:null,url:"",alt:null}}function at(){return{type:"link",title:null,url:"",children:[]}}function Xe(H){return{type:"list",ordered:H.type==="listOrdered",start:null,spread:H._spread,children:[]}}function rn(H){return{type:"listItem",spread:H._spread,checked:null,children:[]}}function se(){return{type:"paragraph",children:[]}}function Xr(){return{type:"strong",children:[]}}function Zr(){return{type:"text",value:""}}function ze(){return{type:"thematicBreak"}}}function Nn(e){return{line:e.line,column:e.column,offset:e.offset}}function kp(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?kp(e,r):g4(e,r)}}function g4(e,t){let n;for(n in t)if(Ap.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function rd(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ei({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ei({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ei({start:t.start,end:t.end})+") is still open")}function b4(e){const t=this;t.parser=n;function n(r){return p4(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function E4(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function x4(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
126
- `}]}function y4(e,t){const n=t.value?t.value+`
127
- `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function T4(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function C4(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function S4(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=$r(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)}function A4(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function k4(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ip(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function I4(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ip(e,t);const i={src:$r(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function _4(e,t){const n={src:$r(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function v4(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function D4(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ip(e,t);const i={href:$r(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function w4(e,t){const n={href:$r(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function P4(e,t,n){const r=e.all(t),i=n?N4(n):_p(t),s={},a=[];if(typeof t.checked=="boolean"){const d=r[0];let c;d&&d.type==="element"&&d.tagName==="p"?c=d:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
125
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function b4(e){const r={constructs:bp([f4,...(e||{}).extensions||[]]),content:i(PC),defined:[],document:i(LC),flow:i(Z6),lazy:{},string:i(t4),text:i(n4)};return r;function i(s){return a;function a(o){return p4(r,s,o)}}}function E4(e){for(;!Cp(e););return e}const nd=/[\0\t\n\r]/g;function x4(){let e=1,t="",n=!0,r;return i;function i(s,a,o){const u=[];let l,d,c,m,p;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),c=0,t="",n&&(s.charCodeAt(0)===65279&&c++,n=void 0);c<s.length;){if(nd.lastIndex=c,l=nd.exec(s),m=l&&l.index!==void 0?l.index:s.length,p=s.charCodeAt(m),!l){t=s.slice(c);break}if(p===10&&c===m&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),c<m&&(u.push(s.slice(c,m)),e+=m-c),p){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}c=m+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const y4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function T4(e){return e.replace(y4,C4)}function C4(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Ep(n.slice(s?2:1),s?16:10)}return ol(n)||e}const vp={}.hasOwnProperty;function S4(e,t,n){return typeof t!="string"&&(n=t,t=void 0),A4(n)(E4(b4(n).document().write(x4()(e,t,!0))))}function A4(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(at),autolinkProtocol:Q,autolinkEmail:Q,atxHeading:s(zt),blockQuote:s(ne),characterEscape:Q,characterReference:Q,codeFenced:s(U),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(U,a),codeText:s(xe,a),codeTextData:Q,data:Q,codeFlowValue:Q,definition:s(je),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(ce),hardBreakEscape:s(yt),hardBreakTrailing:s(yt),htmlFlow:s(Ce,a),htmlFlowData:Q,htmlText:s(Ce,a),htmlTextData:Q,image:s(st),label:a,link:s(at),listItem:s(rn),listItemValue:m,listOrdered:s(Xe,c),listUnordered:s(Xe),paragraph:s(se),reference:I,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(zt),strong:s(Xr),thematicBreak:s(ze)},exit:{atxHeading:u(),atxHeadingSequence:D,autolink:u(),autolinkEmail:we,autolinkProtocol:te,blockQuote:u(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:q,characterReference:re,codeFenced:u(T),codeFencedFence:b,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:E,codeIndented:u(y),codeText:u(J),codeTextData:E,data:E,definition:u(),definitionDestinationString:N,definitionLabelString:C,definitionTitleString:S,emphasis:u(),hardBreakEscape:u(O),hardBreakTrailing:u(O),htmlFlow:u(z),htmlFlowData:E,htmlText:u(M),htmlTextData:E,image:u(he),label:G,labelText:fe,lineEnding:L,link:u(oe),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:de,resourceDestinationString:_,resourceTitleString:Ee,resource:ue,setextHeading:u(V),setextHeadingLineSequence:B,setextHeadingText:w,strong:u(),thematicBreak:u()}};Dp(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(H){let ee={type:"root",children:[]};const ge={stack:[ee],tokenStack:[],config:t,enter:o,exit:l,buffer:a,resume:d,data:n},Se=[];let ve=-1;for(;++ve<H.length;)if(H[ve][1].type==="listOrdered"||H[ve][1].type==="listUnordered")if(H[ve][0]==="enter")Se.push(ve);else{const Tt=Se.pop();ve=i(H,Tt,ve)}for(ve=-1;++ve<H.length;){const Tt=t[H[ve][0]];vp.call(Tt,H[ve][1].type)&&Tt[H[ve][1].type].call(Object.assign({sliceSerialize:H[ve][2].sliceSerialize},ge),H[ve][1])}if(ge.tokenStack.length>0){const Tt=ge.tokenStack[ge.tokenStack.length-1];(Tt[1]||rd).call(ge,void 0,Tt[0])}for(ee.position={start:Pn(H.length>0?H[0][1].start:{line:1,column:1,offset:0}),end:Pn(H.length>0?H[H.length-2][1].end:{line:1,column:1,offset:0})},ve=-1;++ve<t.transforms.length;)ee=t.transforms[ve](ee)||ee;return ee}function i(H,ee,ge){let Se=ee-1,ve=-1,Tt=!1,ct,wt,$t,K;for(;++Se<=ge;){const ie=H[Se];switch(ie[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ie[0]==="enter"?ve++:ve--,K=void 0;break}case"lineEndingBlank":{ie[0]==="enter"&&(ct&&!K&&!ve&&!$t&&($t=Se),K=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:K=void 0}if(!ve&&ie[0]==="enter"&&ie[1].type==="listItemPrefix"||ve===-1&&ie[0]==="exit"&&(ie[1].type==="listUnordered"||ie[1].type==="listOrdered")){if(ct){let ae=Se;for(wt=void 0;ae--;){const be=H[ae];if(be[1].type==="lineEnding"||be[1].type==="lineEndingBlank"){if(be[0]==="exit")continue;wt&&(H[wt][1].type="lineEndingBlank",Tt=!0),be[1].type="lineEnding",wt=ae}else if(!(be[1].type==="linePrefix"||be[1].type==="blockQuotePrefix"||be[1].type==="blockQuotePrefixWhitespace"||be[1].type==="blockQuoteMarker"||be[1].type==="listItemIndent"))break}$t&&(!wt||$t<wt)&&(ct._spread=!0),ct.end=Object.assign({},wt?H[wt][1].start:ie[1].end),H.splice(wt||Se,0,["exit",ct,ie[2]]),Se++,ge++}if(ie[1].type==="listItemPrefix"){const ae={type:"listItem",_spread:!1,start:Object.assign({},ie[1].start),end:void 0};ct=ae,H.splice(Se,0,["enter",ae,ie[2]]),Se++,ge++,$t=void 0,K=!0}}}return H[ee][1]._spread=Tt,ge}function s(H,ee){return ge;function ge(Se){o.call(this,H(Se),Se),ee&&ee.call(this,Se)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(H,ee,ge){this.stack[this.stack.length-1].children.push(H),this.stack.push(H),this.tokenStack.push([ee,ge||void 0]),H.position={start:Pn(ee.start),end:void 0}}function u(H){return ee;function ee(ge){H&&H.call(this,ge),l.call(this,ge)}}function l(H,ee){const ge=this.stack.pop(),Se=this.tokenStack.pop();if(Se)Se[0].type!==H.type&&(ee?ee.call(this,H,Se[0]):(Se[1]||rd).call(this,H,Se[0]));else throw new Error("Cannot close `"+H.type+"` ("+Ei({start:H.start,end:H.end})+"): it’s not open");ge.position.end=Pn(H.end)}function d(){return al(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function m(H){if(this.data.expectingFirstListItemValue){const ee=this.stack[this.stack.length-2];ee.start=Number.parseInt(this.sliceSerialize(H),10),this.data.expectingFirstListItemValue=void 0}}function p(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.lang=H}function g(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.meta=H}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.value=H.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.value=H.replace(/(\r?\n|\r)$/g,"")}function C(H){const ee=this.resume(),ge=this.stack[this.stack.length-1];ge.label=ee,ge.identifier=en(this.sliceSerialize(H)).toLowerCase()}function S(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.title=H}function N(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.url=H}function D(H){const ee=this.stack[this.stack.length-1];if(!ee.depth){const ge=this.sliceSerialize(H).length;ee.depth=ge}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function B(H){const ee=this.stack[this.stack.length-1];ee.depth=this.sliceSerialize(H).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function Q(H){const ge=this.stack[this.stack.length-1].children;let Se=ge[ge.length-1];(!Se||Se.type!=="text")&&(Se=Zr(),Se.position={start:Pn(H.start),end:void 0},ge.push(Se)),this.stack.push(Se)}function E(H){const ee=this.stack.pop();ee.value+=this.sliceSerialize(H),ee.position.end=Pn(H.end)}function L(H){const ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ge=ee.children[ee.children.length-1];ge.position.end=Pn(H.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ee.type)&&(Q.call(this,H),E.call(this,H))}function O(){this.data.atHardBreak=!0}function z(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.value=H}function M(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.value=H}function J(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.value=H}function oe(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const ee=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=ee,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function he(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const ee=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=ee,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function fe(H){const ee=this.sliceSerialize(H),ge=this.stack[this.stack.length-2];ge.label=T4(ee),ge.identifier=en(ee).toLowerCase()}function G(){const H=this.stack[this.stack.length-1],ee=this.resume(),ge=this.stack[this.stack.length-1];if(this.data.inReference=!0,ge.type==="link"){const Se=H.children;ge.children=Se}else ge.alt=ee}function _(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.url=H}function Ee(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.title=H}function ue(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function de(H){const ee=this.resume(),ge=this.stack[this.stack.length-1];ge.label=ee,ge.identifier=en(this.sliceSerialize(H)).toLowerCase(),this.data.referenceType="full"}function pe(H){this.data.characterReferenceType=H.type}function q(H){const ee=this.sliceSerialize(H),ge=this.data.characterReferenceType;let Se;ge?(Se=Ep(ee,ge==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Se=ol(ee);const ve=this.stack[this.stack.length-1];ve.value+=Se}function re(H){const ee=this.stack.pop();ee.position.end=Pn(H.end)}function te(H){E.call(this,H);const ee=this.stack[this.stack.length-1];ee.url=this.sliceSerialize(H)}function we(H){E.call(this,H);const ee=this.stack[this.stack.length-1];ee.url="mailto:"+this.sliceSerialize(H)}function ne(){return{type:"blockquote",children:[]}}function U(){return{type:"code",lang:null,meta:null,value:""}}function xe(){return{type:"inlineCode",value:""}}function je(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ce(){return{type:"emphasis",children:[]}}function zt(){return{type:"heading",depth:0,children:[]}}function yt(){return{type:"break"}}function Ce(){return{type:"html",value:""}}function st(){return{type:"image",title:null,url:"",alt:null}}function at(){return{type:"link",title:null,url:"",children:[]}}function Xe(H){return{type:"list",ordered:H.type==="listOrdered",start:null,spread:H._spread,children:[]}}function rn(H){return{type:"listItem",spread:H._spread,checked:null,children:[]}}function se(){return{type:"paragraph",children:[]}}function Xr(){return{type:"strong",children:[]}}function Zr(){return{type:"text",value:""}}function ze(){return{type:"thematicBreak"}}}function Pn(e){return{line:e.line,column:e.column,offset:e.offset}}function Dp(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Dp(e,r):k4(e,r)}}function k4(e,t){let n;for(n in t)if(vp.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function rd(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ei({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ei({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ei({start:t.start,end:t.end})+") is still open")}function I4(e){const t=this;t.parser=n;function n(r){return S4(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function _4(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function v4(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
126
+ `}]}function D4(e,t){const n=t.value?t.value+`
127
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function w4(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function N4(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function P4(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=qr(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)}function R4(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function L4(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function wp(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function O4(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return wp(e,t);const i={src:qr(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function F4(e,t){const n={src:qr(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function M4(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function B4(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return wp(e,t);const i={href:qr(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function j4(e,t){const n={href:qr(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function H4(e,t,n){const r=e.all(t),i=n?U4(n):Np(t),s={},a=[];if(typeof t.checked=="boolean"){const d=r[0];let c;d&&d.type==="element"&&d.tagName==="p"?c=d:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
128
128
  `}),d.type==="element"&&d.tagName==="p"&&!i?a.push(...d.children):a.push(d)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
129
- `});const l={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,l),e.applyData(t,l)}function N4(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=_p(n[r])}return t}function _p(e){const t=e.spread;return t??e.children.length>1}function R4(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function L4(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function O4(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function F4(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function M4(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=cn(t.children[1]),u=Ia(t.children[t.children.length-1]);o&&u&&(a.position={start:o,end:u}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function B4(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:t.children.length;let u=-1;const l=[];for(;++u<o;){const c=t.children[u],m={},p=a?a[u]:void 0;p&&(m.align=p);let g={type:"element",tagName:s,properties:m,children:[]};c&&(g.children=e.all(c),e.patch(c,g),g=e.applyData(c,g)),l.push(g)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,d),e.applyData(t,d)}function j4(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const id=9,sd=32;function H4(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(ad(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(ad(t.slice(i),i>0,!1)),s.join("")}function ad(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===id||s===sd;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===id||s===sd;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function U4(e,t){const n={type:"text",value:H4(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function z4(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const $4={blockquote:E4,break:x4,code:y4,delete:T4,emphasis:C4,footnoteReference:S4,heading:A4,html:k4,imageReference:I4,image:_4,inlineCode:v4,linkReference:D4,link:w4,listItem:P4,list:R4,paragraph:L4,root:O4,strong:F4,table:M4,tableCell:j4,tableRow:B4,text:U4,thematicBreak:z4,toml:cs,yaml:cs,definition:cs,footnoteDefinition:cs};function cs(){}const vp=-1,Da=0,yi=1,Xs=2,ul=3,ll=4,cl=5,dl=6,Dp=7,wp=8,od=typeof self=="object"?self:globalThis,q4=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case Da:case vp:return n(a,i);case yi:{const o=n([],i);for(const u of a)o.push(r(u));return o}case Xs:{const o=n({},i);for(const[u,l]of a)o[r(u)]=r(l);return o}case ul:return n(new Date(a),i);case ll:{const{source:o,flags:u}=a;return n(new RegExp(o,u),i)}case cl:{const o=n(new Map,i);for(const[u,l]of a)o.set(r(u),r(l));return o}case dl:{const o=n(new Set,i);for(const u of a)o.add(r(u));return o}case Dp:{const{name:o,message:u}=a;return n(new od[o](u),i)}case wp:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(new od[s](a),i)};return r},ud=e=>q4(new Map,e)(0),Er="",{toString:V4}={},{keys:W4}=Object,si=e=>{const t=typeof e;if(t!=="object"||!e)return[Da,t];const n=V4.call(e).slice(8,-1);switch(n){case"Array":return[yi,Er];case"Object":return[Xs,Er];case"Date":return[ul,Er];case"RegExp":return[ll,Er];case"Map":return[cl,Er];case"Set":return[dl,Er];case"DataView":return[yi,n]}return n.includes("Array")?[yi,n]:n.includes("Error")?[Dp,n]:[Xs,n]},ds=([e,t])=>e===Da&&(t==="function"||t==="symbol"),G4=(e,t,n,r)=>{const i=(a,o)=>{const u=r.push(a)-1;return n.set(o,u),u},s=a=>{if(n.has(a))return n.get(a);let[o,u]=si(a);switch(o){case Da:{let d=a;switch(u){case"bigint":o=wp,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return i([vp],a)}return i([o,d],a)}case yi:{if(u){let m=a;return u==="DataView"?m=new Uint8Array(a.buffer):u==="ArrayBuffer"&&(m=new Uint8Array(a)),i([u,[...m]],a)}const d=[],c=i([o,d],a);for(const m of a)d.push(s(m));return c}case Xs:{if(u)switch(u){case"BigInt":return i([u,a.toString()],a);case"Boolean":case"Number":case"String":return i([u,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const d=[],c=i([o,d],a);for(const m of W4(a))(e||!ds(si(a[m])))&&d.push([s(m),s(a[m])]);return c}case ul:return i([o,a.toISOString()],a);case ll:{const{source:d,flags:c}=a;return i([o,{source:d,flags:c}],a)}case cl:{const d=[],c=i([o,d],a);for(const[m,p]of a)(e||!(ds(si(m))||ds(si(p))))&&d.push([s(m),s(p)]);return c}case dl:{const d=[],c=i([o,d],a);for(const m of a)(e||!ds(si(m)))&&d.push(s(m));return c}}const{message:l}=a;return i([o,{name:u,message:l}],a)};return s},ld=(e,{json:t,lossy:n}={})=>{const r=[];return G4(!(t||n),!!t,new Map,r)(e),r},ir=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ud(ld(e,t)):structuredClone(e):(e,t)=>ud(ld(e,t));function Y4(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function K4(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Q4(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Y4,r=e.options.footnoteBackLabel||K4,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const d=e.all(l),c=String(l.identifier).toUpperCase(),m=$r(c.toLowerCase());let p=0;const g=[],b=e.footnoteCounts.get(c);for(;b!==void 0&&++p<=b;){g.length>0&&g.push({type:"text",value:" "});let C=typeof n=="string"?n:n(u,p);typeof C=="string"&&(C={type:"text",value:C}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,p),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const T=d[d.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const C=T.children[T.children.length-1];C&&C.type==="text"?C.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...g)}else d.push(...g);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(d,!0)};e.patch(l,y),o.push(y)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...ir(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
129
+ `});const l={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,l),e.applyData(t,l)}function U4(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Np(n[r])}return t}function Np(e){const t=e.spread;return t??e.children.length>1}function z4(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function $4(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function q4(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function V4(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function W4(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=cn(t.children[1]),u=Ia(t.children[t.children.length-1]);o&&u&&(a.position={start:o,end:u}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function G4(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:t.children.length;let u=-1;const l=[];for(;++u<o;){const c=t.children[u],m={},p=a?a[u]:void 0;p&&(m.align=p);let g={type:"element",tagName:s,properties:m,children:[]};c&&(g.children=e.all(c),e.patch(c,g),g=e.applyData(c,g)),l.push(g)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,d),e.applyData(t,d)}function Y4(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const id=9,sd=32;function K4(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(ad(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(ad(t.slice(i),i>0,!1)),s.join("")}function ad(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===id||s===sd;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===id||s===sd;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Q4(e,t){const n={type:"text",value:K4(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function X4(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Z4={blockquote:_4,break:v4,code:D4,delete:w4,emphasis:N4,footnoteReference:P4,heading:R4,html:L4,imageReference:O4,image:F4,inlineCode:M4,linkReference:B4,link:j4,listItem:H4,list:z4,paragraph:$4,root:q4,strong:V4,table:W4,tableCell:Y4,tableRow:G4,text:Q4,thematicBreak:X4,toml:cs,yaml:cs,definition:cs,footnoteDefinition:cs};function cs(){}const Pp=-1,Da=0,yi=1,Xs=2,ll=3,cl=4,dl=5,hl=6,Rp=7,Lp=8,od=typeof self=="object"?self:globalThis,J4=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case Da:case Pp:return n(a,i);case yi:{const o=n([],i);for(const u of a)o.push(r(u));return o}case Xs:{const o=n({},i);for(const[u,l]of a)o[r(u)]=r(l);return o}case ll:return n(new Date(a),i);case cl:{const{source:o,flags:u}=a;return n(new RegExp(o,u),i)}case dl:{const o=n(new Map,i);for(const[u,l]of a)o.set(r(u),r(l));return o}case hl:{const o=n(new Set,i);for(const u of a)o.add(r(u));return o}case Rp:{const{name:o,message:u}=a;return n(new od[o](u),i)}case Lp:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(new od[s](a),i)};return r},ud=e=>J4(new Map,e)(0),Er="",{toString:eS}={},{keys:tS}=Object,si=e=>{const t=typeof e;if(t!=="object"||!e)return[Da,t];const n=eS.call(e).slice(8,-1);switch(n){case"Array":return[yi,Er];case"Object":return[Xs,Er];case"Date":return[ll,Er];case"RegExp":return[cl,Er];case"Map":return[dl,Er];case"Set":return[hl,Er];case"DataView":return[yi,n]}return n.includes("Array")?[yi,n]:n.includes("Error")?[Rp,n]:[Xs,n]},ds=([e,t])=>e===Da&&(t==="function"||t==="symbol"),nS=(e,t,n,r)=>{const i=(a,o)=>{const u=r.push(a)-1;return n.set(o,u),u},s=a=>{if(n.has(a))return n.get(a);let[o,u]=si(a);switch(o){case Da:{let d=a;switch(u){case"bigint":o=Lp,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return i([Pp],a)}return i([o,d],a)}case yi:{if(u){let m=a;return u==="DataView"?m=new Uint8Array(a.buffer):u==="ArrayBuffer"&&(m=new Uint8Array(a)),i([u,[...m]],a)}const d=[],c=i([o,d],a);for(const m of a)d.push(s(m));return c}case Xs:{if(u)switch(u){case"BigInt":return i([u,a.toString()],a);case"Boolean":case"Number":case"String":return i([u,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const d=[],c=i([o,d],a);for(const m of tS(a))(e||!ds(si(a[m])))&&d.push([s(m),s(a[m])]);return c}case ll:return i([o,a.toISOString()],a);case cl:{const{source:d,flags:c}=a;return i([o,{source:d,flags:c}],a)}case dl:{const d=[],c=i([o,d],a);for(const[m,p]of a)(e||!(ds(si(m))||ds(si(p))))&&d.push([s(m),s(p)]);return c}case hl:{const d=[],c=i([o,d],a);for(const m of a)(e||!ds(si(m)))&&d.push(s(m));return c}}const{message:l}=a;return i([o,{name:u,message:l}],a)};return s},ld=(e,{json:t,lossy:n}={})=>{const r=[];return nS(!(t||n),!!t,new Map,r)(e),r},ir=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ud(ld(e,t)):structuredClone(e):(e,t)=>ud(ld(e,t));function rS(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function iS(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function sS(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||rS,r=e.options.footnoteBackLabel||iS,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const d=e.all(l),c=String(l.identifier).toUpperCase(),m=qr(c.toLowerCase());let p=0;const g=[],b=e.footnoteCounts.get(c);for(;b!==void 0&&++p<=b;){g.length>0&&g.push({type:"text",value:" "});let C=typeof n=="string"?n:n(u,p);typeof C=="string"&&(C={type:"text",value:C}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,p),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const T=d[d.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const C=T.children[T.children.length-1];C&&C.type==="text"?C.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...g)}else d.push(...g);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(d,!0)};e.patch(l,y),o.push(y)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...ir(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
130
130
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
131
- `}]}}const wa=function(e){if(e==null)return eS;if(typeof e=="function")return Pa(e);if(typeof e=="object")return Array.isArray(e)?X4(e):Z4(e);if(typeof e=="string")return J4(e);throw new Error("Expected function, string, or object as test")};function X4(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=wa(e[n]);return Pa(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function Z4(e){const t=e;return Pa(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function J4(e){return Pa(t);function t(n){return n&&n.type===e}}function Pa(e){return t;function t(n,r,i){return!!(tS(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function eS(){return!0}function tS(e){return e!==null&&typeof e=="object"&&"type"in e}const Pp=[],nS=!0,Zs=!1,Ti="skip";function Np(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=wa(i),a=r?-1:1;o(e,void 0,[])();function o(u,l,d){const c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return m;function m(){let p=Pp,g,b,T;if((!t||s(u,l,d[d.length-1]||void 0))&&(p=rS(n(u,d)),p[0]===Zs))return p;if("children"in u&&u.children){const y=u;if(y.children&&p[0]!==Ti)for(b=(r?y.children.length:-1)+a,T=d.concat(y);b>-1&&b<y.children.length;){const C=y.children[b];if(g=o(C,b,T)(),g[0]===Zs)return g;b=typeof g[1]=="number"?g[1]:b+a}}return p}}}function rS(e){return Array.isArray(e)?e:typeof e=="number"?[nS,e]:e==null?Pp:[e]}function Lt(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),Np(e,s,o,i);function o(u,l){const d=l[l.length-1],c=d?d.children.indexOf(u):void 0;return a(u,c,d)}}const Jo={}.hasOwnProperty,iS={};function sS(e,t){const n=t||iS,r=new Map,i=new Map,s=new Map,a={...$4,...n.handlers},o={all:l,applyData:oS,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:u,options:n,patch:aS,wrap:lS};return Lt(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const c=d.type==="definition"?r:i,m=String(d.identifier).toUpperCase();c.has(m)||c.set(m,d)}}),o;function u(d,c){const m=d.type,p=o.handlers[m];if(Jo.call(o.handlers,m)&&p)return p(o,d,c);if(o.options.passThrough&&o.options.passThrough.includes(m)){if("children"in d){const{children:b,...T}=d,y=ir(T);return y.children=o.all(d),y}return ir(d)}return(o.options.unknownHandler||uS)(o,d,c)}function l(d){const c=[];if("children"in d){const m=d.children;let p=-1;for(;++p<m.length;){const g=o.one(m[p],d);if(g){if(p&&m[p-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=cd(g.value)),!Array.isArray(g)&&g.type==="element")){const b=g.children[0];b&&b.type==="text"&&(b.value=cd(b.value))}Array.isArray(g)?c.push(...g):c.push(g)}}}return c}}function aS(e,t){e.position&&(t.position=KT(e))}function oS(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&s&&Object.assign(n.properties,ir(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function uS(e,t){const n=t.data||{},r="value"in t&&!(Jo.call(n,"hProperties")||Jo.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lS(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
131
+ `}]}}const wa=function(e){if(e==null)return lS;if(typeof e=="function")return Na(e);if(typeof e=="object")return Array.isArray(e)?aS(e):oS(e);if(typeof e=="string")return uS(e);throw new Error("Expected function, string, or object as test")};function aS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=wa(e[n]);return Na(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function oS(e){const t=e;return Na(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function uS(e){return Na(t);function t(n){return n&&n.type===e}}function Na(e){return t;function t(n,r,i){return!!(cS(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function lS(){return!0}function cS(e){return e!==null&&typeof e=="object"&&"type"in e}const Op=[],dS=!0,Zs=!1,Ti="skip";function Fp(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=wa(i),a=r?-1:1;o(e,void 0,[])();function o(u,l,d){const c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return m;function m(){let p=Op,g,b,T;if((!t||s(u,l,d[d.length-1]||void 0))&&(p=hS(n(u,d)),p[0]===Zs))return p;if("children"in u&&u.children){const y=u;if(y.children&&p[0]!==Ti)for(b=(r?y.children.length:-1)+a,T=d.concat(y);b>-1&&b<y.children.length;){const C=y.children[b];if(g=o(C,b,T)(),g[0]===Zs)return g;b=typeof g[1]=="number"?g[1]:b+a}}return p}}}function hS(e){return Array.isArray(e)?e:typeof e=="number"?[dS,e]:e==null?Op:[e]}function Lt(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),Fp(e,s,o,i);function o(u,l){const d=l[l.length-1],c=d?d.children.indexOf(u):void 0;return a(u,c,d)}}const Jo={}.hasOwnProperty,fS={};function pS(e,t){const n=t||fS,r=new Map,i=new Map,s=new Map,a={...Z4,...n.handlers},o={all:l,applyData:gS,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:u,options:n,patch:mS,wrap:ES};return Lt(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const c=d.type==="definition"?r:i,m=String(d.identifier).toUpperCase();c.has(m)||c.set(m,d)}}),o;function u(d,c){const m=d.type,p=o.handlers[m];if(Jo.call(o.handlers,m)&&p)return p(o,d,c);if(o.options.passThrough&&o.options.passThrough.includes(m)){if("children"in d){const{children:b,...T}=d,y=ir(T);return y.children=o.all(d),y}return ir(d)}return(o.options.unknownHandler||bS)(o,d,c)}function l(d){const c=[];if("children"in d){const m=d.children;let p=-1;for(;++p<m.length;){const g=o.one(m[p],d);if(g){if(p&&m[p-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=cd(g.value)),!Array.isArray(g)&&g.type==="element")){const b=g.children[0];b&&b.type==="text"&&(b.value=cd(b.value))}Array.isArray(g)?c.push(...g):c.push(g)}}}return c}}function mS(e,t){e.position&&(t.position=iC(e))}function gS(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&s&&Object.assign(n.properties,ir(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function bS(e,t){const n=t.data||{},r="value"in t&&!(Jo.call(n,"hProperties")||Jo.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ES(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
132
132
  `});++r<e.length;)r&&n.push({type:"text",value:`
133
133
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
134
- `}),n}function cd(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function dd(e,t){const n=sS(e,t),r=n.one(e,void 0),i=Q4(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
135
- `},i),s}function cS(e,t){return e&&"run"in e?async function(n,r){const i=dd(n,{file:r,...t});await e.run(i,r)}:function(n,r){return dd(n,{file:r,...e||t})}}function hd(e){if(e)throw e}var so,fd;function dS(){if(fd)return so;fd=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},s=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var d=e.call(l,"constructor"),c=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!d&&!c)return!1;var m;for(m in l);return typeof m>"u"||e.call(l,m)},a=function(l,d){n&&d.name==="__proto__"?n(l,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):l[d.name]=d.newValue},o=function(l,d){if(d==="__proto__")if(e.call(l,d)){if(r)return r(l,d).value}else return;return l[d]};return so=function u(){var l,d,c,m,p,g,b=arguments[0],T=1,y=arguments.length,C=!1;for(typeof b=="boolean"&&(C=b,b=arguments[1]||{},T=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});T<y;++T)if(l=arguments[T],l!=null)for(d in l)c=o(b,d),m=o(l,d),b!==m&&(C&&m&&(s(m)||(p=i(m)))?(p?(p=!1,g=c&&i(c)?c:[]):g=c&&s(c)?c:{},a(b,{name:d,newValue:u(C,g,m)})):typeof m<"u"&&a(b,{name:d,newValue:m}));return b},so}var hS=dS();const ao=sa(hS);function eu(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function fS(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(u,...l){const d=e[++s];let c=-1;if(u){a(u);return}for(;++c<i.length;)(l[c]===null||l[c]===void 0)&&(l[c]=i[c]);i=l,d?pS(d,o)(...l):a(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function pS(e,t){let n;return r;function r(...a){const o=e.length>a.length;let u;o&&a.push(i);try{u=e.apply(this,a)}catch(l){const d=l;if(o&&n)throw d;return i(d)}o||(u&&u.then&&typeof u.then=="function"?u.then(s,i):u instanceof Error?i(u):s(u))}function i(a,...o){n||(n=!0,t(a,...o))}function s(a){i(null,a)}}const un={basename:mS,dirname:gS,extname:bS,join:ES,sep:"/"};function mS(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Xi(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function gS(e){if(Xi(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function bS(e){Xi(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function ES(...e){let t=-1,n;for(;++t<e.length;)Xi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":xS(n)}function xS(e){Xi(e);const t=e.codePointAt(0)===47;let n=yS(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function yS(e,t){let n="",r=0,i=-1,s=0,a=-1,o,u;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return n}function Xi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const TS={cwd:CS};function CS(){return"/"}function tu(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function SS(e){if(typeof e=="string")e=new URL(e);else if(!tu(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return AS(e)}function AS(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const oo=["history","path","basename","stem","extname","dirname"];class Rp{constructor(t){let n;t?tu(t)?n={path:t}:typeof t=="string"||kS(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":TS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<oo.length;){const s=oo[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)oo.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?un.basename(this.path):void 0}set basename(t){lo(t,"basename"),uo(t,"basename"),this.path=un.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?un.dirname(this.path):void 0}set dirname(t){pd(this.basename,"dirname"),this.path=un.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?un.extname(this.path):void 0}set extname(t){if(uo(t,"extname"),pd(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=un.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){tu(t)&&(t=SS(t)),lo(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?un.basename(this.path,this.extname):void 0}set stem(t){lo(t,"stem"),uo(t,"stem"),this.path=un.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new At(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function uo(e,t){if(e&&e.includes(un.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+un.sep+"`")}function lo(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function pd(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function kS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const IS=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},_S={}.hasOwnProperty;class hl extends IS{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=fS()}copy(){const t=new hl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ao(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(fo("data",this.frozen),this.namespace[t]=n,this):_S.call(this.namespace,t)&&this.namespace[t]||void 0:t?(fo("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=hs(t),r=this.parser||this.Parser;return co("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),co("process",this.parser||this.Parser),ho("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const o=hs(t),u=r.parse(o);r.run(u,o,function(d,c,m){if(d||!c||!m)return l(d);const p=c,g=r.stringify(p,m);wS(g)?m.value=g:m.result=g,l(d,m)});function l(d,c){d||!c?a(d):s?s(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),co("processSync",this.parser||this.Parser),ho("processSync",this.compiler||this.Compiler),this.process(t,i),gd("processSync","process",n),r;function i(s,a){n=!0,hd(s),r=a}}run(t,n,r){md(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,o){const u=hs(n);i.run(t,u,l);function l(d,c,m){const p=c||t;d?o(d):a?a(p):r(void 0,p,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),gd("runSync","run",r),i;function s(a,o){hd(a),i=o,r=!0}}stringify(t,n){this.freeze();const r=hs(n),i=this.compiler||this.Compiler;return ho("stringify",i),md(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(fo("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[d,...c]=l;u(d,c)}else a(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function a(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(l.plugins),l.settings&&(i.settings=ao(!0,i.settings,l.settings))}function o(l){let d=-1;if(l!=null)if(Array.isArray(l))for(;++d<l.length;){const c=l[d];s(c)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,d){let c=-1,m=-1;for(;++c<r.length;)if(r[c][0]===l){m=c;break}if(m===-1)r.push([l,...d]);else if(d.length>0){let[p,...g]=d;const b=r[m][1];eu(b)&&eu(p)&&(p=ao(!0,b,p)),r[m]=[l,p,...g]}}}}const vS=new hl().freeze();function co(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ho(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function fo(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function md(e){if(!eu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function gd(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function hs(e){return DS(e)?e:new Rp(e)}function DS(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function wS(e){return typeof e=="string"||PS(e)}function PS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const NS="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",bd=[],Ed={allowDangerousHtml:!0},RS=/^(https?|ircs?|mailto|xmpp)$/i,LS=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function OS(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,s=e.components,a=e.disallowedElements,o=e.rehypePlugins||bd,u=e.remarkPlugins||bd,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ed}:Ed,d=e.skipHtml,c=e.unwrapDisallowed,m=e.urlTransform||FS,p=vS().use(b4).use(u).use(cS,l).use(o),g=new Rp;typeof r=="string"&&(g.value=r);for(const C of LS)Object.hasOwn(e,C.from)&&(""+C.from+(C.to?"use `"+C.to+"` instead":"remove it")+NS+C.id,void 0);const b=p.parse(g);let T=p.runSync(b,g);return i&&(T={type:"element",tagName:"div",properties:{className:i},children:T.type==="root"?T.children:[T]}),Lt(T,y),eC(T,{Fragment:h.Fragment,components:s,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function y(C,S,P){if(C.type==="raw"&&P&&typeof S=="number")return d?P.children.splice(S,1):P.children[S]={type:"text",value:C.value},S;if(C.type==="element"){let D;for(D in no)if(Object.hasOwn(no,D)&&Object.hasOwn(C.properties,D)){const w=C.properties[D],B=no[D];(B===null||B.includes(C.tagName))&&(C.properties[D]=m(String(w||""),D,C))}}if(C.type==="element"){let D=t?!t.includes(C.tagName):a?a.includes(C.tagName):!1;if(!D&&n&&typeof S=="number"&&(D=!n(C,S,P)),D&&P&&typeof S=="number")return c&&C.children?P.children.splice(S,1,...C.children):P.children.splice(S,1),S}}}function FS(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||RS.test(e.slice(0,t))?e:""}function MS(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function BS(e,t,n){const i=wa((n||{}).ignore||[]),s=jS(t);let a=-1;for(;++a<s.length;)Np(e,"text",o);function o(l,d){let c=-1,m;for(;++c<d.length;){const p=d[c],g=m?m.children:void 0;if(i(p,g?g.indexOf(p):void 0,m))return;m=p}if(m)return u(l,d)}function u(l,d){const c=d[d.length-1],m=s[a][0],p=s[a][1];let g=0;const T=c.children.indexOf(l);let y=!1,C=[];m.lastIndex=0;let S=m.exec(l.value);for(;S;){const P=S.index,D={index:S.index,input:S.input,stack:[...d,l]};let w=p(...S,D);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?m.lastIndex=P+1:(g!==P&&C.push({type:"text",value:l.value.slice(g,P)}),Array.isArray(w)?C.push(...w):w&&C.push(w),g=P+S[0].length,y=!0),!m.global)break;S=m.exec(l.value)}return y?(g<l.value.length&&C.push({type:"text",value:l.value.slice(g)}),c.children.splice(T,1,...C)):C=[l],T+C.length}}function jS(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([HS(i[0]),US(i[1])])}return t}function HS(e){return typeof e=="string"?new RegExp(MS(e),"g"):e}function US(e){return typeof e=="function"?e:function(){return e}}const po="phrasing",mo=["autolink","link","image","label"];function zS(){return{transforms:[KS],enter:{literalAutolink:qS,literalAutolinkEmail:go,literalAutolinkHttp:go,literalAutolinkWww:go},exit:{literalAutolink:YS,literalAutolinkEmail:GS,literalAutolinkHttp:VS,literalAutolinkWww:WS}}}function $S(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:po,notInConstruct:mo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:po,notInConstruct:mo},{character:":",before:"[ps]",after:"\\/",inConstruct:po,notInConstruct:mo}]}}function qS(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function go(e){this.config.enter.autolinkProtocol.call(this,e)}function VS(e){this.config.exit.autolinkProtocol.call(this,e)}function WS(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function GS(e){this.config.exit.autolinkEmail.call(this,e)}function YS(e){this.exit(e)}function KS(e){BS(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,QS],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,XS]],{ignore:["link","linkReference"]})}function QS(e,t,n,r,i){let s="";if(!Lp(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!ZS(n)))return!1;const a=JS(n+r);if(!a[0])return!1;const o={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function XS(e,t,n,r){return!Lp(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ZS(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function JS(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Us(e,"(");let s=Us(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function Lp(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||rr(n)||_a(n))&&(!t||n!==47)}Op.peek=uA;function eA(){this.buffer()}function tA(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function nA(){this.buffer()}function rA(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function iA(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=en(this.sliceSerialize(e)).toLowerCase(),n.label=t}function sA(e){this.exit(e)}function aA(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=en(this.sliceSerialize(e)).toLowerCase(),n.label=t}function oA(e){this.exit(e)}function uA(){return"["}function Op(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),o=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]"),s}function lA(){return{enter:{gfmFootnoteCallString:eA,gfmFootnoteCall:tA,gfmFootnoteDefinitionLabelString:nA,gfmFootnoteDefinition:rA},exit:{gfmFootnoteCallString:iA,gfmFootnoteCall:sA,gfmFootnoteDefinitionLabelString:aA,gfmFootnoteDefinition:oA}}}function cA(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Op},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const o=s.createTracker(a);let u=o.move("[^");const l=s.enter("footnoteDefinition"),d=s.enter("label");return u+=o.move(s.safe(s.associationId(r),{before:u,after:"]"})),d(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
136
- `:" ")+s.indentLines(s.containerFlow(r,o.current()),t?Fp:dA))),l(),u}}function dA(e,t,n){return t===0?e:Fp(e,t,n)}function Fp(e,t,n){return(n?"":" ")+e}const hA=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Mp.peek=bA;function fA(){return{canContainEols:["delete"],enter:{strikethrough:mA},exit:{strikethrough:gA}}}function pA(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:hA}],handlers:{delete:Mp}}}function mA(e){this.enter({type:"delete",children:[]},e)}function gA(e){this.exit(e)}function Mp(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function bA(){return"~"}function EA(e){return e.length}function xA(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||EA,s=[],a=[],o=[],u=[];let l=0,d=-1;for(;++d<e.length;){const b=[],T=[];let y=-1;for(e[d].length>l&&(l=e[d].length);++y<e[d].length;){const C=yA(e[d][y]);if(n.alignDelimiters!==!1){const S=i(C);T[y]=S,(u[y]===void 0||S>u[y])&&(u[y]=S)}b.push(C)}a[d]=b,o[d]=T}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<l;)s[c]=xd(r[c]);else{const b=xd(r);for(;++c<l;)s[c]=b}c=-1;const m=[],p=[];for(;++c<l;){const b=s[c];let T="",y="";b===99?(T=":",y=":"):b===108?T=":":b===114&&(y=":");let C=n.alignDelimiters===!1?1:Math.max(1,u[c]-T.length-y.length);const S=T+"-".repeat(C)+y;n.alignDelimiters!==!1&&(C=T.length+C+y.length,C>u[c]&&(u[c]=C),p[c]=C),m[c]=S}a.splice(1,0,m),o.splice(1,0,p),d=-1;const g=[];for(;++d<a.length;){const b=a[d],T=o[d];c=-1;const y=[];for(;++c<l;){const C=b[c]||"";let S="",P="";if(n.alignDelimiters!==!1){const D=u[c]-(T[c]||0),w=s[c];w===114?S=" ".repeat(D):w===99?D%2?(S=" ".repeat(D/2+.5),P=" ".repeat(D/2-.5)):(S=" ".repeat(D/2),P=S):P=" ".repeat(D)}n.delimiterStart!==!1&&!c&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||c)&&y.push(" "),n.alignDelimiters!==!1&&y.push(S),y.push(C),n.alignDelimiters!==!1&&y.push(P),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||c!==l-1)&&y.push("|")}g.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return g.join(`
137
- `)}function yA(e){return e==null?"":String(e)}function xd(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function TA(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),CA);return i(),a}function CA(e,t,n){return">"+(n?"":" ")+e}function SA(e,t){return yd(e,t.inConstruct,!0)&&!yd(e,t.notInConstruct,!1)}function yd(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Td(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
138
- `&&SA(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
139
- `}function AA(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function kA(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function IA(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function _A(e,t,n,r){const i=IA(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(kA(e,n)){const c=n.enter("codeIndented"),m=n.indentLines(s,vA);return c(),m}const o=n.createTracker(r),u=i.repeat(Math.max(AA(s,i)+1,3)),l=n.enter("codeFenced");let d=o.move(u);if(e.lang){const c=n.enter(`codeFencedLang${a}`);d+=o.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...o.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${a}`);d+=o.move(" "),d+=o.move(n.safe(e.meta,{before:d,after:`
134
+ `}),n}function cd(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function dd(e,t){const n=pS(e,t),r=n.one(e,void 0),i=sS(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
135
+ `},i),s}function xS(e,t){return e&&"run"in e?async function(n,r){const i=dd(n,{file:r,...t});await e.run(i,r)}:function(n,r){return dd(n,{file:r,...e||t})}}function hd(e){if(e)throw e}var so,fd;function yS(){if(fd)return so;fd=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},s=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var d=e.call(l,"constructor"),c=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!d&&!c)return!1;var m;for(m in l);return typeof m>"u"||e.call(l,m)},a=function(l,d){n&&d.name==="__proto__"?n(l,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):l[d.name]=d.newValue},o=function(l,d){if(d==="__proto__")if(e.call(l,d)){if(r)return r(l,d).value}else return;return l[d]};return so=function u(){var l,d,c,m,p,g,b=arguments[0],T=1,y=arguments.length,C=!1;for(typeof b=="boolean"&&(C=b,b=arguments[1]||{},T=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});T<y;++T)if(l=arguments[T],l!=null)for(d in l)c=o(b,d),m=o(l,d),b!==m&&(C&&m&&(s(m)||(p=i(m)))?(p?(p=!1,g=c&&i(c)?c:[]):g=c&&s(c)?c:{},a(b,{name:d,newValue:u(C,g,m)})):typeof m<"u"&&a(b,{name:d,newValue:m}));return b},so}var TS=yS();const ao=sa(TS);function eu(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function CS(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(u,...l){const d=e[++s];let c=-1;if(u){a(u);return}for(;++c<i.length;)(l[c]===null||l[c]===void 0)&&(l[c]=i[c]);i=l,d?SS(d,o)(...l):a(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function SS(e,t){let n;return r;function r(...a){const o=e.length>a.length;let u;o&&a.push(i);try{u=e.apply(this,a)}catch(l){const d=l;if(o&&n)throw d;return i(d)}o||(u&&u.then&&typeof u.then=="function"?u.then(s,i):u instanceof Error?i(u):s(u))}function i(a,...o){n||(n=!0,t(a,...o))}function s(a){i(null,a)}}const un={basename:AS,dirname:kS,extname:IS,join:_S,sep:"/"};function AS(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Xi(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function kS(e){if(Xi(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function IS(e){Xi(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function _S(...e){let t=-1,n;for(;++t<e.length;)Xi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":vS(n)}function vS(e){Xi(e);const t=e.codePointAt(0)===47;let n=DS(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function DS(e,t){let n="",r=0,i=-1,s=0,a=-1,o,u;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return n}function Xi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const wS={cwd:NS};function NS(){return"/"}function tu(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function PS(e){if(typeof e=="string")e=new URL(e);else if(!tu(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return RS(e)}function RS(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const oo=["history","path","basename","stem","extname","dirname"];class Mp{constructor(t){let n;t?tu(t)?n={path:t}:typeof t=="string"||LS(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":wS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<oo.length;){const s=oo[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)oo.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?un.basename(this.path):void 0}set basename(t){lo(t,"basename"),uo(t,"basename"),this.path=un.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?un.dirname(this.path):void 0}set dirname(t){pd(this.basename,"dirname"),this.path=un.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?un.extname(this.path):void 0}set extname(t){if(uo(t,"extname"),pd(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=un.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){tu(t)&&(t=PS(t)),lo(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?un.basename(this.path,this.extname):void 0}set stem(t){lo(t,"stem"),uo(t,"stem"),this.path=un.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new At(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function uo(e,t){if(e&&e.includes(un.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+un.sep+"`")}function lo(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function pd(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function LS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const OS=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},FS={}.hasOwnProperty;class fl extends OS{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=CS()}copy(){const t=new fl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ao(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(fo("data",this.frozen),this.namespace[t]=n,this):FS.call(this.namespace,t)&&this.namespace[t]||void 0:t?(fo("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=hs(t),r=this.parser||this.Parser;return co("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),co("process",this.parser||this.Parser),ho("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const o=hs(t),u=r.parse(o);r.run(u,o,function(d,c,m){if(d||!c||!m)return l(d);const p=c,g=r.stringify(p,m);jS(g)?m.value=g:m.result=g,l(d,m)});function l(d,c){d||!c?a(d):s?s(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),co("processSync",this.parser||this.Parser),ho("processSync",this.compiler||this.Compiler),this.process(t,i),gd("processSync","process",n),r;function i(s,a){n=!0,hd(s),r=a}}run(t,n,r){md(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,o){const u=hs(n);i.run(t,u,l);function l(d,c,m){const p=c||t;d?o(d):a?a(p):r(void 0,p,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),gd("runSync","run",r),i;function s(a,o){hd(a),i=o,r=!0}}stringify(t,n){this.freeze();const r=hs(n),i=this.compiler||this.Compiler;return ho("stringify",i),md(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(fo("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[d,...c]=l;u(d,c)}else a(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function a(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(l.plugins),l.settings&&(i.settings=ao(!0,i.settings,l.settings))}function o(l){let d=-1;if(l!=null)if(Array.isArray(l))for(;++d<l.length;){const c=l[d];s(c)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,d){let c=-1,m=-1;for(;++c<r.length;)if(r[c][0]===l){m=c;break}if(m===-1)r.push([l,...d]);else if(d.length>0){let[p,...g]=d;const b=r[m][1];eu(b)&&eu(p)&&(p=ao(!0,b,p)),r[m]=[l,p,...g]}}}}const MS=new fl().freeze();function co(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ho(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function fo(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function md(e){if(!eu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function gd(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function hs(e){return BS(e)?e:new Mp(e)}function BS(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function jS(e){return typeof e=="string"||HS(e)}function HS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const US="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",bd=[],Ed={allowDangerousHtml:!0},zS=/^(https?|ircs?|mailto|xmpp)$/i,$S=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function qS(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,s=e.components,a=e.disallowedElements,o=e.rehypePlugins||bd,u=e.remarkPlugins||bd,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ed}:Ed,d=e.skipHtml,c=e.unwrapDisallowed,m=e.urlTransform||VS,p=MS().use(I4).use(u).use(xS,l).use(o),g=new Mp;typeof r=="string"&&(g.value=r);for(const C of $S)Object.hasOwn(e,C.from)&&(""+C.from+(C.to?"use `"+C.to+"` instead":"remove it")+US+C.id,void 0);const b=p.parse(g);let T=p.runSync(b,g);return i&&(T={type:"element",tagName:"div",properties:{className:i},children:T.type==="root"?T.children:[T]}),Lt(T,y),lC(T,{Fragment:h.Fragment,components:s,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function y(C,S,N){if(C.type==="raw"&&N&&typeof S=="number")return d?N.children.splice(S,1):N.children[S]={type:"text",value:C.value},S;if(C.type==="element"){let D;for(D in no)if(Object.hasOwn(no,D)&&Object.hasOwn(C.properties,D)){const w=C.properties[D],B=no[D];(B===null||B.includes(C.tagName))&&(C.properties[D]=m(String(w||""),D,C))}}if(C.type==="element"){let D=t?!t.includes(C.tagName):a?a.includes(C.tagName):!1;if(!D&&n&&typeof S=="number"&&(D=!n(C,S,N)),D&&N&&typeof S=="number")return c&&C.children?N.children.splice(S,1,...C.children):N.children.splice(S,1),S}}}function VS(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||zS.test(e.slice(0,t))?e:""}function WS(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function GS(e,t,n){const i=wa((n||{}).ignore||[]),s=YS(t);let a=-1;for(;++a<s.length;)Fp(e,"text",o);function o(l,d){let c=-1,m;for(;++c<d.length;){const p=d[c],g=m?m.children:void 0;if(i(p,g?g.indexOf(p):void 0,m))return;m=p}if(m)return u(l,d)}function u(l,d){const c=d[d.length-1],m=s[a][0],p=s[a][1];let g=0;const T=c.children.indexOf(l);let y=!1,C=[];m.lastIndex=0;let S=m.exec(l.value);for(;S;){const N=S.index,D={index:S.index,input:S.input,stack:[...d,l]};let w=p(...S,D);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?m.lastIndex=N+1:(g!==N&&C.push({type:"text",value:l.value.slice(g,N)}),Array.isArray(w)?C.push(...w):w&&C.push(w),g=N+S[0].length,y=!0),!m.global)break;S=m.exec(l.value)}return y?(g<l.value.length&&C.push({type:"text",value:l.value.slice(g)}),c.children.splice(T,1,...C)):C=[l],T+C.length}}function YS(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([KS(i[0]),QS(i[1])])}return t}function KS(e){return typeof e=="string"?new RegExp(WS(e),"g"):e}function QS(e){return typeof e=="function"?e:function(){return e}}const po="phrasing",mo=["autolink","link","image","label"];function XS(){return{transforms:[iA],enter:{literalAutolink:JS,literalAutolinkEmail:go,literalAutolinkHttp:go,literalAutolinkWww:go},exit:{literalAutolink:rA,literalAutolinkEmail:nA,literalAutolinkHttp:eA,literalAutolinkWww:tA}}}function ZS(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:po,notInConstruct:mo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:po,notInConstruct:mo},{character:":",before:"[ps]",after:"\\/",inConstruct:po,notInConstruct:mo}]}}function JS(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function go(e){this.config.enter.autolinkProtocol.call(this,e)}function eA(e){this.config.exit.autolinkProtocol.call(this,e)}function tA(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function nA(e){this.config.exit.autolinkEmail.call(this,e)}function rA(e){this.exit(e)}function iA(e){GS(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,sA],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,aA]],{ignore:["link","linkReference"]})}function sA(e,t,n,r,i){let s="";if(!Bp(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!oA(n)))return!1;const a=uA(n+r);if(!a[0])return!1;const o={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function aA(e,t,n,r){return!Bp(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function oA(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function uA(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Us(e,"(");let s=Us(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function Bp(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||rr(n)||_a(n))&&(!t||n!==47)}jp.peek=bA;function lA(){this.buffer()}function cA(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function dA(){this.buffer()}function hA(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function fA(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=en(this.sliceSerialize(e)).toLowerCase(),n.label=t}function pA(e){this.exit(e)}function mA(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=en(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gA(e){this.exit(e)}function bA(){return"["}function jp(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),o=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]"),s}function EA(){return{enter:{gfmFootnoteCallString:lA,gfmFootnoteCall:cA,gfmFootnoteDefinitionLabelString:dA,gfmFootnoteDefinition:hA},exit:{gfmFootnoteCallString:fA,gfmFootnoteCall:pA,gfmFootnoteDefinitionLabelString:mA,gfmFootnoteDefinition:gA}}}function xA(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:jp},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const o=s.createTracker(a);let u=o.move("[^");const l=s.enter("footnoteDefinition"),d=s.enter("label");return u+=o.move(s.safe(s.associationId(r),{before:u,after:"]"})),d(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
136
+ `:" ")+s.indentLines(s.containerFlow(r,o.current()),t?Hp:yA))),l(),u}}function yA(e,t,n){return t===0?e:Hp(e,t,n)}function Hp(e,t,n){return(n?"":" ")+e}const TA=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Up.peek=IA;function CA(){return{canContainEols:["delete"],enter:{strikethrough:AA},exit:{strikethrough:kA}}}function SA(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:TA}],handlers:{delete:Up}}}function AA(e){this.enter({type:"delete",children:[]},e)}function kA(e){this.exit(e)}function Up(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function IA(){return"~"}function _A(e){return e.length}function vA(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||_A,s=[],a=[],o=[],u=[];let l=0,d=-1;for(;++d<e.length;){const b=[],T=[];let y=-1;for(e[d].length>l&&(l=e[d].length);++y<e[d].length;){const C=DA(e[d][y]);if(n.alignDelimiters!==!1){const S=i(C);T[y]=S,(u[y]===void 0||S>u[y])&&(u[y]=S)}b.push(C)}a[d]=b,o[d]=T}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<l;)s[c]=xd(r[c]);else{const b=xd(r);for(;++c<l;)s[c]=b}c=-1;const m=[],p=[];for(;++c<l;){const b=s[c];let T="",y="";b===99?(T=":",y=":"):b===108?T=":":b===114&&(y=":");let C=n.alignDelimiters===!1?1:Math.max(1,u[c]-T.length-y.length);const S=T+"-".repeat(C)+y;n.alignDelimiters!==!1&&(C=T.length+C+y.length,C>u[c]&&(u[c]=C),p[c]=C),m[c]=S}a.splice(1,0,m),o.splice(1,0,p),d=-1;const g=[];for(;++d<a.length;){const b=a[d],T=o[d];c=-1;const y=[];for(;++c<l;){const C=b[c]||"";let S="",N="";if(n.alignDelimiters!==!1){const D=u[c]-(T[c]||0),w=s[c];w===114?S=" ".repeat(D):w===99?D%2?(S=" ".repeat(D/2+.5),N=" ".repeat(D/2-.5)):(S=" ".repeat(D/2),N=S):N=" ".repeat(D)}n.delimiterStart!==!1&&!c&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||c)&&y.push(" "),n.alignDelimiters!==!1&&y.push(S),y.push(C),n.alignDelimiters!==!1&&y.push(N),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||c!==l-1)&&y.push("|")}g.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return g.join(`
137
+ `)}function DA(e){return e==null?"":String(e)}function xd(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function wA(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),NA);return i(),a}function NA(e,t,n){return">"+(n?"":" ")+e}function PA(e,t){return yd(e,t.inConstruct,!0)&&!yd(e,t.notInConstruct,!1)}function yd(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Td(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
138
+ `&&PA(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
139
+ `}function RA(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function LA(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function OA(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function FA(e,t,n,r){const i=OA(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(LA(e,n)){const c=n.enter("codeIndented"),m=n.indentLines(s,MA);return c(),m}const o=n.createTracker(r),u=i.repeat(Math.max(RA(s,i)+1,3)),l=n.enter("codeFenced");let d=o.move(u);if(e.lang){const c=n.enter(`codeFencedLang${a}`);d+=o.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...o.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${a}`);d+=o.move(" "),d+=o.move(n.safe(e.meta,{before:d,after:`
140
140
  `,encode:["`"],...o.current()})),c()}return d+=o.move(`
141
141
  `),s&&(d+=o.move(s+`
142
- `)),d+=o.move(u),l(),d}function vA(e,t,n){return(n?"":" ")+e}function fl(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function DA(e,t,n,r){const i=fl(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let o=n.enter("label");const u=n.createTracker(r);let l=u.move("[");return l+=u.move(n.safe(n.associationId(e),{before:l,after:"]",...u.current()})),l+=u.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":`
143
- `,...u.current()}))),o(),e.title&&(o=n.enter(`title${s}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),o()),a(),l}function wA(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Bi(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Js(e,t,n){const r=Lr(e),i=Lr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Bp.peek=PA;function Bp(e,t,n,r){const i=wA(n),s=n.enter("emphasis"),a=n.createTracker(r),o=a.move(i);let u=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const l=u.charCodeAt(0),d=Js(r.before.charCodeAt(r.before.length-1),l,i);d.inside&&(u=Bi(l)+u.slice(1));const c=u.charCodeAt(u.length-1),m=Js(r.after.charCodeAt(0),c,i);m.inside&&(u=u.slice(0,-1)+Bi(c));const p=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},o+u+p}function PA(e,t,n){return n.options.emphasis||"*"}function NA(e,t){let n=!1;return Lt(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Zs}),!!((!e.depth||e.depth<3)&&sl(e)&&(t.options.setext||n))}function RA(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(NA(e,n)){const d=n.enter("headingSetext"),c=n.enter("phrasing"),m=n.containerPhrasing(e,{...s.current(),before:`
142
+ `)),d+=o.move(u),l(),d}function MA(e,t,n){return(n?"":" ")+e}function pl(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function BA(e,t,n,r){const i=pl(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let o=n.enter("label");const u=n.createTracker(r);let l=u.move("[");return l+=u.move(n.safe(n.associationId(e),{before:l,after:"]",...u.current()})),l+=u.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":`
143
+ `,...u.current()}))),o(),e.title&&(o=n.enter(`title${s}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),o()),a(),l}function jA(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Bi(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Js(e,t,n){const r=Lr(e),i=Lr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}zp.peek=HA;function zp(e,t,n,r){const i=jA(n),s=n.enter("emphasis"),a=n.createTracker(r),o=a.move(i);let u=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const l=u.charCodeAt(0),d=Js(r.before.charCodeAt(r.before.length-1),l,i);d.inside&&(u=Bi(l)+u.slice(1));const c=u.charCodeAt(u.length-1),m=Js(r.after.charCodeAt(0),c,i);m.inside&&(u=u.slice(0,-1)+Bi(c));const p=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},o+u+p}function HA(e,t,n){return n.options.emphasis||"*"}function UA(e,t){let n=!1;return Lt(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Zs}),!!((!e.depth||e.depth<3)&&al(e)&&(t.options.setext||n))}function zA(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(UA(e,n)){const d=n.enter("headingSetext"),c=n.enter("phrasing"),m=n.containerPhrasing(e,{...s.current(),before:`
144
144
  `,after:`
145
145
  `});return c(),d(),m+`
146
146
  `+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
147
147
  `))+1))}const a="#".repeat(i),o=n.enter("headingAtx"),u=n.enter("phrasing");s.move(a+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
148
- `,...s.current()});return/^[\t ]/.test(l)&&(l=Bi(l.charCodeAt(0))+l.slice(1)),l=l?a+" "+l:a,n.options.closeAtx&&(l+=" "+a),u(),o(),l}jp.peek=LA;function jp(e){return e.value||""}function LA(){return"<"}Hp.peek=OA;function Hp(e,t,n,r){const i=fl(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let o=n.enter("label");const u=n.createTracker(r);let l=u.move("![");return l+=u.move(n.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),o(),e.title&&(o=n.enter(`title${s}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),o()),l+=u.move(")"),a(),l}function OA(){return"!"}Up.peek=FA;function Up(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let u=o.move("![");const l=n.safe(e.alt,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return a(),n.stack=d,s(),i==="full"||!l||l!==c?u+=o.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function FA(){return"!"}zp.peek=MA;function zp(e,t,n){let r=e.value||"",i="`",s=-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+" ");++s<n.unsafe.length;){const a=n.unsafe[s],o=n.compilePattern(a);let u;if(a.atBreak)for(;u=o.exec(r);){let l=u.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(u.index+1)}}return i+r+i}function MA(){return"`"}function $p(e,t){const n=sl(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}qp.peek=BA;function qp(e,t,n,r){const i=fl(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let o,u;if($p(e,n)){const d=n.stack;n.stack=[],o=n.enter("autolink");let c=a.move("<");return c+=a.move(n.containerPhrasing(e,{before:c,after:">",...a.current()})),c+=a.move(">"),o(),n.stack=d,c}o=n.enter("link"),u=n.enter("label");let l=a.move("[");return l+=a.move(n.containerPhrasing(e,{before:l,after:"](",...a.current()})),l+=a.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),l+=a.move("<"),l+=a.move(n.safe(e.url,{before:l,after:">",...a.current()})),l+=a.move(">")):(u=n.enter("destinationRaw"),l+=a.move(n.safe(e.url,{before:l,after:e.title?" ":")",...a.current()}))),u(),e.title&&(u=n.enter(`title${s}`),l+=a.move(" "+i),l+=a.move(n.safe(e.title,{before:l,after:i,...a.current()})),l+=a.move(i),u()),l+=a.move(")"),o(),l}function BA(e,t,n){return $p(e,n)?"<":"["}Vp.peek=jA;function Vp(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let u=o.move("[");const l=n.containerPhrasing(e,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return a(),n.stack=d,s(),i==="full"||!l||l!==c?u+=o.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function jA(){return"["}function pl(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 HA(e){const t=pl(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 UA(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 Wp(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 zA(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?UA(n):pl(n);const o=e.ordered?a==="."?")":".":HA(n);let u=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.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&&(u=!0),Wp(n)===a&&d){let c=-1;for(;++c<e.children.length;){const m=e.children[c];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(a=o),n.bulletCurrent=a;const l=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),l}function $A(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function qA(e,t,n,r){const i=$A(n);let s=n.bulletCurrent||pl(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.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(s+" ".repeat(a-s.length)),o.shift(a);const u=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,o.current()),d);return u(),l;function d(c,m,p){return m?(p?"":" ".repeat(a))+c:(p?s:s+" ".repeat(a-s.length))+c}}function VA(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const WA=wa(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function GA(e,t,n,r){return(e.children.some(function(a){return WA(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function YA(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Gp.peek=KA;function Gp(e,t,n,r){const i=YA(n),s=n.enter("strong"),a=n.createTracker(r),o=a.move(i+i);let u=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const l=u.charCodeAt(0),d=Js(r.before.charCodeAt(r.before.length-1),l,i);d.inside&&(u=Bi(l)+u.slice(1));const c=u.charCodeAt(u.length-1),m=Js(r.after.charCodeAt(0),c,i);m.inside&&(u=u.slice(0,-1)+Bi(c));const p=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},o+u+p}function KA(e,t,n){return n.options.strong||"*"}function QA(e,t,n,r){return n.safe(e.value,r)}function XA(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 ZA(e,t,n){const r=(Wp(n)+(n.options.ruleSpaces?" ":"")).repeat(XA(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Yp={blockquote:TA,break:Td,code:_A,definition:DA,emphasis:Bp,hardBreak:Td,heading:RA,html:jp,image:Hp,imageReference:Up,inlineCode:zp,link:qp,linkReference:Vp,list:zA,listItem:qA,paragraph:VA,root:GA,strong:Gp,text:QA,thematicBreak:ZA};function JA(){return{enter:{table:e5,tableData:Cd,tableHeader:Cd,tableRow:n5},exit:{codeText:r5,table:t5,tableData:bo,tableHeader:bo,tableRow:bo}}}function e5(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 t5(e){this.exit(e),this.data.inTable=void 0}function n5(e){this.enter({type:"tableRow",children:[]},e)}function bo(e){this.exit(e)}function Cd(e){this.enter({type:"tableCell",children:[]},e)}function r5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,i5));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function i5(e,t){return t==="|"?t:e}function s5(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
148
+ `,...s.current()});return/^[\t ]/.test(l)&&(l=Bi(l.charCodeAt(0))+l.slice(1)),l=l?a+" "+l:a,n.options.closeAtx&&(l+=" "+a),u(),o(),l}$p.peek=$A;function $p(e){return e.value||""}function $A(){return"<"}qp.peek=qA;function qp(e,t,n,r){const i=pl(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let o=n.enter("label");const u=n.createTracker(r);let l=u.move("![");return l+=u.move(n.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),o(),e.title&&(o=n.enter(`title${s}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),o()),l+=u.move(")"),a(),l}function qA(){return"!"}Vp.peek=VA;function Vp(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let u=o.move("![");const l=n.safe(e.alt,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return a(),n.stack=d,s(),i==="full"||!l||l!==c?u+=o.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function VA(){return"!"}Wp.peek=WA;function Wp(e,t,n){let r=e.value||"",i="`",s=-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+" ");++s<n.unsafe.length;){const a=n.unsafe[s],o=n.compilePattern(a);let u;if(a.atBreak)for(;u=o.exec(r);){let l=u.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(u.index+1)}}return i+r+i}function WA(){return"`"}function Gp(e,t){const n=al(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Yp.peek=GA;function Yp(e,t,n,r){const i=pl(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let o,u;if(Gp(e,n)){const d=n.stack;n.stack=[],o=n.enter("autolink");let c=a.move("<");return c+=a.move(n.containerPhrasing(e,{before:c,after:">",...a.current()})),c+=a.move(">"),o(),n.stack=d,c}o=n.enter("link"),u=n.enter("label");let l=a.move("[");return l+=a.move(n.containerPhrasing(e,{before:l,after:"](",...a.current()})),l+=a.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),l+=a.move("<"),l+=a.move(n.safe(e.url,{before:l,after:">",...a.current()})),l+=a.move(">")):(u=n.enter("destinationRaw"),l+=a.move(n.safe(e.url,{before:l,after:e.title?" ":")",...a.current()}))),u(),e.title&&(u=n.enter(`title${s}`),l+=a.move(" "+i),l+=a.move(n.safe(e.title,{before:l,after:i,...a.current()})),l+=a.move(i),u()),l+=a.move(")"),o(),l}function GA(e,t,n){return Gp(e,n)?"<":"["}Kp.peek=YA;function Kp(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let u=o.move("[");const l=n.containerPhrasing(e,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return a(),n.stack=d,s(),i==="full"||!l||l!==c?u+=o.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function YA(){return"["}function ml(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 KA(e){const t=ml(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 QA(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 Qp(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 XA(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?QA(n):ml(n);const o=e.ordered?a==="."?")":".":KA(n);let u=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.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&&(u=!0),Qp(n)===a&&d){let c=-1;for(;++c<e.children.length;){const m=e.children[c];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(a=o),n.bulletCurrent=a;const l=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),l}function ZA(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function JA(e,t,n,r){const i=ZA(n);let s=n.bulletCurrent||ml(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.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(s+" ".repeat(a-s.length)),o.shift(a);const u=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,o.current()),d);return u(),l;function d(c,m,p){return m?(p?"":" ".repeat(a))+c:(p?s:s+" ".repeat(a-s.length))+c}}function e5(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const t5=wa(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function n5(e,t,n,r){return(e.children.some(function(a){return t5(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function r5(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Xp.peek=i5;function Xp(e,t,n,r){const i=r5(n),s=n.enter("strong"),a=n.createTracker(r),o=a.move(i+i);let u=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const l=u.charCodeAt(0),d=Js(r.before.charCodeAt(r.before.length-1),l,i);d.inside&&(u=Bi(l)+u.slice(1));const c=u.charCodeAt(u.length-1),m=Js(r.after.charCodeAt(0),c,i);m.inside&&(u=u.slice(0,-1)+Bi(c));const p=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},o+u+p}function i5(e,t,n){return n.options.strong||"*"}function s5(e,t,n,r){return n.safe(e.value,r)}function a5(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 o5(e,t,n){const r=(Qp(n)+(n.options.ruleSpaces?" ":"")).repeat(a5(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Zp={blockquote:wA,break:Td,code:FA,definition:BA,emphasis:zp,hardBreak:Td,heading:zA,html:$p,image:qp,imageReference:Vp,inlineCode:Wp,link:Yp,linkReference:Kp,list:XA,listItem:JA,paragraph:e5,root:n5,strong:Xp,text:s5,thematicBreak:o5};function u5(){return{enter:{table:l5,tableData:Cd,tableHeader:Cd,tableRow:d5},exit:{codeText:h5,table:c5,tableData:bo,tableHeader:bo,tableRow:bo}}}function l5(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 c5(e){this.exit(e),this.data.inTable=void 0}function d5(e){this.enter({type:"tableRow",children:[]},e)}function bo(e){this.exit(e)}function Cd(e){this.enter({type:"tableCell",children:[]},e)}function h5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,f5));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function f5(e,t){return t==="|"?t:e}function p5(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
149
149
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:a,tableCell:u,tableRow:o}};function a(p,g,b,T){return l(d(p,b,T),p.align)}function o(p,g,b,T){const y=c(p,b,T),C=l([y]);return C.slice(0,C.indexOf(`
150
- `))}function u(p,g,b,T){const y=b.enter("tableCell"),C=b.enter("phrasing"),S=b.containerPhrasing(p,{...T,before:s,after:s});return C(),y(),S}function l(p,g){return xA(p,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function d(p,g,b){const T=p.children;let y=-1;const C=[],S=g.enter("table");for(;++y<T.length;)C[y]=c(T[y],g,b);return S(),C}function c(p,g,b){const T=p.children;let y=-1;const C=[],S=g.enter("tableRow");for(;++y<T.length;)C[y]=u(T[y],p,g,b);return S(),C}function m(p,g,b){let T=Yp.inlineCode(p,g,b);return b.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function a5(){return{exit:{taskListCheckValueChecked:Sd,taskListCheckValueUnchecked:Sd,paragraph:u5}}}function o5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:l5}}}function Sd(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function u5(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,a;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){a=o;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function l5(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);s&&o.move(a);let u=Yp.listItem(e,t,n,{...r,...o.current()});return s&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(d){return d+a}}function c5(){return[zS(),lA(),fA(),JA(),a5()]}function d5(e){return{extensions:[$S(),cA(e),pA(),s5(e),o5()]}}const h5={tokenize:E5,partial:!0},Kp={tokenize:x5,partial:!0},Qp={tokenize:y5,partial:!0},Xp={tokenize:T5,partial:!0},f5={tokenize:C5,partial:!0},Zp={name:"wwwAutolink",tokenize:g5,previous:em},Jp={name:"protocolAutolink",tokenize:b5,previous:tm},vn={name:"emailAutolink",tokenize:m5,previous:nm},dn={};function p5(){return{text:dn}}let $n=48;for(;$n<123;)dn[$n]=vn,$n++,$n===58?$n=65:$n===91&&($n=97);dn[43]=vn;dn[45]=vn;dn[46]=vn;dn[95]=vn;dn[72]=[vn,Jp];dn[104]=[vn,Jp];dn[87]=[vn,Zp];dn[119]=[vn,Zp];function m5(e,t,n){const r=this;let i,s;return a;function a(c){return!nu(c)||!nm.call(r,r.previous)||ml(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(c))}function o(c){return nu(c)?(e.consume(c),o):c===64?(e.consume(c),u):n(c)}function u(c){return c===46?e.check(f5,d,l)(c):c===45||c===95||St(c)?(s=!0,e.consume(c),u):d(c)}function l(c){return e.consume(c),i=!0,u}function d(c){return s&&i&&vt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function g5(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!em.call(r,r.previous)||ml(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(h5,e.attempt(Kp,e.attempt(Qp,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function b5(e,t,n){const r=this;let i="",s=!1;return a;function a(c){return(c===72||c===104)&&tm.call(r,r.previous)&&!ml(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),o):n(c)}function o(c){if(vt(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),o;if(c===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(c),u}return n(c)}function u(c){return c===47?(e.consume(c),s?l:(s=!0,u)):n(c)}function l(c){return c===null||Qs(c)||Le(c)||rr(c)||_a(c)?n(c):e.attempt(Kp,e.attempt(Qp,d),n)(c)}function d(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function E5(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function x5(e,t,n){let r,i,s;return a;function a(l){return l===46||l===95?e.check(Xp,u,o)(l):l===null||Le(l)||rr(l)||l!==45&&_a(l)?u(l):(s=!0,e.consume(l),a)}function o(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),a}function u(l){return i||r||!s?n(l):t(l)}}function y5(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Xp,t,s)(a):a===null||Le(a)||rr(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function T5(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),s):o===93?(e.consume(o),i):o===60||o===null||Le(o)||rr(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||Le(o)||rr(o)?t(o):r(o)}function s(o){return vt(o)?a(o):n(o)}function a(o){return o===59?(e.consume(o),r):vt(o)?(e.consume(o),a):n(o)}}function C5(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return St(s)?n(s):t(s)}}function em(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Le(e)}function tm(e){return!vt(e)}function nm(e){return!(e===47||nu(e))}function nu(e){return e===43||e===45||e===46||e===95||St(e)}function ml(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const S5={tokenize:P5,partial:!0};function A5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:v5,continuation:{tokenize:D5},exit:w5}},text:{91:{name:"gfmFootnoteCall",tokenize:_5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:k5,resolveTo:I5}}}}function k5(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!a||!a._balanced)return n(u);const l=en(r.sliceSerialize({start:a.end,end:r.now()}));return l.codePointAt(0)!==94||!s.includes(l.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function I5(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 s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function _5(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(c){if(s>999||c===93&&!a||c===null||c===91||Le(c))return n(c);if(c===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(en(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return Le(c)||(a=!0),s++,e.consume(c),c===92?d:l}function d(c){return c===91||c===92||c===93?(e.consume(c),s++,l):l(c)}}function v5(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return u;function u(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(g)}function d(g){if(a>999||g===93&&!o||g===null||g===91||Le(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return s=en(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Le(g)||(o=!0),a++,e.consume(g),g===92?c:d}function c(g){return g===91||g===92||g===93?(e.consume(g),a++,d):d(g)}function m(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(s)||i.push(s),_e(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function D5(e,t,n){return e.check(Qi,t,e.attempt(S5,t,n))}function w5(e){e.exit("gfmFootnoteDefinition")}function P5(e,t,n){const r=this;return _e(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function N5(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let l=u;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[u][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[u][1].end)},c={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[u][1].start)},m=[["enter",d,o],["enter",a[l][1],o],["exit",a[l][1],o],["enter",c,o]],p=o.parser.constructs.insideSpan.null;p&&Ht(m,m.length,0,va(p,a.slice(l+1,u),o)),Ht(m,m.length,0,[["exit",c,o],["enter",a[u][1],o],["exit",a[u][1],o],["exit",d,o]]),Ht(a,l-1,u-l+3,m),u=l+m.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function s(a,o,u){const l=this.previous,d=this.events;let c=0;return m;function m(g){return l===126&&d[d.length-1][1].type!=="characterEscape"?u(g):(a.enter("strikethroughSequenceTemporary"),p(g))}function p(g){const b=Lr(l);if(g===126)return c>1?u(g):(a.consume(g),c++,p);if(c<2&&!n)return u(g);const T=a.exit("strikethroughSequenceTemporary"),y=Lr(g);return T._open=!y||y===2&&!!b,T._close=!b||b===2&&!!y,o(g)}}}class R5{constructor(){this.map=[]}add(t,n,r){L5(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[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.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function L5(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function O5(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function F5(){return{flow:{null:{name:"table",tokenize:M5,resolveAll:B5}}}}function M5(e,t,n){const r=this;let i=0,s=0,a;return o;function o(E){let L=r.events.length-1;for(;L>-1;){const M=r.events[L][1].type;if(M==="lineEnding"||M==="linePrefix")L--;else break}const O=L>-1?r.events[L][1].type:null,z=O==="tableHead"||O==="tableRow"?w:u;return z===w&&r.parser.lazy[r.now().line]?n(E):z(E)}function u(E){return e.enter("tableHead"),e.enter("tableRow"),l(E)}function l(E){return E===124||(a=!0,s+=1),d(E)}function d(E){return E===null?n(E):me(E)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),p):n(E):Ie(E)?_e(e,d,"whitespace")(E):(s+=1,a&&(a=!1,i+=1),E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),c(E)))}function c(E){return E===null||E===124||Le(E)?(e.exit("data"),d(E)):(e.consume(E),E===92?m:c)}function m(E){return E===92||E===124?(e.consume(E),c):c(E)}function p(E){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(E):(e.enter("tableDelimiterRow"),a=!1,Ie(E)?_e(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):g(E))}function g(E){return E===45||E===58?T(E):E===124?(a=!0,e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),b):D(E)}function b(E){return Ie(E)?_e(e,T,"whitespace")(E):T(E)}function T(E){return E===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),y):E===45?(s+=1,y(E)):E===null||me(E)?P(E):D(E)}function y(E){return E===45?(e.enter("tableDelimiterFiller"),C(E)):D(E)}function C(E){return E===45?(e.consume(E),C):E===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(E))}function S(E){return Ie(E)?_e(e,P,"whitespace")(E):P(E)}function P(E){return E===124?g(E):E===null||me(E)?!a||i!==s?D(E):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(E)):D(E)}function D(E){return n(E)}function w(E){return e.enter("tableRow"),B(E)}function B(E){return E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),B):E===null||me(E)?(e.exit("tableRow"),t(E)):Ie(E)?_e(e,B,"whitespace")(E):(e.enter("data"),V(E))}function V(E){return E===null||E===124||Le(E)?(e.exit("data"),B(E)):(e.consume(E),E===92?Q:V)}function Q(E){return E===92||E===124?(e.consume(E),V):V(E)}}function B5(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,u=0,l,d,c;const m=new R5;for(;++n<e.length;){const p=e[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(o=!1,u!==0&&(Ad(m,t,u,l,d),d=void 0,u=0),l={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",l,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,s=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",d,t]])),i=g.type==="tableDelimiterRow"?2:d?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],c=fs(m,t,s,i,void 0,c),s=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],c=fs(m,t,s,i,void 0,c)),s=a,a=[s[1],n,0,0])):g.type==="tableHead"?(o=!0,u=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(u=n,s[1]!==0?(a[0]=a[1],c=fs(m,t,s,i,n,c)):a[1]!==0&&(c=fs(m,t,a,i,n,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(u!==0&&Ad(m,t,u,l,d),m.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=O5(t.events,n))}return e}function fs(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},Tr(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const u=Tr(t.events,n[1]);if(s={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const l=Tr(t.events,n[2]),d=Tr(t.events,n[3]),c={type:o,start:Object.assign({},l),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const m=t.events[n[2]],p=t.events[n[3]];if(m[1].end=Object.assign({},p[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,b=n[3]-n[2]-1;e.add(g,b,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(s.end=Object.assign({},Tr(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function Ad(e,t,n,r,i){const s=[],a=Tr(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function Tr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const j5={name:"tasklistCheck",tokenize:U5};function H5(){return{text:{91:j5}}}function U5(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),s)}function s(u){return Le(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),a):n(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(u)}function o(u){return me(u)?t(u):Ie(u)?e.check({tokenize:z5},t,n)(u):n(u)}}function z5(e,t,n){return _e(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function $5(e){return fp([p5(),A5(),N5(e),F5(),H5()])}const q5={};function V5(e){const t=this,n=e||q5,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push($5(n)),s.push(c5()),a.push(d5(n))}const kd=/[#.]/g;function W5(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){kd.lastIndex=i;const o=kd.exec(n),u=n.slice(i,o?o.index:n.length);u&&(s?s==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:a=u,i+=u.length),o&&(s=o[0],i++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function rm(e,t,n){const r=n?Q5(n):void 0;function i(s,a,...o){let u;if(s==null){u={type:"root",children:[]};const l=a;o.unshift(l)}else{u=W5(s,t);const l=u.tagName.toLowerCase(),d=r?r.get(l):void 0;if(u.tagName=d||l,G5(a))o.unshift(a);else for(const[c,m]of Object.entries(a))Y5(e,u.properties,c,m)}for(const l of o)ru(u.children,l);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return i}function G5(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Y5(e,t,n,r){const i=Gi(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=$o(r):i.commaSeparated?s=zo(r):i.commaOrSpaceSeparated?s=$o(zo(r).join(" ")):s=Id(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?K5(r):String(r);if(Array.isArray(s)){const a=[];for(const o of s)a.push(Id(i,i.property,o));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function ru(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)ru(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?ru(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Id(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Ni(n)===Ni(t)))return!0}return n}function K5(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Q5(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const X5=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],Z5=rm(Ur,"div"),J5=rm(In,"g",X5);function ek(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let a=0;for(;;){let o=n[a];if(o===void 0){const u=_d(t,n[a-1]);o=u===-1?t.length+1:u+1,n[a]=o}if(o>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const o=n[n.length-1],u=_d(t,o),l=u===-1?t.length+1:u+1;if(o===l)break;n.push(l)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function _d(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
151
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Xn={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},im={}.hasOwnProperty,tk=Object.prototype;function nk(e,t){const n=t||{};return gl({file:n.file||void 0,location:!1,schema:n.space==="svg"?In:Ur,verbose:n.verbose||!1},e)}function gl(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},ks(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:sm(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=ek(s),o=a.toPoint(0),u=a.toPoint(s.length);n.position={start:o,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},ks(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},ks(e,r,n),n}default:return n=rk(e,t),n}}function sm(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=gl(e,t[n]);r.push(i)}return r}function rk(e,t){const n=e.schema;e.schema=t.namespaceURI===Xn.svg?In:Ur;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],u=(o.prefix?o.prefix+":":"")+o.name;im.call(tk,u)||(i[u]=o.value)}const a=(e.schema.space==="svg"?J5:Z5)(t.tagName,i,sm(e,t.childNodes));if(ks(e,t,a),a.tagName==="template"){const o=t,u=o.sourceCodeLocation,l=u&&u.startTag&&Sr(u.startTag),d=u&&u.endTag&&Sr(u.endTag),c=gl(e,o.content);l&&d&&e.file&&(c.position={start:l.end,end:d.start}),a.content=c}return e.schema=n,a}function ks(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=ik(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function ik(e,t,n){const r=Sr(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const s={};let a;if(n.attrs)for(a in n.attrs)im.call(n.attrs,a)&&(s[Gi(e.schema,a).property]=Sr(n.attrs[a]));n.startTag;const o=Sr(n.startTag),u=n.endTag?Sr(n.endTag):void 0,l={opening:o};u&&(l.closing=u),l.properties=s,t.data={position:l}}}return r}function Sr(e){const t=vd({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=vd({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function vd(e){return e.line&&e.column?e:void 0}class Zi{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Zi.prototype.property={};Zi.prototype.normal={};Zi.prototype.space=null;function am(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Zi(n,r,t)}function iu(e){return e.toLowerCase()}class Zt{constructor(t,n){this.property=t,this.attribute=n}}Zt.prototype.space=null;Zt.prototype.boolean=!1;Zt.prototype.booleanish=!1;Zt.prototype.overloadedBoolean=!1;Zt.prototype.number=!1;Zt.prototype.commaSeparated=!1;Zt.prototype.spaceSeparated=!1;Zt.prototype.commaOrSpaceSeparated=!1;Zt.prototype.mustUseProperty=!1;Zt.prototype.defined=!1;let sk=0;const Te=ur(),Je=ur(),om=ur(),Z=ur(),Fe=ur(),Dr=ur(),Mt=ur();function ur(){return 2**++sk}const su=Object.freeze(Object.defineProperty({__proto__:null,boolean:Te,booleanish:Je,commaOrSpaceSeparated:Mt,commaSeparated:Dr,number:Z,overloadedBoolean:om,spaceSeparated:Fe},Symbol.toStringTag,{value:"Module"})),Eo=Object.keys(su);class bl extends Zt{constructor(t,n,r,i){let s=-1;if(super(t,n),Dd(this,"space",i),typeof r=="number")for(;++s<Eo.length;){const a=Eo[s];Dd(this,Eo[s],(r&su[a])===su[a])}}}bl.prototype.defined=!0;function Dd(e,t,n){n&&(e[t]=n)}const ak={}.hasOwnProperty;function qr(e){const t={},n={};let r;for(r in e.properties)if(ak.call(e.properties,r)){const i=e.properties[r],s=new bl(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[iu(r)]=r,n[iu(s.attribute)]=r}return new Zi(t,n,e.space)}const um=qr({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),lm=qr({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function cm(e,t){return t in e?e[t]:t}function dm(e,t){return cm(e,t.toLowerCase())}const hm=qr({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:dm,properties:{xmlns:null,xmlnsXLink:null}}),fm=qr({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Je,ariaAutoComplete:null,ariaBusy:Je,ariaChecked:Je,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:Fe,ariaCurrent:null,ariaDescribedBy:Fe,ariaDetails:null,ariaDisabled:Je,ariaDropEffect:Fe,ariaErrorMessage:null,ariaExpanded:Je,ariaFlowTo:Fe,ariaGrabbed:Je,ariaHasPopup:null,ariaHidden:Je,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Fe,ariaLevel:Z,ariaLive:null,ariaModal:Je,ariaMultiLine:Je,ariaMultiSelectable:Je,ariaOrientation:null,ariaOwns:Fe,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:Je,ariaReadOnly:Je,ariaRelevant:null,ariaRequired:Je,ariaRoleDescription:Fe,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:Je,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null}}),ok=qr({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:dm,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Dr,acceptCharset:Fe,accessKey:Fe,action:null,allow:null,allowFullScreen:Te,allowPaymentRequest:Te,allowUserMedia:Te,alt:null,as:null,async:Te,autoCapitalize:null,autoComplete:Fe,autoFocus:Te,autoPlay:Te,blocking:Fe,capture:null,charSet:null,checked:Te,cite:null,className:Fe,cols:Z,colSpan:null,content:null,contentEditable:Je,controls:Te,controlsList:Fe,coords:Z|Dr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Te,defer:Te,dir:null,dirName:null,disabled:Te,download:om,draggable:Je,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Te,formTarget:null,headers:Fe,height:Z,hidden:Te,high:Z,href:null,hrefLang:null,htmlFor:Fe,httpEquiv:Fe,id:null,imageSizes:null,imageSrcSet:null,inert:Te,inputMode:null,integrity:null,is:null,isMap:Te,itemId:null,itemProp:Fe,itemRef:Fe,itemScope:Te,itemType:Fe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Te,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:Te,muted:Te,name:null,nonce:null,noModule:Te,noValidate:Te,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Te,optimum:Z,pattern:null,ping:Fe,placeholder:null,playsInline:Te,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Te,referrerPolicy:null,rel:Fe,required:Te,reversed:Te,rows:Z,rowSpan:Z,sandbox:Fe,scope:null,scoped:Te,seamless:Te,selected:Te,shadowRootClonable:Te,shadowRootDelegatesFocus:Te,shadowRootMode:null,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:Je,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:Te,useMap:null,value:Je,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Fe,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Te,declare:Te,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:Te,noHref:Te,noShade:Te,noWrap:Te,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:Je,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Te,disableRemotePlayback:Te,prefix:null,property:null,results:Z,security:null,unselectable:null}}),uk=qr({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:cm,properties:{about:Mt,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:Fe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:Te,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Dr,g2:Dr,glyphName:Dr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:Mt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Fe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Mt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Mt,rev:Mt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Mt,requiredFeatures:Mt,requiredFonts:Mt,requiredFormats:Mt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:Mt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Mt,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Mt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),lk=/^data[-\w.:]+$/i,wd=/-[a-z]/g,ck=/[A-Z]/g;function dk(e,t){const n=iu(t);let r=t,i=Zt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&lk.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(wd,fk);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!wd.test(s)){let a=s.replace(ck,hk);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=bl}return new i(r,t)}function hk(e){return"-"+e.toLowerCase()}function fk(e){return e.charAt(1).toUpperCase()}const pk=am([lm,um,hm,fm,ok],"html"),pm=am([lm,um,hm,fm,uk],"svg"),mk={},gk={}.hasOwnProperty,mm=ba("type",{handlers:{root:Ek,element:Sk,text:Tk,comment:Ck,doctype:yk}});function bk(e,t){const r=(t||mk).space;return mm(e,r==="svg"?pm:pk)}function Ek(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=El(e.children,n,t),Vr(e,n),n}function xk(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=El(e.children,n,t),Vr(e,n),n}function yk(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Vr(e,t),t}function Tk(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Vr(e,t),t}function Ck(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Vr(e,t),t}function Sk(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=pm);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&gk.call(e.properties,s)){const u=Ak(r,s,e.properties[s]);u&&i.push(u)}}const a=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Xn[a],childNodes:[],parentNode:null};return o.childNodes=El(e.children,o,r),Vr(e,o),e.tagName==="template"&&e.content&&(o.content=xk(e.content,r)),o}function Ak(e,t,n){const r=dk(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Ea(n):xa(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=Xn[r.space]}return i}function El(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=mm(e[r],n);s.parentNode=t,i.push(s)}return i}function Vr(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const kk=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Ue="�";var A;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(A||(A={}));const Nt={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function gm(e){return e>=55296&&e<=57343}function Ik(e){return e>=56320&&e<=57343}function _k(e,t){return(e-55296)*1024+9216+t}function bm(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Em(e){return e>=64976&&e<=65007||kk.has(e)}var F;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(F||(F={}));const vk=65536;class Dk{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=vk,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:s}=this,a=i+n,o=s+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(Ik(n))return this.pos++,this._addGap(),_k(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,A.EOF;return this._err(F.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,A.EOF;const r=this.html.charCodeAt(n);return r===A.CARRIAGE_RETURN?A.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,A.EOF;let t=this.html.charCodeAt(this.pos);return t===A.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,A.LINE_FEED):t===A.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,gm(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===A.LINE_FEED||t===A.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){bm(t)?this._err(F.controlCharacterInInputStream):Em(t)&&this._err(F.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ke;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(ke||(ke={}));function xm(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const ym=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),wk=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var xo;const Pk=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Nk=(xo=String.fromCodePoint)!==null&&xo!==void 0?xo:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Rk(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Pk.get(e))!==null&&t!==void 0?t:e}var ft;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ft||(ft={}));const Lk=32;var Fn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Fn||(Fn={}));function au(e){return e>=ft.ZERO&&e<=ft.NINE}function Ok(e){return e>=ft.UPPER_A&&e<=ft.UPPER_F||e>=ft.LOWER_A&&e<=ft.LOWER_F}function Fk(e){return e>=ft.UPPER_A&&e<=ft.UPPER_Z||e>=ft.LOWER_A&&e<=ft.LOWER_Z||au(e)}function Mk(e){return e===ft.EQUALS||Fk(e)}var dt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(dt||(dt={}));var yn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(yn||(yn={}));class Tm{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=dt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=yn.Strict}startEntity(t){this.decodeMode=t,this.state=dt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case dt.EntityStart:return t.charCodeAt(n)===ft.NUM?(this.state=dt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=dt.NamedEntity,this.stateNamedEntity(t,n));case dt.NumericStart:return this.stateNumericStart(t,n);case dt.NumericDecimal:return this.stateNumericDecimal(t,n);case dt.NumericHex:return this.stateNumericHex(t,n);case dt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Lk)===ft.LOWER_X?(this.state=dt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=dt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+parseInt(t.substr(n,s),i),this.consumed+=s}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(au(i)||Ok(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(au(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===ft.SEMI)this.consumed+=1;else if(this.decodeMode===yn.Strict)return 0;return this.emitCodePoint(Rk(this.result),this.consumed),this.errors&&(t!==ft.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&Fn.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=Bk(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===yn.Attribute&&(s===0||Mk(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&Fn.VALUE_LENGTH)>>14,s!==0){if(a===ft.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==yn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Fn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Fn.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case dt.NamedEntity:return this.result!==0&&(this.decodeMode!==yn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case dt.NumericDecimal:return this.emitNumericEntity(0,2);case dt.NumericHex:return this.emitNumericEntity(0,3);case dt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case dt.EntityStart:return 0}}}function Cm(e){let t="";const n=new Tm(e,r=>t+=Nk(r));return function(i,s){let a=0,o=0;for(;(o=i.indexOf("&",o))>=0;){t+=i.slice(a,o),n.startEntity(s);const l=n.write(i,o+1);if(l<0){a=o+n.end();break}a=o+l,o=l===0?a+1:a}const u=t+i.slice(a);return t="",u}}function Bk(e,t,n,r){const i=(t&Fn.BRANCH_LENGTH)>>7,s=t&Fn.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const u=r-s;return u<0||u>=i?-1:e[n+u]-1}let a=n,o=a+i-1;for(;a<=o;){const u=a+o>>>1,l=e[u];if(l<r)a=u+1;else if(l>r)o=u-1;else return e[u+i]}return-1}Cm(ym);Cm(wk);var W;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(W||(W={}));var Jn;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Jn||(Jn={}));var Kt;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Kt||(Kt={}));var R;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(R||(R={}));var f;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(f||(f={}));const jk=new Map([[R.A,f.A],[R.ADDRESS,f.ADDRESS],[R.ANNOTATION_XML,f.ANNOTATION_XML],[R.APPLET,f.APPLET],[R.AREA,f.AREA],[R.ARTICLE,f.ARTICLE],[R.ASIDE,f.ASIDE],[R.B,f.B],[R.BASE,f.BASE],[R.BASEFONT,f.BASEFONT],[R.BGSOUND,f.BGSOUND],[R.BIG,f.BIG],[R.BLOCKQUOTE,f.BLOCKQUOTE],[R.BODY,f.BODY],[R.BR,f.BR],[R.BUTTON,f.BUTTON],[R.CAPTION,f.CAPTION],[R.CENTER,f.CENTER],[R.CODE,f.CODE],[R.COL,f.COL],[R.COLGROUP,f.COLGROUP],[R.DD,f.DD],[R.DESC,f.DESC],[R.DETAILS,f.DETAILS],[R.DIALOG,f.DIALOG],[R.DIR,f.DIR],[R.DIV,f.DIV],[R.DL,f.DL],[R.DT,f.DT],[R.EM,f.EM],[R.EMBED,f.EMBED],[R.FIELDSET,f.FIELDSET],[R.FIGCAPTION,f.FIGCAPTION],[R.FIGURE,f.FIGURE],[R.FONT,f.FONT],[R.FOOTER,f.FOOTER],[R.FOREIGN_OBJECT,f.FOREIGN_OBJECT],[R.FORM,f.FORM],[R.FRAME,f.FRAME],[R.FRAMESET,f.FRAMESET],[R.H1,f.H1],[R.H2,f.H2],[R.H3,f.H3],[R.H4,f.H4],[R.H5,f.H5],[R.H6,f.H6],[R.HEAD,f.HEAD],[R.HEADER,f.HEADER],[R.HGROUP,f.HGROUP],[R.HR,f.HR],[R.HTML,f.HTML],[R.I,f.I],[R.IMG,f.IMG],[R.IMAGE,f.IMAGE],[R.INPUT,f.INPUT],[R.IFRAME,f.IFRAME],[R.KEYGEN,f.KEYGEN],[R.LABEL,f.LABEL],[R.LI,f.LI],[R.LINK,f.LINK],[R.LISTING,f.LISTING],[R.MAIN,f.MAIN],[R.MALIGNMARK,f.MALIGNMARK],[R.MARQUEE,f.MARQUEE],[R.MATH,f.MATH],[R.MENU,f.MENU],[R.META,f.META],[R.MGLYPH,f.MGLYPH],[R.MI,f.MI],[R.MO,f.MO],[R.MN,f.MN],[R.MS,f.MS],[R.MTEXT,f.MTEXT],[R.NAV,f.NAV],[R.NOBR,f.NOBR],[R.NOFRAMES,f.NOFRAMES],[R.NOEMBED,f.NOEMBED],[R.NOSCRIPT,f.NOSCRIPT],[R.OBJECT,f.OBJECT],[R.OL,f.OL],[R.OPTGROUP,f.OPTGROUP],[R.OPTION,f.OPTION],[R.P,f.P],[R.PARAM,f.PARAM],[R.PLAINTEXT,f.PLAINTEXT],[R.PRE,f.PRE],[R.RB,f.RB],[R.RP,f.RP],[R.RT,f.RT],[R.RTC,f.RTC],[R.RUBY,f.RUBY],[R.S,f.S],[R.SCRIPT,f.SCRIPT],[R.SEARCH,f.SEARCH],[R.SECTION,f.SECTION],[R.SELECT,f.SELECT],[R.SOURCE,f.SOURCE],[R.SMALL,f.SMALL],[R.SPAN,f.SPAN],[R.STRIKE,f.STRIKE],[R.STRONG,f.STRONG],[R.STYLE,f.STYLE],[R.SUB,f.SUB],[R.SUMMARY,f.SUMMARY],[R.SUP,f.SUP],[R.TABLE,f.TABLE],[R.TBODY,f.TBODY],[R.TEMPLATE,f.TEMPLATE],[R.TEXTAREA,f.TEXTAREA],[R.TFOOT,f.TFOOT],[R.TD,f.TD],[R.TH,f.TH],[R.THEAD,f.THEAD],[R.TITLE,f.TITLE],[R.TR,f.TR],[R.TRACK,f.TRACK],[R.TT,f.TT],[R.U,f.U],[R.UL,f.UL],[R.SVG,f.SVG],[R.VAR,f.VAR],[R.WBR,f.WBR],[R.XMP,f.XMP]]);function Wr(e){var t;return(t=jk.get(e))!==null&&t!==void 0?t:f.UNKNOWN}const Y=f,Hk={[W.HTML]:new Set([Y.ADDRESS,Y.APPLET,Y.AREA,Y.ARTICLE,Y.ASIDE,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BLOCKQUOTE,Y.BODY,Y.BR,Y.BUTTON,Y.CAPTION,Y.CENTER,Y.COL,Y.COLGROUP,Y.DD,Y.DETAILS,Y.DIR,Y.DIV,Y.DL,Y.DT,Y.EMBED,Y.FIELDSET,Y.FIGCAPTION,Y.FIGURE,Y.FOOTER,Y.FORM,Y.FRAME,Y.FRAMESET,Y.H1,Y.H2,Y.H3,Y.H4,Y.H5,Y.H6,Y.HEAD,Y.HEADER,Y.HGROUP,Y.HR,Y.HTML,Y.IFRAME,Y.IMG,Y.INPUT,Y.LI,Y.LINK,Y.LISTING,Y.MAIN,Y.MARQUEE,Y.MENU,Y.META,Y.NAV,Y.NOEMBED,Y.NOFRAMES,Y.NOSCRIPT,Y.OBJECT,Y.OL,Y.P,Y.PARAM,Y.PLAINTEXT,Y.PRE,Y.SCRIPT,Y.SECTION,Y.SELECT,Y.SOURCE,Y.STYLE,Y.SUMMARY,Y.TABLE,Y.TBODY,Y.TD,Y.TEMPLATE,Y.TEXTAREA,Y.TFOOT,Y.TH,Y.THEAD,Y.TITLE,Y.TR,Y.TRACK,Y.UL,Y.WBR,Y.XMP]),[W.MATHML]:new Set([Y.MI,Y.MO,Y.MN,Y.MS,Y.MTEXT,Y.ANNOTATION_XML]),[W.SVG]:new Set([Y.TITLE,Y.FOREIGN_OBJECT,Y.DESC]),[W.XLINK]:new Set,[W.XML]:new Set,[W.XMLNS]:new Set},ou=new Set([Y.H1,Y.H2,Y.H3,Y.H4,Y.H5,Y.H6]);R.STYLE,R.SCRIPT,R.XMP,R.IFRAME,R.NOEMBED,R.NOFRAMES,R.PLAINTEXT;var k;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(k||(k={}));const Ke={DATA:k.DATA,RCDATA:k.RCDATA,RAWTEXT:k.RAWTEXT,SCRIPT_DATA:k.SCRIPT_DATA,PLAINTEXT:k.PLAINTEXT,CDATA_SECTION:k.CDATA_SECTION};function Uk(e){return e>=A.DIGIT_0&&e<=A.DIGIT_9}function pi(e){return e>=A.LATIN_CAPITAL_A&&e<=A.LATIN_CAPITAL_Z}function zk(e){return e>=A.LATIN_SMALL_A&&e<=A.LATIN_SMALL_Z}function Rn(e){return zk(e)||pi(e)}function Pd(e){return Rn(e)||Uk(e)}function ps(e){return e+32}function Sm(e){return e===A.SPACE||e===A.LINE_FEED||e===A.TABULATION||e===A.FORM_FEED}function Nd(e){return Sm(e)||e===A.SOLIDUS||e===A.GREATER_THAN_SIGN}function $k(e){return e===A.NULL?F.nullCharacterReference:e>1114111?F.characterReferenceOutsideUnicodeRange:gm(e)?F.surrogateCharacterReference:Em(e)?F.noncharacterCharacterReference:bm(e)||e===A.CARRIAGE_RETURN?F.controlCharacterReference:null}class qk{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=k.DATA,this.returnState=k.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Dk(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Tm(ym,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(F.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(F.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=$k(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ke.START_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ke.END_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ke.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ke.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(xm(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(F.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Wr(t.tagName),t.type===ke.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(F.endTagWithAttributes),t.selfClosing&&this._err(F.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case ke.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ke.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ke.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:ke.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=Sm(t)?ke.WHITESPACE_CHARACTER:t===A.NULL?ke.NULL_CHARACTER:ke.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ke.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=k.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?yn.Attribute:yn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===k.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===k.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===k.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case k.DATA:{this._stateData(t);break}case k.RCDATA:{this._stateRcdata(t);break}case k.RAWTEXT:{this._stateRawtext(t);break}case k.SCRIPT_DATA:{this._stateScriptData(t);break}case k.PLAINTEXT:{this._statePlaintext(t);break}case k.TAG_OPEN:{this._stateTagOpen(t);break}case k.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case k.TAG_NAME:{this._stateTagName(t);break}case k.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case k.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case k.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case k.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case k.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case k.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case k.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case k.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case k.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case k.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case k.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case k.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case k.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case k.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case k.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case k.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case k.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case k.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case k.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case k.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case k.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case k.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case k.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case k.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case k.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case k.BOGUS_COMMENT:{this._stateBogusComment(t);break}case k.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case k.COMMENT_START:{this._stateCommentStart(t);break}case k.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case k.COMMENT:{this._stateComment(t);break}case k.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case k.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case k.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case k.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case k.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case k.COMMENT_END:{this._stateCommentEnd(t);break}case k.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case k.DOCTYPE:{this._stateDoctype(t);break}case k.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case k.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case k.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case k.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case k.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case k.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case k.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case k.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case k.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case k.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case k.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case k.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case k.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case k.CDATA_SECTION:{this._stateCdataSection(t);break}case k.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case k.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case k.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case k.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=k.TAG_OPEN;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitCodePoint(t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case A.AMPERSAND:{this._startCharacterReference();break}case A.LESS_THAN_SIGN:{this.state=k.RCDATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(Ue);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case A.LESS_THAN_SIGN:{this.state=k.RAWTEXT_LESS_THAN_SIGN;break}case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(Ue);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(Ue);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(Ue);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Rn(t))this._createStartTagToken(),this.state=k.TAG_NAME,this._stateTagName(t);else switch(t){case A.EXCLAMATION_MARK:{this.state=k.MARKUP_DECLARATION_OPEN;break}case A.SOLIDUS:{this.state=k.END_TAG_OPEN;break}case A.QUESTION_MARK:{this._err(F.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=k.BOGUS_COMMENT,this._stateBogusComment(t);break}case A.EOF:{this._err(F.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(F.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=k.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Rn(t))this._createEndTagToken(),this.state=k.TAG_NAME,this._stateTagName(t);else switch(t){case A.GREATER_THAN_SIGN:{this._err(F.missingEndTagName),this.state=k.DATA;break}case A.EOF:{this._err(F.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(F.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=k.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=k.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this.state=k.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.tagName+=Ue;break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(pi(t)?ps(t):t)}}_stateRcdataLessThanSign(t){t===A.SOLIDUS?this.state=k.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=k.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Rn(t)?(this.state=k.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=k.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=k.BEFORE_ATTRIBUTE_NAME,!1;case A.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=k.SELF_CLOSING_START_TAG,!1;case A.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=k.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===A.SOLIDUS?this.state=k.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=k.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Rn(t)?(this.state=k.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=k.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case A.SOLIDUS:{this.state=k.SCRIPT_DATA_END_TAG_OPEN;break}case A.EXCLAMATION_MARK:{this.state=k.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=k.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Rn(t)?(this.state=k.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===A.HYPHEN_MINUS?(this.state=k.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===A.HYPHEN_MINUS?(this.state=k.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(Ue);break}case A.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_ESCAPED,this._emitChars(Ue);break}case A.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.GREATER_THAN_SIGN:{this.state=k.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_ESCAPED,this._emitChars(Ue);break}case A.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===A.SOLIDUS?this.state=k.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Rn(t)?(this._emitChars("<"),this.state=k.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Rn(t)?(this.state=k.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Nt.SCRIPT,!1)&&Nd(this.preprocessor.peek(Nt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Nt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(Ue);break}case A.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ue);break}case A.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.GREATER_THAN_SIGN:{this.state=k.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ue);break}case A.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===A.SOLIDUS?(this.state=k.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Nt.SCRIPT,!1)&&Nd(this.preprocessor.peek(Nt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Nt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=k.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this.state=k.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._err(F.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=k.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=k.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this._leaveAttrName(),this.state=k.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._leaveAttrName(),this.state=k.BEFORE_ATTRIBUTE_VALUE;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:{this._err(F.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.currentAttr.name+=Ue;break}default:this.currentAttr.name+=String.fromCodePoint(pi(t)?ps(t):t)}}_stateAfterAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:{this.state=k.SELF_CLOSING_START_TAG;break}case A.EQUALS_SIGN:{this.state=k.BEFORE_ATTRIBUTE_VALUE;break}case A.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=k.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{this.state=k.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this.state=k.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(F.missingAttributeValue),this.state=k.DATA,this.emitCurrentTagToken();break}default:this.state=k.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case A.QUOTATION_MARK:{this.state=k.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.currentAttr.value+=Ue;break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case A.APOSTROPHE:{this.state=k.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.currentAttr.value+=Ue;break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=k.BEFORE_ATTRIBUTE_NAME;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=k.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.currentAttr.value+=Ue;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:case A.EQUALS_SIGN:case A.GRAVE_ACCENT:{this._err(F.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=k.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this._leaveAttrValue(),this.state=k.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=k.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this._err(F.missingWhitespaceBetweenAttributes),this.state=k.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case A.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=k.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this._err(F.unexpectedSolidusInTag),this.state=k.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentComment(n);break}case A.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.data+=Ue;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Nt.DASH_DASH,!0)?(this._createCommentToken(Nt.DASH_DASH.length+1),this.state=k.COMMENT_START):this._consumeSequenceIfMatch(Nt.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Nt.DOCTYPE.length+1),this.state=k.DOCTYPE):this._consumeSequenceIfMatch(Nt.CDATA_START,!0)?this.inForeignNode?this.state=k.CDATA_SECTION:(this._err(F.cdataInHtmlContent),this._createCommentToken(Nt.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=k.BOGUS_COMMENT):this._ensureHibernation()||(this._err(F.incorrectlyOpenedComment),this._createCommentToken(2),this.state=k.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case A.HYPHEN_MINUS:{this.state=k.COMMENT_START_DASH;break}case A.GREATER_THAN_SIGN:{this._err(F.abruptClosingOfEmptyComment),this.state=k.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=k.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=k.COMMENT_END;break}case A.GREATER_THAN_SIGN:{this._err(F.abruptClosingOfEmptyComment),this.state=k.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=k.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=k.COMMENT_END_DASH;break}case A.LESS_THAN_SIGN:{n.data+="<",this.state=k.COMMENT_LESS_THAN_SIGN;break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.data+=Ue;break}case A.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case A.EXCLAMATION_MARK:{n.data+="!",this.state=k.COMMENT_LESS_THAN_SIGN_BANG;break}case A.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=k.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===A.HYPHEN_MINUS?this.state=k.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=k.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===A.HYPHEN_MINUS?this.state=k.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=k.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==A.GREATER_THAN_SIGN&&t!==A.EOF&&this._err(F.nestedComment),this.state=k.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=k.COMMENT_END;break}case A.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=k.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentComment(n);break}case A.EXCLAMATION_MARK:{this.state=k.COMMENT_END_BANG;break}case A.HYPHEN_MINUS:{n.data+="-";break}case A.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=k.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{n.data+="--!",this.state=k.COMMENT_END_DASH;break}case A.GREATER_THAN_SIGN:{this._err(F.incorrectlyClosedComment),this.state=k.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=k.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=k.BEFORE_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=k.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case A.EOF:{this._err(F.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingWhitespaceBeforeDoctypeName),this.state=k.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(pi(t))this._createDoctypeToken(String.fromCharCode(ps(t))),this.state=k.DOCTYPE_NAME;else switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.NULL:{this._err(F.unexpectedNullCharacter),this._createDoctypeToken(Ue),this.state=k.DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this._err(F.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case A.EOF:{this._err(F.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=k.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=k.AFTER_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentDoctype(n);break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.name+=Ue;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(pi(t)?ps(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Nt.PUBLIC,!1)?this.state=k.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Nt.SYSTEM,!1)?this.state=k.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(F.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=k.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(F.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(F.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(F.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(F.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=k.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.publicId+=Ue;break}case A.GREATER_THAN_SIGN:{this._err(F.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case A.APOSTROPHE:{this.state=k.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.publicId+=Ue;break}case A.GREATER_THAN_SIGN:{this._err(F.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=k.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case A.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentDoctype(n);break}case A.QUOTATION_MARK:{this._err(F.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(F.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=k.DATA;break}case A.QUOTATION_MARK:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=k.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(F.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(F.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(F.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(F.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=k.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.systemId+=Ue;break}case A.GREATER_THAN_SIGN:{this._err(F.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case A.APOSTROPHE:{this.state=k.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.systemId+=Ue;break}case A.GREATER_THAN_SIGN:{this._err(F.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=k.DATA;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=k.DATA;break}case A.NULL:{this._err(F.unexpectedNullCharacter);break}case A.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case A.RIGHT_SQUARE_BRACKET:{this.state=k.CDATA_SECTION_BRACKET;break}case A.EOF:{this._err(F.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===A.RIGHT_SQUARE_BRACKET?this.state=k.CDATA_SECTION_END:(this._emitChars("]"),this.state=k.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case A.GREATER_THAN_SIGN:{this.state=k.DATA;break}case A.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=k.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(A.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Pd(this.preprocessor.peek(1))?k.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Pd(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===A.SEMICOLON&&this._err(F.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Am=new Set([f.DD,f.DT,f.LI,f.OPTGROUP,f.OPTION,f.P,f.RB,f.RP,f.RT,f.RTC]),Rd=new Set([...Am,f.CAPTION,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]),ea=new Set([f.APPLET,f.CAPTION,f.HTML,f.MARQUEE,f.OBJECT,f.TABLE,f.TD,f.TEMPLATE,f.TH]),Vk=new Set([...ea,f.OL,f.UL]),Wk=new Set([...ea,f.BUTTON]),Ld=new Set([f.ANNOTATION_XML,f.MI,f.MN,f.MO,f.MS,f.MTEXT]),Od=new Set([f.DESC,f.FOREIGN_OBJECT,f.TITLE]),Gk=new Set([f.TR,f.TEMPLATE,f.HTML]),Yk=new Set([f.TBODY,f.TFOOT,f.THEAD,f.TEMPLATE,f.HTML]),Kk=new Set([f.TABLE,f.TEMPLATE,f.HTML]),Qk=new Set([f.TD,f.TH]);class Xk{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=f.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===f.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===W.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==W.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(n<0?0:n)}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r<0?0:r)}popUntilNumberedHeaderPopped(){this.popUntilPopped(ou,W.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Qk,W.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Kk,W.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Yk,W.HTML)}clearBackToTableRowContext(){this.clearBackTo(Gk,W.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===f.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===f.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case W.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case W.SVG:{if(Od.has(i))return!1;break}case W.MATHML:{if(Ld.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,ea)}hasInListItemScope(t){return this.hasInDynamicScope(t,Vk)}hasInButtonScope(t){return this.hasInDynamicScope(t,Wk)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case W.HTML:{if(ou.has(n))return!0;if(ea.has(n))return!1;break}case W.SVG:{if(Od.has(n))return!1;break}case W.MATHML:{if(Ld.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===W.HTML)switch(this.tagIDs[n]){case t:return!0;case f.TABLE:case f.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===W.HTML)switch(this.tagIDs[t]){case f.TBODY:case f.THEAD:case f.TFOOT:return!0;case f.TABLE:case f.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===W.HTML)switch(this.tagIDs[n]){case t:return!0;case f.OPTION:case f.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;Am.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;Rd.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&Rd.has(this.currentTagId);)this.pop()}}const yo=3;var ln;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(ln||(ln={}));const Fd={type:ln.Marker};class Zk{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,s=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===ln.Marker)break;const{element:l}=u;if(this.treeAdapter.getTagName(l)===s&&this.treeAdapter.getNamespaceURI(l)===a){const d=this.treeAdapter.getAttrList(l);d.length===i&&r.push({idx:o,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<yo)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<yo)return;const i=new Map(n.map(a=>[a.name,a.value]));let s=0;for(let a=0;a<r.length;a++){const o=r[a];o.attrs.every(u=>i.get(u.name)===u.value)&&(s+=1,s>=yo&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Fd)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:ln.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:ln.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Fd);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===ln.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===ln.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===ln.Element&&n.element===t)}}const Ln={createDocument(){return{nodeName:"#document",mode:Kt.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(s=>s.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ln.appendChild(e,s)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Ln.isTextNode(n)){n.value+=t;return}}Ln.appendChild(e,Ln.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ln.isTextNode(r)?r.value+=t:Ln.insertBefore(e,Ln.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},km="html",Jk="about:legacy-compat",eI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Im=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],tI=[...Im,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],nI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),_m=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],rI=[..._m,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Md(e,t){return t.some(n=>e.startsWith(n))}function iI(e){return e.name===km&&e.publicId===null&&(e.systemId===null||e.systemId===Jk)}function sI(e){if(e.name!==km)return Kt.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===eI)return Kt.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),nI.has(n))return Kt.QUIRKS;let r=t===null?tI:Im;if(Md(n,r))return Kt.QUIRKS;if(r=t===null?_m:rI,Md(n,r))return Kt.LIMITED_QUIRKS}return Kt.NO_QUIRKS}const Bd={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},aI="definitionurl",oI="definitionURL",uI=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),lI=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:W.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:W.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:W.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:W.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:W.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:W.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:W.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:W.XML}],["xml:space",{prefix:"xml",name:"space",namespace:W.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:W.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:W.XMLNS}]]),cI=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),dI=new Set([f.B,f.BIG,f.BLOCKQUOTE,f.BODY,f.BR,f.CENTER,f.CODE,f.DD,f.DIV,f.DL,f.DT,f.EM,f.EMBED,f.H1,f.H2,f.H3,f.H4,f.H5,f.H6,f.HEAD,f.HR,f.I,f.IMG,f.LI,f.LISTING,f.MENU,f.META,f.NOBR,f.OL,f.P,f.PRE,f.RUBY,f.S,f.SMALL,f.SPAN,f.STRONG,f.STRIKE,f.SUB,f.SUP,f.TABLE,f.TT,f.U,f.UL,f.VAR]);function hI(e){const t=e.tagID;return t===f.FONT&&e.attrs.some(({name:r})=>r===Jn.COLOR||r===Jn.SIZE||r===Jn.FACE)||dI.has(t)}function vm(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===aI){e.attrs[t].name=oI;break}}function Dm(e){for(let t=0;t<e.attrs.length;t++){const n=uI.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function xl(e){for(let t=0;t<e.attrs.length;t++){const n=lI.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function fI(e){const t=cI.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Wr(e.tagName))}function pI(e,t){return t===W.MATHML&&(e===f.MI||e===f.MO||e===f.MN||e===f.MS||e===f.MTEXT)}function mI(e,t,n){if(t===W.MATHML&&e===f.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Jn.ENCODING){const i=n[r].value.toLowerCase();return i===Bd.TEXT_HTML||i===Bd.APPLICATION_XML}}return t===W.SVG&&(e===f.FOREIGN_OBJECT||e===f.DESC||e===f.TITLE)}function gI(e,t,n,r){return(!r||r===W.HTML)&&mI(e,t,n)||(!r||r===W.MATHML)&&pI(e,t)}const bI="hidden",EI=8,xI=3;var v;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(v||(v={}));const yI={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},wm=new Set([f.TABLE,f.TBODY,f.TFOOT,f.THEAD,f.TR]),jd={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ln,onParseError:null};class Hd{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=v.INITIAL,this.originalInsertionMode=v.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...jd,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new qk(this.options,this),this.activeFormattingElements=new Zk(this.treeAdapter),this.fragmentContextID=r?Wr(this.treeAdapter.getTagName(r)):f.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Xk(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...jd,...n};t??(t=r.treeAdapter.createElement(R.TEMPLATE,W.HTML,[]));const i=r.treeAdapter.createElement("documentmock",W.HTML,[]),s=new this(r,i,t);return s.fragmentContextID===f.TEMPLATE&&s.tmplInsertionModeStack.unshift(v.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const s=(i=t.location)!==null&&i!==void 0?i:yI,a={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(a)}onItemPush(t,n,r){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_setContextModes(t,n){const r=t===this.document||this.treeAdapter.getNamespaceURI(t)===W.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,W.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=v.TEXT}switchToPlaintextParsing(){this.insertionMode=v.TEXT,this.originalInsertionMode=v.IN_BODY,this.tokenizer.state=Ke.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===R.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==W.HTML))switch(this.fragmentContextID){case f.TITLE:case f.TEXTAREA:{this.tokenizer.state=Ke.RCDATA;break}case f.STYLE:case f.XMP:case f.IFRAME:case f.NOEMBED:case f.NOFRAMES:case f.NOSCRIPT:{this.tokenizer.state=Ke.RAWTEXT;break}case f.SCRIPT:{this.tokenizer.state=Ke.SCRIPT_DATA;break}case f.PLAINTEXT:{this.tokenizer.state=Ke.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,W.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,W.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(R.HTML,W.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,f.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),s=r?i.lastIndexOf(r):i.length,a=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:u,endCol:l,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:u,endCol:l,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),s=n.type===ke.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,s)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===f.SVG&&this.treeAdapter.getTagName(n)===R.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===W.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===f.MGLYPH||t.tagID===f.MALIGNMARK)&&!this._isIntegrationPoint(r,n,W.HTML)}_processToken(t){switch(t.type){case ke.CHARACTER:{this.onCharacter(t);break}case ke.NULL_CHARACTER:{this.onNullCharacter(t);break}case ke.COMMENT:{this.onComment(t);break}case ke.DOCTYPE:{this.onDoctype(t);break}case ke.START_TAG:{this._processStartTag(t);break}case ke.END_TAG:{this.onEndTag(t);break}case ke.EOF:{this.onEof(t);break}case ke.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return gI(t,i,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===ln.Marker||this.openElements.contains(i.element)),r=n<0?t-1:n-1;for(let i=r;i>=0;i--){const s=this.activeFormattingElements.entries[i];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=v.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(f.P),this.openElements.popUntilTagNamePopped(f.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case f.TR:{this.insertionMode=v.IN_ROW;return}case f.TBODY:case f.THEAD:case f.TFOOT:{this.insertionMode=v.IN_TABLE_BODY;return}case f.CAPTION:{this.insertionMode=v.IN_CAPTION;return}case f.COLGROUP:{this.insertionMode=v.IN_COLUMN_GROUP;return}case f.TABLE:{this.insertionMode=v.IN_TABLE;return}case f.BODY:{this.insertionMode=v.IN_BODY;return}case f.FRAMESET:{this.insertionMode=v.IN_FRAMESET;return}case f.SELECT:{this._resetInsertionModeForSelect(t);return}case f.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case f.HTML:{this.insertionMode=this.headElement?v.AFTER_HEAD:v.BEFORE_HEAD;return}case f.TD:case f.TH:{if(t>0){this.insertionMode=v.IN_CELL;return}break}case f.HEAD:{if(t>0){this.insertionMode=v.IN_HEAD;return}break}}this.insertionMode=v.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===f.TEMPLATE)break;if(r===f.TABLE){this.insertionMode=v.IN_SELECT_IN_TABLE;return}}this.insertionMode=v.IN_SELECT}_isElementCausesFosterParenting(t){return wm.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case f.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===W.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case f.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return Hk[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Q_(this,t);return}switch(this.insertionMode){case v.INITIAL:{ai(this,t);break}case v.BEFORE_HTML:{Ci(this,t);break}case v.BEFORE_HEAD:{Si(this,t);break}case v.IN_HEAD:{Ai(this,t);break}case v.IN_HEAD_NO_SCRIPT:{ki(this,t);break}case v.AFTER_HEAD:{Ii(this,t);break}case v.IN_BODY:case v.IN_CAPTION:case v.IN_CELL:case v.IN_TEMPLATE:{Nm(this,t);break}case v.TEXT:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case v.IN_TABLE:case v.IN_TABLE_BODY:case v.IN_ROW:{To(this,t);break}case v.IN_TABLE_TEXT:{Bm(this,t);break}case v.IN_COLUMN_GROUP:{ta(this,t);break}case v.AFTER_BODY:{na(this,t);break}case v.AFTER_AFTER_BODY:{Is(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){K_(this,t);return}switch(this.insertionMode){case v.INITIAL:{ai(this,t);break}case v.BEFORE_HTML:{Ci(this,t);break}case v.BEFORE_HEAD:{Si(this,t);break}case v.IN_HEAD:{Ai(this,t);break}case v.IN_HEAD_NO_SCRIPT:{ki(this,t);break}case v.AFTER_HEAD:{Ii(this,t);break}case v.TEXT:{this._insertCharacters(t);break}case v.IN_TABLE:case v.IN_TABLE_BODY:case v.IN_ROW:{To(this,t);break}case v.IN_COLUMN_GROUP:{ta(this,t);break}case v.AFTER_BODY:{na(this,t);break}case v.AFTER_AFTER_BODY:{Is(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){uu(this,t);return}switch(this.insertionMode){case v.INITIAL:case v.BEFORE_HTML:case v.BEFORE_HEAD:case v.IN_HEAD:case v.IN_HEAD_NO_SCRIPT:case v.AFTER_HEAD:case v.IN_BODY:case v.IN_TABLE:case v.IN_CAPTION:case v.IN_COLUMN_GROUP:case v.IN_TABLE_BODY:case v.IN_ROW:case v.IN_CELL:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:case v.IN_TEMPLATE:case v.IN_FRAMESET:case v.AFTER_FRAMESET:{uu(this,t);break}case v.IN_TABLE_TEXT:{oi(this,t);break}case v.AFTER_BODY:{_I(this,t);break}case v.AFTER_AFTER_BODY:case v.AFTER_AFTER_FRAMESET:{vI(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case v.INITIAL:{DI(this,t);break}case v.BEFORE_HEAD:case v.IN_HEAD:case v.IN_HEAD_NO_SCRIPT:case v.AFTER_HEAD:{this._err(t,F.misplacedDoctype);break}case v.IN_TABLE_TEXT:{oi(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,F.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?X_(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case v.INITIAL:{ai(this,t);break}case v.BEFORE_HTML:{wI(this,t);break}case v.BEFORE_HEAD:{NI(this,t);break}case v.IN_HEAD:{nn(this,t);break}case v.IN_HEAD_NO_SCRIPT:{OI(this,t);break}case v.AFTER_HEAD:{MI(this,t);break}case v.IN_BODY:{kt(this,t);break}case v.IN_TABLE:{Or(this,t);break}case v.IN_TABLE_TEXT:{oi(this,t);break}case v.IN_CAPTION:{R_(this,t);break}case v.IN_COLUMN_GROUP:{Cl(this,t);break}case v.IN_TABLE_BODY:{La(this,t);break}case v.IN_ROW:{Oa(this,t);break}case v.IN_CELL:{F_(this,t);break}case v.IN_SELECT:{Um(this,t);break}case v.IN_SELECT_IN_TABLE:{B_(this,t);break}case v.IN_TEMPLATE:{H_(this,t);break}case v.AFTER_BODY:{z_(this,t);break}case v.IN_FRAMESET:{$_(this,t);break}case v.AFTER_FRAMESET:{V_(this,t);break}case v.AFTER_AFTER_BODY:{G_(this,t);break}case v.AFTER_AFTER_FRAMESET:{Y_(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Z_(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case v.INITIAL:{ai(this,t);break}case v.BEFORE_HTML:{PI(this,t);break}case v.BEFORE_HEAD:{RI(this,t);break}case v.IN_HEAD:{LI(this,t);break}case v.IN_HEAD_NO_SCRIPT:{FI(this,t);break}case v.AFTER_HEAD:{BI(this,t);break}case v.IN_BODY:{Ra(this,t);break}case v.TEXT:{S_(this,t);break}case v.IN_TABLE:{ji(this,t);break}case v.IN_TABLE_TEXT:{oi(this,t);break}case v.IN_CAPTION:{L_(this,t);break}case v.IN_COLUMN_GROUP:{O_(this,t);break}case v.IN_TABLE_BODY:{lu(this,t);break}case v.IN_ROW:{Hm(this,t);break}case v.IN_CELL:{M_(this,t);break}case v.IN_SELECT:{zm(this,t);break}case v.IN_SELECT_IN_TABLE:{j_(this,t);break}case v.IN_TEMPLATE:{U_(this,t);break}case v.AFTER_BODY:{qm(this,t);break}case v.IN_FRAMESET:{q_(this,t);break}case v.AFTER_FRAMESET:{W_(this,t);break}case v.AFTER_AFTER_BODY:{Is(this,t);break}}}onEof(t){switch(this.insertionMode){case v.INITIAL:{ai(this,t);break}case v.BEFORE_HTML:{Ci(this,t);break}case v.BEFORE_HEAD:{Si(this,t);break}case v.IN_HEAD:{Ai(this,t);break}case v.IN_HEAD_NO_SCRIPT:{ki(this,t);break}case v.AFTER_HEAD:{Ii(this,t);break}case v.IN_BODY:case v.IN_TABLE:case v.IN_CAPTION:case v.IN_COLUMN_GROUP:case v.IN_TABLE_BODY:case v.IN_ROW:case v.IN_CELL:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:{Fm(this,t);break}case v.TEXT:{A_(this,t);break}case v.IN_TABLE_TEXT:{oi(this,t);break}case v.IN_TEMPLATE:{$m(this,t);break}case v.AFTER_BODY:case v.IN_FRAMESET:case v.AFTER_FRAMESET:case v.AFTER_AFTER_BODY:case v.AFTER_AFTER_FRAMESET:{Tl(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===A.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case v.IN_HEAD:case v.IN_HEAD_NO_SCRIPT:case v.AFTER_HEAD:case v.TEXT:case v.IN_COLUMN_GROUP:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:case v.IN_FRAMESET:case v.AFTER_FRAMESET:{this._insertCharacters(t);break}case v.IN_BODY:case v.IN_CAPTION:case v.IN_CELL:case v.IN_TEMPLATE:case v.AFTER_BODY:case v.AFTER_AFTER_BODY:case v.AFTER_AFTER_FRAMESET:{Pm(this,t);break}case v.IN_TABLE:case v.IN_TABLE_BODY:case v.IN_ROW:{To(this,t);break}case v.IN_TABLE_TEXT:{Mm(this,t);break}}}}function TI(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Om(e,t),n}function CI(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function SI(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,a=i;a!==n;s++,a=i){i=e.openElements.getCommonAncestor(a);const o=e.activeFormattingElements.getElementEntry(a),u=o&&s>=xI;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(a)):(a=AI(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function AI(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function kI(e,t,n){const r=e.treeAdapter.getTagName(t),i=Wr(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===f.TEMPLATE&&s===W.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function II(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,i.tagID)}function yl(e,t){for(let n=0;n<EI;n++){const r=TI(e,t);if(!r)break;const i=CI(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=SI(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&kI(e,a,s),II(e,i,r)}}function uu(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function _I(e,t){e._appendCommentNode(t,e.openElements.items[0])}function vI(e,t){e._appendCommentNode(t,e.document)}function Tl(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function DI(e,t){e._setDocumentType(t);const n=t.forceQuirks?Kt.QUIRKS:sI(t);iI(t)||e._err(t,F.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=v.BEFORE_HTML}function ai(e,t){e._err(t,F.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Kt.QUIRKS),e.insertionMode=v.BEFORE_HTML,e._processToken(t)}function wI(e,t){t.tagID===f.HTML?(e._insertElement(t,W.HTML),e.insertionMode=v.BEFORE_HEAD):Ci(e,t)}function PI(e,t){const n=t.tagID;(n===f.HTML||n===f.HEAD||n===f.BODY||n===f.BR)&&Ci(e,t)}function Ci(e,t){e._insertFakeRootElement(),e.insertionMode=v.BEFORE_HEAD,e._processToken(t)}function NI(e,t){switch(t.tagID){case f.HTML:{kt(e,t);break}case f.HEAD:{e._insertElement(t,W.HTML),e.headElement=e.openElements.current,e.insertionMode=v.IN_HEAD;break}default:Si(e,t)}}function RI(e,t){const n=t.tagID;n===f.HEAD||n===f.BODY||n===f.HTML||n===f.BR?Si(e,t):e._err(t,F.endTagWithoutMatchingOpenElement)}function Si(e,t){e._insertFakeElement(R.HEAD,f.HEAD),e.headElement=e.openElements.current,e.insertionMode=v.IN_HEAD,e._processToken(t)}function nn(e,t){switch(t.tagID){case f.HTML:{kt(e,t);break}case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case f.TITLE:{e._switchToTextParsing(t,Ke.RCDATA);break}case f.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ke.RAWTEXT):(e._insertElement(t,W.HTML),e.insertionMode=v.IN_HEAD_NO_SCRIPT);break}case f.NOFRAMES:case f.STYLE:{e._switchToTextParsing(t,Ke.RAWTEXT);break}case f.SCRIPT:{e._switchToTextParsing(t,Ke.SCRIPT_DATA);break}case f.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=v.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(v.IN_TEMPLATE);break}case f.HEAD:{e._err(t,F.misplacedStartTagForHeadElement);break}default:Ai(e,t)}}function LI(e,t){switch(t.tagID){case f.HEAD:{e.openElements.pop(),e.insertionMode=v.AFTER_HEAD;break}case f.BODY:case f.BR:case f.HTML:{Ai(e,t);break}case f.TEMPLATE:{lr(e,t);break}default:e._err(t,F.endTagWithoutMatchingOpenElement)}}function lr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==f.TEMPLATE&&e._err(t,F.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,F.endTagWithoutMatchingOpenElement)}function Ai(e,t){e.openElements.pop(),e.insertionMode=v.AFTER_HEAD,e._processToken(t)}function OI(e,t){switch(t.tagID){case f.HTML:{kt(e,t);break}case f.BASEFONT:case f.BGSOUND:case f.HEAD:case f.LINK:case f.META:case f.NOFRAMES:case f.STYLE:{nn(e,t);break}case f.NOSCRIPT:{e._err(t,F.nestedNoscriptInHead);break}default:ki(e,t)}}function FI(e,t){switch(t.tagID){case f.NOSCRIPT:{e.openElements.pop(),e.insertionMode=v.IN_HEAD;break}case f.BR:{ki(e,t);break}default:e._err(t,F.endTagWithoutMatchingOpenElement)}}function ki(e,t){const n=t.type===ke.EOF?F.openElementsLeftAfterEof:F.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=v.IN_HEAD,e._processToken(t)}function MI(e,t){switch(t.tagID){case f.HTML:{kt(e,t);break}case f.BODY:{e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=v.IN_BODY;break}case f.FRAMESET:{e._insertElement(t,W.HTML),e.insertionMode=v.IN_FRAMESET;break}case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:case f.NOFRAMES:case f.SCRIPT:case f.STYLE:case f.TEMPLATE:case f.TITLE:{e._err(t,F.abandonedHeadElementChild),e.openElements.push(e.headElement,f.HEAD),nn(e,t),e.openElements.remove(e.headElement);break}case f.HEAD:{e._err(t,F.misplacedStartTagForHeadElement);break}default:Ii(e,t)}}function BI(e,t){switch(t.tagID){case f.BODY:case f.HTML:case f.BR:{Ii(e,t);break}case f.TEMPLATE:{lr(e,t);break}default:e._err(t,F.endTagWithoutMatchingOpenElement)}}function Ii(e,t){e._insertFakeElement(R.BODY,f.BODY),e.insertionMode=v.IN_BODY,Na(e,t)}function Na(e,t){switch(t.type){case ke.CHARACTER:{Nm(e,t);break}case ke.WHITESPACE_CHARACTER:{Pm(e,t);break}case ke.COMMENT:{uu(e,t);break}case ke.START_TAG:{kt(e,t);break}case ke.END_TAG:{Ra(e,t);break}case ke.EOF:{Fm(e,t);break}}}function Pm(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Nm(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function jI(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function HI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function UI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,W.HTML),e.insertionMode=v.IN_FRAMESET)}function zI(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function $I(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),ou.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,W.HTML)}function qI(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function VI(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,W.HTML),n||(e.formElement=e.openElements.current))}function WI(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===f.LI&&i===f.LI||(n===f.DD||n===f.DT)&&(i===f.DD||i===f.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==f.ADDRESS&&i!==f.DIV&&i!==f.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function GI(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.tokenizer.state=Ke.PLAINTEXT}function YI(e,t){e.openElements.hasInScope(f.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.framesetOk=!1}function KI(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(R.A);n&&(yl(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function QI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function XI(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(f.NOBR)&&(yl(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ZI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function JI(e,t){e.treeAdapter.getDocumentMode(e.document)!==Kt.QUIRKS&&e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=v.IN_TABLE}function Rm(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Lm(e){const t=xm(e,Jn.TYPE);return t!=null&&t.toLowerCase()===bI}function e_(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),Lm(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function t_(e,t){e._appendElement(t,W.HTML),t.ackSelfClosing=!0}function n_(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function r_(e,t){t.tagName=R.IMG,t.tagID=f.IMG,Rm(e,t)}function i_(e,t){e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ke.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=v.TEXT}function s_(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ke.RAWTEXT)}function a_(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ke.RAWTEXT)}function Ud(e,t){e._switchToTextParsing(t,Ke.RAWTEXT)}function o_(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===v.IN_TABLE||e.insertionMode===v.IN_CAPTION||e.insertionMode===v.IN_TABLE_BODY||e.insertionMode===v.IN_ROW||e.insertionMode===v.IN_CELL?v.IN_SELECT_IN_TABLE:v.IN_SELECT}function u_(e,t){e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function l_(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,W.HTML)}function c_(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(f.RTC),e._insertElement(t,W.HTML)}function d_(e,t){e._reconstructActiveFormattingElements(),vm(t),xl(t),t.selfClosing?e._appendElement(t,W.MATHML):e._insertElement(t,W.MATHML),t.ackSelfClosing=!0}function h_(e,t){e._reconstructActiveFormattingElements(),Dm(t),xl(t),t.selfClosing?e._appendElement(t,W.SVG):e._insertElement(t,W.SVG),t.ackSelfClosing=!0}function zd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function kt(e,t){switch(t.tagID){case f.I:case f.S:case f.B:case f.U:case f.EM:case f.TT:case f.BIG:case f.CODE:case f.FONT:case f.SMALL:case f.STRIKE:case f.STRONG:{QI(e,t);break}case f.A:{KI(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{$I(e,t);break}case f.P:case f.DL:case f.OL:case f.UL:case f.DIV:case f.DIR:case f.NAV:case f.MAIN:case f.MENU:case f.ASIDE:case f.CENTER:case f.FIGURE:case f.FOOTER:case f.HEADER:case f.HGROUP:case f.DIALOG:case f.DETAILS:case f.ADDRESS:case f.ARTICLE:case f.SEARCH:case f.SECTION:case f.SUMMARY:case f.FIELDSET:case f.BLOCKQUOTE:case f.FIGCAPTION:{zI(e,t);break}case f.LI:case f.DD:case f.DT:{WI(e,t);break}case f.BR:case f.IMG:case f.WBR:case f.AREA:case f.EMBED:case f.KEYGEN:{Rm(e,t);break}case f.HR:{n_(e,t);break}case f.RB:case f.RTC:{l_(e,t);break}case f.RT:case f.RP:{c_(e,t);break}case f.PRE:case f.LISTING:{qI(e,t);break}case f.XMP:{s_(e,t);break}case f.SVG:{h_(e,t);break}case f.HTML:{jI(e,t);break}case f.BASE:case f.LINK:case f.META:case f.STYLE:case f.TITLE:case f.SCRIPT:case f.BGSOUND:case f.BASEFONT:case f.TEMPLATE:{nn(e,t);break}case f.BODY:{HI(e,t);break}case f.FORM:{VI(e,t);break}case f.NOBR:{XI(e,t);break}case f.MATH:{d_(e,t);break}case f.TABLE:{JI(e,t);break}case f.INPUT:{e_(e,t);break}case f.PARAM:case f.TRACK:case f.SOURCE:{t_(e,t);break}case f.IMAGE:{r_(e,t);break}case f.BUTTON:{YI(e,t);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{ZI(e,t);break}case f.IFRAME:{a_(e,t);break}case f.SELECT:{o_(e,t);break}case f.OPTION:case f.OPTGROUP:{u_(e,t);break}case f.NOEMBED:case f.NOFRAMES:{Ud(e,t);break}case f.FRAMESET:{UI(e,t);break}case f.TEXTAREA:{i_(e,t);break}case f.NOSCRIPT:{e.options.scriptingEnabled?Ud(e,t):zd(e,t);break}case f.PLAINTEXT:{GI(e,t);break}case f.COL:case f.TH:case f.TD:case f.TR:case f.HEAD:case f.FRAME:case f.TBODY:case f.TFOOT:case f.THEAD:case f.CAPTION:case f.COLGROUP:break;default:zd(e,t)}}function f_(e,t){if(e.openElements.hasInScope(f.BODY)&&(e.insertionMode=v.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function p_(e,t){e.openElements.hasInScope(f.BODY)&&(e.insertionMode=v.AFTER_BODY,qm(e,t))}function m_(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function g_(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(f.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(f.FORM):n&&e.openElements.remove(n))}function b_(e){e.openElements.hasInButtonScope(f.P)||e._insertFakeElement(R.P,f.P),e._closePElement()}function E_(e){e.openElements.hasInListItemScope(f.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(f.LI),e.openElements.popUntilTagNamePopped(f.LI))}function x_(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function y_(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function T_(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function C_(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(R.BR,f.BR),e.openElements.pop(),e.framesetOk=!1}function Om(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const s=e.openElements.items[i],a=e.openElements.tagIDs[i];if(r===a&&(r!==f.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(s,a))break}}function Ra(e,t){switch(t.tagID){case f.A:case f.B:case f.I:case f.S:case f.U:case f.EM:case f.TT:case f.BIG:case f.CODE:case f.FONT:case f.NOBR:case f.SMALL:case f.STRIKE:case f.STRONG:{yl(e,t);break}case f.P:{b_(e);break}case f.DL:case f.UL:case f.OL:case f.DIR:case f.DIV:case f.NAV:case f.PRE:case f.MAIN:case f.MENU:case f.ASIDE:case f.BUTTON:case f.CENTER:case f.FIGURE:case f.FOOTER:case f.HEADER:case f.HGROUP:case f.DIALOG:case f.ADDRESS:case f.ARTICLE:case f.DETAILS:case f.SEARCH:case f.SECTION:case f.SUMMARY:case f.LISTING:case f.FIELDSET:case f.BLOCKQUOTE:case f.FIGCAPTION:{m_(e,t);break}case f.LI:{E_(e);break}case f.DD:case f.DT:{x_(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{y_(e);break}case f.BR:{C_(e);break}case f.BODY:{f_(e,t);break}case f.HTML:{p_(e,t);break}case f.FORM:{g_(e);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{T_(e,t);break}case f.TEMPLATE:{lr(e,t);break}default:Om(e,t)}}function Fm(e,t){e.tmplInsertionModeStack.length>0?$m(e,t):Tl(e,t)}function S_(e,t){var n;t.tagID===f.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function A_(e,t){e._err(t,F.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function To(e,t){if(wm.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=v.IN_TABLE_TEXT,t.type){case ke.CHARACTER:{Bm(e,t);break}case ke.WHITESPACE_CHARACTER:{Mm(e,t);break}}else Ji(e,t)}function k_(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,W.HTML),e.insertionMode=v.IN_CAPTION}function I_(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=v.IN_COLUMN_GROUP}function __(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.COLGROUP,f.COLGROUP),e.insertionMode=v.IN_COLUMN_GROUP,Cl(e,t)}function v_(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=v.IN_TABLE_BODY}function D_(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.TBODY,f.TBODY),e.insertionMode=v.IN_TABLE_BODY,La(e,t)}function w_(e,t){e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function P_(e,t){Lm(t)?e._appendElement(t,W.HTML):Ji(e,t),t.ackSelfClosing=!0}function N_(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,W.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Or(e,t){switch(t.tagID){case f.TD:case f.TH:case f.TR:{D_(e,t);break}case f.STYLE:case f.SCRIPT:case f.TEMPLATE:{nn(e,t);break}case f.COL:{__(e,t);break}case f.FORM:{N_(e,t);break}case f.TABLE:{w_(e,t);break}case f.TBODY:case f.TFOOT:case f.THEAD:{v_(e,t);break}case f.INPUT:{P_(e,t);break}case f.CAPTION:{k_(e,t);break}case f.COLGROUP:{I_(e,t);break}default:Ji(e,t)}}function ji(e,t){switch(t.tagID){case f.TABLE:{e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode());break}case f.TEMPLATE:{lr(e,t);break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TBODY:case f.TD:case f.TFOOT:case f.TH:case f.THEAD:case f.TR:break;default:Ji(e,t)}}function Ji(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Na(e,t),e.fosterParentingEnabled=n}function Mm(e,t){e.pendingCharacterTokens.push(t)}function Bm(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function oi(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ji(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const jm=new Set([f.CAPTION,f.COL,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]);function R_(e,t){const n=t.tagID;jm.has(n)?e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=v.IN_TABLE,Or(e,t)):kt(e,t)}function L_(e,t){const n=t.tagID;switch(n){case f.CAPTION:case f.TABLE:{e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=v.IN_TABLE,n===f.TABLE&&ji(e,t));break}case f.BODY:case f.COL:case f.COLGROUP:case f.HTML:case f.TBODY:case f.TD:case f.TFOOT:case f.TH:case f.THEAD:case f.TR:break;default:Ra(e,t)}}function Cl(e,t){switch(t.tagID){case f.HTML:{kt(e,t);break}case f.COL:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case f.TEMPLATE:{nn(e,t);break}default:ta(e,t)}}function O_(e,t){switch(t.tagID){case f.COLGROUP:{e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=v.IN_TABLE);break}case f.TEMPLATE:{lr(e,t);break}case f.COL:break;default:ta(e,t)}}function ta(e,t){e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=v.IN_TABLE,e._processToken(t))}function La(e,t){switch(t.tagID){case f.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,W.HTML),e.insertionMode=v.IN_ROW;break}case f.TH:case f.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(R.TR,f.TR),e.insertionMode=v.IN_ROW,Oa(e,t);break}case f.CAPTION:case f.COL:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE,Or(e,t));break}default:Or(e,t)}}function lu(e,t){const n=t.tagID;switch(t.tagID){case f.TBODY:case f.TFOOT:case f.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE);break}case f.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE,ji(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TD:case f.TH:case f.TR:break;default:ji(e,t)}}function Oa(e,t){switch(t.tagID){case f.TH:case f.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,W.HTML),e.insertionMode=v.IN_CELL,e.activeFormattingElements.insertMarker();break}case f.CAPTION:case f.COL:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY,La(e,t));break}default:Or(e,t)}}function Hm(e,t){switch(t.tagID){case f.TR:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY);break}case f.TABLE:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY,lu(e,t));break}case f.TBODY:case f.TFOOT:case f.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(f.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY,lu(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TD:case f.TH:break;default:ji(e,t)}}function F_(e,t){const n=t.tagID;jm.has(n)?(e.openElements.hasInTableScope(f.TD)||e.openElements.hasInTableScope(f.TH))&&(e._closeTableCell(),Oa(e,t)):kt(e,t)}function M_(e,t){const n=t.tagID;switch(n){case f.TD:case f.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=v.IN_ROW);break}case f.TABLE:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Hm(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:break;default:Ra(e,t)}}function Um(e,t){switch(t.tagID){case f.HTML:{kt(e,t);break}case f.OPTION:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._insertElement(t,W.HTML);break}case f.OPTGROUP:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._insertElement(t,W.HTML);break}case f.HR:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case f.INPUT:case f.KEYGEN:case f.TEXTAREA:case f.SELECT:{e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),t.tagID!==f.SELECT&&e._processStartTag(t));break}case f.SCRIPT:case f.TEMPLATE:{nn(e,t);break}}}function zm(e,t){switch(t.tagID){case f.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===f.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===f.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop();break}case f.OPTION:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop();break}case f.SELECT:{e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode());break}case f.TEMPLATE:{lr(e,t);break}}}function B_(e,t){const n=t.tagID;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Um(e,t)}function j_(e,t){const n=t.tagID;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e.onEndTag(t)):zm(e,t)}function H_(e,t){switch(t.tagID){case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:case f.NOFRAMES:case f.SCRIPT:case f.STYLE:case f.TEMPLATE:case f.TITLE:{nn(e,t);break}case f.CAPTION:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:{e.tmplInsertionModeStack[0]=v.IN_TABLE,e.insertionMode=v.IN_TABLE,Or(e,t);break}case f.COL:{e.tmplInsertionModeStack[0]=v.IN_COLUMN_GROUP,e.insertionMode=v.IN_COLUMN_GROUP,Cl(e,t);break}case f.TR:{e.tmplInsertionModeStack[0]=v.IN_TABLE_BODY,e.insertionMode=v.IN_TABLE_BODY,La(e,t);break}case f.TD:case f.TH:{e.tmplInsertionModeStack[0]=v.IN_ROW,e.insertionMode=v.IN_ROW,Oa(e,t);break}default:e.tmplInsertionModeStack[0]=v.IN_BODY,e.insertionMode=v.IN_BODY,kt(e,t)}}function U_(e,t){t.tagID===f.TEMPLATE&&lr(e,t)}function $m(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Tl(e,t)}function z_(e,t){t.tagID===f.HTML?kt(e,t):na(e,t)}function qm(e,t){var n;if(t.tagID===f.HTML){if(e.fragmentContext||(e.insertionMode=v.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===f.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else na(e,t)}function na(e,t){e.insertionMode=v.IN_BODY,Na(e,t)}function $_(e,t){switch(t.tagID){case f.HTML:{kt(e,t);break}case f.FRAMESET:{e._insertElement(t,W.HTML);break}case f.FRAME:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case f.NOFRAMES:{nn(e,t);break}}}function q_(e,t){t.tagID===f.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==f.FRAMESET&&(e.insertionMode=v.AFTER_FRAMESET))}function V_(e,t){switch(t.tagID){case f.HTML:{kt(e,t);break}case f.NOFRAMES:{nn(e,t);break}}}function W_(e,t){t.tagID===f.HTML&&(e.insertionMode=v.AFTER_AFTER_FRAMESET)}function G_(e,t){t.tagID===f.HTML?kt(e,t):Is(e,t)}function Is(e,t){e.insertionMode=v.IN_BODY,Na(e,t)}function Y_(e,t){switch(t.tagID){case f.HTML:{kt(e,t);break}case f.NOFRAMES:{nn(e,t);break}}}function K_(e,t){t.chars=Ue,e._insertCharacters(t)}function Q_(e,t){e._insertCharacters(t),e.framesetOk=!1}function Vm(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==W.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function X_(e,t){if(hI(t))Vm(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===W.MATHML?vm(t):r===W.SVG&&(fI(t),Dm(t)),xl(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Z_(e,t){if(t.tagID===f.P||t.tagID===f.BR){Vm(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===W.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}R.AREA,R.BASE,R.BASEFONT,R.BGSOUND,R.BR,R.COL,R.EMBED,R.FRAME,R.HR,R.IMG,R.INPUT,R.KEYGEN,R.LINK,R.META,R.PARAM,R.SOURCE,R.TRACK,R.WBR;const J_=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,ev=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),$d={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Wm(e,t){const n=cv(e),r=ba("type",{handlers:{root:tv,element:nv,text:rv,comment:Ym,doctype:iv,raw:av},unknown:ov}),i={parser:n?new Hd($d):Hd.getFragmentParser(void 0,$d),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),Gr(i,cn());const s=n?i.parser.document:i.parser.getFragment(),a=nk(s,{file:i.options.file});return i.stitches&&Lt(a,"comment",function(o,u,l){const d=o;if(d.value.stitch&&l&&u!==void 0){const c=l.children;return c[u]=d.value.stitch,u}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function Gm(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function tv(e,t){Gm(e.children,t)}function nv(e,t){uv(e,t),Gm(e.children,t),lv(e,t)}function rv(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ke.CHARACTER,chars:e.value,location:es(e)};Gr(t,cn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function iv(e,t){const n={type:ke.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:es(e)};Gr(t,cn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function sv(e,t){t.stitches=!0;const n=dv(e);if("children"in e&&"children"in n){const r=Wm({type:"root",children:e.children},t.options);n.children=r.children}Ym({type:"comment",value:{stitch:n}},t)}function Ym(e,t){const n=e.value,r={type:ke.COMMENT,data:n,location:es(e)};Gr(t,cn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function av(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Km(t,cn(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(J_,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function ov(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))sv(n,t);else{let r="";throw ev.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Gr(e,t){Km(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Ke.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Km(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function uv(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ke.PLAINTEXT)return;Gr(t,cn(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Xn.html;i===Xn.html&&n==="svg"&&(i=Xn.svg);const s=bk({...e,children:[]},{space:i===Xn.svg?"svg":"html"}),a={type:ke.START_TAG,tagName:n,tagID:Wr(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:es(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function lv(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Yh.includes(n)||t.parser.tokenizer.state===Ke.PLAINTEXT)return;Gr(t,Ia(e));const r={type:ke.END_TAG,tagName:n,tagID:Wr(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:es(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ke.RCDATA||t.parser.tokenizer.state===Ke.RAWTEXT||t.parser.tokenizer.state===Ke.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ke.DATA)}function cv(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function es(e){const t=cn(e)||{line:void 0,column:void 0,offset:void 0},n=Ia(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function dv(e){return"children"in e?ir({...e,children:[]}):ir(e)}function Qm(e){return function(t,n){return Wm(t,{...e,file:n})}}const hv=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/i,fv=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)(\/.*)?\]/i,pv=({legacyTitle:e=!1,tagName:t="div"}={})=>n=>{Lt(n,"blockquote",(r,i,s)=>{let a="",o="",u=!0,l=r.children.map(d=>{if(u&&d.type==="paragraph"){const c=d.children[0],m=c.type==="text"?c.value:"",p=e?fv:hv,g=m.match(p);if(g&&(u=!1,a=g[1].toLocaleLowerCase(),o=e&&g[2]||a.toLocaleUpperCase(),m.includes(`
150
+ `))}function u(p,g,b,T){const y=b.enter("tableCell"),C=b.enter("phrasing"),S=b.containerPhrasing(p,{...T,before:s,after:s});return C(),y(),S}function l(p,g){return vA(p,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function d(p,g,b){const T=p.children;let y=-1;const C=[],S=g.enter("table");for(;++y<T.length;)C[y]=c(T[y],g,b);return S(),C}function c(p,g,b){const T=p.children;let y=-1;const C=[],S=g.enter("tableRow");for(;++y<T.length;)C[y]=u(T[y],p,g,b);return S(),C}function m(p,g,b){let T=Zp.inlineCode(p,g,b);return b.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function m5(){return{exit:{taskListCheckValueChecked:Sd,taskListCheckValueUnchecked:Sd,paragraph:b5}}}function g5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:E5}}}function Sd(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function b5(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,a;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){a=o;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function E5(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);s&&o.move(a);let u=Zp.listItem(e,t,n,{...r,...o.current()});return s&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(d){return d+a}}function x5(){return[XS(),EA(),CA(),u5(),m5()]}function y5(e){return{extensions:[ZS(),xA(e),SA(),p5(e),g5()]}}const T5={tokenize:_5,partial:!0},Jp={tokenize:v5,partial:!0},em={tokenize:D5,partial:!0},tm={tokenize:w5,partial:!0},C5={tokenize:N5,partial:!0},nm={name:"wwwAutolink",tokenize:k5,previous:im},rm={name:"protocolAutolink",tokenize:I5,previous:sm},vn={name:"emailAutolink",tokenize:A5,previous:am},dn={};function S5(){return{text:dn}}let $n=48;for(;$n<123;)dn[$n]=vn,$n++,$n===58?$n=65:$n===91&&($n=97);dn[43]=vn;dn[45]=vn;dn[46]=vn;dn[95]=vn;dn[72]=[vn,rm];dn[104]=[vn,rm];dn[87]=[vn,nm];dn[119]=[vn,nm];function A5(e,t,n){const r=this;let i,s;return a;function a(c){return!nu(c)||!am.call(r,r.previous)||gl(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(c))}function o(c){return nu(c)?(e.consume(c),o):c===64?(e.consume(c),u):n(c)}function u(c){return c===46?e.check(C5,d,l)(c):c===45||c===95||St(c)?(s=!0,e.consume(c),u):d(c)}function l(c){return e.consume(c),i=!0,u}function d(c){return s&&i&&vt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function k5(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!im.call(r,r.previous)||gl(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(T5,e.attempt(Jp,e.attempt(em,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function I5(e,t,n){const r=this;let i="",s=!1;return a;function a(c){return(c===72||c===104)&&sm.call(r,r.previous)&&!gl(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),o):n(c)}function o(c){if(vt(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),o;if(c===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(c),u}return n(c)}function u(c){return c===47?(e.consume(c),s?l:(s=!0,u)):n(c)}function l(c){return c===null||Qs(c)||Le(c)||rr(c)||_a(c)?n(c):e.attempt(Jp,e.attempt(em,d),n)(c)}function d(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function _5(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function v5(e,t,n){let r,i,s;return a;function a(l){return l===46||l===95?e.check(tm,u,o)(l):l===null||Le(l)||rr(l)||l!==45&&_a(l)?u(l):(s=!0,e.consume(l),a)}function o(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),a}function u(l){return i||r||!s?n(l):t(l)}}function D5(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(tm,t,s)(a):a===null||Le(a)||rr(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function w5(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),s):o===93?(e.consume(o),i):o===60||o===null||Le(o)||rr(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||Le(o)||rr(o)?t(o):r(o)}function s(o){return vt(o)?a(o):n(o)}function a(o){return o===59?(e.consume(o),r):vt(o)?(e.consume(o),a):n(o)}}function N5(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return St(s)?n(s):t(s)}}function im(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Le(e)}function sm(e){return!vt(e)}function am(e){return!(e===47||nu(e))}function nu(e){return e===43||e===45||e===46||e===95||St(e)}function gl(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const P5={tokenize:H5,partial:!0};function R5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:M5,continuation:{tokenize:B5},exit:j5}},text:{91:{name:"gfmFootnoteCall",tokenize:F5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:L5,resolveTo:O5}}}}function L5(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!a||!a._balanced)return n(u);const l=en(r.sliceSerialize({start:a.end,end:r.now()}));return l.codePointAt(0)!==94||!s.includes(l.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function O5(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 s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function F5(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(c){if(s>999||c===93&&!a||c===null||c===91||Le(c))return n(c);if(c===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(en(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return Le(c)||(a=!0),s++,e.consume(c),c===92?d:l}function d(c){return c===91||c===92||c===93?(e.consume(c),s++,l):l(c)}}function M5(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return u;function u(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(g)}function d(g){if(a>999||g===93&&!o||g===null||g===91||Le(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return s=en(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Le(g)||(o=!0),a++,e.consume(g),g===92?c:d}function c(g){return g===91||g===92||g===93?(e.consume(g),a++,d):d(g)}function m(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(s)||i.push(s),_e(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function B5(e,t,n){return e.check(Qi,t,e.attempt(P5,t,n))}function j5(e){e.exit("gfmFootnoteDefinition")}function H5(e,t,n){const r=this;return _e(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function U5(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let l=u;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[u][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[u][1].end)},c={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[u][1].start)},m=[["enter",d,o],["enter",a[l][1],o],["exit",a[l][1],o],["enter",c,o]],p=o.parser.constructs.insideSpan.null;p&&Ht(m,m.length,0,va(p,a.slice(l+1,u),o)),Ht(m,m.length,0,[["exit",c,o],["enter",a[u][1],o],["exit",a[u][1],o],["exit",d,o]]),Ht(a,l-1,u-l+3,m),u=l+m.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function s(a,o,u){const l=this.previous,d=this.events;let c=0;return m;function m(g){return l===126&&d[d.length-1][1].type!=="characterEscape"?u(g):(a.enter("strikethroughSequenceTemporary"),p(g))}function p(g){const b=Lr(l);if(g===126)return c>1?u(g):(a.consume(g),c++,p);if(c<2&&!n)return u(g);const T=a.exit("strikethroughSequenceTemporary"),y=Lr(g);return T._open=!y||y===2&&!!b,T._close=!b||b===2&&!!y,o(g)}}}class z5{constructor(){this.map=[]}add(t,n,r){$5(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[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.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function $5(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function q5(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function V5(){return{flow:{null:{name:"table",tokenize:W5,resolveAll:G5}}}}function W5(e,t,n){const r=this;let i=0,s=0,a;return o;function o(E){let L=r.events.length-1;for(;L>-1;){const M=r.events[L][1].type;if(M==="lineEnding"||M==="linePrefix")L--;else break}const O=L>-1?r.events[L][1].type:null,z=O==="tableHead"||O==="tableRow"?w:u;return z===w&&r.parser.lazy[r.now().line]?n(E):z(E)}function u(E){return e.enter("tableHead"),e.enter("tableRow"),l(E)}function l(E){return E===124||(a=!0,s+=1),d(E)}function d(E){return E===null?n(E):me(E)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),p):n(E):Ie(E)?_e(e,d,"whitespace")(E):(s+=1,a&&(a=!1,i+=1),E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),c(E)))}function c(E){return E===null||E===124||Le(E)?(e.exit("data"),d(E)):(e.consume(E),E===92?m:c)}function m(E){return E===92||E===124?(e.consume(E),c):c(E)}function p(E){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(E):(e.enter("tableDelimiterRow"),a=!1,Ie(E)?_e(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):g(E))}function g(E){return E===45||E===58?T(E):E===124?(a=!0,e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),b):D(E)}function b(E){return Ie(E)?_e(e,T,"whitespace")(E):T(E)}function T(E){return E===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),y):E===45?(s+=1,y(E)):E===null||me(E)?N(E):D(E)}function y(E){return E===45?(e.enter("tableDelimiterFiller"),C(E)):D(E)}function C(E){return E===45?(e.consume(E),C):E===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(E))}function S(E){return Ie(E)?_e(e,N,"whitespace")(E):N(E)}function N(E){return E===124?g(E):E===null||me(E)?!a||i!==s?D(E):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(E)):D(E)}function D(E){return n(E)}function w(E){return e.enter("tableRow"),B(E)}function B(E){return E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),B):E===null||me(E)?(e.exit("tableRow"),t(E)):Ie(E)?_e(e,B,"whitespace")(E):(e.enter("data"),V(E))}function V(E){return E===null||E===124||Le(E)?(e.exit("data"),B(E)):(e.consume(E),E===92?Q:V)}function Q(E){return E===92||E===124?(e.consume(E),V):V(E)}}function G5(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,u=0,l,d,c;const m=new z5;for(;++n<e.length;){const p=e[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(o=!1,u!==0&&(Ad(m,t,u,l,d),d=void 0,u=0),l={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",l,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,s=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",d,t]])),i=g.type==="tableDelimiterRow"?2:d?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],c=fs(m,t,s,i,void 0,c),s=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],c=fs(m,t,s,i,void 0,c)),s=a,a=[s[1],n,0,0])):g.type==="tableHead"?(o=!0,u=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(u=n,s[1]!==0?(a[0]=a[1],c=fs(m,t,s,i,n,c)):a[1]!==0&&(c=fs(m,t,a,i,n,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(u!==0&&Ad(m,t,u,l,d),m.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=q5(t.events,n))}return e}function fs(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},Tr(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const u=Tr(t.events,n[1]);if(s={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const l=Tr(t.events,n[2]),d=Tr(t.events,n[3]),c={type:o,start:Object.assign({},l),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const m=t.events[n[2]],p=t.events[n[3]];if(m[1].end=Object.assign({},p[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,b=n[3]-n[2]-1;e.add(g,b,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(s.end=Object.assign({},Tr(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function Ad(e,t,n,r,i){const s=[],a=Tr(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function Tr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Y5={name:"tasklistCheck",tokenize:Q5};function K5(){return{text:{91:Y5}}}function Q5(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),s)}function s(u){return Le(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),a):n(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(u)}function o(u){return me(u)?t(u):Ie(u)?e.check({tokenize:X5},t,n)(u):n(u)}}function X5(e,t,n){return _e(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Z5(e){return bp([S5(),R5(),U5(e),V5(),K5()])}const J5={};function ek(e){const t=this,n=e||J5,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Z5(n)),s.push(x5()),a.push(y5(n))}const kd=/[#.]/g;function tk(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){kd.lastIndex=i;const o=kd.exec(n),u=n.slice(i,o?o.index:n.length);u&&(s?s==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:a=u,i+=u.length),o&&(s=o[0],i++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function om(e,t,n){const r=n?sk(n):void 0;function i(s,a,...o){let u;if(s==null){u={type:"root",children:[]};const l=a;o.unshift(l)}else{u=tk(s,t);const l=u.tagName.toLowerCase(),d=r?r.get(l):void 0;if(u.tagName=d||l,nk(a))o.unshift(a);else for(const[c,m]of Object.entries(a))rk(e,u.properties,c,m)}for(const l of o)ru(u.children,l);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return i}function nk(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function rk(e,t,n,r){const i=Gi(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=$o(r):i.commaSeparated?s=zo(r):i.commaOrSpaceSeparated?s=$o(zo(r).join(" ")):s=Id(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?ik(r):String(r);if(Array.isArray(s)){const a=[];for(const o of s)a.push(Id(i,i.property,o));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function ru(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)ru(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?ru(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Id(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Pi(n)===Pi(t)))return!0}return n}function ik(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function sk(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const ak=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],ok=om(Ur,"div"),uk=om(In,"g",ak);function lk(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let a=0;for(;;){let o=n[a];if(o===void 0){const u=_d(t,n[a-1]);o=u===-1?t.length+1:u+1,n[a]=o}if(o>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const o=n[n.length-1],u=_d(t,o),l=u===-1?t.length+1:u+1;if(o===l)break;n.push(l)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function _d(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
151
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Xn={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},um={}.hasOwnProperty,ck=Object.prototype;function dk(e,t){const n=t||{};return bl({file:n.file||void 0,location:!1,schema:n.space==="svg"?In:Ur,verbose:n.verbose||!1},e)}function bl(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},ks(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:lm(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=lk(s),o=a.toPoint(0),u=a.toPoint(s.length);n.position={start:o,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},ks(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},ks(e,r,n),n}default:return n=hk(e,t),n}}function lm(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=bl(e,t[n]);r.push(i)}return r}function hk(e,t){const n=e.schema;e.schema=t.namespaceURI===Xn.svg?In:Ur;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],u=(o.prefix?o.prefix+":":"")+o.name;um.call(ck,u)||(i[u]=o.value)}const a=(e.schema.space==="svg"?uk:ok)(t.tagName,i,lm(e,t.childNodes));if(ks(e,t,a),a.tagName==="template"){const o=t,u=o.sourceCodeLocation,l=u&&u.startTag&&Sr(u.startTag),d=u&&u.endTag&&Sr(u.endTag),c=bl(e,o.content);l&&d&&e.file&&(c.position={start:l.end,end:d.start}),a.content=c}return e.schema=n,a}function ks(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=fk(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function fk(e,t,n){const r=Sr(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const s={};let a;if(n.attrs)for(a in n.attrs)um.call(n.attrs,a)&&(s[Gi(e.schema,a).property]=Sr(n.attrs[a]));n.startTag;const o=Sr(n.startTag),u=n.endTag?Sr(n.endTag):void 0,l={opening:o};u&&(l.closing=u),l.properties=s,t.data={position:l}}}return r}function Sr(e){const t=vd({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=vd({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function vd(e){return e.line&&e.column?e:void 0}class Zi{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Zi.prototype.property={};Zi.prototype.normal={};Zi.prototype.space=null;function cm(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Zi(n,r,t)}function iu(e){return e.toLowerCase()}class Zt{constructor(t,n){this.property=t,this.attribute=n}}Zt.prototype.space=null;Zt.prototype.boolean=!1;Zt.prototype.booleanish=!1;Zt.prototype.overloadedBoolean=!1;Zt.prototype.number=!1;Zt.prototype.commaSeparated=!1;Zt.prototype.spaceSeparated=!1;Zt.prototype.commaOrSpaceSeparated=!1;Zt.prototype.mustUseProperty=!1;Zt.prototype.defined=!1;let pk=0;const Te=ur(),Je=ur(),dm=ur(),Z=ur(),Me=ur(),Dr=ur(),Mt=ur();function ur(){return 2**++pk}const su=Object.freeze(Object.defineProperty({__proto__:null,boolean:Te,booleanish:Je,commaOrSpaceSeparated:Mt,commaSeparated:Dr,number:Z,overloadedBoolean:dm,spaceSeparated:Me},Symbol.toStringTag,{value:"Module"})),Eo=Object.keys(su);class El extends Zt{constructor(t,n,r,i){let s=-1;if(super(t,n),Dd(this,"space",i),typeof r=="number")for(;++s<Eo.length;){const a=Eo[s];Dd(this,Eo[s],(r&su[a])===su[a])}}}El.prototype.defined=!0;function Dd(e,t,n){n&&(e[t]=n)}const mk={}.hasOwnProperty;function Vr(e){const t={},n={};let r;for(r in e.properties)if(mk.call(e.properties,r)){const i=e.properties[r],s=new El(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[iu(r)]=r,n[iu(s.attribute)]=r}return new Zi(t,n,e.space)}const hm=Vr({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),fm=Vr({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function pm(e,t){return t in e?e[t]:t}function mm(e,t){return pm(e,t.toLowerCase())}const gm=Vr({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:mm,properties:{xmlns:null,xmlnsXLink:null}}),bm=Vr({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Je,ariaAutoComplete:null,ariaBusy:Je,ariaChecked:Je,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:Me,ariaCurrent:null,ariaDescribedBy:Me,ariaDetails:null,ariaDisabled:Je,ariaDropEffect:Me,ariaErrorMessage:null,ariaExpanded:Je,ariaFlowTo:Me,ariaGrabbed:Je,ariaHasPopup:null,ariaHidden:Je,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Me,ariaLevel:Z,ariaLive:null,ariaModal:Je,ariaMultiLine:Je,ariaMultiSelectable:Je,ariaOrientation:null,ariaOwns:Me,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:Je,ariaReadOnly:Je,ariaRelevant:null,ariaRequired:Je,ariaRoleDescription:Me,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:Je,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null}}),gk=Vr({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:mm,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Dr,acceptCharset:Me,accessKey:Me,action:null,allow:null,allowFullScreen:Te,allowPaymentRequest:Te,allowUserMedia:Te,alt:null,as:null,async:Te,autoCapitalize:null,autoComplete:Me,autoFocus:Te,autoPlay:Te,blocking:Me,capture:null,charSet:null,checked:Te,cite:null,className:Me,cols:Z,colSpan:null,content:null,contentEditable:Je,controls:Te,controlsList:Me,coords:Z|Dr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Te,defer:Te,dir:null,dirName:null,disabled:Te,download:dm,draggable:Je,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Te,formTarget:null,headers:Me,height:Z,hidden:Te,high:Z,href:null,hrefLang:null,htmlFor:Me,httpEquiv:Me,id:null,imageSizes:null,imageSrcSet:null,inert:Te,inputMode:null,integrity:null,is:null,isMap:Te,itemId:null,itemProp:Me,itemRef:Me,itemScope:Te,itemType:Me,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Te,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:Te,muted:Te,name:null,nonce:null,noModule:Te,noValidate:Te,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Te,optimum:Z,pattern:null,ping:Me,placeholder:null,playsInline:Te,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Te,referrerPolicy:null,rel:Me,required:Te,reversed:Te,rows:Z,rowSpan:Z,sandbox:Me,scope:null,scoped:Te,seamless:Te,selected:Te,shadowRootClonable:Te,shadowRootDelegatesFocus:Te,shadowRootMode:null,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:Je,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:Te,useMap:null,value:Je,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Me,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Te,declare:Te,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:Te,noHref:Te,noShade:Te,noWrap:Te,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:Je,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Te,disableRemotePlayback:Te,prefix:null,property:null,results:Z,security:null,unselectable:null}}),bk=Vr({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:pm,properties:{about:Mt,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:Me,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:Te,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Dr,g2:Dr,glyphName:Dr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:Mt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Mt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Mt,rev:Mt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Mt,requiredFeatures:Mt,requiredFonts:Mt,requiredFormats:Mt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:Mt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Mt,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Mt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Ek=/^data[-\w.:]+$/i,wd=/-[a-z]/g,xk=/[A-Z]/g;function yk(e,t){const n=iu(t);let r=t,i=Zt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Ek.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(wd,Ck);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!wd.test(s)){let a=s.replace(xk,Tk);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=El}return new i(r,t)}function Tk(e){return"-"+e.toLowerCase()}function Ck(e){return e.charAt(1).toUpperCase()}const Sk=cm([fm,hm,gm,bm,gk],"html"),Em=cm([fm,hm,gm,bm,bk],"svg"),Ak={},kk={}.hasOwnProperty,xm=ba("type",{handlers:{root:_k,element:Pk,text:wk,comment:Nk,doctype:Dk}});function Ik(e,t){const r=(t||Ak).space;return xm(e,r==="svg"?Em:Sk)}function _k(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=xl(e.children,n,t),Wr(e,n),n}function vk(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=xl(e.children,n,t),Wr(e,n),n}function Dk(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Wr(e,t),t}function wk(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Wr(e,t),t}function Nk(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Wr(e,t),t}function Pk(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Em);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&kk.call(e.properties,s)){const u=Rk(r,s,e.properties[s]);u&&i.push(u)}}const a=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Xn[a],childNodes:[],parentNode:null};return o.childNodes=xl(e.children,o,r),Wr(e,o),e.tagName==="template"&&e.content&&(o.content=vk(e.content,r)),o}function Rk(e,t,n){const r=yk(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Ea(n):xa(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=Xn[r.space]}return i}function xl(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=xm(e[r],n);s.parentNode=t,i.push(s)}return i}function Wr(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const Lk=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Ue="�";var A;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(A||(A={}));const Pt={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function ym(e){return e>=55296&&e<=57343}function Ok(e){return e>=56320&&e<=57343}function Fk(e,t){return(e-55296)*1024+9216+t}function Tm(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Cm(e){return e>=64976&&e<=65007||Lk.has(e)}var F;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(F||(F={}));const Mk=65536;class Bk{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Mk,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:s}=this,a=i+n,o=s+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(Ok(n))return this.pos++,this._addGap(),Fk(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,A.EOF;return this._err(F.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,A.EOF;const r=this.html.charCodeAt(n);return r===A.CARRIAGE_RETURN?A.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,A.EOF;let t=this.html.charCodeAt(this.pos);return t===A.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,A.LINE_FEED):t===A.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,ym(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===A.LINE_FEED||t===A.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Tm(t)?this._err(F.controlCharacterInInputStream):Cm(t)&&this._err(F.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ke;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(ke||(ke={}));function Sm(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const Am=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),jk=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var xo;const Hk=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Uk=(xo=String.fromCodePoint)!==null&&xo!==void 0?xo:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function zk(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Hk.get(e))!==null&&t!==void 0?t:e}var ft;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ft||(ft={}));const $k=32;var Fn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Fn||(Fn={}));function au(e){return e>=ft.ZERO&&e<=ft.NINE}function qk(e){return e>=ft.UPPER_A&&e<=ft.UPPER_F||e>=ft.LOWER_A&&e<=ft.LOWER_F}function Vk(e){return e>=ft.UPPER_A&&e<=ft.UPPER_Z||e>=ft.LOWER_A&&e<=ft.LOWER_Z||au(e)}function Wk(e){return e===ft.EQUALS||Vk(e)}var dt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(dt||(dt={}));var yn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(yn||(yn={}));class km{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=dt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=yn.Strict}startEntity(t){this.decodeMode=t,this.state=dt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case dt.EntityStart:return t.charCodeAt(n)===ft.NUM?(this.state=dt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=dt.NamedEntity,this.stateNamedEntity(t,n));case dt.NumericStart:return this.stateNumericStart(t,n);case dt.NumericDecimal:return this.stateNumericDecimal(t,n);case dt.NumericHex:return this.stateNumericHex(t,n);case dt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|$k)===ft.LOWER_X?(this.state=dt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=dt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+parseInt(t.substr(n,s),i),this.consumed+=s}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(au(i)||qk(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(au(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===ft.SEMI)this.consumed+=1;else if(this.decodeMode===yn.Strict)return 0;return this.emitCodePoint(zk(this.result),this.consumed),this.errors&&(t!==ft.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&Fn.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=Gk(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===yn.Attribute&&(s===0||Wk(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&Fn.VALUE_LENGTH)>>14,s!==0){if(a===ft.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==yn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Fn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Fn.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case dt.NamedEntity:return this.result!==0&&(this.decodeMode!==yn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case dt.NumericDecimal:return this.emitNumericEntity(0,2);case dt.NumericHex:return this.emitNumericEntity(0,3);case dt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case dt.EntityStart:return 0}}}function Im(e){let t="";const n=new km(e,r=>t+=Uk(r));return function(i,s){let a=0,o=0;for(;(o=i.indexOf("&",o))>=0;){t+=i.slice(a,o),n.startEntity(s);const l=n.write(i,o+1);if(l<0){a=o+n.end();break}a=o+l,o=l===0?a+1:a}const u=t+i.slice(a);return t="",u}}function Gk(e,t,n,r){const i=(t&Fn.BRANCH_LENGTH)>>7,s=t&Fn.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const u=r-s;return u<0||u>=i?-1:e[n+u]-1}let a=n,o=a+i-1;for(;a<=o;){const u=a+o>>>1,l=e[u];if(l<r)a=u+1;else if(l>r)o=u-1;else return e[u+i]}return-1}Im(Am);Im(jk);var W;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(W||(W={}));var Jn;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Jn||(Jn={}));var Kt;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Kt||(Kt={}));var R;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(R||(R={}));var f;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(f||(f={}));const Yk=new Map([[R.A,f.A],[R.ADDRESS,f.ADDRESS],[R.ANNOTATION_XML,f.ANNOTATION_XML],[R.APPLET,f.APPLET],[R.AREA,f.AREA],[R.ARTICLE,f.ARTICLE],[R.ASIDE,f.ASIDE],[R.B,f.B],[R.BASE,f.BASE],[R.BASEFONT,f.BASEFONT],[R.BGSOUND,f.BGSOUND],[R.BIG,f.BIG],[R.BLOCKQUOTE,f.BLOCKQUOTE],[R.BODY,f.BODY],[R.BR,f.BR],[R.BUTTON,f.BUTTON],[R.CAPTION,f.CAPTION],[R.CENTER,f.CENTER],[R.CODE,f.CODE],[R.COL,f.COL],[R.COLGROUP,f.COLGROUP],[R.DD,f.DD],[R.DESC,f.DESC],[R.DETAILS,f.DETAILS],[R.DIALOG,f.DIALOG],[R.DIR,f.DIR],[R.DIV,f.DIV],[R.DL,f.DL],[R.DT,f.DT],[R.EM,f.EM],[R.EMBED,f.EMBED],[R.FIELDSET,f.FIELDSET],[R.FIGCAPTION,f.FIGCAPTION],[R.FIGURE,f.FIGURE],[R.FONT,f.FONT],[R.FOOTER,f.FOOTER],[R.FOREIGN_OBJECT,f.FOREIGN_OBJECT],[R.FORM,f.FORM],[R.FRAME,f.FRAME],[R.FRAMESET,f.FRAMESET],[R.H1,f.H1],[R.H2,f.H2],[R.H3,f.H3],[R.H4,f.H4],[R.H5,f.H5],[R.H6,f.H6],[R.HEAD,f.HEAD],[R.HEADER,f.HEADER],[R.HGROUP,f.HGROUP],[R.HR,f.HR],[R.HTML,f.HTML],[R.I,f.I],[R.IMG,f.IMG],[R.IMAGE,f.IMAGE],[R.INPUT,f.INPUT],[R.IFRAME,f.IFRAME],[R.KEYGEN,f.KEYGEN],[R.LABEL,f.LABEL],[R.LI,f.LI],[R.LINK,f.LINK],[R.LISTING,f.LISTING],[R.MAIN,f.MAIN],[R.MALIGNMARK,f.MALIGNMARK],[R.MARQUEE,f.MARQUEE],[R.MATH,f.MATH],[R.MENU,f.MENU],[R.META,f.META],[R.MGLYPH,f.MGLYPH],[R.MI,f.MI],[R.MO,f.MO],[R.MN,f.MN],[R.MS,f.MS],[R.MTEXT,f.MTEXT],[R.NAV,f.NAV],[R.NOBR,f.NOBR],[R.NOFRAMES,f.NOFRAMES],[R.NOEMBED,f.NOEMBED],[R.NOSCRIPT,f.NOSCRIPT],[R.OBJECT,f.OBJECT],[R.OL,f.OL],[R.OPTGROUP,f.OPTGROUP],[R.OPTION,f.OPTION],[R.P,f.P],[R.PARAM,f.PARAM],[R.PLAINTEXT,f.PLAINTEXT],[R.PRE,f.PRE],[R.RB,f.RB],[R.RP,f.RP],[R.RT,f.RT],[R.RTC,f.RTC],[R.RUBY,f.RUBY],[R.S,f.S],[R.SCRIPT,f.SCRIPT],[R.SEARCH,f.SEARCH],[R.SECTION,f.SECTION],[R.SELECT,f.SELECT],[R.SOURCE,f.SOURCE],[R.SMALL,f.SMALL],[R.SPAN,f.SPAN],[R.STRIKE,f.STRIKE],[R.STRONG,f.STRONG],[R.STYLE,f.STYLE],[R.SUB,f.SUB],[R.SUMMARY,f.SUMMARY],[R.SUP,f.SUP],[R.TABLE,f.TABLE],[R.TBODY,f.TBODY],[R.TEMPLATE,f.TEMPLATE],[R.TEXTAREA,f.TEXTAREA],[R.TFOOT,f.TFOOT],[R.TD,f.TD],[R.TH,f.TH],[R.THEAD,f.THEAD],[R.TITLE,f.TITLE],[R.TR,f.TR],[R.TRACK,f.TRACK],[R.TT,f.TT],[R.U,f.U],[R.UL,f.UL],[R.SVG,f.SVG],[R.VAR,f.VAR],[R.WBR,f.WBR],[R.XMP,f.XMP]]);function Gr(e){var t;return(t=Yk.get(e))!==null&&t!==void 0?t:f.UNKNOWN}const Y=f,Kk={[W.HTML]:new Set([Y.ADDRESS,Y.APPLET,Y.AREA,Y.ARTICLE,Y.ASIDE,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BLOCKQUOTE,Y.BODY,Y.BR,Y.BUTTON,Y.CAPTION,Y.CENTER,Y.COL,Y.COLGROUP,Y.DD,Y.DETAILS,Y.DIR,Y.DIV,Y.DL,Y.DT,Y.EMBED,Y.FIELDSET,Y.FIGCAPTION,Y.FIGURE,Y.FOOTER,Y.FORM,Y.FRAME,Y.FRAMESET,Y.H1,Y.H2,Y.H3,Y.H4,Y.H5,Y.H6,Y.HEAD,Y.HEADER,Y.HGROUP,Y.HR,Y.HTML,Y.IFRAME,Y.IMG,Y.INPUT,Y.LI,Y.LINK,Y.LISTING,Y.MAIN,Y.MARQUEE,Y.MENU,Y.META,Y.NAV,Y.NOEMBED,Y.NOFRAMES,Y.NOSCRIPT,Y.OBJECT,Y.OL,Y.P,Y.PARAM,Y.PLAINTEXT,Y.PRE,Y.SCRIPT,Y.SECTION,Y.SELECT,Y.SOURCE,Y.STYLE,Y.SUMMARY,Y.TABLE,Y.TBODY,Y.TD,Y.TEMPLATE,Y.TEXTAREA,Y.TFOOT,Y.TH,Y.THEAD,Y.TITLE,Y.TR,Y.TRACK,Y.UL,Y.WBR,Y.XMP]),[W.MATHML]:new Set([Y.MI,Y.MO,Y.MN,Y.MS,Y.MTEXT,Y.ANNOTATION_XML]),[W.SVG]:new Set([Y.TITLE,Y.FOREIGN_OBJECT,Y.DESC]),[W.XLINK]:new Set,[W.XML]:new Set,[W.XMLNS]:new Set},ou=new Set([Y.H1,Y.H2,Y.H3,Y.H4,Y.H5,Y.H6]);R.STYLE,R.SCRIPT,R.XMP,R.IFRAME,R.NOEMBED,R.NOFRAMES,R.PLAINTEXT;var k;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(k||(k={}));const Ke={DATA:k.DATA,RCDATA:k.RCDATA,RAWTEXT:k.RAWTEXT,SCRIPT_DATA:k.SCRIPT_DATA,PLAINTEXT:k.PLAINTEXT,CDATA_SECTION:k.CDATA_SECTION};function Qk(e){return e>=A.DIGIT_0&&e<=A.DIGIT_9}function pi(e){return e>=A.LATIN_CAPITAL_A&&e<=A.LATIN_CAPITAL_Z}function Xk(e){return e>=A.LATIN_SMALL_A&&e<=A.LATIN_SMALL_Z}function Rn(e){return Xk(e)||pi(e)}function Nd(e){return Rn(e)||Qk(e)}function ps(e){return e+32}function _m(e){return e===A.SPACE||e===A.LINE_FEED||e===A.TABULATION||e===A.FORM_FEED}function Pd(e){return _m(e)||e===A.SOLIDUS||e===A.GREATER_THAN_SIGN}function Zk(e){return e===A.NULL?F.nullCharacterReference:e>1114111?F.characterReferenceOutsideUnicodeRange:ym(e)?F.surrogateCharacterReference:Cm(e)?F.noncharacterCharacterReference:Tm(e)||e===A.CARRIAGE_RETURN?F.controlCharacterReference:null}class Jk{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=k.DATA,this.returnState=k.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Bk(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new km(Am,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(F.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(F.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=Zk(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ke.START_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ke.END_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ke.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ke.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Sm(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(F.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Gr(t.tagName),t.type===ke.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(F.endTagWithAttributes),t.selfClosing&&this._err(F.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case ke.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ke.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ke.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:ke.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=_m(t)?ke.WHITESPACE_CHARACTER:t===A.NULL?ke.NULL_CHARACTER:ke.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ke.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=k.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?yn.Attribute:yn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===k.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===k.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===k.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case k.DATA:{this._stateData(t);break}case k.RCDATA:{this._stateRcdata(t);break}case k.RAWTEXT:{this._stateRawtext(t);break}case k.SCRIPT_DATA:{this._stateScriptData(t);break}case k.PLAINTEXT:{this._statePlaintext(t);break}case k.TAG_OPEN:{this._stateTagOpen(t);break}case k.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case k.TAG_NAME:{this._stateTagName(t);break}case k.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case k.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case k.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case k.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case k.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case k.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case k.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case k.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case k.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case k.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case k.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case k.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case k.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case k.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case k.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case k.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case k.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case k.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case k.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case k.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case k.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case k.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case k.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case k.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case k.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case k.BOGUS_COMMENT:{this._stateBogusComment(t);break}case k.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case k.COMMENT_START:{this._stateCommentStart(t);break}case k.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case k.COMMENT:{this._stateComment(t);break}case k.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case k.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case k.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case k.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case k.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case k.COMMENT_END:{this._stateCommentEnd(t);break}case k.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case k.DOCTYPE:{this._stateDoctype(t);break}case k.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case k.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case k.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case k.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case k.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case k.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case k.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case k.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case k.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case k.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case k.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case k.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case k.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case k.CDATA_SECTION:{this._stateCdataSection(t);break}case k.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case k.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case k.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case k.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=k.TAG_OPEN;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitCodePoint(t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case A.AMPERSAND:{this._startCharacterReference();break}case A.LESS_THAN_SIGN:{this.state=k.RCDATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(Ue);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case A.LESS_THAN_SIGN:{this.state=k.RAWTEXT_LESS_THAN_SIGN;break}case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(Ue);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(Ue);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(Ue);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Rn(t))this._createStartTagToken(),this.state=k.TAG_NAME,this._stateTagName(t);else switch(t){case A.EXCLAMATION_MARK:{this.state=k.MARKUP_DECLARATION_OPEN;break}case A.SOLIDUS:{this.state=k.END_TAG_OPEN;break}case A.QUESTION_MARK:{this._err(F.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=k.BOGUS_COMMENT,this._stateBogusComment(t);break}case A.EOF:{this._err(F.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(F.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=k.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Rn(t))this._createEndTagToken(),this.state=k.TAG_NAME,this._stateTagName(t);else switch(t){case A.GREATER_THAN_SIGN:{this._err(F.missingEndTagName),this.state=k.DATA;break}case A.EOF:{this._err(F.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(F.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=k.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=k.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this.state=k.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.tagName+=Ue;break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(pi(t)?ps(t):t)}}_stateRcdataLessThanSign(t){t===A.SOLIDUS?this.state=k.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=k.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Rn(t)?(this.state=k.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=k.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=k.BEFORE_ATTRIBUTE_NAME,!1;case A.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=k.SELF_CLOSING_START_TAG,!1;case A.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=k.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===A.SOLIDUS?this.state=k.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=k.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Rn(t)?(this.state=k.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=k.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case A.SOLIDUS:{this.state=k.SCRIPT_DATA_END_TAG_OPEN;break}case A.EXCLAMATION_MARK:{this.state=k.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=k.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Rn(t)?(this.state=k.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===A.HYPHEN_MINUS?(this.state=k.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===A.HYPHEN_MINUS?(this.state=k.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(Ue);break}case A.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_ESCAPED,this._emitChars(Ue);break}case A.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.GREATER_THAN_SIGN:{this.state=k.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_ESCAPED,this._emitChars(Ue);break}case A.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===A.SOLIDUS?this.state=k.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Rn(t)?(this._emitChars("<"),this.state=k.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Rn(t)?(this.state=k.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Pt.SCRIPT,!1)&&Pd(this.preprocessor.peek(Pt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Pt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(Ue);break}case A.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ue);break}case A.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.GREATER_THAN_SIGN:{this.state=k.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ue);break}case A.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===A.SOLIDUS?(this.state=k.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Pt.SCRIPT,!1)&&Pd(this.preprocessor.peek(Pt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Pt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=k.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this.state=k.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._err(F.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=k.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=k.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this._leaveAttrName(),this.state=k.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._leaveAttrName(),this.state=k.BEFORE_ATTRIBUTE_VALUE;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:{this._err(F.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.currentAttr.name+=Ue;break}default:this.currentAttr.name+=String.fromCodePoint(pi(t)?ps(t):t)}}_stateAfterAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:{this.state=k.SELF_CLOSING_START_TAG;break}case A.EQUALS_SIGN:{this.state=k.BEFORE_ATTRIBUTE_VALUE;break}case A.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=k.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{this.state=k.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this.state=k.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(F.missingAttributeValue),this.state=k.DATA,this.emitCurrentTagToken();break}default:this.state=k.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case A.QUOTATION_MARK:{this.state=k.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.currentAttr.value+=Ue;break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case A.APOSTROPHE:{this.state=k.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.currentAttr.value+=Ue;break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=k.BEFORE_ATTRIBUTE_NAME;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=k.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.currentAttr.value+=Ue;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:case A.EQUALS_SIGN:case A.GRAVE_ACCENT:{this._err(F.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=k.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this._leaveAttrValue(),this.state=k.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=k.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this._err(F.missingWhitespaceBetweenAttributes),this.state=k.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case A.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=k.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this._err(F.unexpectedSolidusInTag),this.state=k.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentComment(n);break}case A.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.data+=Ue;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Pt.DASH_DASH,!0)?(this._createCommentToken(Pt.DASH_DASH.length+1),this.state=k.COMMENT_START):this._consumeSequenceIfMatch(Pt.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Pt.DOCTYPE.length+1),this.state=k.DOCTYPE):this._consumeSequenceIfMatch(Pt.CDATA_START,!0)?this.inForeignNode?this.state=k.CDATA_SECTION:(this._err(F.cdataInHtmlContent),this._createCommentToken(Pt.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=k.BOGUS_COMMENT):this._ensureHibernation()||(this._err(F.incorrectlyOpenedComment),this._createCommentToken(2),this.state=k.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case A.HYPHEN_MINUS:{this.state=k.COMMENT_START_DASH;break}case A.GREATER_THAN_SIGN:{this._err(F.abruptClosingOfEmptyComment),this.state=k.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=k.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=k.COMMENT_END;break}case A.GREATER_THAN_SIGN:{this._err(F.abruptClosingOfEmptyComment),this.state=k.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=k.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=k.COMMENT_END_DASH;break}case A.LESS_THAN_SIGN:{n.data+="<",this.state=k.COMMENT_LESS_THAN_SIGN;break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.data+=Ue;break}case A.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case A.EXCLAMATION_MARK:{n.data+="!",this.state=k.COMMENT_LESS_THAN_SIGN_BANG;break}case A.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=k.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===A.HYPHEN_MINUS?this.state=k.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=k.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===A.HYPHEN_MINUS?this.state=k.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=k.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==A.GREATER_THAN_SIGN&&t!==A.EOF&&this._err(F.nestedComment),this.state=k.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=k.COMMENT_END;break}case A.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=k.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentComment(n);break}case A.EXCLAMATION_MARK:{this.state=k.COMMENT_END_BANG;break}case A.HYPHEN_MINUS:{n.data+="-";break}case A.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=k.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{n.data+="--!",this.state=k.COMMENT_END_DASH;break}case A.GREATER_THAN_SIGN:{this._err(F.incorrectlyClosedComment),this.state=k.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=k.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=k.BEFORE_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=k.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case A.EOF:{this._err(F.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingWhitespaceBeforeDoctypeName),this.state=k.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(pi(t))this._createDoctypeToken(String.fromCharCode(ps(t))),this.state=k.DOCTYPE_NAME;else switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.NULL:{this._err(F.unexpectedNullCharacter),this._createDoctypeToken(Ue),this.state=k.DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this._err(F.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case A.EOF:{this._err(F.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=k.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=k.AFTER_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentDoctype(n);break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.name+=Ue;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(pi(t)?ps(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Pt.PUBLIC,!1)?this.state=k.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Pt.SYSTEM,!1)?this.state=k.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(F.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=k.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(F.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(F.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(F.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(F.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=k.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.publicId+=Ue;break}case A.GREATER_THAN_SIGN:{this._err(F.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case A.APOSTROPHE:{this.state=k.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.publicId+=Ue;break}case A.GREATER_THAN_SIGN:{this._err(F.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=k.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case A.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentDoctype(n);break}case A.QUOTATION_MARK:{this._err(F.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(F.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=k.DATA;break}case A.QUOTATION_MARK:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=k.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(F.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(F.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(F.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(F.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=k.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.systemId+=Ue;break}case A.GREATER_THAN_SIGN:{this._err(F.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case A.APOSTROPHE:{this.state=k.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.systemId+=Ue;break}case A.GREATER_THAN_SIGN:{this._err(F.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=k.DATA;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=k.DATA;break}case A.NULL:{this._err(F.unexpectedNullCharacter);break}case A.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case A.RIGHT_SQUARE_BRACKET:{this.state=k.CDATA_SECTION_BRACKET;break}case A.EOF:{this._err(F.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===A.RIGHT_SQUARE_BRACKET?this.state=k.CDATA_SECTION_END:(this._emitChars("]"),this.state=k.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case A.GREATER_THAN_SIGN:{this.state=k.DATA;break}case A.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=k.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(A.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Nd(this.preprocessor.peek(1))?k.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Nd(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===A.SEMICOLON&&this._err(F.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const vm=new Set([f.DD,f.DT,f.LI,f.OPTGROUP,f.OPTION,f.P,f.RB,f.RP,f.RT,f.RTC]),Rd=new Set([...vm,f.CAPTION,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]),ea=new Set([f.APPLET,f.CAPTION,f.HTML,f.MARQUEE,f.OBJECT,f.TABLE,f.TD,f.TEMPLATE,f.TH]),eI=new Set([...ea,f.OL,f.UL]),tI=new Set([...ea,f.BUTTON]),Ld=new Set([f.ANNOTATION_XML,f.MI,f.MN,f.MO,f.MS,f.MTEXT]),Od=new Set([f.DESC,f.FOREIGN_OBJECT,f.TITLE]),nI=new Set([f.TR,f.TEMPLATE,f.HTML]),rI=new Set([f.TBODY,f.TFOOT,f.THEAD,f.TEMPLATE,f.HTML]),iI=new Set([f.TABLE,f.TEMPLATE,f.HTML]),sI=new Set([f.TD,f.TH]);class aI{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=f.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===f.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===W.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==W.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(n<0?0:n)}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r<0?0:r)}popUntilNumberedHeaderPopped(){this.popUntilPopped(ou,W.HTML)}popUntilTableCellPopped(){this.popUntilPopped(sI,W.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(iI,W.HTML)}clearBackToTableBodyContext(){this.clearBackTo(rI,W.HTML)}clearBackToTableRowContext(){this.clearBackTo(nI,W.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===f.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===f.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case W.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case W.SVG:{if(Od.has(i))return!1;break}case W.MATHML:{if(Ld.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,ea)}hasInListItemScope(t){return this.hasInDynamicScope(t,eI)}hasInButtonScope(t){return this.hasInDynamicScope(t,tI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case W.HTML:{if(ou.has(n))return!0;if(ea.has(n))return!1;break}case W.SVG:{if(Od.has(n))return!1;break}case W.MATHML:{if(Ld.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===W.HTML)switch(this.tagIDs[n]){case t:return!0;case f.TABLE:case f.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===W.HTML)switch(this.tagIDs[t]){case f.TBODY:case f.THEAD:case f.TFOOT:return!0;case f.TABLE:case f.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===W.HTML)switch(this.tagIDs[n]){case t:return!0;case f.OPTION:case f.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;vm.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;Rd.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&Rd.has(this.currentTagId);)this.pop()}}const yo=3;var ln;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(ln||(ln={}));const Fd={type:ln.Marker};class oI{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,s=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===ln.Marker)break;const{element:l}=u;if(this.treeAdapter.getTagName(l)===s&&this.treeAdapter.getNamespaceURI(l)===a){const d=this.treeAdapter.getAttrList(l);d.length===i&&r.push({idx:o,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<yo)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<yo)return;const i=new Map(n.map(a=>[a.name,a.value]));let s=0;for(let a=0;a<r.length;a++){const o=r[a];o.attrs.every(u=>i.get(u.name)===u.value)&&(s+=1,s>=yo&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Fd)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:ln.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:ln.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Fd);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===ln.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===ln.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===ln.Element&&n.element===t)}}const Ln={createDocument(){return{nodeName:"#document",mode:Kt.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(s=>s.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ln.appendChild(e,s)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Ln.isTextNode(n)){n.value+=t;return}}Ln.appendChild(e,Ln.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ln.isTextNode(r)?r.value+=t:Ln.insertBefore(e,Ln.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Dm="html",uI="about:legacy-compat",lI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",wm=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],cI=[...wm,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],dI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Nm=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],hI=[...Nm,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Md(e,t){return t.some(n=>e.startsWith(n))}function fI(e){return e.name===Dm&&e.publicId===null&&(e.systemId===null||e.systemId===uI)}function pI(e){if(e.name!==Dm)return Kt.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===lI)return Kt.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),dI.has(n))return Kt.QUIRKS;let r=t===null?cI:wm;if(Md(n,r))return Kt.QUIRKS;if(r=t===null?Nm:hI,Md(n,r))return Kt.LIMITED_QUIRKS}return Kt.NO_QUIRKS}const Bd={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},mI="definitionurl",gI="definitionURL",bI=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),EI=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:W.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:W.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:W.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:W.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:W.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:W.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:W.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:W.XML}],["xml:space",{prefix:"xml",name:"space",namespace:W.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:W.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:W.XMLNS}]]),xI=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),yI=new Set([f.B,f.BIG,f.BLOCKQUOTE,f.BODY,f.BR,f.CENTER,f.CODE,f.DD,f.DIV,f.DL,f.DT,f.EM,f.EMBED,f.H1,f.H2,f.H3,f.H4,f.H5,f.H6,f.HEAD,f.HR,f.I,f.IMG,f.LI,f.LISTING,f.MENU,f.META,f.NOBR,f.OL,f.P,f.PRE,f.RUBY,f.S,f.SMALL,f.SPAN,f.STRONG,f.STRIKE,f.SUB,f.SUP,f.TABLE,f.TT,f.U,f.UL,f.VAR]);function TI(e){const t=e.tagID;return t===f.FONT&&e.attrs.some(({name:r})=>r===Jn.COLOR||r===Jn.SIZE||r===Jn.FACE)||yI.has(t)}function Pm(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===mI){e.attrs[t].name=gI;break}}function Rm(e){for(let t=0;t<e.attrs.length;t++){const n=bI.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function yl(e){for(let t=0;t<e.attrs.length;t++){const n=EI.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function CI(e){const t=xI.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Gr(e.tagName))}function SI(e,t){return t===W.MATHML&&(e===f.MI||e===f.MO||e===f.MN||e===f.MS||e===f.MTEXT)}function AI(e,t,n){if(t===W.MATHML&&e===f.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Jn.ENCODING){const i=n[r].value.toLowerCase();return i===Bd.TEXT_HTML||i===Bd.APPLICATION_XML}}return t===W.SVG&&(e===f.FOREIGN_OBJECT||e===f.DESC||e===f.TITLE)}function kI(e,t,n,r){return(!r||r===W.HTML)&&AI(e,t,n)||(!r||r===W.MATHML)&&SI(e,t)}const II="hidden",_I=8,vI=3;var v;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(v||(v={}));const DI={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Lm=new Set([f.TABLE,f.TBODY,f.TFOOT,f.THEAD,f.TR]),jd={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ln,onParseError:null};class Hd{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=v.INITIAL,this.originalInsertionMode=v.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...jd,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new Jk(this.options,this),this.activeFormattingElements=new oI(this.treeAdapter),this.fragmentContextID=r?Gr(this.treeAdapter.getTagName(r)):f.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new aI(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...jd,...n};t??(t=r.treeAdapter.createElement(R.TEMPLATE,W.HTML,[]));const i=r.treeAdapter.createElement("documentmock",W.HTML,[]),s=new this(r,i,t);return s.fragmentContextID===f.TEMPLATE&&s.tmplInsertionModeStack.unshift(v.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const s=(i=t.location)!==null&&i!==void 0?i:DI,a={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(a)}onItemPush(t,n,r){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_setContextModes(t,n){const r=t===this.document||this.treeAdapter.getNamespaceURI(t)===W.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,W.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=v.TEXT}switchToPlaintextParsing(){this.insertionMode=v.TEXT,this.originalInsertionMode=v.IN_BODY,this.tokenizer.state=Ke.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===R.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==W.HTML))switch(this.fragmentContextID){case f.TITLE:case f.TEXTAREA:{this.tokenizer.state=Ke.RCDATA;break}case f.STYLE:case f.XMP:case f.IFRAME:case f.NOEMBED:case f.NOFRAMES:case f.NOSCRIPT:{this.tokenizer.state=Ke.RAWTEXT;break}case f.SCRIPT:{this.tokenizer.state=Ke.SCRIPT_DATA;break}case f.PLAINTEXT:{this.tokenizer.state=Ke.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,W.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,W.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(R.HTML,W.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,f.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),s=r?i.lastIndexOf(r):i.length,a=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:u,endCol:l,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:u,endCol:l,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),s=n.type===ke.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,s)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===f.SVG&&this.treeAdapter.getTagName(n)===R.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===W.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===f.MGLYPH||t.tagID===f.MALIGNMARK)&&!this._isIntegrationPoint(r,n,W.HTML)}_processToken(t){switch(t.type){case ke.CHARACTER:{this.onCharacter(t);break}case ke.NULL_CHARACTER:{this.onNullCharacter(t);break}case ke.COMMENT:{this.onComment(t);break}case ke.DOCTYPE:{this.onDoctype(t);break}case ke.START_TAG:{this._processStartTag(t);break}case ke.END_TAG:{this.onEndTag(t);break}case ke.EOF:{this.onEof(t);break}case ke.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return kI(t,i,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===ln.Marker||this.openElements.contains(i.element)),r=n<0?t-1:n-1;for(let i=r;i>=0;i--){const s=this.activeFormattingElements.entries[i];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=v.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(f.P),this.openElements.popUntilTagNamePopped(f.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case f.TR:{this.insertionMode=v.IN_ROW;return}case f.TBODY:case f.THEAD:case f.TFOOT:{this.insertionMode=v.IN_TABLE_BODY;return}case f.CAPTION:{this.insertionMode=v.IN_CAPTION;return}case f.COLGROUP:{this.insertionMode=v.IN_COLUMN_GROUP;return}case f.TABLE:{this.insertionMode=v.IN_TABLE;return}case f.BODY:{this.insertionMode=v.IN_BODY;return}case f.FRAMESET:{this.insertionMode=v.IN_FRAMESET;return}case f.SELECT:{this._resetInsertionModeForSelect(t);return}case f.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case f.HTML:{this.insertionMode=this.headElement?v.AFTER_HEAD:v.BEFORE_HEAD;return}case f.TD:case f.TH:{if(t>0){this.insertionMode=v.IN_CELL;return}break}case f.HEAD:{if(t>0){this.insertionMode=v.IN_HEAD;return}break}}this.insertionMode=v.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===f.TEMPLATE)break;if(r===f.TABLE){this.insertionMode=v.IN_SELECT_IN_TABLE;return}}this.insertionMode=v.IN_SELECT}_isElementCausesFosterParenting(t){return Lm.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case f.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===W.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case f.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return Kk[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){sv(this,t);return}switch(this.insertionMode){case v.INITIAL:{ai(this,t);break}case v.BEFORE_HTML:{Ci(this,t);break}case v.BEFORE_HEAD:{Si(this,t);break}case v.IN_HEAD:{Ai(this,t);break}case v.IN_HEAD_NO_SCRIPT:{ki(this,t);break}case v.AFTER_HEAD:{Ii(this,t);break}case v.IN_BODY:case v.IN_CAPTION:case v.IN_CELL:case v.IN_TEMPLATE:{Fm(this,t);break}case v.TEXT:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case v.IN_TABLE:case v.IN_TABLE_BODY:case v.IN_ROW:{To(this,t);break}case v.IN_TABLE_TEXT:{zm(this,t);break}case v.IN_COLUMN_GROUP:{ta(this,t);break}case v.AFTER_BODY:{na(this,t);break}case v.AFTER_AFTER_BODY:{Is(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){iv(this,t);return}switch(this.insertionMode){case v.INITIAL:{ai(this,t);break}case v.BEFORE_HTML:{Ci(this,t);break}case v.BEFORE_HEAD:{Si(this,t);break}case v.IN_HEAD:{Ai(this,t);break}case v.IN_HEAD_NO_SCRIPT:{ki(this,t);break}case v.AFTER_HEAD:{Ii(this,t);break}case v.TEXT:{this._insertCharacters(t);break}case v.IN_TABLE:case v.IN_TABLE_BODY:case v.IN_ROW:{To(this,t);break}case v.IN_COLUMN_GROUP:{ta(this,t);break}case v.AFTER_BODY:{na(this,t);break}case v.AFTER_AFTER_BODY:{Is(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){uu(this,t);return}switch(this.insertionMode){case v.INITIAL:case v.BEFORE_HTML:case v.BEFORE_HEAD:case v.IN_HEAD:case v.IN_HEAD_NO_SCRIPT:case v.AFTER_HEAD:case v.IN_BODY:case v.IN_TABLE:case v.IN_CAPTION:case v.IN_COLUMN_GROUP:case v.IN_TABLE_BODY:case v.IN_ROW:case v.IN_CELL:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:case v.IN_TEMPLATE:case v.IN_FRAMESET:case v.AFTER_FRAMESET:{uu(this,t);break}case v.IN_TABLE_TEXT:{oi(this,t);break}case v.AFTER_BODY:{FI(this,t);break}case v.AFTER_AFTER_BODY:case v.AFTER_AFTER_FRAMESET:{MI(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case v.INITIAL:{BI(this,t);break}case v.BEFORE_HEAD:case v.IN_HEAD:case v.IN_HEAD_NO_SCRIPT:case v.AFTER_HEAD:{this._err(t,F.misplacedDoctype);break}case v.IN_TABLE_TEXT:{oi(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,F.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?av(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case v.INITIAL:{ai(this,t);break}case v.BEFORE_HTML:{jI(this,t);break}case v.BEFORE_HEAD:{UI(this,t);break}case v.IN_HEAD:{nn(this,t);break}case v.IN_HEAD_NO_SCRIPT:{qI(this,t);break}case v.AFTER_HEAD:{WI(this,t);break}case v.IN_BODY:{kt(this,t);break}case v.IN_TABLE:{Or(this,t);break}case v.IN_TABLE_TEXT:{oi(this,t);break}case v.IN_CAPTION:{z_(this,t);break}case v.IN_COLUMN_GROUP:{Sl(this,t);break}case v.IN_TABLE_BODY:{La(this,t);break}case v.IN_ROW:{Oa(this,t);break}case v.IN_CELL:{V_(this,t);break}case v.IN_SELECT:{Vm(this,t);break}case v.IN_SELECT_IN_TABLE:{G_(this,t);break}case v.IN_TEMPLATE:{K_(this,t);break}case v.AFTER_BODY:{X_(this,t);break}case v.IN_FRAMESET:{Z_(this,t);break}case v.AFTER_FRAMESET:{ev(this,t);break}case v.AFTER_AFTER_BODY:{nv(this,t);break}case v.AFTER_AFTER_FRAMESET:{rv(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?ov(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case v.INITIAL:{ai(this,t);break}case v.BEFORE_HTML:{HI(this,t);break}case v.BEFORE_HEAD:{zI(this,t);break}case v.IN_HEAD:{$I(this,t);break}case v.IN_HEAD_NO_SCRIPT:{VI(this,t);break}case v.AFTER_HEAD:{GI(this,t);break}case v.IN_BODY:{Ra(this,t);break}case v.TEXT:{P_(this,t);break}case v.IN_TABLE:{ji(this,t);break}case v.IN_TABLE_TEXT:{oi(this,t);break}case v.IN_CAPTION:{$_(this,t);break}case v.IN_COLUMN_GROUP:{q_(this,t);break}case v.IN_TABLE_BODY:{lu(this,t);break}case v.IN_ROW:{qm(this,t);break}case v.IN_CELL:{W_(this,t);break}case v.IN_SELECT:{Wm(this,t);break}case v.IN_SELECT_IN_TABLE:{Y_(this,t);break}case v.IN_TEMPLATE:{Q_(this,t);break}case v.AFTER_BODY:{Ym(this,t);break}case v.IN_FRAMESET:{J_(this,t);break}case v.AFTER_FRAMESET:{tv(this,t);break}case v.AFTER_AFTER_BODY:{Is(this,t);break}}}onEof(t){switch(this.insertionMode){case v.INITIAL:{ai(this,t);break}case v.BEFORE_HTML:{Ci(this,t);break}case v.BEFORE_HEAD:{Si(this,t);break}case v.IN_HEAD:{Ai(this,t);break}case v.IN_HEAD_NO_SCRIPT:{ki(this,t);break}case v.AFTER_HEAD:{Ii(this,t);break}case v.IN_BODY:case v.IN_TABLE:case v.IN_CAPTION:case v.IN_COLUMN_GROUP:case v.IN_TABLE_BODY:case v.IN_ROW:case v.IN_CELL:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:{Hm(this,t);break}case v.TEXT:{R_(this,t);break}case v.IN_TABLE_TEXT:{oi(this,t);break}case v.IN_TEMPLATE:{Gm(this,t);break}case v.AFTER_BODY:case v.IN_FRAMESET:case v.AFTER_FRAMESET:case v.AFTER_AFTER_BODY:case v.AFTER_AFTER_FRAMESET:{Cl(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===A.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case v.IN_HEAD:case v.IN_HEAD_NO_SCRIPT:case v.AFTER_HEAD:case v.TEXT:case v.IN_COLUMN_GROUP:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:case v.IN_FRAMESET:case v.AFTER_FRAMESET:{this._insertCharacters(t);break}case v.IN_BODY:case v.IN_CAPTION:case v.IN_CELL:case v.IN_TEMPLATE:case v.AFTER_BODY:case v.AFTER_AFTER_BODY:case v.AFTER_AFTER_FRAMESET:{Om(this,t);break}case v.IN_TABLE:case v.IN_TABLE_BODY:case v.IN_ROW:{To(this,t);break}case v.IN_TABLE_TEXT:{Um(this,t);break}}}}function wI(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):jm(e,t),n}function NI(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function PI(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,a=i;a!==n;s++,a=i){i=e.openElements.getCommonAncestor(a);const o=e.activeFormattingElements.getElementEntry(a),u=o&&s>=vI;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(a)):(a=RI(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function RI(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function LI(e,t,n){const r=e.treeAdapter.getTagName(t),i=Gr(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===f.TEMPLATE&&s===W.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function OI(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,i.tagID)}function Tl(e,t){for(let n=0;n<_I;n++){const r=wI(e,t);if(!r)break;const i=NI(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=PI(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&LI(e,a,s),OI(e,i,r)}}function uu(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function FI(e,t){e._appendCommentNode(t,e.openElements.items[0])}function MI(e,t){e._appendCommentNode(t,e.document)}function Cl(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function BI(e,t){e._setDocumentType(t);const n=t.forceQuirks?Kt.QUIRKS:pI(t);fI(t)||e._err(t,F.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=v.BEFORE_HTML}function ai(e,t){e._err(t,F.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Kt.QUIRKS),e.insertionMode=v.BEFORE_HTML,e._processToken(t)}function jI(e,t){t.tagID===f.HTML?(e._insertElement(t,W.HTML),e.insertionMode=v.BEFORE_HEAD):Ci(e,t)}function HI(e,t){const n=t.tagID;(n===f.HTML||n===f.HEAD||n===f.BODY||n===f.BR)&&Ci(e,t)}function Ci(e,t){e._insertFakeRootElement(),e.insertionMode=v.BEFORE_HEAD,e._processToken(t)}function UI(e,t){switch(t.tagID){case f.HTML:{kt(e,t);break}case f.HEAD:{e._insertElement(t,W.HTML),e.headElement=e.openElements.current,e.insertionMode=v.IN_HEAD;break}default:Si(e,t)}}function zI(e,t){const n=t.tagID;n===f.HEAD||n===f.BODY||n===f.HTML||n===f.BR?Si(e,t):e._err(t,F.endTagWithoutMatchingOpenElement)}function Si(e,t){e._insertFakeElement(R.HEAD,f.HEAD),e.headElement=e.openElements.current,e.insertionMode=v.IN_HEAD,e._processToken(t)}function nn(e,t){switch(t.tagID){case f.HTML:{kt(e,t);break}case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case f.TITLE:{e._switchToTextParsing(t,Ke.RCDATA);break}case f.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ke.RAWTEXT):(e._insertElement(t,W.HTML),e.insertionMode=v.IN_HEAD_NO_SCRIPT);break}case f.NOFRAMES:case f.STYLE:{e._switchToTextParsing(t,Ke.RAWTEXT);break}case f.SCRIPT:{e._switchToTextParsing(t,Ke.SCRIPT_DATA);break}case f.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=v.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(v.IN_TEMPLATE);break}case f.HEAD:{e._err(t,F.misplacedStartTagForHeadElement);break}default:Ai(e,t)}}function $I(e,t){switch(t.tagID){case f.HEAD:{e.openElements.pop(),e.insertionMode=v.AFTER_HEAD;break}case f.BODY:case f.BR:case f.HTML:{Ai(e,t);break}case f.TEMPLATE:{lr(e,t);break}default:e._err(t,F.endTagWithoutMatchingOpenElement)}}function lr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==f.TEMPLATE&&e._err(t,F.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,F.endTagWithoutMatchingOpenElement)}function Ai(e,t){e.openElements.pop(),e.insertionMode=v.AFTER_HEAD,e._processToken(t)}function qI(e,t){switch(t.tagID){case f.HTML:{kt(e,t);break}case f.BASEFONT:case f.BGSOUND:case f.HEAD:case f.LINK:case f.META:case f.NOFRAMES:case f.STYLE:{nn(e,t);break}case f.NOSCRIPT:{e._err(t,F.nestedNoscriptInHead);break}default:ki(e,t)}}function VI(e,t){switch(t.tagID){case f.NOSCRIPT:{e.openElements.pop(),e.insertionMode=v.IN_HEAD;break}case f.BR:{ki(e,t);break}default:e._err(t,F.endTagWithoutMatchingOpenElement)}}function ki(e,t){const n=t.type===ke.EOF?F.openElementsLeftAfterEof:F.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=v.IN_HEAD,e._processToken(t)}function WI(e,t){switch(t.tagID){case f.HTML:{kt(e,t);break}case f.BODY:{e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=v.IN_BODY;break}case f.FRAMESET:{e._insertElement(t,W.HTML),e.insertionMode=v.IN_FRAMESET;break}case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:case f.NOFRAMES:case f.SCRIPT:case f.STYLE:case f.TEMPLATE:case f.TITLE:{e._err(t,F.abandonedHeadElementChild),e.openElements.push(e.headElement,f.HEAD),nn(e,t),e.openElements.remove(e.headElement);break}case f.HEAD:{e._err(t,F.misplacedStartTagForHeadElement);break}default:Ii(e,t)}}function GI(e,t){switch(t.tagID){case f.BODY:case f.HTML:case f.BR:{Ii(e,t);break}case f.TEMPLATE:{lr(e,t);break}default:e._err(t,F.endTagWithoutMatchingOpenElement)}}function Ii(e,t){e._insertFakeElement(R.BODY,f.BODY),e.insertionMode=v.IN_BODY,Pa(e,t)}function Pa(e,t){switch(t.type){case ke.CHARACTER:{Fm(e,t);break}case ke.WHITESPACE_CHARACTER:{Om(e,t);break}case ke.COMMENT:{uu(e,t);break}case ke.START_TAG:{kt(e,t);break}case ke.END_TAG:{Ra(e,t);break}case ke.EOF:{Hm(e,t);break}}}function Om(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Fm(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function YI(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function KI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function QI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,W.HTML),e.insertionMode=v.IN_FRAMESET)}function XI(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function ZI(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),ou.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,W.HTML)}function JI(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function e_(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,W.HTML),n||(e.formElement=e.openElements.current))}function t_(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===f.LI&&i===f.LI||(n===f.DD||n===f.DT)&&(i===f.DD||i===f.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==f.ADDRESS&&i!==f.DIV&&i!==f.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function n_(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.tokenizer.state=Ke.PLAINTEXT}function r_(e,t){e.openElements.hasInScope(f.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.framesetOk=!1}function i_(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(R.A);n&&(Tl(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function s_(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function a_(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(f.NOBR)&&(Tl(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function o_(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function u_(e,t){e.treeAdapter.getDocumentMode(e.document)!==Kt.QUIRKS&&e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=v.IN_TABLE}function Mm(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Bm(e){const t=Sm(e,Jn.TYPE);return t!=null&&t.toLowerCase()===II}function l_(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),Bm(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function c_(e,t){e._appendElement(t,W.HTML),t.ackSelfClosing=!0}function d_(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function h_(e,t){t.tagName=R.IMG,t.tagID=f.IMG,Mm(e,t)}function f_(e,t){e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ke.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=v.TEXT}function p_(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ke.RAWTEXT)}function m_(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ke.RAWTEXT)}function Ud(e,t){e._switchToTextParsing(t,Ke.RAWTEXT)}function g_(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===v.IN_TABLE||e.insertionMode===v.IN_CAPTION||e.insertionMode===v.IN_TABLE_BODY||e.insertionMode===v.IN_ROW||e.insertionMode===v.IN_CELL?v.IN_SELECT_IN_TABLE:v.IN_SELECT}function b_(e,t){e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function E_(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,W.HTML)}function x_(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(f.RTC),e._insertElement(t,W.HTML)}function y_(e,t){e._reconstructActiveFormattingElements(),Pm(t),yl(t),t.selfClosing?e._appendElement(t,W.MATHML):e._insertElement(t,W.MATHML),t.ackSelfClosing=!0}function T_(e,t){e._reconstructActiveFormattingElements(),Rm(t),yl(t),t.selfClosing?e._appendElement(t,W.SVG):e._insertElement(t,W.SVG),t.ackSelfClosing=!0}function zd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function kt(e,t){switch(t.tagID){case f.I:case f.S:case f.B:case f.U:case f.EM:case f.TT:case f.BIG:case f.CODE:case f.FONT:case f.SMALL:case f.STRIKE:case f.STRONG:{s_(e,t);break}case f.A:{i_(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{ZI(e,t);break}case f.P:case f.DL:case f.OL:case f.UL:case f.DIV:case f.DIR:case f.NAV:case f.MAIN:case f.MENU:case f.ASIDE:case f.CENTER:case f.FIGURE:case f.FOOTER:case f.HEADER:case f.HGROUP:case f.DIALOG:case f.DETAILS:case f.ADDRESS:case f.ARTICLE:case f.SEARCH:case f.SECTION:case f.SUMMARY:case f.FIELDSET:case f.BLOCKQUOTE:case f.FIGCAPTION:{XI(e,t);break}case f.LI:case f.DD:case f.DT:{t_(e,t);break}case f.BR:case f.IMG:case f.WBR:case f.AREA:case f.EMBED:case f.KEYGEN:{Mm(e,t);break}case f.HR:{d_(e,t);break}case f.RB:case f.RTC:{E_(e,t);break}case f.RT:case f.RP:{x_(e,t);break}case f.PRE:case f.LISTING:{JI(e,t);break}case f.XMP:{p_(e,t);break}case f.SVG:{T_(e,t);break}case f.HTML:{YI(e,t);break}case f.BASE:case f.LINK:case f.META:case f.STYLE:case f.TITLE:case f.SCRIPT:case f.BGSOUND:case f.BASEFONT:case f.TEMPLATE:{nn(e,t);break}case f.BODY:{KI(e,t);break}case f.FORM:{e_(e,t);break}case f.NOBR:{a_(e,t);break}case f.MATH:{y_(e,t);break}case f.TABLE:{u_(e,t);break}case f.INPUT:{l_(e,t);break}case f.PARAM:case f.TRACK:case f.SOURCE:{c_(e,t);break}case f.IMAGE:{h_(e,t);break}case f.BUTTON:{r_(e,t);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{o_(e,t);break}case f.IFRAME:{m_(e,t);break}case f.SELECT:{g_(e,t);break}case f.OPTION:case f.OPTGROUP:{b_(e,t);break}case f.NOEMBED:case f.NOFRAMES:{Ud(e,t);break}case f.FRAMESET:{QI(e,t);break}case f.TEXTAREA:{f_(e,t);break}case f.NOSCRIPT:{e.options.scriptingEnabled?Ud(e,t):zd(e,t);break}case f.PLAINTEXT:{n_(e,t);break}case f.COL:case f.TH:case f.TD:case f.TR:case f.HEAD:case f.FRAME:case f.TBODY:case f.TFOOT:case f.THEAD:case f.CAPTION:case f.COLGROUP:break;default:zd(e,t)}}function C_(e,t){if(e.openElements.hasInScope(f.BODY)&&(e.insertionMode=v.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function S_(e,t){e.openElements.hasInScope(f.BODY)&&(e.insertionMode=v.AFTER_BODY,Ym(e,t))}function A_(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function k_(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(f.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(f.FORM):n&&e.openElements.remove(n))}function I_(e){e.openElements.hasInButtonScope(f.P)||e._insertFakeElement(R.P,f.P),e._closePElement()}function __(e){e.openElements.hasInListItemScope(f.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(f.LI),e.openElements.popUntilTagNamePopped(f.LI))}function v_(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function D_(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function w_(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function N_(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(R.BR,f.BR),e.openElements.pop(),e.framesetOk=!1}function jm(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const s=e.openElements.items[i],a=e.openElements.tagIDs[i];if(r===a&&(r!==f.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(s,a))break}}function Ra(e,t){switch(t.tagID){case f.A:case f.B:case f.I:case f.S:case f.U:case f.EM:case f.TT:case f.BIG:case f.CODE:case f.FONT:case f.NOBR:case f.SMALL:case f.STRIKE:case f.STRONG:{Tl(e,t);break}case f.P:{I_(e);break}case f.DL:case f.UL:case f.OL:case f.DIR:case f.DIV:case f.NAV:case f.PRE:case f.MAIN:case f.MENU:case f.ASIDE:case f.BUTTON:case f.CENTER:case f.FIGURE:case f.FOOTER:case f.HEADER:case f.HGROUP:case f.DIALOG:case f.ADDRESS:case f.ARTICLE:case f.DETAILS:case f.SEARCH:case f.SECTION:case f.SUMMARY:case f.LISTING:case f.FIELDSET:case f.BLOCKQUOTE:case f.FIGCAPTION:{A_(e,t);break}case f.LI:{__(e);break}case f.DD:case f.DT:{v_(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{D_(e);break}case f.BR:{N_(e);break}case f.BODY:{C_(e,t);break}case f.HTML:{S_(e,t);break}case f.FORM:{k_(e);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{w_(e,t);break}case f.TEMPLATE:{lr(e,t);break}default:jm(e,t)}}function Hm(e,t){e.tmplInsertionModeStack.length>0?Gm(e,t):Cl(e,t)}function P_(e,t){var n;t.tagID===f.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function R_(e,t){e._err(t,F.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function To(e,t){if(Lm.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=v.IN_TABLE_TEXT,t.type){case ke.CHARACTER:{zm(e,t);break}case ke.WHITESPACE_CHARACTER:{Um(e,t);break}}else Ji(e,t)}function L_(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,W.HTML),e.insertionMode=v.IN_CAPTION}function O_(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=v.IN_COLUMN_GROUP}function F_(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.COLGROUP,f.COLGROUP),e.insertionMode=v.IN_COLUMN_GROUP,Sl(e,t)}function M_(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=v.IN_TABLE_BODY}function B_(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.TBODY,f.TBODY),e.insertionMode=v.IN_TABLE_BODY,La(e,t)}function j_(e,t){e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function H_(e,t){Bm(t)?e._appendElement(t,W.HTML):Ji(e,t),t.ackSelfClosing=!0}function U_(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,W.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Or(e,t){switch(t.tagID){case f.TD:case f.TH:case f.TR:{B_(e,t);break}case f.STYLE:case f.SCRIPT:case f.TEMPLATE:{nn(e,t);break}case f.COL:{F_(e,t);break}case f.FORM:{U_(e,t);break}case f.TABLE:{j_(e,t);break}case f.TBODY:case f.TFOOT:case f.THEAD:{M_(e,t);break}case f.INPUT:{H_(e,t);break}case f.CAPTION:{L_(e,t);break}case f.COLGROUP:{O_(e,t);break}default:Ji(e,t)}}function ji(e,t){switch(t.tagID){case f.TABLE:{e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode());break}case f.TEMPLATE:{lr(e,t);break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TBODY:case f.TD:case f.TFOOT:case f.TH:case f.THEAD:case f.TR:break;default:Ji(e,t)}}function Ji(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Pa(e,t),e.fosterParentingEnabled=n}function Um(e,t){e.pendingCharacterTokens.push(t)}function zm(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function oi(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ji(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const $m=new Set([f.CAPTION,f.COL,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]);function z_(e,t){const n=t.tagID;$m.has(n)?e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=v.IN_TABLE,Or(e,t)):kt(e,t)}function $_(e,t){const n=t.tagID;switch(n){case f.CAPTION:case f.TABLE:{e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=v.IN_TABLE,n===f.TABLE&&ji(e,t));break}case f.BODY:case f.COL:case f.COLGROUP:case f.HTML:case f.TBODY:case f.TD:case f.TFOOT:case f.TH:case f.THEAD:case f.TR:break;default:Ra(e,t)}}function Sl(e,t){switch(t.tagID){case f.HTML:{kt(e,t);break}case f.COL:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case f.TEMPLATE:{nn(e,t);break}default:ta(e,t)}}function q_(e,t){switch(t.tagID){case f.COLGROUP:{e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=v.IN_TABLE);break}case f.TEMPLATE:{lr(e,t);break}case f.COL:break;default:ta(e,t)}}function ta(e,t){e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=v.IN_TABLE,e._processToken(t))}function La(e,t){switch(t.tagID){case f.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,W.HTML),e.insertionMode=v.IN_ROW;break}case f.TH:case f.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(R.TR,f.TR),e.insertionMode=v.IN_ROW,Oa(e,t);break}case f.CAPTION:case f.COL:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE,Or(e,t));break}default:Or(e,t)}}function lu(e,t){const n=t.tagID;switch(t.tagID){case f.TBODY:case f.TFOOT:case f.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE);break}case f.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE,ji(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TD:case f.TH:case f.TR:break;default:ji(e,t)}}function Oa(e,t){switch(t.tagID){case f.TH:case f.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,W.HTML),e.insertionMode=v.IN_CELL,e.activeFormattingElements.insertMarker();break}case f.CAPTION:case f.COL:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY,La(e,t));break}default:Or(e,t)}}function qm(e,t){switch(t.tagID){case f.TR:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY);break}case f.TABLE:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY,lu(e,t));break}case f.TBODY:case f.TFOOT:case f.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(f.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY,lu(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TD:case f.TH:break;default:ji(e,t)}}function V_(e,t){const n=t.tagID;$m.has(n)?(e.openElements.hasInTableScope(f.TD)||e.openElements.hasInTableScope(f.TH))&&(e._closeTableCell(),Oa(e,t)):kt(e,t)}function W_(e,t){const n=t.tagID;switch(n){case f.TD:case f.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=v.IN_ROW);break}case f.TABLE:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),qm(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:break;default:Ra(e,t)}}function Vm(e,t){switch(t.tagID){case f.HTML:{kt(e,t);break}case f.OPTION:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._insertElement(t,W.HTML);break}case f.OPTGROUP:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._insertElement(t,W.HTML);break}case f.HR:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case f.INPUT:case f.KEYGEN:case f.TEXTAREA:case f.SELECT:{e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),t.tagID!==f.SELECT&&e._processStartTag(t));break}case f.SCRIPT:case f.TEMPLATE:{nn(e,t);break}}}function Wm(e,t){switch(t.tagID){case f.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===f.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===f.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop();break}case f.OPTION:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop();break}case f.SELECT:{e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode());break}case f.TEMPLATE:{lr(e,t);break}}}function G_(e,t){const n=t.tagID;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Vm(e,t)}function Y_(e,t){const n=t.tagID;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Wm(e,t)}function K_(e,t){switch(t.tagID){case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:case f.NOFRAMES:case f.SCRIPT:case f.STYLE:case f.TEMPLATE:case f.TITLE:{nn(e,t);break}case f.CAPTION:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:{e.tmplInsertionModeStack[0]=v.IN_TABLE,e.insertionMode=v.IN_TABLE,Or(e,t);break}case f.COL:{e.tmplInsertionModeStack[0]=v.IN_COLUMN_GROUP,e.insertionMode=v.IN_COLUMN_GROUP,Sl(e,t);break}case f.TR:{e.tmplInsertionModeStack[0]=v.IN_TABLE_BODY,e.insertionMode=v.IN_TABLE_BODY,La(e,t);break}case f.TD:case f.TH:{e.tmplInsertionModeStack[0]=v.IN_ROW,e.insertionMode=v.IN_ROW,Oa(e,t);break}default:e.tmplInsertionModeStack[0]=v.IN_BODY,e.insertionMode=v.IN_BODY,kt(e,t)}}function Q_(e,t){t.tagID===f.TEMPLATE&&lr(e,t)}function Gm(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Cl(e,t)}function X_(e,t){t.tagID===f.HTML?kt(e,t):na(e,t)}function Ym(e,t){var n;if(t.tagID===f.HTML){if(e.fragmentContext||(e.insertionMode=v.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===f.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else na(e,t)}function na(e,t){e.insertionMode=v.IN_BODY,Pa(e,t)}function Z_(e,t){switch(t.tagID){case f.HTML:{kt(e,t);break}case f.FRAMESET:{e._insertElement(t,W.HTML);break}case f.FRAME:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case f.NOFRAMES:{nn(e,t);break}}}function J_(e,t){t.tagID===f.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==f.FRAMESET&&(e.insertionMode=v.AFTER_FRAMESET))}function ev(e,t){switch(t.tagID){case f.HTML:{kt(e,t);break}case f.NOFRAMES:{nn(e,t);break}}}function tv(e,t){t.tagID===f.HTML&&(e.insertionMode=v.AFTER_AFTER_FRAMESET)}function nv(e,t){t.tagID===f.HTML?kt(e,t):Is(e,t)}function Is(e,t){e.insertionMode=v.IN_BODY,Pa(e,t)}function rv(e,t){switch(t.tagID){case f.HTML:{kt(e,t);break}case f.NOFRAMES:{nn(e,t);break}}}function iv(e,t){t.chars=Ue,e._insertCharacters(t)}function sv(e,t){e._insertCharacters(t),e.framesetOk=!1}function Km(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==W.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function av(e,t){if(TI(t))Km(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===W.MATHML?Pm(t):r===W.SVG&&(CI(t),Rm(t)),yl(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function ov(e,t){if(t.tagID===f.P||t.tagID===f.BR){Km(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===W.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}R.AREA,R.BASE,R.BASEFONT,R.BGSOUND,R.BR,R.COL,R.EMBED,R.FRAME,R.HR,R.IMG,R.INPUT,R.KEYGEN,R.LINK,R.META,R.PARAM,R.SOURCE,R.TRACK,R.WBR;const uv=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,lv=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),$d={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Qm(e,t){const n=xv(e),r=ba("type",{handlers:{root:cv,element:dv,text:hv,comment:Zm,doctype:fv,raw:mv},unknown:gv}),i={parser:n?new Hd($d):Hd.getFragmentParser(void 0,$d),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),Yr(i,cn());const s=n?i.parser.document:i.parser.getFragment(),a=dk(s,{file:i.options.file});return i.stitches&&Lt(a,"comment",function(o,u,l){const d=o;if(d.value.stitch&&l&&u!==void 0){const c=l.children;return c[u]=d.value.stitch,u}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function Xm(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function cv(e,t){Xm(e.children,t)}function dv(e,t){bv(e,t),Xm(e.children,t),Ev(e,t)}function hv(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ke.CHARACTER,chars:e.value,location:es(e)};Yr(t,cn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function fv(e,t){const n={type:ke.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:es(e)};Yr(t,cn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function pv(e,t){t.stitches=!0;const n=yv(e);if("children"in e&&"children"in n){const r=Qm({type:"root",children:e.children},t.options);n.children=r.children}Zm({type:"comment",value:{stitch:n}},t)}function Zm(e,t){const n=e.value,r={type:ke.COMMENT,data:n,location:es(e)};Yr(t,cn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function mv(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Jm(t,cn(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(uv,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function gv(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))pv(n,t);else{let r="";throw lv.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Yr(e,t){Jm(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Ke.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Jm(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function bv(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ke.PLAINTEXT)return;Yr(t,cn(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Xn.html;i===Xn.html&&n==="svg"&&(i=Xn.svg);const s=Ik({...e,children:[]},{space:i===Xn.svg?"svg":"html"}),a={type:ke.START_TAG,tagName:n,tagID:Gr(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:es(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Ev(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Yh.includes(n)||t.parser.tokenizer.state===Ke.PLAINTEXT)return;Yr(t,Ia(e));const r={type:ke.END_TAG,tagName:n,tagID:Gr(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:es(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ke.RCDATA||t.parser.tokenizer.state===Ke.RAWTEXT||t.parser.tokenizer.state===Ke.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ke.DATA)}function xv(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function es(e){const t=cn(e)||{line:void 0,column:void 0,offset:void 0},n=Ia(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function yv(e){return"children"in e?ir({...e,children:[]}):ir(e)}function e0(e){return function(t,n){return Qm(t,{...e,file:n})}}const Tv=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/i,Cv=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)(\/.*)?\]/i,Sv=({legacyTitle:e=!1,tagName:t="div"}={})=>n=>{Lt(n,"blockquote",(r,i,s)=>{let a="",o="",u=!0,l=r.children.map(d=>{if(u&&d.type==="paragraph"){const c=d.children[0],m=c.type==="text"?c.value:"",p=e?Cv:Tv,g=m.match(p);if(g&&(u=!1,a=g[1].toLocaleLowerCase(),o=e&&g[2]||a.toLocaleUpperCase(),m.includes(`
152
152
  `)&&(d.children[0]={type:"text",value:m.replace(p,"").replace(/^\n+/,"")}),!m.includes(`
153
- `))){const b=[];d.children.forEach((T,y)=>{y!=0&&(y==1&&T.type==="break"||b.push(T))}),d.children=[...b]}}return d});a&&(r.data={hName:t,hProperties:{class:`markdown-alert markdown-alert-${a}`,dir:"auto"}},l.unshift({type:"paragraph",children:[mv(a),{type:"text",value:o.replace(/^\//,"")}],data:{hProperties:{class:"markdown-alert-title",dir:"auto"}}})),r.children=[...l]})};function mv(e){let t=gv[e]??"";return{type:"emphasis",data:{hName:"svg",hProperties:{class:"octicon",viewBox:"0 0 16 16",width:"16",height:"16",ariaHidden:"true"}},children:[{type:"emphasis",data:{hName:"path",hProperties:{d:t}},children:[]}]}}const gv={note:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z",tip:"M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z",important:"M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",warning:"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",caution:"M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"};function bv(e,t){if(typeof document>"u")return;const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style={position:"absolute",left:"-9999px"},document.body.appendChild(n);const r=document.getSelection().rangeCount>0?document.getSelection().getRangeAt(0):!1;n.select();let i=!1;try{i=!!document.execCommand("copy")}catch{i=!1}document.body.removeChild(n),r&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(r)),t&&t(i)}function Xm(e){if(!e)return null;var t=e;return t.dataset.code&&t.classList.contains("copied")?t:t.parentElement?Xm(t.parentElement):null}function Ev(e){var t=n=>{var r=Xm(n.target);r&&(r.classList.add("active"),bv(r.dataset.code,function(){setTimeout(()=>{r.classList.remove("active")},2e3)}))};N.useEffect(()=>{var n,r;return(n=e.current)==null||n.removeEventListener("click",t,!1),(r=e.current)==null||r.addEventListener("click",t,!1),()=>{var i;(i=e.current)==null||i.removeEventListener("click",t,!1)}},[e])}var xv=["prefixCls","className","source","style","disableCopy","skipHtml","onScroll","onMouseOver","pluginsFilter","rehypeRewrite","wrapperElement","warpperElement","urlTransform"],yv=e=>e;const Tv=N.forwardRef((e,t)=>{var{prefixCls:n="wmde-markdown wmde-markdown-color",className:r,source:i,style:s,disableCopy:a=!1,skipHtml:o=!0,onScroll:u,onMouseOver:l,pluginsFilter:d,wrapperElement:c={},warpperElement:m={},urlTransform:p}=e,g=jT(e,xv),b=N.useRef(null);N.useImperativeHandle(t,()=>Sn({},e,{mdp:b}),[b,e]);var T=(n||"")+" "+(r||"");Ev(b);var y=[...g.rehypePlugins||[]],C={allowElement:(D,w,B)=>g.allowElement?g.allowElement(D,w,B):/^[A-Za-z0-9]+$/.test(D.tagName)};o&&y.push(Qm);var S=[pv,...g.remarkPlugins||[],V5],P=Sn({},m,c);return h.jsx("div",Sn({ref:b,onScroll:u,onMouseOver:l},P,{className:T,style:s,children:h.jsx(OS,Sn({},C,g,{skipHtml:o,urlTransform:p||yv,rehypePlugins:d?d("rehype",y):y,remarkPlugins:d?d("remark",S):S,children:i||""}))}))});var _s={},cu={};function Cv(e,t){for(var n=t,r=0;r<e.length;r++){var i=r===e.length-1,s=e.charAt(r),a=n[s]||(n[s]={chars:{}});i&&(a.self=e),n=a.chars}}function qd(e){if(e.length===0)return _s;for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];Cv(i,t)}return t}function Sv(e){if(e.length===0)return cu;for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];t[i]=!0}return t}var ms={},Vd={type:"String",optional:!0};function Av(e){var t={type:"NoArgument",optional:!1};function n(a){if(t.type&&t.type!==a&&t.type!=="NoArgument")throw new Error('Conflicting pseudo-class argument type: "'.concat(t.type,'" vs "').concat(a,'".'));t.type=a}for(var r=0,i=e;r<i.length;r++){var s=i[r];s==="NoArgument"&&(t.optional=!0),s==="Formula"&&n("Formula"),s==="FormulaOfSelector"&&(n("Formula"),t.ofSelector=!0),s==="String"&&n("String"),s==="Selector"&&n("Selector")}return t}function kv(e){for(var t={},n=0,r=Object.keys(e);n<r.length;n++){var i=r[n],s=e[i];if(s)for(var a=0,o=s;a<o.length;a++){var u=o[a];(t[u]||(t[u]=[])).push(i)}}return t}function Wd(e){for(var t=kv(e),n={},r=0,i=Object.keys(t);r<i.length;r++){var s=i[r],a=t[s];a&&(n[s]=Av(a))}return n}var Fr=function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Fr.apply(this,arguments)},Iv={},du={wildcard:!0};function _v(e){return e?typeof e=="boolean"?du:e:Iv}function vv(e,t){return function(n,r){return t(e(n),e(r))}}function Dv(e){return function(t,n){var r=e(t,n);if(!r)throw new Error("Syntax definition cannot be null or undefined.");return r}}function Gd(e,t){return function(n,r){return r===!0?e:t(n===!0?e:n,r)}}function xr(e){return function(t,n){if(!n||!t)return n;if(typeof n!="object"||n===null)throw new Error("Unexpected syntax definition extension type: ".concat(n,"."));for(var r=Fr({},t),i=0,s=Object.entries(n);i<s.length;i++){var a=s[i],o=a[0],u=a[1];if(o!=="latest"){var l=e[o];r[o]=l(t[o],u)}}return r}}function bn(e,t){return t!==void 0?t:e}function gs(e,t){return t?e?e.concat(t):t:e}function Yd(e,t){if(!t)return e;if(!e)return t;for(var n=Fr({},e),r=0,i=Object.entries(t);r<i.length;r++){var s=i[r],a=s[0],o=s[1];if(!o){delete n[a];continue}var u=e[a];if(!u){n[a]=o;continue}n[a]=u.concat(o)}return n}var er=Dv(xr({baseSyntax:bn,modules:gs,tag:Gd(du,xr({wildcard:bn})),ids:bn,classNames:bn,namespace:Gd(du,xr({wildcard:bn})),combinators:gs,attributes:xr({operators:gs,caseSensitivityModifiers:gs,unknownCaseSensitivityModifiers:bn}),pseudoClasses:xr({unknown:bn,definitions:Yd}),pseudoElements:xr({unknown:bn,notation:bn,definitions:vv(function(e){return Array.isArray(e)?{NoArgument:e}:e},Yd)})})),Zm={tag:{},ids:!0,classNames:!0,combinators:[],pseudoElements:{unknown:"reject",notation:"singleColon",definitions:["first-letter","first-line"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["link","visited","active"]}}},Jm=er(Zm,{tag:{wildcard:!0},combinators:[">","+"],attributes:{unknownCaseSensitivityModifiers:"reject",operators:["=","~=","|="]},pseudoElements:{definitions:["before","after"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["hover","focus","first-child"],String:["lang"]}}}),hu=er(Jm,{namespace:{wildcard:!0},combinators:["~"],attributes:{operators:["^=","$=","*="]},pseudoElements:{notation:"both"},pseudoClasses:{definitions:{NoArgument:["root","last-child","first-of-type","last-of-type","only-child","only-of-type","empty","target","enabled","disabled","checked","indeterminate"],Formula:["nth-child","nth-last-child","nth-of-type","nth-last-of-type"],Selector:["not"]}}}),e0=er(hu,{combinators:["||"],attributes:{caseSensitivityModifiers:["i","I","s","S"]},pseudoClasses:{definitions:{NoArgument:["any-link","local-link","target-within","scope","current","past","future","focus-within","focus-visible","read-write","read-only","placeholder-shown","default","valid","invalid","in-range","out-of-range","required","optional","blank","user-invalid","playing","paused","autofill","modal","fullscreen","picture-in-picture","defined","loading","popover-open"],Formula:["nth-col","nth-last-col"],String:["dir"],FormulaOfSelector:["nth-child","nth-last-child"],Selector:["current","is","where","has","state"]}},pseudoElements:{definitions:{NoArgument:["marker"],Selector:["part"]}}}),ra={"css-position-1":{latest:!1,pseudoClasses:{definitions:{NoArgument:["static","relative","absolute"]}}},"css-position-2":{latest:!1,pseudoClasses:{definitions:{NoArgument:["static","relative","absolute","fixed"]}}},"css-position-3":{latest:!1,pseudoClasses:{definitions:{NoArgument:["sticky","fixed","absolute","relative","static"]}}},"css-position-4":{latest:!0,pseudoClasses:{definitions:{NoArgument:["sticky","fixed","absolute","relative","static","initial"]}}},"css-scoping-1":{latest:!0,pseudoClasses:{definitions:{NoArgument:["host","host-context"],Selector:["host","host-context"]}},pseudoElements:{definitions:{Selector:["slotted"]}}},"css-pseudo-4":{latest:!0,pseudoElements:{definitions:{NoArgument:["marker","selection","target-text","search-text","spelling-error","grammar-error","backdrop","file-selector-button","prefix","postfix","placeholder","details-content"],String:["highlight"]}}},"css-shadow-parts-1":{latest:!0,pseudoElements:{definitions:{Selector:["part"]}}}},t0=Fr(Fr({},e0),{modules:Object.entries(ra).filter(function(e){var t=e[1].latest;return t}).map(function(e){var t=e[0];return t})}),wv=er(t0,{pseudoElements:{unknown:"accept"},pseudoClasses:{unknown:"accept"},attributes:{unknownCaseSensitivityModifiers:"accept"}}),fu={css1:Zm,css2:Jm,css3:hu,"selectors-3":hu,"selectors-4":e0,latest:t0,progressive:wv};function Pv(){for(var e={pseudoClasses:{},pseudoElements:{}},t=["css1","css2","css3","selectors-3","selectors-4"],n=0,r=t;n<r.length;n++){var i=r[n],s=fu[i];if(s.pseudoClasses&&typeof s.pseudoClasses=="object"){var a=s.pseudoClasses.definitions;if(a)for(var o=0,u=Object.entries(a);o<u.length;o++)for(var l=u[o],d=l[1],c=0,m=d;c<m.length;c++){var p=m[c];e.pseudoClasses[p]||(e.pseudoClasses[p]=[]),e.pseudoClasses[p].includes(i)||e.pseudoClasses[p].push(i)}}if(s.pseudoElements&&typeof s.pseudoElements=="object"){var a=s.pseudoElements.definitions;if(a)if(Array.isArray(a))for(var g=0,b=a;g<b.length;g++){var T=b[g];e.pseudoElements[T]||(e.pseudoElements[T]=[]),e.pseudoElements[T].includes(i)||e.pseudoElements[T].push(i)}else for(var y=0,C=Object.values(a);y<C.length;y++)for(var d=C[y],S=0,P=d;S<P.length;S++){var D=P[S];e.pseudoElements[D]||(e.pseudoElements[D]=[]),e.pseudoElements[D].includes(i)||e.pseudoElements[D].push(i)}}}for(var w=0,B=Object.entries(ra);w<B.length;w++){var V=B[w],Q=V[0],E=V[1];if(E.pseudoClasses&&typeof E.pseudoClasses=="object"){var a=E.pseudoClasses.definitions;if(a)for(var L=0,O=Object.values(a);L<O.length;L++)for(var d=O[L],z=0,M=d;z<M.length;z++){var J=M[z];e.pseudoClasses[J]||(e.pseudoClasses[J]=[]),e.pseudoClasses[J].includes(Q)||e.pseudoClasses[J].push(Q)}}if(E.pseudoElements&&typeof E.pseudoElements=="object"){var a=E.pseudoElements.definitions;if(a)if(Array.isArray(a))for(var oe=0,he=a;oe<he.length;oe++){var fe=he[oe];e.pseudoElements[fe]||(e.pseudoElements[fe]=[]),e.pseudoElements[fe].includes(Q)||e.pseudoElements[fe].push(Q)}else for(var G=0,_=Object.values(a);G<_.length;G++)for(var d=_[G],Ee=0,ue=d;Ee<ue.length;Ee++){var I=ue[Ee];e.pseudoElements[I]||(e.pseudoElements[I]=[]),e.pseudoElements[I].includes(Q)||e.pseudoElements[I].push(Q)}}}return e}var Kd=Pv();function ui(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="-"||e==="_"||e==="\\"||e>=" "}function Qd(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="-"||e==="_"||e>=" "}function li(e){return e>="a"&&e<="f"||e>="A"&&e<="F"||e>="0"&&e<="9"}var Nv={" ":!0," ":!0,"\n":!0,"\r":!0,"\f":!0},Rv={'"':!0,"'":!0},Co={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0},Lv=6,So="css-selector-parser parse error: ";function Ov(e){e===void 0&&(e={});var t=e.syntax,n=t===void 0?"latest":t,r=e.substitutes,i=e.strict,s=i===void 0?!0:i,a=e.modules,o=typeof n=="object"?n:fu[n];if(o.baseSyntax&&(o=er(fu[o.baseSyntax],o)),o.modules&&o.modules.length>0)for(var u=0,l=o.modules;u<l.length;u++){var d=l[u],c=ra[d];c&&(o=er(c,o))}if(a&&a.length>0)for(var m=0,p=a;m<p.length;m++){var g=p[m],c=ra[g];c&&(o=er(c,o))}var b=o.tag?[!0,!!_v(o.tag).wildcard]:[!1,!1],T=b[0],y=b[1],C=!!o.ids,S=!!o.classNames,P=!!o.namespace,D=o.namespace&&(o.namespace===!0||o.namespace.wildcard===!0);if(P&&!T)throw new Error("".concat(So,"Namespaces cannot be enabled while tags are disabled."));var w=!!r,B=o.combinators?qd(o.combinators):_s,V=o.attributes?[!0,o.attributes.operators?qd(o.attributes.operators):_s,o.attributes.caseSensitivityModifiers?Sv(o.attributes.caseSensitivityModifiers):cu,o.attributes.unknownCaseSensitivityModifiers==="accept"]:[!1,_s,cu,!1],Q=V[0],E=V[1],L=V[2],O=V[3],z=O||Object.keys(L).length>0,M=o.pseudoClasses?[!0,o.pseudoClasses.definitions?Wd(o.pseudoClasses.definitions):ms,o.pseudoClasses.unknown==="accept"]:[!1,ms,!1],J=M[0],oe=M[1],he=M[2],fe=o.pseudoElements?[!0,o.pseudoElements.notation==="singleColon"||o.pseudoElements.notation==="both",!o.pseudoElements.notation||o.pseudoElements.notation==="doubleColon"||o.pseudoElements.notation==="both",o.pseudoElements.definitions?Wd(Array.isArray(o.pseudoElements.definitions)?{NoArgument:o.pseudoElements.definitions}:o.pseudoElements.definitions):ms,o.pseudoElements.unknown==="accept"]:[!1,!1,!1,ms,!1],G=fe[0],_=fe[1],Ee=fe[2],ue=fe[3],I=fe[4],de="",pe=de.length,q=0,re="",te=function(K){return re===K},we=function(){return te("*")||ui(re)},ne=function(K){q=K,re=de.charAt(q)},U=function(){q++,re=de.charAt(q)},xe=function(){var K=re;return q++,re=de.charAt(q),K};function je(K){var ie=Math.min(pe-1,q),ae=new Error("".concat(So).concat(K," Pos: ").concat(ie,"."));throw ae.position=ie,ae.name="ParserError",ae}function ce(K,ie){if(!K)return je(ie)}var zt=function(){ce(q<pe,"Unexpected end of input.")},yt=function(){return q>=pe},Ce=function(K){ce(q<pe,'Expected "'.concat(K,'" but end of input reached.')),ce(re===K,'Expected "'.concat(K,'" but "').concat(re,'" found.')),q++,re=de.charAt(q)};function st(K){var ie=at(K,q);if(ie)return q+=ie.length,re=de.charAt(q),ie}function at(K,ie){var ae=de.charAt(ie),be=K[ae];if(be){var Pt=at(be.chars,ie+1);if(Pt)return Pt;if(be.self)return be.self}}function Xe(){for(var K=xe(),ie=1;li(re)&&ie<Lv;)K+=xe(),ie++;return Zr(),String.fromCharCode(parseInt(K,16))}function rn(K){var ie="";for(Ce(K);q<pe;){if(te(K))return U(),ie;te("\\")?(U(),te(K)?(ie+=K,U()):re===`
153
+ `))){const b=[];d.children.forEach((T,y)=>{y!=0&&(y==1&&T.type==="break"||b.push(T))}),d.children=[...b]}}return d});a&&(r.data={hName:t,hProperties:{class:`markdown-alert markdown-alert-${a}`,dir:"auto"}},l.unshift({type:"paragraph",children:[Av(a),{type:"text",value:o.replace(/^\//,"")}],data:{hProperties:{class:"markdown-alert-title",dir:"auto"}}})),r.children=[...l]})};function Av(e){let t=kv[e]??"";return{type:"emphasis",data:{hName:"svg",hProperties:{class:"octicon",viewBox:"0 0 16 16",width:"16",height:"16",ariaHidden:"true"}},children:[{type:"emphasis",data:{hName:"path",hProperties:{d:t}},children:[]}]}}const kv={note:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z",tip:"M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z",important:"M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",warning:"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",caution:"M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"};function Iv(e,t){if(typeof document>"u")return;const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style={position:"absolute",left:"-9999px"},document.body.appendChild(n);const r=document.getSelection().rangeCount>0?document.getSelection().getRangeAt(0):!1;n.select();let i=!1;try{i=!!document.execCommand("copy")}catch{i=!1}document.body.removeChild(n),r&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(r)),t&&t(i)}function t0(e){if(!e)return null;var t=e;return t.dataset.code&&t.classList.contains("copied")?t:t.parentElement?t0(t.parentElement):null}function _v(e){var t=n=>{var r=t0(n.target);r&&(r.classList.add("active"),Iv(r.dataset.code,function(){setTimeout(()=>{r.classList.remove("active")},2e3)}))};P.useEffect(()=>{var n,r;return(n=e.current)==null||n.removeEventListener("click",t,!1),(r=e.current)==null||r.addEventListener("click",t,!1),()=>{var i;(i=e.current)==null||i.removeEventListener("click",t,!1)}},[e])}var vv=["prefixCls","className","source","style","disableCopy","skipHtml","onScroll","onMouseOver","pluginsFilter","rehypeRewrite","wrapperElement","warpperElement","urlTransform"],Dv=e=>e;const wv=P.forwardRef((e,t)=>{var{prefixCls:n="wmde-markdown wmde-markdown-color",className:r,source:i,style:s,disableCopy:a=!1,skipHtml:o=!0,onScroll:u,onMouseOver:l,pluginsFilter:d,wrapperElement:c={},warpperElement:m={},urlTransform:p}=e,g=YT(e,vv),b=P.useRef(null);P.useImperativeHandle(t,()=>Sn({},e,{mdp:b}),[b,e]);var T=(n||"")+" "+(r||"");_v(b);var y=[...g.rehypePlugins||[]],C={allowElement:(D,w,B)=>g.allowElement?g.allowElement(D,w,B):/^[A-Za-z0-9]+$/.test(D.tagName)};o&&y.push(e0);var S=[Sv,...g.remarkPlugins||[],ek],N=Sn({},m,c);return h.jsx("div",Sn({ref:b,onScroll:u,onMouseOver:l},N,{className:T,style:s,children:h.jsx(qS,Sn({},C,g,{skipHtml:o,urlTransform:p||Dv,rehypePlugins:d?d("rehype",y):y,remarkPlugins:d?d("remark",S):S,children:i||""}))}))});var _s={},cu={};function Nv(e,t){for(var n=t,r=0;r<e.length;r++){var i=r===e.length-1,s=e.charAt(r),a=n[s]||(n[s]={chars:{}});i&&(a.self=e),n=a.chars}}function qd(e){if(e.length===0)return _s;for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];Nv(i,t)}return t}function Pv(e){if(e.length===0)return cu;for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];t[i]=!0}return t}var ms={},Vd={type:"String",optional:!0};function Rv(e){var t={type:"NoArgument",optional:!1};function n(a){if(t.type&&t.type!==a&&t.type!=="NoArgument")throw new Error('Conflicting pseudo-class argument type: "'.concat(t.type,'" vs "').concat(a,'".'));t.type=a}for(var r=0,i=e;r<i.length;r++){var s=i[r];s==="NoArgument"&&(t.optional=!0),s==="Formula"&&n("Formula"),s==="FormulaOfSelector"&&(n("Formula"),t.ofSelector=!0),s==="String"&&n("String"),s==="Selector"&&n("Selector")}return t}function Lv(e){for(var t={},n=0,r=Object.keys(e);n<r.length;n++){var i=r[n],s=e[i];if(s)for(var a=0,o=s;a<o.length;a++){var u=o[a];(t[u]||(t[u]=[])).push(i)}}return t}function Wd(e){for(var t=Lv(e),n={},r=0,i=Object.keys(t);r<i.length;r++){var s=i[r],a=t[s];a&&(n[s]=Rv(a))}return n}var Fr=function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Fr.apply(this,arguments)},Ov={},du={wildcard:!0};function Fv(e){return e?typeof e=="boolean"?du:e:Ov}function Mv(e,t){return function(n,r){return t(e(n),e(r))}}function Bv(e){return function(t,n){var r=e(t,n);if(!r)throw new Error("Syntax definition cannot be null or undefined.");return r}}function Gd(e,t){return function(n,r){return r===!0?e:t(n===!0?e:n,r)}}function xr(e){return function(t,n){if(!n||!t)return n;if(typeof n!="object"||n===null)throw new Error("Unexpected syntax definition extension type: ".concat(n,"."));for(var r=Fr({},t),i=0,s=Object.entries(n);i<s.length;i++){var a=s[i],o=a[0],u=a[1];if(o!=="latest"){var l=e[o];r[o]=l(t[o],u)}}return r}}function bn(e,t){return t!==void 0?t:e}function gs(e,t){return t?e?e.concat(t):t:e}function Yd(e,t){if(!t)return e;if(!e)return t;for(var n=Fr({},e),r=0,i=Object.entries(t);r<i.length;r++){var s=i[r],a=s[0],o=s[1];if(!o){delete n[a];continue}var u=e[a];if(!u){n[a]=o;continue}n[a]=u.concat(o)}return n}var er=Bv(xr({baseSyntax:bn,modules:gs,tag:Gd(du,xr({wildcard:bn})),ids:bn,classNames:bn,namespace:Gd(du,xr({wildcard:bn})),combinators:gs,attributes:xr({operators:gs,caseSensitivityModifiers:gs,unknownCaseSensitivityModifiers:bn}),pseudoClasses:xr({unknown:bn,definitions:Yd}),pseudoElements:xr({unknown:bn,notation:bn,definitions:Mv(function(e){return Array.isArray(e)?{NoArgument:e}:e},Yd)})})),n0={tag:{},ids:!0,classNames:!0,combinators:[],pseudoElements:{unknown:"reject",notation:"singleColon",definitions:["first-letter","first-line"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["link","visited","active"]}}},r0=er(n0,{tag:{wildcard:!0},combinators:[">","+"],attributes:{unknownCaseSensitivityModifiers:"reject",operators:["=","~=","|="]},pseudoElements:{definitions:["before","after"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["hover","focus","first-child"],String:["lang"]}}}),hu=er(r0,{namespace:{wildcard:!0},combinators:["~"],attributes:{operators:["^=","$=","*="]},pseudoElements:{notation:"both"},pseudoClasses:{definitions:{NoArgument:["root","last-child","first-of-type","last-of-type","only-child","only-of-type","empty","target","enabled","disabled","checked","indeterminate"],Formula:["nth-child","nth-last-child","nth-of-type","nth-last-of-type"],Selector:["not"]}}}),i0=er(hu,{combinators:["||"],attributes:{caseSensitivityModifiers:["i","I","s","S"]},pseudoClasses:{definitions:{NoArgument:["any-link","local-link","target-within","scope","current","past","future","focus-within","focus-visible","read-write","read-only","placeholder-shown","default","valid","invalid","in-range","out-of-range","required","optional","blank","user-invalid","playing","paused","autofill","modal","fullscreen","picture-in-picture","defined","loading","popover-open"],Formula:["nth-col","nth-last-col"],String:["dir"],FormulaOfSelector:["nth-child","nth-last-child"],Selector:["current","is","where","has","state"]}},pseudoElements:{definitions:{NoArgument:["marker"],Selector:["part"]}}}),ra={"css-position-1":{latest:!1,pseudoClasses:{definitions:{NoArgument:["static","relative","absolute"]}}},"css-position-2":{latest:!1,pseudoClasses:{definitions:{NoArgument:["static","relative","absolute","fixed"]}}},"css-position-3":{latest:!1,pseudoClasses:{definitions:{NoArgument:["sticky","fixed","absolute","relative","static"]}}},"css-position-4":{latest:!0,pseudoClasses:{definitions:{NoArgument:["sticky","fixed","absolute","relative","static","initial"]}}},"css-scoping-1":{latest:!0,pseudoClasses:{definitions:{NoArgument:["host","host-context"],Selector:["host","host-context"]}},pseudoElements:{definitions:{Selector:["slotted"]}}},"css-pseudo-4":{latest:!0,pseudoElements:{definitions:{NoArgument:["marker","selection","target-text","search-text","spelling-error","grammar-error","backdrop","file-selector-button","prefix","postfix","placeholder","details-content"],String:["highlight"]}}},"css-shadow-parts-1":{latest:!0,pseudoElements:{definitions:{Selector:["part"]}}}},s0=Fr(Fr({},i0),{modules:Object.entries(ra).filter(function(e){var t=e[1].latest;return t}).map(function(e){var t=e[0];return t})}),jv=er(s0,{pseudoElements:{unknown:"accept"},pseudoClasses:{unknown:"accept"},attributes:{unknownCaseSensitivityModifiers:"accept"}}),fu={css1:n0,css2:r0,css3:hu,"selectors-3":hu,"selectors-4":i0,latest:s0,progressive:jv};function Hv(){for(var e={pseudoClasses:{},pseudoElements:{}},t=["css1","css2","css3","selectors-3","selectors-4"],n=0,r=t;n<r.length;n++){var i=r[n],s=fu[i];if(s.pseudoClasses&&typeof s.pseudoClasses=="object"){var a=s.pseudoClasses.definitions;if(a)for(var o=0,u=Object.entries(a);o<u.length;o++)for(var l=u[o],d=l[1],c=0,m=d;c<m.length;c++){var p=m[c];e.pseudoClasses[p]||(e.pseudoClasses[p]=[]),e.pseudoClasses[p].includes(i)||e.pseudoClasses[p].push(i)}}if(s.pseudoElements&&typeof s.pseudoElements=="object"){var a=s.pseudoElements.definitions;if(a)if(Array.isArray(a))for(var g=0,b=a;g<b.length;g++){var T=b[g];e.pseudoElements[T]||(e.pseudoElements[T]=[]),e.pseudoElements[T].includes(i)||e.pseudoElements[T].push(i)}else for(var y=0,C=Object.values(a);y<C.length;y++)for(var d=C[y],S=0,N=d;S<N.length;S++){var D=N[S];e.pseudoElements[D]||(e.pseudoElements[D]=[]),e.pseudoElements[D].includes(i)||e.pseudoElements[D].push(i)}}}for(var w=0,B=Object.entries(ra);w<B.length;w++){var V=B[w],Q=V[0],E=V[1];if(E.pseudoClasses&&typeof E.pseudoClasses=="object"){var a=E.pseudoClasses.definitions;if(a)for(var L=0,O=Object.values(a);L<O.length;L++)for(var d=O[L],z=0,M=d;z<M.length;z++){var J=M[z];e.pseudoClasses[J]||(e.pseudoClasses[J]=[]),e.pseudoClasses[J].includes(Q)||e.pseudoClasses[J].push(Q)}}if(E.pseudoElements&&typeof E.pseudoElements=="object"){var a=E.pseudoElements.definitions;if(a)if(Array.isArray(a))for(var oe=0,he=a;oe<he.length;oe++){var fe=he[oe];e.pseudoElements[fe]||(e.pseudoElements[fe]=[]),e.pseudoElements[fe].includes(Q)||e.pseudoElements[fe].push(Q)}else for(var G=0,_=Object.values(a);G<_.length;G++)for(var d=_[G],Ee=0,ue=d;Ee<ue.length;Ee++){var I=ue[Ee];e.pseudoElements[I]||(e.pseudoElements[I]=[]),e.pseudoElements[I].includes(Q)||e.pseudoElements[I].push(Q)}}}return e}var Kd=Hv();function ui(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="-"||e==="_"||e==="\\"||e>=" "}function Qd(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="-"||e==="_"||e>=" "}function li(e){return e>="a"&&e<="f"||e>="A"&&e<="F"||e>="0"&&e<="9"}var Uv={" ":!0," ":!0,"\n":!0,"\r":!0,"\f":!0},zv={'"':!0,"'":!0},Co={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0},$v=6,So="css-selector-parser parse error: ";function qv(e){e===void 0&&(e={});var t=e.syntax,n=t===void 0?"latest":t,r=e.substitutes,i=e.strict,s=i===void 0?!0:i,a=e.modules,o=typeof n=="object"?n:fu[n];if(o.baseSyntax&&(o=er(fu[o.baseSyntax],o)),o.modules&&o.modules.length>0)for(var u=0,l=o.modules;u<l.length;u++){var d=l[u],c=ra[d];c&&(o=er(c,o))}if(a&&a.length>0)for(var m=0,p=a;m<p.length;m++){var g=p[m],c=ra[g];c&&(o=er(c,o))}var b=o.tag?[!0,!!Fv(o.tag).wildcard]:[!1,!1],T=b[0],y=b[1],C=!!o.ids,S=!!o.classNames,N=!!o.namespace,D=o.namespace&&(o.namespace===!0||o.namespace.wildcard===!0);if(N&&!T)throw new Error("".concat(So,"Namespaces cannot be enabled while tags are disabled."));var w=!!r,B=o.combinators?qd(o.combinators):_s,V=o.attributes?[!0,o.attributes.operators?qd(o.attributes.operators):_s,o.attributes.caseSensitivityModifiers?Pv(o.attributes.caseSensitivityModifiers):cu,o.attributes.unknownCaseSensitivityModifiers==="accept"]:[!1,_s,cu,!1],Q=V[0],E=V[1],L=V[2],O=V[3],z=O||Object.keys(L).length>0,M=o.pseudoClasses?[!0,o.pseudoClasses.definitions?Wd(o.pseudoClasses.definitions):ms,o.pseudoClasses.unknown==="accept"]:[!1,ms,!1],J=M[0],oe=M[1],he=M[2],fe=o.pseudoElements?[!0,o.pseudoElements.notation==="singleColon"||o.pseudoElements.notation==="both",!o.pseudoElements.notation||o.pseudoElements.notation==="doubleColon"||o.pseudoElements.notation==="both",o.pseudoElements.definitions?Wd(Array.isArray(o.pseudoElements.definitions)?{NoArgument:o.pseudoElements.definitions}:o.pseudoElements.definitions):ms,o.pseudoElements.unknown==="accept"]:[!1,!1,!1,ms,!1],G=fe[0],_=fe[1],Ee=fe[2],ue=fe[3],I=fe[4],de="",pe=de.length,q=0,re="",te=function(K){return re===K},we=function(){return te("*")||ui(re)},ne=function(K){q=K,re=de.charAt(q)},U=function(){q++,re=de.charAt(q)},xe=function(){var K=re;return q++,re=de.charAt(q),K};function je(K){var ie=Math.min(pe-1,q),ae=new Error("".concat(So).concat(K," Pos: ").concat(ie,"."));throw ae.position=ie,ae.name="ParserError",ae}function ce(K,ie){if(!K)return je(ie)}var zt=function(){ce(q<pe,"Unexpected end of input.")},yt=function(){return q>=pe},Ce=function(K){ce(q<pe,'Expected "'.concat(K,'" but end of input reached.')),ce(re===K,'Expected "'.concat(K,'" but "').concat(re,'" found.')),q++,re=de.charAt(q)};function st(K){var ie=at(K,q);if(ie)return q+=ie.length,re=de.charAt(q),ie}function at(K,ie){var ae=de.charAt(ie),be=K[ae];if(be){var Nt=at(be.chars,ie+1);if(Nt)return Nt;if(be.self)return be.self}}function Xe(){for(var K=xe(),ie=1;li(re)&&ie<$v;)K+=xe(),ie++;return Zr(),String.fromCharCode(parseInt(K,16))}function rn(K){var ie="";for(Ce(K);q<pe;){if(te(K))return U(),ie;te("\\")?(U(),te(K)?(ie+=K,U()):re===`
154
154
  `||re==="\f"?U():re==="\r"?(U(),te(`
155
155
  `)&&U()):li(re)?ie+=Xe():(ie+=re,U())):(ie+=re,U())}return ie}function se(){if(!ui(re))return null;for(var K="";te("-");)K+=re,U();for(K==="-"&&!Qd(re)&&!te("\\")&&je("Identifiers cannot consist of a single hyphen."),s&&K.length>=2&&je("Identifiers cannot start with two hyphens with strict mode on."),Co[re]&&je("Identifiers cannot start with hyphens followed by digits.");q<pe;)if(Qd(re))K+=xe();else if(te("\\"))U(),zt(),li(re)?K+=Xe():K+=xe();else break;return K}function Xr(){for(var K="";q<pe&&!te(")");)if(te("\\")){if(U(),yt()&&!s)return(K+"\\").trim();zt(),li(re)?K+=Xe():K+=xe()}else K+=xe();return K.trim()}function Zr(){if(re===" "||re===" "||re==="\f"||re===`
156
156
  `){U();return}re==="\r"&&U(),re===`
157
- `&&U()}function ze(){for(;Nv[re];)U()}function H(K){K===void 0&&(K=!1),ze();for(var ie=[$t(K)];te(",");)U(),ze(),ie.push($t(K));return{type:"Selector",rules:ie}}function ee(){Ce("["),ze();var K;if(te("|")){ce(P,"Namespaces are not enabled."),U();var ie=se();ce(ie,"Expected attribute name."),K={type:"Attribute",name:ie,namespace:{type:"NoNamespace"}}}else if(te("*")){ce(P,"Namespaces are not enabled."),ce(D,"Wildcard namespace is not enabled."),U(),Ce("|");var ae=se();ce(ae,"Expected attribute name."),K={type:"Attribute",name:ae,namespace:{type:"WildcardNamespace"}}}else{var be=se();if(ce(be,"Expected attribute name."),K={type:"Attribute",name:be},te("|")){var Pt=q;if(U(),ui(re)){ce(P,"Namespaces are not enabled.");var Dn=se();ce(Dn,"Expected attribute name."),K={type:"Attribute",name:Dn,namespace:{type:"NamespaceName",name:be}}}else ne(Pt)}}if(ce(K.name,"Expected attribute name."),ze(),yt()&&!s)return K;if(te("]"))U();else{if(K.operator=st(E),ce(K.operator,"Expected a valid attribute selector operator."),ze(),zt(),Rv[re])K.value={type:"String",value:rn(re)};else if(w&&te("$")){U();var wn=se();ce(wn,"Expected substitute name."),K.value={type:"Substitution",name:wn}}else{var Pn=se();ce(Pn,"Expected attribute value."),K.value={type:"String",value:Pn}}if(ze(),yt()&&!s)return K;if(!te("]")){var Jt=se();if(ce(Jt,"Expected end of attribute selector."),K.caseSensitivityModifier=Jt,ce(z,"Attribute case sensitivity modifiers are not enabled."),ce(O||L[K.caseSensitivityModifier],"Unknown attribute case sensitivity modifier."),ze(),yt()&&!s)return K}Ce("]")}return K}function ge(){for(var K="";Co[re];)K+=xe();return ce(K!=="","Formula parse error."),parseInt(K)}var Se=function(){return te("-")||te("+")||Co[re]};function ve(){if(te("e")||te("o")){var K=se();if(K==="even")return ze(),[2,0];if(K==="odd")return ze(),[2,1]}var ie=null,ae=1;if(te("-")&&(U(),ae=-1),Se()&&(te("+")&&U(),ie=ge(),!te("\\")&&!te("n")))return[0,ie*ae];ie===null&&(ie=1),ie*=ae;var be;if(te("\\")?(U(),li(re)?be=Xe():be=xe()):be=xe(),ce(be==="n",'Formula parse error: expected "n".'),ze(),te("+")||te("-")){var Pt=te("+")?1:-1;return U(),ze(),[ie,Pt*ge()]}else return[ie,0]}function Tt(K,ie,ae){var be;if(te("(")){if(U(),ze(),w&&te("$")){U();var Pt=se();ce(Pt,"Expected substitute name."),be={type:"Substitution",name:Pt}}else if(ae.type==="String")be={type:"String",value:Xr()},ce(be.value,"Expected ".concat(ie," argument value."));else if(ae.type==="Selector")be=H(!0);else if(ae.type==="Formula"){var Dn=ve(),wn=Dn[0],Pn=Dn[1];if(be={type:"Formula",a:wn,b:Pn},ae.ofSelector&&(ze(),te("o")||te("\\"))){var Jt=se();ce(Jt==="of","Formula of selector parse error."),ze(),be={type:"FormulaOfSelector",a:wn,b:Pn,selector:$t()}}}else return je("Invalid ".concat(ie," signature."));if(ze(),yt()&&!s)return be;Ce(")")}else ce(ae.optional,"Argument is required for ".concat(ie,' "').concat(K,'".'));return be}function ct(){if(te("*"))return ce(y,"Wildcard tag name is not enabled."),U(),{type:"WildcardTag"};if(ui(re)){ce(T,"Tag names are not enabled.");var K=se();return ce(K,"Expected tag name."),{type:"TagName",name:K}}else return je("Expected tag name.")}function wt(){if(te("*")){var K=q;if(U(),!te("|")||(U(),!we()))return ne(K),ct();ce(P,"Namespaces are not enabled."),ce(D,"Wildcard namespace is not enabled.");var ie=ct();return ie.namespace={type:"WildcardNamespace"},ie}else if(te("|")){ce(P,"Namespaces are not enabled."),U();var ie=ct();return ie.namespace={type:"NoNamespace"},ie}else if(ui(re)){var ae=se();if(ce(ae,"Expected tag name."),!te("|"))return ce(T,"Tag names are not enabled."),{type:"TagName",name:ae};var K=q;if(U(),!we())return ne(K),{type:"TagName",name:ae};ce(P,"Namespaces are not enabled.");var ie=ct();return ie.namespace={type:"NamespaceName",name:ae},ie}else return je("Expected tag name.")}function $t(K){var ie,ae;K===void 0&&(K=!1);var be={type:"Rule",items:[]};if(K){var Pt=st(B);Pt&&(be.combinator=Pt,ze())}for(;q<pe;)if(we())ce(be.items.length===0,"Unexpected tag/namespace start."),be.items.push(wt());else if(te("|")){var Dn=q;if(U(),we())ce(be.items.length===0,"Unexpected tag/namespace start."),ne(Dn),be.items.push(wt());else{ne(Dn);break}}else if(te(".")){ce(S,"Class names are not enabled."),U();var wn=se();ce(wn,"Expected class name."),be.items.push({type:"ClassName",name:wn})}else if(te("#")){ce(C,"IDs are not enabled."),U();var Pn=se();ce(Pn,"Expected ID name."),be.items.push({type:"Id",name:Pn})}else if(te("["))ce(Q,"Attributes are not enabled."),be.items.push(ee());else if(te(":")){var Jt=!1,Nl=!1;U(),te(":")&&(ce(G,"Pseudo elements are not enabled."),ce(Ee,"Pseudo elements double colon notation is not enabled."),Jt=!0,U());var It=se();if(ce(Jt||It,"Expected pseudo-class name."),ce(!Jt||It,"Expected pseudo-element name."),ce(It,"Expected pseudo-class name."),!(!Jt||I||Object.prototype.hasOwnProperty.call(ue,It))){var Un=Kd.pseudoElements[It],Jr='Unknown pseudo-element "'.concat(It,'"');Un&&Un.length>0&&(Jr+=". It is defined in: ".concat(Un.join(", "))),je(Jr+".")}if(Nl=G&&(Jt||!Jt&&_&&Object.prototype.hasOwnProperty.call(ue,It)),Nl){var ts=(ie=ue[It])!==null&&ie!==void 0?ie:I&&Vd,Rl={type:"PseudoElement",name:It},zn=Tt(It,"pseudo-element",ts);zn&&(ce(zn.type!=="Formula"&&zn.type!=="FormulaOfSelector","Pseudo-elements cannot have formula argument."),Rl.argument=zn),be.items.push(Rl)}else{ce(J,"Pseudo-classes are not enabled.");var ts=(ae=oe[It])!==null&&ae!==void 0?ae:he&&Vd;if(!ts){var Un=Kd.pseudoClasses[It],Jr='Unknown pseudo-class: "'.concat(It,'"');Un&&Un.length>0&&(Jr+=". It is defined in: ".concat(Un.join(", "))),je(Jr+".")}var zn=Tt(It,"pseudo-class",ts),Ll={type:"PseudoClass",name:It};zn&&(Ll.argument=zn),be.items.push(Ll)}}else break;if(be.items.length===0)return yt()?je("Expected rule but end of input reached."):je('Expected rule but "'.concat(re,'" found.'));if(ze(),!yt()&&!te(",")&&!te(")")){var Pt=st(B);ze(),be.nestedRule=$t(),be.nestedRule.combinator=Pt}return be}return function(K){if(typeof K!="string")throw new Error("".concat(So,"Expected string input."));return de=K,pe=de.length,q=0,re=de.charAt(0),H()}}const Fv=Ov({syntax:"selectors-4"});function Mv(e){if(typeof e!="string")throw new TypeError("Expected `string` as selector, not `"+e+"`");return Fv(e)}const n0="֑-߿יִ-﷽ﹰ-ﻼ",r0="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",Bv=new RegExp("^[^"+r0+"]*["+n0+"]"),jv=new RegExp("^[^"+n0+"]*["+r0+"]");function Hv(e){const t=String(e||"");return Bv.test(t)?"rtl":jv.test(t)?"ltr":"neutral"}function i0(e){return"children"in e?s0(e):"value"in e?e.value:""}function Uv(e){return e.type==="text"?e.value:"children"in e?s0(e):""}function s0(e){let t=-1;const n=[];for(;++t<e.children.length;)n[t]=Uv(e.children[t]);return n.join("")}function zv(e,t){const n=e.schema,r=e.language,i=e.direction,s=e.editableOrEditingHost;let a;if(t.type==="element"){const l=t.properties.xmlLang||t.properties.lang,d=t.properties.type||"text",c=Xd(t);l!=null&&(e.language=String(l)),n&&n.space==="html"?(t.properties.contentEditable==="true"&&(e.editableOrEditingHost=!0),t.tagName==="svg"&&(e.schema=In),c==="rtl"?a=c:c==="ltr"||c!=="auto"&&t.tagName==="html"||c!=="auto"&&t.tagName==="input"&&d==="tel"?a="ltr":(c==="auto"||t.tagName==="bdi")&&(t.tagName==="textarea"?a=Ao(i0(t)):t.tagName==="input"&&(d==="email"||d==="search"||d==="tel"||d==="text")?a=t.properties.value?Ao(String(t.properties.value)):"ltr":Lt(t,u)),a&&(e.direction=a)):e.editableOrEditingHost&&(e.editableOrEditingHost=!1)}return o;function o(){e.schema=n,e.language=r,e.direction=i,e.editableOrEditingHost=s}function u(l){if(l.type==="text")return a=Ao(l.value),a?Zs:void 0;if(l!==t&&l.type==="element"&&(l.tagName==="bdi"||l.tagName==="script"||l.tagName==="style"||l.tagName==="textare"||Xd(l)))return Ti}}function Ao(e){const t=Hv(e);return t==="neutral"?void 0:t}function Xd(e){const t=e.type==="element"&&typeof e.properties.dir=="string"?e.properties.dir.toLowerCase():void 0;return t==="auto"||t==="ltr"||t==="rtl"?t:void 0}function $v(e,t,n){const r=Gi(n,e.name),i=t.properties[r.property];let s=qv(i,r);if(!e.value)return s!==void 0;e.value.type;let a=e.value.value;if(e.caseSensitivityModifier==="i"&&(a=a.toLowerCase(),s&&(s=s.toLowerCase())),s!==void 0)switch(e.operator){case"=":return a===s;case"$=":return a===s.slice(-a.length);case"*=":return s.includes(a);case"^=":return a===s.slice(0,a.length);case"|=":return a===s||a===s.slice(0,a.length)&&s.charAt(a.length)==="-";case"~=":return a===s||$o(s).includes(a)}return!1}function qv(e,t){if(e!=null)if(typeof e=="boolean"){if(e)return t.attribute}else if(Array.isArray(e)){if(e.length>0)return(t.commaSeparated?Ea:xa)(e)}else return String(e)}const Vv=[];function Wv(e,t){return(t.properties.className||Vv).includes(e.name)}function Gv(e,t){return t.properties.id===e.name}function Yv(e,t){return e.name===t.tagName}function Kv(e,t){return function(n,r){let i=Zd(n,"tag");const s=Zd(r??"*","range"),a=[];let o=-1;for(;++o<s.length;){const u=s[o].toLowerCase();if(!t&&u==="*")continue;let l=-1;const d=[];for(;++l<i.length;)if(e(i[l].toLowerCase(),u)){if(!t)return i[l];a.push(i[l])}else d.push(i[l]);i=d}return t?a:void 0}}const Qv=Kv(function(e,t){const n=e.split("-"),r=t.split("-");let i=0,s=0;if(r[s]!=="*"&&n[i]!==r[s])return!1;for(i++,s++;s<r.length;){if(r[s]==="*"){s++;continue}if(!n[i])return!1;if(n[i]===r[s]){i++,s++;continue}if(n[i].length===1)return!1;i++}return!0},!0);function Zd(e,t){const n=e&&typeof e=="string"?[e]:e;if(!n||typeof n!="object"||!("length"in n))throw new Error("Invalid "+t+" `"+n+"`, expected non-empty string");return n}const Xv={}.hasOwnProperty;function sr(e,t){const n=e.type==="element"&&Xv.call(e.properties,t)&&e.properties[t];return n!=null&&n!==!1}const Zv=new Set([9,10,12,13,32]),Jd=48,Jv=57;function e8(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,n=0,r=s(),i=a();if(t<e.length&&e.charAt(t)==="n"&&(t++,n=r*(i??1),o(),t<e.length?(r=s(),o(),i=a()):r=i=0),i===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[n,r*i];function s(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function a(){const u=t;let l=0;for(;t<e.length&&e.charCodeAt(t)>=Jd&&e.charCodeAt(t)<=Jv;)l=l*10+(e.charCodeAt(t)-Jd),t++;return t===u?null:l}function o(){for(;t<e.length&&Zv.has(e.charCodeAt(t));)t++}}var ko,eh;function t8(){return eh||(eh=1,ko={trueFunc:function(){return!0},falseFunc:function(){return!1}}),ko}var n8=t8();const th=sa(n8);function r8(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return th.falseFunc;if(t===-1)return s=>s<=n;if(t===0)return s=>s===n;if(t===1)return n<0?th.trueFunc:s=>s>=n;const r=Math.abs(t),i=(n%r+r)%r;return t>1?s=>s>=n&&s%r===i:s=>s<=n&&s%r===i}function nh(e){return r8(e8(e))}const i8=nh.default||nh,s8=ba("name",{handlers:{"any-link":a8,blank:o8,checked:u8,dir:l8,disabled:a0,empty:c8,enabled:d8,"first-child":h8,"first-of-type":f8,has:p8,is:o0,lang:g8,"last-child":b8,"last-of-type":E8,not:x8,"nth-child":y8,"nth-last-child":T8,"nth-last-of-type":C8,"nth-of-type":S8,"only-child":A8,"only-of-type":k8,optional:I8,"read-only":_8,"read-write":u0,required:l0,root:v8,scope:D8},invalid:m8,unknown:w8});function a8(e,t){return(t.tagName==="a"||t.tagName==="area"||t.tagName==="link")&&sr(t,"href")}function hn(e,t){if(e.shallow)throw new Error("Cannot use `:"+t.name+"` without parent")}function o8(e,t){return!c0(t,n);function n(r){return r.type==="element"||r.type==="text"&&!Yi(r)}}function u8(e,t){return t.tagName==="input"||t.tagName==="menuitem"?!!((t.properties.type==="checkbox"||t.properties.type==="radio")&&sr(t,"checked")):t.tagName==="option"?sr(t,"selected"):!1}function l8(e,t,n,r,i){return e.argument,e.argument.type,i.direction===e.argument.value}function a0(e,t){return(t.tagName==="button"||t.tagName==="input"||t.tagName==="select"||t.tagName==="textarea"||t.tagName==="optgroup"||t.tagName==="option"||t.tagName==="menuitem"||t.tagName==="fieldset")&&sr(t,"disabled")}function c8(e,t){return!c0(t,n);function n(r){return r.type==="element"||r.type==="text"}}function d8(e,t){return!a0(e,t)}function h8(e,t,n,r,i){return hn(i,e),i.elementIndex===0}function f8(e,t,n,r,i){return hn(i,e),i.typeIndex===0}function Fa(e){let t=e._cachedFn;if(!t){const n=e.argument;if(n.type!=="Formula")throw new Error("Expected `nth` formula, such as `even` or `2n+1` (`of` is not yet supported)");t=i8(n.a+"n+"+n.b),e._cachedFn=t}return t}function p8(e,t,n,r,i){e.argument,e.argument.type;const s={...i,found:!1,one:!0,results:[],rootQuery:e.argument,scopeElements:[t],shallow:!1};return Sl(s,{type:"root",children:t.children}),s.results.length>0}function m8(){}function o0(e,t,n,r,i){e.argument,e.argument.type;const s={...i,found:!1,one:!0,results:[],rootQuery:e.argument,scopeElements:[t],shallow:!1};return Sl(s,t),s.results[0]===t}function g8(e,t,n,r,i){return e.argument,e.argument.type,i.language!==""&&i.language!==void 0&&Qv(i.language,zo(e.argument.value)).length>0}function b8(e,t,n,r,i){return hn(i,e),!!(i.elementCount&&i.elementIndex===i.elementCount-1)}function E8(e,t,n,r,i){return hn(i,e),typeof i.typeIndex=="number"&&typeof i.typeCount=="number"&&i.typeIndex===i.typeCount-1}function x8(e,t,n,r,i){return!o0(e,t,n,r,i)}function y8(e,t,n,r,i){const s=Fa(e);return hn(i,e),typeof i.elementIndex=="number"&&s(i.elementIndex)}function T8(e,t,n,r,i){const s=Fa(e);return hn(i,e),!!(typeof i.elementCount=="number"&&typeof i.elementIndex=="number"&&s(i.elementCount-i.elementIndex-1))}function C8(e,t,n,r,i){const s=Fa(e);return hn(i,e),typeof i.typeCount=="number"&&typeof i.typeIndex=="number"&&s(i.typeCount-1-i.typeIndex)}function S8(e,t,n,r,i){const s=Fa(e);return hn(i,e),typeof i.typeIndex=="number"&&s(i.typeIndex)}function A8(e,t,n,r,i){return hn(i,e),i.elementCount===1}function k8(e,t,n,r,i){return hn(i,e),i.typeCount===1}function I8(e,t){return!l0(e,t)}function _8(e,t,n,r,i){return!u0(e,t,n,r,i)}function u0(e,t,n,r,i){return t.tagName==="input"||t.tagName==="textarea"?!sr(t,"readOnly")&&!sr(t,"disabled"):!!i.editableOrEditingHost}function l0(e,t){return(t.tagName==="input"||t.tagName==="textarea"||t.tagName==="select")&&sr(t,"required")}function v8(e,t,n,r,i){return!!((!r||r.type==="root")&&i.schema&&(i.schema.space==="html"||i.schema.space==="svg")&&(t.tagName==="html"||t.tagName==="svg"))}function D8(e,t,n,r,i){return i.scopeElements.includes(t)}function c0(e,t){const n=e.children;let r=-1;for(;++r<n.length;)if(t(n[r]))return!0;return!1}function w8(e){const t=e;throw new Error("Unknown pseudo-selector `"+t.name+"`")}function P8(e,t,n,r,i){for(const s of e.items)if(s.type==="Attribute"){if(!$v(s,t,i.schema))return!1}else if(s.type==="Id"){if(!Gv(s,t))return!1}else if(s.type==="ClassName"){if(!Wv(s,t))return!1}else if(s.type==="PseudoClass"){if(!s8(s,t,n,r,i))return!1}else{if(s.type==="PseudoElement")throw new Error("Invalid selector: `::"+s.name+"`");if(s.type==="TagName"&&!Yv(s,t))return!1}return!0}const N8=[];function Sl(e,t){t&&d0(e,[],t,void 0,void 0,t)}function Io(e,t,n){const r=e[t];r?r.push(n):e[t]=[n]}function R8(e,t,n,r){const i=vs(t.descendant,t.directChild);let s,a=-1;const o={count:0,types:new Map},u={count:0,types:new Map};for(;++a<n.children.length;)rh(o,n.children[a]);for(a=-1;++a<n.children.length;){const l=n.children[a],d=l.type==="element"?l.tagName.toUpperCase():void 0;if(e.elementIndex=u.count,e.typeIndex=d&&u.types.get(d)||0,e.elementCount=o.count,e.typeCount=d?o.types.get(d):0,"children"in l){const c=vs(i,s),m=d0(e,c,n.children[a],a,n,r);s=vs(m.generalSibling,m.adjacentSibling)}if(e.one&&e.found)break;rh(u,n.children[a])}}function L8(e,t,n,r,i){const s={adjacentSibling:void 0,descendant:void 0,directChild:void 0,generalSibling:void 0};let a=-1;for(;++a<t.length;){const o=t[a];if(e.one&&e.found)break;if(e.shallow&&o.nestedRule)throw new Error("Expected selector without nesting");if(P8(o,n,r,i,e)){const u=o.nestedRule;if(u){const l=u.combinator==="+"?"adjacentSibling":u.combinator==="~"?"generalSibling":u.combinator===">"?"directChild":"descendant";Io(s,l,u)}else e.found=!0,e.results.includes(n)||e.results.push(n)}o.combinator===void 0?Io(s,"descendant",o):o.combinator==="~"&&Io(s,"generalSibling",o)}return s}function vs(e,t){return e&&t&&e.length>0&&t.length>0?[...e,...t]:e&&e.length>0?e:t&&t.length>0?t:N8}function rh(e,t){if(t.type==="element"){const n=t.tagName.toUpperCase(),r=(e.types.get(n)||0)+1;e.count++,e.types.set(n,r)}}function d0(e,t,n,r,i,s){let a={adjacentSibling:void 0,descendant:void 0,directChild:void 0,generalSibling:void 0};const o=zv(e,n);if(n.type==="element"){let u=e.rootQuery.rules;i&&i!==s&&(u=e.rootQuery.rules.filter(l=>l.combinator===void 0||l.combinator===">"&&i===s)),a=L8(e,vs(t,u),n,r,i)}return"children"in n&&!e.shallow&&!(e.one&&e.found)&&R8(e,a,n,s),o(),a}function O8(e,t,n){const r=F8(e,t);return Sl(r,t||void 0),r.results}function F8(e,t,n){return{direction:"ltr",editableOrEditingHost:!1,elementCount:void 0,elementIndex:void 0,found:!1,language:void 0,one:!1,results:[],rootQuery:Mv(e),schema:Ur,scopeElements:t?t.type==="root"?t.children:[t]:[],shallow:!1,typeIndex:void 0,typeCount:void 0}}const h0=(e=[],t="")=>(e.forEach(n=>{n.type==="text"?t+=n.value:n.type==="element"&&n.children&&Array.isArray(n.children)&&(t+=h0(n.children))}),t),M8=e=>{const{selector:t,rewrite:n}=e||{};return r=>{if(!(!n||typeof n!="function")){if(t&&typeof t=="string"){const i=O8(t,r);i&&i.length>0&&Lt(r,i,(s,a,o)=>{n(s,a,o)});return}Lt(r,(i,s,a)=>{n(i,s,a)})}}},B8=(e="")=>(e.match(/([^?=&]+)(=([^&]*))/g)||[]).reduce((t,n)=>(t[n.slice(0,n.indexOf("="))]=n.slice(n.indexOf("=")+1),t),{}),j8=(e=[],t)=>{let n=t;for(;n>-1;){if(n--,!e[n])return;if(e[n]&&e[n].value&&e[n].value.replace(/(\n|\s)/g,"")!==""||e[n].type!=="text")return!/^rehype:/.test(e[n].value)||e[n].type!=="comment"?void 0:e[n]}},f0=(e=[],t,n,r)=>{let i=t;for(;i<e.length;)if(i++,n){const s=e[i];if(s&&s.value&&s.value.replace(/(\n|\s)/g,"")!==""||e[i]&&e[i].type==="element")return s.tagName===n?s:void 0}else{const s=e[i];if(!s||s.type==="element"||s.type==="text"&&s.value.replace(/(\n|\s)/g,"")!=="")return;if(s.type&&/^(comment|raw)$/ig.test(s.type))return s.value&&!/^rehype:/.test(s.value.replace(/^(\s+)?<!--(.*?)-->/,"$2")||"")?void 0:r?f0(e,i,"pre",r)?void 0:(s.value=(s.value||"").replace(/^(\n|\s)+/,""),s):(s.value=(s.value||"").replace(/^(\n|\s)+/,""),s)}},ih=({value:e=""})=>{const t=B8(e.replace(/^<!--(.*?)-->/,"$1").replace(/^rehype:/,""));return Object.keys(t).forEach(n=>{t[n]==="true"&&(t[n]=!0),t[n]==="false"&&(t[n]=!1),typeof t[n]=="string"&&!/^0/.test(t[n])&&!isNaN(+t[n])&&(t[n]=+t[n])}),t},sh=(e,t,n)=>n==="string"?{...e,"data-config":JSON.stringify({...t,rehyp:!0})}:n==="attr"?{...e,...t}:{...e,"data-config":{...t,rehyp:!0}},H8=(e={})=>{const{properties:t="data",codeBlockParames:n=!0}=e;return r=>{Lt(r,"element",(i,s,a)=>{if(n&&i.tagName==="pre"&&i&&Array.isArray(i.children)&&a&&Array.isArray(a.children)&&a.children.length>1){const o=i.children[0];if(o&&o.tagName==="code"&&typeof s=="number"){const u=j8(a.children,s);if(u){const l=ih(u);Object.keys(l).length>0&&(i.properties={...i.properties,"data-type":"rehyp"},o.properties=sh(o.properties,l,t))}}}if(/^(em|strong|b|a|i|p|pre|kbd|blockquote|h(1|2|3|4|5|6)|code|table|img|del|ul|ol)$/.test(i.tagName)&&a&&Array.isArray(a.children)&&typeof s=="number"){const o=f0(a.children,s,"",n);if(o){const u=ih(o);Object.keys(u).length>0&&(i.properties=sh(i.properties,u,t))}}})}};var U8=function(t){return n=>{Lt(n,r=>{r.type==="element"&&r.tagName==="code"&&r.data&&r.data.meta&&(r.properties=Sn({},r.properties,{"data-meta":String(r.data.meta)}))})}},z8=function(t){return n=>{Lt(n,r=>{if(r.type==="element"&&r.tagName==="code"&&r.properties&&r.properties.dataMeta){r.data||(r.data={});var i=r.properties.dataMeta;typeof i=="string"&&(r.data.meta=i),delete r.properties.dataMeta}})}};const $8=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,q8=Object.hasOwnProperty;class V8{constructor(){this.occurrences,this.reset()}slug(t,n){const r=this;let i=W8(t,n===!0);const s=i;for(;q8.call(r.occurrences,i);)r.occurrences[s]++,i=s+"-"+r.occurrences[s];return r.occurrences[i]=0,i}reset(){this.occurrences=Object.create(null)}}function W8(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace($8,"").replace(/ /g,"-"))}function p0(e){const t=e.type==="element"?e.tagName.toLowerCase():"",n=t.length===2&&t.charCodeAt(0)===104?t.charCodeAt(1):0;return n>48&&n<55?n-48:void 0}const G8={},ah=new V8;function Y8(e){const n=(e||G8).prefix||"";return function(r){ah.reset(),Lt(r,"element",function(i){p0(i)&&!i.properties.id&&(i.properties.id=n+ah.slug(i0(i)))})}}const m0=function(e){if(e==null)return X8;if(typeof e=="string")return Q8(e);if(typeof e=="object")return K8(e);if(typeof e=="function")return Al(e);throw new Error("Expected function, string, or array as `test`")};function K8(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=m0(e[n]);return Al(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function Q8(e){return Al(t);function t(n){return n.tagName===e}}function Al(e){return t;function t(n,r,i){return!!(Z8(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function X8(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function Z8(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const oh={type:"element",tagName:"span",properties:{className:["icon","icon-link"]},children:[]},J8={};function eD(e){const t=e||J8;let n=t.properties;const r=t.headingProperties,i=t.behavior||"prepend",s=t.content,a=t.group,o=m0(t.test);let u;return i==="after"||i==="before"?u=d:i==="wrap"?u=c:(u=l,n||(n={ariaHidden:"true",tabIndex:-1})),function(m){Lt(m,"element",function(p,g,b){if(p0(p)&&p.properties.id&&o(p,g,b))return Object.assign(p.properties,bs(r,p)),u(p,g,b)})};function l(m){const p=uh(s||oh,m);return m.children[i==="prepend"?"unshift":"push"](_o(m,bs(n,m),p)),[Ti]}function d(m,p,g){if(typeof p!="number"||!g)return;const b=uh(s||oh,m),T=_o(m,bs(n,m),b);let y=i==="before"?[T,m]:[m,T];if(a){const C=g0(a,m);C&&!Array.isArray(C)&&C.type==="element"&&(C.children=y,y=[C])}return g.children.splice(p,1,...y),[Ti,p+y.length]}function c(m){let p=m.children,g=[];return typeof s=="function"?(p=[],g=s(m)):s&&(g=kl(s)),m.children=[_o(m,bs(n,m),Array.isArray(g)?[...p,...g]:[...p,g])],[Ti]}}function kl(e){return ir(e)}function _o(e,t,n){return{type:"element",tagName:"a",properties:{...t,href:"#"+e.properties.id},children:n}}function uh(e,t){const n=g0(e,t);return Array.isArray(n)?n:[n]}function g0(e,t){return typeof e=="function"?e(t):kl(e)}function bs(e,t){return typeof e=="function"?e(t):e?kl(e):{}}const tD=(e={})=>{const{openDelimiter:t="rehype:ignore:start",closeDelimiter:n="rehype:ignore:end"}=e;return r=>{Lt(r,(i,s,a)=>{if(i.type==="element"||i.type==="root"){let o=!1;i.children=i.children.filter(u=>{if(u.type==="raw"||u.type==="comment"){let l=(u.value||"").trim();if(l=l.replace(/^<!--(.*?)-->/,"$1"),l===t)return o=!0,!1;if(l===n)return o=!1,!1}return!o})}})}};var nD={type:"element",tagName:"svg",properties:{className:"octicon octicon-link",viewBox:"0 0 16 16",version:"1.1",width:"16",height:"16",ariaHidden:"true"},children:[{type:"element",tagName:"path",children:[],properties:{fillRule:"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"}}]};function rD(e){return e===void 0&&(e=""),{type:"element",tagName:"div",properties:{class:"copied","data-code":e},children:[{type:"element",tagName:"svg",properties:{className:"octicon-copy",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"},children:[]},{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"},children:[]}]},{type:"element",tagName:"svg",properties:{className:"octicon-check",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"},children:[]}]}]}}var iD=(e,t)=>(n,r,i)=>{if(n.type==="element"&&i&&i.type==="root"&&/h(1|2|3|4|5|6)/.test(n.tagName)){var s=n.children&&n.children[0];s&&s.properties&&s.properties.ariaHidden==="true"&&(s.properties=Sn({class:"anchor"},s.properties),s.children=[nD])}if(n.type==="element"&&n.tagName==="pre"&&!e){var a=h0(n.children);n.children.push(rD(a))}t&&t(n,r===null?void 0:r,i===null?void 0:i)},sD=[Y8,eD,tD];const b0=N.forwardRef((e,t)=>{var n,r=[U8,Qm,z8,...sD,[M8,{rewrite:iD((n=e.disableCopy)!=null?n:!1,e.rehypeRewrite)}],[H8,{properties:"attr"}],...e.rehypePlugins||[]];return h.jsx(Tv,Sn({},e,{rehypePlugins:r,ref:t}))});function aD(e,t){return De({},e,t)}var Yr=N.createContext({markdown:""});function E0(e,t){return e===void 0&&(e=[]),t===void 0&&(t={}),e.forEach(n=>{n.children&&Array.isArray(n.children)?t=De({},t,E0(n.children||[])):n.keyCommand&&n.shortcuts&&n.execute&&(t[n.shortcuts.toLocaleLowerCase()]=n)}),t}function x0(e,t,n,r,i){t===void 0&&(t=[]);var s=E0(t||[]),a=[];if(e.altKey&&a.push("alt"),e.shiftKey&&a.push("shift"),e.metaKey&&a.push("cmd"),e.ctrlKey&&a.push("ctrl"),a.length>0&&!/(control|alt|meta|shift)/.test(e.key.toLocaleLowerCase())&&a.push(e.key.toLocaleLowerCase()),/escape/.test(e.key.toLocaleLowerCase())&&a.push("escape"),!(a.length<1)){var o=!!s[a.join("+")],u=o?s[a.join("+")]:void 0;if(Object.keys(s).forEach(l=>{var d=l.split("+").every(c=>/ctrlcmd/.test(c)?a.includes("ctrl")||a.includes("cmd"):a.includes(c));d&&(u=s[l])}),u&&n){e.stopPropagation(),e.preventDefault(),n.executeCommand(u,r,i,a);return}}}var vo;function lh(e){if(e.nodeName!=="TEXTAREA")return!1;if(typeof vo>"u"){var t=document.createElement("textarea");t.value="1",vo=!!t.firstChild}return vo}function wr(e,t){if(e.focus(),document.selection){var n=document.selection.createRange();n.text=t,n.collapse(!1),n.select();return}var r=!1;if(t!==""?r=document.execCommand&&document.execCommand("insertText",!1,t):r=document.execCommand&&document.execCommand("delete",!1),!r){var i=e.selectionStart,s=e.selectionEnd;if(typeof e.setRangeText=="function")e.setRangeText(t);else{var a=document.createRange(),o=document.createTextNode(t);if(lh(e)){var u=e.firstChild;if(!u)e.appendChild(o);else{for(var l=0,d=null,c=null;u&&(d===null||c===null);){var m=u.nodeValue.length;i>=l&&i<=l+m&&a.setStart(d=u,i-l),s>=l&&s<=l+m&&a.setEnd(c=u,s-l),l+=m,u=u.nextSibling}i!==s&&a.deleteContents()}}if(lh(e)&&a.commonAncestorContainer.nodeName==="#text")a.insertNode(o);else{var p=e.value;e.value=p.slice(0,i)+t+p.slice(s)}}e.setSelectionRange(i+t.length,i+t.length);var g=document.createEvent("UIEvent");g.initEvent("input",!0,!1),e.dispatchEvent(g)}}function Dt(e){var{text:t,selection:n,prefix:r,suffix:i=r}=e,s=n;if(t&&t.length&&n.start===n.end&&(s=oD(t,n.start)),s.start>=r.length&&s.end<=t.length-i.length){var a=t.slice(s.start-r.length,s.end+i.length);if(a.startsWith(r)&&a.endsWith(i))return{start:s.start-r.length,end:s.end+i.length}}return s}function _i(e){var{text:t,selection:n}=e,r=t.slice(0,n.start).lastIndexOf(`
157
+ `&&U()}function ze(){for(;Uv[re];)U()}function H(K){K===void 0&&(K=!1),ze();for(var ie=[$t(K)];te(",");)U(),ze(),ie.push($t(K));return{type:"Selector",rules:ie}}function ee(){Ce("["),ze();var K;if(te("|")){ce(N,"Namespaces are not enabled."),U();var ie=se();ce(ie,"Expected attribute name."),K={type:"Attribute",name:ie,namespace:{type:"NoNamespace"}}}else if(te("*")){ce(N,"Namespaces are not enabled."),ce(D,"Wildcard namespace is not enabled."),U(),Ce("|");var ae=se();ce(ae,"Expected attribute name."),K={type:"Attribute",name:ae,namespace:{type:"WildcardNamespace"}}}else{var be=se();if(ce(be,"Expected attribute name."),K={type:"Attribute",name:be},te("|")){var Nt=q;if(U(),ui(re)){ce(N,"Namespaces are not enabled.");var Dn=se();ce(Dn,"Expected attribute name."),K={type:"Attribute",name:Dn,namespace:{type:"NamespaceName",name:be}}}else ne(Nt)}}if(ce(K.name,"Expected attribute name."),ze(),yt()&&!s)return K;if(te("]"))U();else{if(K.operator=st(E),ce(K.operator,"Expected a valid attribute selector operator."),ze(),zt(),zv[re])K.value={type:"String",value:rn(re)};else if(w&&te("$")){U();var wn=se();ce(wn,"Expected substitute name."),K.value={type:"Substitution",name:wn}}else{var Nn=se();ce(Nn,"Expected attribute value."),K.value={type:"String",value:Nn}}if(ze(),yt()&&!s)return K;if(!te("]")){var Jt=se();if(ce(Jt,"Expected end of attribute selector."),K.caseSensitivityModifier=Jt,ce(z,"Attribute case sensitivity modifiers are not enabled."),ce(O||L[K.caseSensitivityModifier],"Unknown attribute case sensitivity modifier."),ze(),yt()&&!s)return K}Ce("]")}return K}function ge(){for(var K="";Co[re];)K+=xe();return ce(K!=="","Formula parse error."),parseInt(K)}var Se=function(){return te("-")||te("+")||Co[re]};function ve(){if(te("e")||te("o")){var K=se();if(K==="even")return ze(),[2,0];if(K==="odd")return ze(),[2,1]}var ie=null,ae=1;if(te("-")&&(U(),ae=-1),Se()&&(te("+")&&U(),ie=ge(),!te("\\")&&!te("n")))return[0,ie*ae];ie===null&&(ie=1),ie*=ae;var be;if(te("\\")?(U(),li(re)?be=Xe():be=xe()):be=xe(),ce(be==="n",'Formula parse error: expected "n".'),ze(),te("+")||te("-")){var Nt=te("+")?1:-1;return U(),ze(),[ie,Nt*ge()]}else return[ie,0]}function Tt(K,ie,ae){var be;if(te("(")){if(U(),ze(),w&&te("$")){U();var Nt=se();ce(Nt,"Expected substitute name."),be={type:"Substitution",name:Nt}}else if(ae.type==="String")be={type:"String",value:Xr()},ce(be.value,"Expected ".concat(ie," argument value."));else if(ae.type==="Selector")be=H(!0);else if(ae.type==="Formula"){var Dn=ve(),wn=Dn[0],Nn=Dn[1];if(be={type:"Formula",a:wn,b:Nn},ae.ofSelector&&(ze(),te("o")||te("\\"))){var Jt=se();ce(Jt==="of","Formula of selector parse error."),ze(),be={type:"FormulaOfSelector",a:wn,b:Nn,selector:$t()}}}else return je("Invalid ".concat(ie," signature."));if(ze(),yt()&&!s)return be;Ce(")")}else ce(ae.optional,"Argument is required for ".concat(ie,' "').concat(K,'".'));return be}function ct(){if(te("*"))return ce(y,"Wildcard tag name is not enabled."),U(),{type:"WildcardTag"};if(ui(re)){ce(T,"Tag names are not enabled.");var K=se();return ce(K,"Expected tag name."),{type:"TagName",name:K}}else return je("Expected tag name.")}function wt(){if(te("*")){var K=q;if(U(),!te("|")||(U(),!we()))return ne(K),ct();ce(N,"Namespaces are not enabled."),ce(D,"Wildcard namespace is not enabled.");var ie=ct();return ie.namespace={type:"WildcardNamespace"},ie}else if(te("|")){ce(N,"Namespaces are not enabled."),U();var ie=ct();return ie.namespace={type:"NoNamespace"},ie}else if(ui(re)){var ae=se();if(ce(ae,"Expected tag name."),!te("|"))return ce(T,"Tag names are not enabled."),{type:"TagName",name:ae};var K=q;if(U(),!we())return ne(K),{type:"TagName",name:ae};ce(N,"Namespaces are not enabled.");var ie=ct();return ie.namespace={type:"NamespaceName",name:ae},ie}else return je("Expected tag name.")}function $t(K){var ie,ae;K===void 0&&(K=!1);var be={type:"Rule",items:[]};if(K){var Nt=st(B);Nt&&(be.combinator=Nt,ze())}for(;q<pe;)if(we())ce(be.items.length===0,"Unexpected tag/namespace start."),be.items.push(wt());else if(te("|")){var Dn=q;if(U(),we())ce(be.items.length===0,"Unexpected tag/namespace start."),ne(Dn),be.items.push(wt());else{ne(Dn);break}}else if(te(".")){ce(S,"Class names are not enabled."),U();var wn=se();ce(wn,"Expected class name."),be.items.push({type:"ClassName",name:wn})}else if(te("#")){ce(C,"IDs are not enabled."),U();var Nn=se();ce(Nn,"Expected ID name."),be.items.push({type:"Id",name:Nn})}else if(te("["))ce(Q,"Attributes are not enabled."),be.items.push(ee());else if(te(":")){var Jt=!1,Pl=!1;U(),te(":")&&(ce(G,"Pseudo elements are not enabled."),ce(Ee,"Pseudo elements double colon notation is not enabled."),Jt=!0,U());var It=se();if(ce(Jt||It,"Expected pseudo-class name."),ce(!Jt||It,"Expected pseudo-element name."),ce(It,"Expected pseudo-class name."),!(!Jt||I||Object.prototype.hasOwnProperty.call(ue,It))){var Un=Kd.pseudoElements[It],Jr='Unknown pseudo-element "'.concat(It,'"');Un&&Un.length>0&&(Jr+=". It is defined in: ".concat(Un.join(", "))),je(Jr+".")}if(Pl=G&&(Jt||!Jt&&_&&Object.prototype.hasOwnProperty.call(ue,It)),Pl){var ts=(ie=ue[It])!==null&&ie!==void 0?ie:I&&Vd,Rl={type:"PseudoElement",name:It},zn=Tt(It,"pseudo-element",ts);zn&&(ce(zn.type!=="Formula"&&zn.type!=="FormulaOfSelector","Pseudo-elements cannot have formula argument."),Rl.argument=zn),be.items.push(Rl)}else{ce(J,"Pseudo-classes are not enabled.");var ts=(ae=oe[It])!==null&&ae!==void 0?ae:he&&Vd;if(!ts){var Un=Kd.pseudoClasses[It],Jr='Unknown pseudo-class: "'.concat(It,'"');Un&&Un.length>0&&(Jr+=". It is defined in: ".concat(Un.join(", "))),je(Jr+".")}var zn=Tt(It,"pseudo-class",ts),Ll={type:"PseudoClass",name:It};zn&&(Ll.argument=zn),be.items.push(Ll)}}else break;if(be.items.length===0)return yt()?je("Expected rule but end of input reached."):je('Expected rule but "'.concat(re,'" found.'));if(ze(),!yt()&&!te(",")&&!te(")")){var Nt=st(B);ze(),be.nestedRule=$t(),be.nestedRule.combinator=Nt}return be}return function(K){if(typeof K!="string")throw new Error("".concat(So,"Expected string input."));return de=K,pe=de.length,q=0,re=de.charAt(0),H()}}const Vv=qv({syntax:"selectors-4"});function Wv(e){if(typeof e!="string")throw new TypeError("Expected `string` as selector, not `"+e+"`");return Vv(e)}const a0="֑-߿יִ-﷽ﹰ-ﻼ",o0="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",Gv=new RegExp("^[^"+o0+"]*["+a0+"]"),Yv=new RegExp("^[^"+a0+"]*["+o0+"]");function Kv(e){const t=String(e||"");return Gv.test(t)?"rtl":Yv.test(t)?"ltr":"neutral"}function u0(e){return"children"in e?l0(e):"value"in e?e.value:""}function Qv(e){return e.type==="text"?e.value:"children"in e?l0(e):""}function l0(e){let t=-1;const n=[];for(;++t<e.children.length;)n[t]=Qv(e.children[t]);return n.join("")}function Xv(e,t){const n=e.schema,r=e.language,i=e.direction,s=e.editableOrEditingHost;let a;if(t.type==="element"){const l=t.properties.xmlLang||t.properties.lang,d=t.properties.type||"text",c=Xd(t);l!=null&&(e.language=String(l)),n&&n.space==="html"?(t.properties.contentEditable==="true"&&(e.editableOrEditingHost=!0),t.tagName==="svg"&&(e.schema=In),c==="rtl"?a=c:c==="ltr"||c!=="auto"&&t.tagName==="html"||c!=="auto"&&t.tagName==="input"&&d==="tel"?a="ltr":(c==="auto"||t.tagName==="bdi")&&(t.tagName==="textarea"?a=Ao(u0(t)):t.tagName==="input"&&(d==="email"||d==="search"||d==="tel"||d==="text")?a=t.properties.value?Ao(String(t.properties.value)):"ltr":Lt(t,u)),a&&(e.direction=a)):e.editableOrEditingHost&&(e.editableOrEditingHost=!1)}return o;function o(){e.schema=n,e.language=r,e.direction=i,e.editableOrEditingHost=s}function u(l){if(l.type==="text")return a=Ao(l.value),a?Zs:void 0;if(l!==t&&l.type==="element"&&(l.tagName==="bdi"||l.tagName==="script"||l.tagName==="style"||l.tagName==="textare"||Xd(l)))return Ti}}function Ao(e){const t=Kv(e);return t==="neutral"?void 0:t}function Xd(e){const t=e.type==="element"&&typeof e.properties.dir=="string"?e.properties.dir.toLowerCase():void 0;return t==="auto"||t==="ltr"||t==="rtl"?t:void 0}function Zv(e,t,n){const r=Gi(n,e.name),i=t.properties[r.property];let s=Jv(i,r);if(!e.value)return s!==void 0;e.value.type;let a=e.value.value;if(e.caseSensitivityModifier==="i"&&(a=a.toLowerCase(),s&&(s=s.toLowerCase())),s!==void 0)switch(e.operator){case"=":return a===s;case"$=":return a===s.slice(-a.length);case"*=":return s.includes(a);case"^=":return a===s.slice(0,a.length);case"|=":return a===s||a===s.slice(0,a.length)&&s.charAt(a.length)==="-";case"~=":return a===s||$o(s).includes(a)}return!1}function Jv(e,t){if(e!=null)if(typeof e=="boolean"){if(e)return t.attribute}else if(Array.isArray(e)){if(e.length>0)return(t.commaSeparated?Ea:xa)(e)}else return String(e)}const e8=[];function t8(e,t){return(t.properties.className||e8).includes(e.name)}function n8(e,t){return t.properties.id===e.name}function r8(e,t){return e.name===t.tagName}function i8(e,t){return function(n,r){let i=Zd(n,"tag");const s=Zd(r??"*","range"),a=[];let o=-1;for(;++o<s.length;){const u=s[o].toLowerCase();if(!t&&u==="*")continue;let l=-1;const d=[];for(;++l<i.length;)if(e(i[l].toLowerCase(),u)){if(!t)return i[l];a.push(i[l])}else d.push(i[l]);i=d}return t?a:void 0}}const s8=i8(function(e,t){const n=e.split("-"),r=t.split("-");let i=0,s=0;if(r[s]!=="*"&&n[i]!==r[s])return!1;for(i++,s++;s<r.length;){if(r[s]==="*"){s++;continue}if(!n[i])return!1;if(n[i]===r[s]){i++,s++;continue}if(n[i].length===1)return!1;i++}return!0},!0);function Zd(e,t){const n=e&&typeof e=="string"?[e]:e;if(!n||typeof n!="object"||!("length"in n))throw new Error("Invalid "+t+" `"+n+"`, expected non-empty string");return n}const a8={}.hasOwnProperty;function sr(e,t){const n=e.type==="element"&&a8.call(e.properties,t)&&e.properties[t];return n!=null&&n!==!1}const o8=new Set([9,10,12,13,32]),Jd=48,u8=57;function l8(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,n=0,r=s(),i=a();if(t<e.length&&e.charAt(t)==="n"&&(t++,n=r*(i??1),o(),t<e.length?(r=s(),o(),i=a()):r=i=0),i===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[n,r*i];function s(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function a(){const u=t;let l=0;for(;t<e.length&&e.charCodeAt(t)>=Jd&&e.charCodeAt(t)<=u8;)l=l*10+(e.charCodeAt(t)-Jd),t++;return t===u?null:l}function o(){for(;t<e.length&&o8.has(e.charCodeAt(t));)t++}}var ko,eh;function c8(){return eh||(eh=1,ko={trueFunc:function(){return!0},falseFunc:function(){return!1}}),ko}var d8=c8();const th=sa(d8);function h8(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return th.falseFunc;if(t===-1)return s=>s<=n;if(t===0)return s=>s===n;if(t===1)return n<0?th.trueFunc:s=>s>=n;const r=Math.abs(t),i=(n%r+r)%r;return t>1?s=>s>=n&&s%r===i:s=>s<=n&&s%r===i}function nh(e){return h8(l8(e))}const f8=nh.default||nh,p8=ba("name",{handlers:{"any-link":m8,blank:g8,checked:b8,dir:E8,disabled:c0,empty:x8,enabled:y8,"first-child":T8,"first-of-type":C8,has:S8,is:d0,lang:k8,"last-child":I8,"last-of-type":_8,not:v8,"nth-child":D8,"nth-last-child":w8,"nth-last-of-type":N8,"nth-of-type":P8,"only-child":R8,"only-of-type":L8,optional:O8,"read-only":F8,"read-write":h0,required:f0,root:M8,scope:B8},invalid:A8,unknown:j8});function m8(e,t){return(t.tagName==="a"||t.tagName==="area"||t.tagName==="link")&&sr(t,"href")}function hn(e,t){if(e.shallow)throw new Error("Cannot use `:"+t.name+"` without parent")}function g8(e,t){return!p0(t,n);function n(r){return r.type==="element"||r.type==="text"&&!Yi(r)}}function b8(e,t){return t.tagName==="input"||t.tagName==="menuitem"?!!((t.properties.type==="checkbox"||t.properties.type==="radio")&&sr(t,"checked")):t.tagName==="option"?sr(t,"selected"):!1}function E8(e,t,n,r,i){return e.argument,e.argument.type,i.direction===e.argument.value}function c0(e,t){return(t.tagName==="button"||t.tagName==="input"||t.tagName==="select"||t.tagName==="textarea"||t.tagName==="optgroup"||t.tagName==="option"||t.tagName==="menuitem"||t.tagName==="fieldset")&&sr(t,"disabled")}function x8(e,t){return!p0(t,n);function n(r){return r.type==="element"||r.type==="text"}}function y8(e,t){return!c0(e,t)}function T8(e,t,n,r,i){return hn(i,e),i.elementIndex===0}function C8(e,t,n,r,i){return hn(i,e),i.typeIndex===0}function Fa(e){let t=e._cachedFn;if(!t){const n=e.argument;if(n.type!=="Formula")throw new Error("Expected `nth` formula, such as `even` or `2n+1` (`of` is not yet supported)");t=f8(n.a+"n+"+n.b),e._cachedFn=t}return t}function S8(e,t,n,r,i){e.argument,e.argument.type;const s={...i,found:!1,one:!0,results:[],rootQuery:e.argument,scopeElements:[t],shallow:!1};return Al(s,{type:"root",children:t.children}),s.results.length>0}function A8(){}function d0(e,t,n,r,i){e.argument,e.argument.type;const s={...i,found:!1,one:!0,results:[],rootQuery:e.argument,scopeElements:[t],shallow:!1};return Al(s,t),s.results[0]===t}function k8(e,t,n,r,i){return e.argument,e.argument.type,i.language!==""&&i.language!==void 0&&s8(i.language,zo(e.argument.value)).length>0}function I8(e,t,n,r,i){return hn(i,e),!!(i.elementCount&&i.elementIndex===i.elementCount-1)}function _8(e,t,n,r,i){return hn(i,e),typeof i.typeIndex=="number"&&typeof i.typeCount=="number"&&i.typeIndex===i.typeCount-1}function v8(e,t,n,r,i){return!d0(e,t,n,r,i)}function D8(e,t,n,r,i){const s=Fa(e);return hn(i,e),typeof i.elementIndex=="number"&&s(i.elementIndex)}function w8(e,t,n,r,i){const s=Fa(e);return hn(i,e),!!(typeof i.elementCount=="number"&&typeof i.elementIndex=="number"&&s(i.elementCount-i.elementIndex-1))}function N8(e,t,n,r,i){const s=Fa(e);return hn(i,e),typeof i.typeCount=="number"&&typeof i.typeIndex=="number"&&s(i.typeCount-1-i.typeIndex)}function P8(e,t,n,r,i){const s=Fa(e);return hn(i,e),typeof i.typeIndex=="number"&&s(i.typeIndex)}function R8(e,t,n,r,i){return hn(i,e),i.elementCount===1}function L8(e,t,n,r,i){return hn(i,e),i.typeCount===1}function O8(e,t){return!f0(e,t)}function F8(e,t,n,r,i){return!h0(e,t,n,r,i)}function h0(e,t,n,r,i){return t.tagName==="input"||t.tagName==="textarea"?!sr(t,"readOnly")&&!sr(t,"disabled"):!!i.editableOrEditingHost}function f0(e,t){return(t.tagName==="input"||t.tagName==="textarea"||t.tagName==="select")&&sr(t,"required")}function M8(e,t,n,r,i){return!!((!r||r.type==="root")&&i.schema&&(i.schema.space==="html"||i.schema.space==="svg")&&(t.tagName==="html"||t.tagName==="svg"))}function B8(e,t,n,r,i){return i.scopeElements.includes(t)}function p0(e,t){const n=e.children;let r=-1;for(;++r<n.length;)if(t(n[r]))return!0;return!1}function j8(e){const t=e;throw new Error("Unknown pseudo-selector `"+t.name+"`")}function H8(e,t,n,r,i){for(const s of e.items)if(s.type==="Attribute"){if(!Zv(s,t,i.schema))return!1}else if(s.type==="Id"){if(!n8(s,t))return!1}else if(s.type==="ClassName"){if(!t8(s,t))return!1}else if(s.type==="PseudoClass"){if(!p8(s,t,n,r,i))return!1}else{if(s.type==="PseudoElement")throw new Error("Invalid selector: `::"+s.name+"`");if(s.type==="TagName"&&!r8(s,t))return!1}return!0}const U8=[];function Al(e,t){t&&m0(e,[],t,void 0,void 0,t)}function Io(e,t,n){const r=e[t];r?r.push(n):e[t]=[n]}function z8(e,t,n,r){const i=vs(t.descendant,t.directChild);let s,a=-1;const o={count:0,types:new Map},u={count:0,types:new Map};for(;++a<n.children.length;)rh(o,n.children[a]);for(a=-1;++a<n.children.length;){const l=n.children[a],d=l.type==="element"?l.tagName.toUpperCase():void 0;if(e.elementIndex=u.count,e.typeIndex=d&&u.types.get(d)||0,e.elementCount=o.count,e.typeCount=d?o.types.get(d):0,"children"in l){const c=vs(i,s),m=m0(e,c,n.children[a],a,n,r);s=vs(m.generalSibling,m.adjacentSibling)}if(e.one&&e.found)break;rh(u,n.children[a])}}function $8(e,t,n,r,i){const s={adjacentSibling:void 0,descendant:void 0,directChild:void 0,generalSibling:void 0};let a=-1;for(;++a<t.length;){const o=t[a];if(e.one&&e.found)break;if(e.shallow&&o.nestedRule)throw new Error("Expected selector without nesting");if(H8(o,n,r,i,e)){const u=o.nestedRule;if(u){const l=u.combinator==="+"?"adjacentSibling":u.combinator==="~"?"generalSibling":u.combinator===">"?"directChild":"descendant";Io(s,l,u)}else e.found=!0,e.results.includes(n)||e.results.push(n)}o.combinator===void 0?Io(s,"descendant",o):o.combinator==="~"&&Io(s,"generalSibling",o)}return s}function vs(e,t){return e&&t&&e.length>0&&t.length>0?[...e,...t]:e&&e.length>0?e:t&&t.length>0?t:U8}function rh(e,t){if(t.type==="element"){const n=t.tagName.toUpperCase(),r=(e.types.get(n)||0)+1;e.count++,e.types.set(n,r)}}function m0(e,t,n,r,i,s){let a={adjacentSibling:void 0,descendant:void 0,directChild:void 0,generalSibling:void 0};const o=Xv(e,n);if(n.type==="element"){let u=e.rootQuery.rules;i&&i!==s&&(u=e.rootQuery.rules.filter(l=>l.combinator===void 0||l.combinator===">"&&i===s)),a=$8(e,vs(t,u),n,r,i)}return"children"in n&&!e.shallow&&!(e.one&&e.found)&&z8(e,a,n,s),o(),a}function q8(e,t,n){const r=V8(e,t);return Al(r,t||void 0),r.results}function V8(e,t,n){return{direction:"ltr",editableOrEditingHost:!1,elementCount:void 0,elementIndex:void 0,found:!1,language:void 0,one:!1,results:[],rootQuery:Wv(e),schema:Ur,scopeElements:t?t.type==="root"?t.children:[t]:[],shallow:!1,typeIndex:void 0,typeCount:void 0}}const g0=(e=[],t="")=>(e.forEach(n=>{n.type==="text"?t+=n.value:n.type==="element"&&n.children&&Array.isArray(n.children)&&(t+=g0(n.children))}),t),W8=e=>{const{selector:t,rewrite:n}=e||{};return r=>{if(!(!n||typeof n!="function")){if(t&&typeof t=="string"){const i=q8(t,r);i&&i.length>0&&Lt(r,i,(s,a,o)=>{n(s,a,o)});return}Lt(r,(i,s,a)=>{n(i,s,a)})}}},G8=(e="")=>(e.match(/([^?=&]+)(=([^&]*))/g)||[]).reduce((t,n)=>(t[n.slice(0,n.indexOf("="))]=n.slice(n.indexOf("=")+1),t),{}),Y8=(e=[],t)=>{let n=t;for(;n>-1;){if(n--,!e[n])return;if(e[n]&&e[n].value&&e[n].value.replace(/(\n|\s)/g,"")!==""||e[n].type!=="text")return!/^rehype:/.test(e[n].value)||e[n].type!=="comment"?void 0:e[n]}},b0=(e=[],t,n,r)=>{let i=t;for(;i<e.length;)if(i++,n){const s=e[i];if(s&&s.value&&s.value.replace(/(\n|\s)/g,"")!==""||e[i]&&e[i].type==="element")return s.tagName===n?s:void 0}else{const s=e[i];if(!s||s.type==="element"||s.type==="text"&&s.value.replace(/(\n|\s)/g,"")!=="")return;if(s.type&&/^(comment|raw)$/ig.test(s.type))return s.value&&!/^rehype:/.test(s.value.replace(/^(\s+)?<!--(.*?)-->/,"$2")||"")?void 0:r?b0(e,i,"pre",r)?void 0:(s.value=(s.value||"").replace(/^(\n|\s)+/,""),s):(s.value=(s.value||"").replace(/^(\n|\s)+/,""),s)}},ih=({value:e=""})=>{const t=G8(e.replace(/^<!--(.*?)-->/,"$1").replace(/^rehype:/,""));return Object.keys(t).forEach(n=>{t[n]==="true"&&(t[n]=!0),t[n]==="false"&&(t[n]=!1),typeof t[n]=="string"&&!/^0/.test(t[n])&&!isNaN(+t[n])&&(t[n]=+t[n])}),t},sh=(e,t,n)=>n==="string"?{...e,"data-config":JSON.stringify({...t,rehyp:!0})}:n==="attr"?{...e,...t}:{...e,"data-config":{...t,rehyp:!0}},K8=(e={})=>{const{properties:t="data",codeBlockParames:n=!0}=e;return r=>{Lt(r,"element",(i,s,a)=>{if(n&&i.tagName==="pre"&&i&&Array.isArray(i.children)&&a&&Array.isArray(a.children)&&a.children.length>1){const o=i.children[0];if(o&&o.tagName==="code"&&typeof s=="number"){const u=Y8(a.children,s);if(u){const l=ih(u);Object.keys(l).length>0&&(i.properties={...i.properties,"data-type":"rehyp"},o.properties=sh(o.properties,l,t))}}}if(/^(em|strong|b|a|i|p|pre|kbd|blockquote|h(1|2|3|4|5|6)|code|table|img|del|ul|ol)$/.test(i.tagName)&&a&&Array.isArray(a.children)&&typeof s=="number"){const o=b0(a.children,s,"",n);if(o){const u=ih(o);Object.keys(u).length>0&&(i.properties=sh(i.properties,u,t))}}})}};var Q8=function(t){return n=>{Lt(n,r=>{r.type==="element"&&r.tagName==="code"&&r.data&&r.data.meta&&(r.properties=Sn({},r.properties,{"data-meta":String(r.data.meta)}))})}},X8=function(t){return n=>{Lt(n,r=>{if(r.type==="element"&&r.tagName==="code"&&r.properties&&r.properties.dataMeta){r.data||(r.data={});var i=r.properties.dataMeta;typeof i=="string"&&(r.data.meta=i),delete r.properties.dataMeta}})}};const Z8=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,J8=Object.hasOwnProperty;class eD{constructor(){this.occurrences,this.reset()}slug(t,n){const r=this;let i=tD(t,n===!0);const s=i;for(;J8.call(r.occurrences,i);)r.occurrences[s]++,i=s+"-"+r.occurrences[s];return r.occurrences[i]=0,i}reset(){this.occurrences=Object.create(null)}}function tD(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(Z8,"").replace(/ /g,"-"))}function E0(e){const t=e.type==="element"?e.tagName.toLowerCase():"",n=t.length===2&&t.charCodeAt(0)===104?t.charCodeAt(1):0;return n>48&&n<55?n-48:void 0}const nD={},ah=new eD;function rD(e){const n=(e||nD).prefix||"";return function(r){ah.reset(),Lt(r,"element",function(i){E0(i)&&!i.properties.id&&(i.properties.id=n+ah.slug(u0(i)))})}}const x0=function(e){if(e==null)return aD;if(typeof e=="string")return sD(e);if(typeof e=="object")return iD(e);if(typeof e=="function")return kl(e);throw new Error("Expected function, string, or array as `test`")};function iD(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=x0(e[n]);return kl(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function sD(e){return kl(t);function t(n){return n.tagName===e}}function kl(e){return t;function t(n,r,i){return!!(oD(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function aD(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function oD(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const oh={type:"element",tagName:"span",properties:{className:["icon","icon-link"]},children:[]},uD={};function lD(e){const t=e||uD;let n=t.properties;const r=t.headingProperties,i=t.behavior||"prepend",s=t.content,a=t.group,o=x0(t.test);let u;return i==="after"||i==="before"?u=d:i==="wrap"?u=c:(u=l,n||(n={ariaHidden:"true",tabIndex:-1})),function(m){Lt(m,"element",function(p,g,b){if(E0(p)&&p.properties.id&&o(p,g,b))return Object.assign(p.properties,bs(r,p)),u(p,g,b)})};function l(m){const p=uh(s||oh,m);return m.children[i==="prepend"?"unshift":"push"](_o(m,bs(n,m),p)),[Ti]}function d(m,p,g){if(typeof p!="number"||!g)return;const b=uh(s||oh,m),T=_o(m,bs(n,m),b);let y=i==="before"?[T,m]:[m,T];if(a){const C=y0(a,m);C&&!Array.isArray(C)&&C.type==="element"&&(C.children=y,y=[C])}return g.children.splice(p,1,...y),[Ti,p+y.length]}function c(m){let p=m.children,g=[];return typeof s=="function"?(p=[],g=s(m)):s&&(g=Il(s)),m.children=[_o(m,bs(n,m),Array.isArray(g)?[...p,...g]:[...p,g])],[Ti]}}function Il(e){return ir(e)}function _o(e,t,n){return{type:"element",tagName:"a",properties:{...t,href:"#"+e.properties.id},children:n}}function uh(e,t){const n=y0(e,t);return Array.isArray(n)?n:[n]}function y0(e,t){return typeof e=="function"?e(t):Il(e)}function bs(e,t){return typeof e=="function"?e(t):e?Il(e):{}}const cD=(e={})=>{const{openDelimiter:t="rehype:ignore:start",closeDelimiter:n="rehype:ignore:end"}=e;return r=>{Lt(r,(i,s,a)=>{if(i.type==="element"||i.type==="root"){let o=!1;i.children=i.children.filter(u=>{if(u.type==="raw"||u.type==="comment"){let l=(u.value||"").trim();if(l=l.replace(/^<!--(.*?)-->/,"$1"),l===t)return o=!0,!1;if(l===n)return o=!1,!1}return!o})}})}};var dD={type:"element",tagName:"svg",properties:{className:"octicon octicon-link",viewBox:"0 0 16 16",version:"1.1",width:"16",height:"16",ariaHidden:"true"},children:[{type:"element",tagName:"path",children:[],properties:{fillRule:"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"}}]};function hD(e){return e===void 0&&(e=""),{type:"element",tagName:"div",properties:{class:"copied","data-code":e},children:[{type:"element",tagName:"svg",properties:{className:"octicon-copy",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"},children:[]},{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"},children:[]}]},{type:"element",tagName:"svg",properties:{className:"octicon-check",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"},children:[]}]}]}}var fD=(e,t)=>(n,r,i)=>{if(n.type==="element"&&i&&i.type==="root"&&/h(1|2|3|4|5|6)/.test(n.tagName)){var s=n.children&&n.children[0];s&&s.properties&&s.properties.ariaHidden==="true"&&(s.properties=Sn({class:"anchor"},s.properties),s.children=[dD])}if(n.type==="element"&&n.tagName==="pre"&&!e){var a=g0(n.children);n.children.push(hD(a))}t&&t(n,r===null?void 0:r,i===null?void 0:i)},pD=[rD,lD,cD];const T0=P.forwardRef((e,t)=>{var n,r=[Q8,e0,X8,...pD,[W8,{rewrite:fD((n=e.disableCopy)!=null?n:!1,e.rehypeRewrite)}],[K8,{properties:"attr"}],...e.rehypePlugins||[]];return h.jsx(wv,Sn({},e,{rehypePlugins:r,ref:t}))});function mD(e,t){return De({},e,t)}var Kr=P.createContext({markdown:""});function C0(e,t){return e===void 0&&(e=[]),t===void 0&&(t={}),e.forEach(n=>{n.children&&Array.isArray(n.children)?t=De({},t,C0(n.children||[])):n.keyCommand&&n.shortcuts&&n.execute&&(t[n.shortcuts.toLocaleLowerCase()]=n)}),t}function S0(e,t,n,r,i){t===void 0&&(t=[]);var s=C0(t||[]),a=[];if(e.altKey&&a.push("alt"),e.shiftKey&&a.push("shift"),e.metaKey&&a.push("cmd"),e.ctrlKey&&a.push("ctrl"),a.length>0&&!/(control|alt|meta|shift)/.test(e.key.toLocaleLowerCase())&&a.push(e.key.toLocaleLowerCase()),/escape/.test(e.key.toLocaleLowerCase())&&a.push("escape"),!(a.length<1)){var o=!!s[a.join("+")],u=o?s[a.join("+")]:void 0;if(Object.keys(s).forEach(l=>{var d=l.split("+").every(c=>/ctrlcmd/.test(c)?a.includes("ctrl")||a.includes("cmd"):a.includes(c));d&&(u=s[l])}),u&&n){e.stopPropagation(),e.preventDefault(),n.executeCommand(u,r,i,a);return}}}var vo;function lh(e){if(e.nodeName!=="TEXTAREA")return!1;if(typeof vo>"u"){var t=document.createElement("textarea");t.value="1",vo=!!t.firstChild}return vo}function wr(e,t){if(e.focus(),document.selection){var n=document.selection.createRange();n.text=t,n.collapse(!1),n.select();return}var r=!1;if(t!==""?r=document.execCommand&&document.execCommand("insertText",!1,t):r=document.execCommand&&document.execCommand("delete",!1),!r){var i=e.selectionStart,s=e.selectionEnd;if(typeof e.setRangeText=="function")e.setRangeText(t);else{var a=document.createRange(),o=document.createTextNode(t);if(lh(e)){var u=e.firstChild;if(!u)e.appendChild(o);else{for(var l=0,d=null,c=null;u&&(d===null||c===null);){var m=u.nodeValue.length;i>=l&&i<=l+m&&a.setStart(d=u,i-l),s>=l&&s<=l+m&&a.setEnd(c=u,s-l),l+=m,u=u.nextSibling}i!==s&&a.deleteContents()}}if(lh(e)&&a.commonAncestorContainer.nodeName==="#text")a.insertNode(o);else{var p=e.value;e.value=p.slice(0,i)+t+p.slice(s)}}e.setSelectionRange(i+t.length,i+t.length);var g=document.createEvent("UIEvent");g.initEvent("input",!0,!1),e.dispatchEvent(g)}}function Dt(e){var{text:t,selection:n,prefix:r,suffix:i=r}=e,s=n;if(t&&t.length&&n.start===n.end&&(s=gD(t,n.start)),s.start>=r.length&&s.end<=t.length-i.length){var a=t.slice(s.start-r.length,s.end+i.length);if(a.startsWith(r)&&a.endsWith(i))return{start:s.start-r.length,end:s.end+i.length}}return s}function _i(e){var{text:t,selection:n}=e,r=t.slice(0,n.start).lastIndexOf(`
158
158
  `)+1,i=t.slice(n.end).indexOf(`
159
- `)+n.end;return i===n.end-1&&(i=t.length),{start:r,end:i}}function y0(e,t){if(e===void 0&&(e=""),t===0)return 0;for(var n=2,r=!0,i=t-1;i>=0&&n>=0;i--)switch(e.charCodeAt(i)){case 32:continue;case 10:n--,r=!1;break;default:return n}return r?0:n}function T0(e,t){if(e===void 0&&(e=""),t===e.length-1)return 0;for(var n=2,r=!0,i=t;i<e.length&&n>=0;i++)switch(e.charCodeAt(i)){case 32:continue;case 10:{n--,r=!1;break}default:return n}return r?0:n}function oD(e,t){if(!e)throw Error("Argument 'text' should be truthy");for(var n=o=>o===" "||o.charCodeAt(0)===10,r=0,i=e.length,s=t;s-1>-1;s--)if(n(e[s-1])){r=s;break}for(var a=t;a<e.length;a++)if(n(e[a])){i=a;break}return{start:r,end:i}}function mt(e){var{api:t,selectedText:n,selection:r,prefix:i,suffix:s=i}=e;n.length>=i.length+s.length&&n.startsWith(i)&&n.endsWith(s)?(t.replaceSelection(n.slice(i.length,s.length?-s.length:void 0)),t.setSelectionRange({start:r.start-i.length,end:r.end-i.length})):(t.replaceSelection(""+i+n+s),t.setSelectionRange({start:r.start+i.length,end:r.end+i.length}))}function Il(e,t){var n=e.split(/\n/),r=0,i=n.map((s,a)=>{if(typeof t=="string")return s.startsWith(t)?(r-=t.length,s.slice(t.length)):(r+=t.length,t+s);if(typeof t=="function"){if(s.startsWith(t(s,a)))return r-=t(s,a).length,s.slice(t(s,a).length);var o=t(s,a);return r+=o.length,t(s,a)+s}throw Error("insertion is expected to be either a string or a function")}).join(`
160
- `);return{modifiedText:i,insertionLength:r}}var uD={name:"bold",keyCommand:"bold",shortcuts:"ctrlcmd+b",prefix:"**",buttonProps:{"aria-label":"Add bold text (ctrl + b)",title:"Add bold text (ctrl + b)"},icon:h.jsx("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 384 512",children:h.jsx("path",{fill:"currentColor",d:"M304.793 243.891c33.639-18.537 53.657-54.16 53.657-95.693 0-48.236-26.25-87.626-68.626-104.179C265.138 34.01 240.849 32 209.661 32H24c-8.837 0-16 7.163-16 16v33.049c0 8.837 7.163 16 16 16h33.113v318.53H24c-8.837 0-16 7.163-16 16V464c0 8.837 7.163 16 16 16h195.69c24.203 0 44.834-1.289 66.866-7.584C337.52 457.193 376 410.647 376 350.014c0-52.168-26.573-91.684-71.207-106.123zM142.217 100.809h67.444c16.294 0 27.536 2.019 37.525 6.717 15.828 8.479 24.906 26.502 24.906 49.446 0 35.029-20.32 56.79-53.029 56.79h-76.846V100.809zm112.642 305.475c-10.14 4.056-22.677 4.907-31.409 4.907h-81.233V281.943h84.367c39.645 0 63.057 25.38 63.057 63.057.001 28.425-13.66 52.483-34.782 61.284z"})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},C0={name:"codeBlock",keyCommand:"codeBlock",shortcuts:"ctrlcmd+shift+j",prefix:"```",buttonProps:{"aria-label":"Insert Code Block (ctrl + shift + j)",title:"Insert Code Block (ctrl + shift +j)"},icon:h.jsx("svg",{width:"13",height:"13",role:"img",viewBox:"0 0 156 156",children:h.jsx("path",{fill:"currentColor",d:"M110.85 120.575 43.7 120.483333 43.7083334 110.091667 110.85 110.191667 110.841667 120.583333 110.85 120.575ZM85.1333334 87.1916666 43.625 86.7083332 43.7083334 76.3166666 85.2083334 76.7916666 85.1333334 87.1916666 85.1333334 87.1916666ZM110.841667 53.4166666 43.7 53.3166666 43.7083334 42.925 110.85 43.025 110.841667 53.4166666ZM36 138C27.2916666 138 20.75 136.216667 16.4 132.666667 12.1333334 129.2 10 124.308333 10 118L10 95.3333332C10 91.0666666 9.25 88.1333332 7.7333334 86.5333332 6.3166668 84.8416666 3.7333334 84 0 84L0 72C3.7333334 72 6.3083334 71.2 7.7333334 69.6 9.2416668 67.9083334 10 64.9333334 10 60.6666666L10 38C10 31.775 12.1333334 26.8833334 16.4 23.3333332 20.7583334 19.7749998 27.2916666 18 36 18L40.6666668 18 40.6666668 30 36 30C34.0212222 29.9719277 32.1263151 30.7979128 30.8 32.2666666 29.3605875 33.8216362 28.5938182 35.8823287 28.6666668 38L28.6666668 60.6666666C28.6666668 67.5083332 26.6666668 72.4 22.6666668 75.3333332 20.9317416 76.7274684 18.8640675 77.6464347 16.6666668 78 18.8916668 78.35 20.8916668 79.2416666 22.6666668 80.6666666 26.6666668 83.95 28.6666668 88.8416666 28.6666668 95.3333332L28.6666668 118C28.6666668 120.308333 29.3750002 122.216667 30.8 123.733333 32.2166666 125.241667 33.9583334 126 36 126L40.6666668 126 40.6666668 138 36 138 36 138ZM114.116667 126 118.783333 126C120.833333 126 122.566667 125.241667 123.983333 123.733333 125.422746 122.178364 126.189515 120.117671 126.116667 118L126.116667 95.3333332C126.116667 88.8333332 128.116667 83.9499998 132.116667 80.6666666 133.9 79.2416666 135.9 78.35 138.116667 78 135.919156 77.6468047 133.851391 76.7277979 132.116667 75.3333332 128.116667 72.3999998 126.116667 67.5 126.116667 60.6666666L126.116667 38C126.189515 35.8823287 125.422746 33.8216361 123.983333 32.2666666 122.657018 30.7979128 120.762111 29.9719277 118.783333 30L114.116667 30 114.116667 18 118.783333 18C127.5 18 133.983333 19.775 138.25 23.3333332 142.608333 26.8833332 144.783333 31.7749998 144.783333 38L144.783333 60.6666666C144.783333 64.9333332 145.5 67.9083332 146.916667 69.6 148.433333 71.2 151.05 72 154.783333 72L154.783333 84C151.05 84 148.433333 84.8333334 146.916667 86.5333332 145.5 88.1333332 144.783333 91.0666666 144.783333 95.3333332L144.783333 118C144.783333 124.308333 142.616667 129.2 138.25 132.666667 133.983333 136.216667 127.5 138 118.783333 138L114.116667 138 114.116667 126 114.116667 126Z"})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:"```\n",suffix:"\n```"}),r=t.setSelectionRange(n),i="\n```\n",s="\n```\n";r.selectedText.length>=i.length+s.length-2&&r.selectedText.startsWith(i)&&r.selectedText.endsWith(s)?(i="```\n",s="\n```"):((r.selection.start>=1&&e.text.slice(r.selection.start-1,r.selection.start)===`
159
+ `)+n.end;return i===n.end-1&&(i=t.length),{start:r,end:i}}function A0(e,t){if(e===void 0&&(e=""),t===0)return 0;for(var n=2,r=!0,i=t-1;i>=0&&n>=0;i--)switch(e.charCodeAt(i)){case 32:continue;case 10:n--,r=!1;break;default:return n}return r?0:n}function k0(e,t){if(e===void 0&&(e=""),t===e.length-1)return 0;for(var n=2,r=!0,i=t;i<e.length&&n>=0;i++)switch(e.charCodeAt(i)){case 32:continue;case 10:{n--,r=!1;break}default:return n}return r?0:n}function gD(e,t){if(!e)throw Error("Argument 'text' should be truthy");for(var n=o=>o===" "||o.charCodeAt(0)===10,r=0,i=e.length,s=t;s-1>-1;s--)if(n(e[s-1])){r=s;break}for(var a=t;a<e.length;a++)if(n(e[a])){i=a;break}return{start:r,end:i}}function mt(e){var{api:t,selectedText:n,selection:r,prefix:i,suffix:s=i}=e;n.length>=i.length+s.length&&n.startsWith(i)&&n.endsWith(s)?(t.replaceSelection(n.slice(i.length,s.length?-s.length:void 0)),t.setSelectionRange({start:r.start-i.length,end:r.end-i.length})):(t.replaceSelection(""+i+n+s),t.setSelectionRange({start:r.start+i.length,end:r.end+i.length}))}function _l(e,t){var n=e.split(/\n/),r=0,i=n.map((s,a)=>{if(typeof t=="string")return s.startsWith(t)?(r-=t.length,s.slice(t.length)):(r+=t.length,t+s);if(typeof t=="function"){if(s.startsWith(t(s,a)))return r-=t(s,a).length,s.slice(t(s,a).length);var o=t(s,a);return r+=o.length,t(s,a)+s}throw Error("insertion is expected to be either a string or a function")}).join(`
160
+ `);return{modifiedText:i,insertionLength:r}}var bD={name:"bold",keyCommand:"bold",shortcuts:"ctrlcmd+b",prefix:"**",buttonProps:{"aria-label":"Add bold text (ctrl + b)",title:"Add bold text (ctrl + b)"},icon:h.jsx("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 384 512",children:h.jsx("path",{fill:"currentColor",d:"M304.793 243.891c33.639-18.537 53.657-54.16 53.657-95.693 0-48.236-26.25-87.626-68.626-104.179C265.138 34.01 240.849 32 209.661 32H24c-8.837 0-16 7.163-16 16v33.049c0 8.837 7.163 16 16 16h33.113v318.53H24c-8.837 0-16 7.163-16 16V464c0 8.837 7.163 16 16 16h195.69c24.203 0 44.834-1.289 66.866-7.584C337.52 457.193 376 410.647 376 350.014c0-52.168-26.573-91.684-71.207-106.123zM142.217 100.809h67.444c16.294 0 27.536 2.019 37.525 6.717 15.828 8.479 24.906 26.502 24.906 49.446 0 35.029-20.32 56.79-53.029 56.79h-76.846V100.809zm112.642 305.475c-10.14 4.056-22.677 4.907-31.409 4.907h-81.233V281.943h84.367c39.645 0 63.057 25.38 63.057 63.057.001 28.425-13.66 52.483-34.782 61.284z"})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},I0={name:"codeBlock",keyCommand:"codeBlock",shortcuts:"ctrlcmd+shift+j",prefix:"```",buttonProps:{"aria-label":"Insert Code Block (ctrl + shift + j)",title:"Insert Code Block (ctrl + shift +j)"},icon:h.jsx("svg",{width:"13",height:"13",role:"img",viewBox:"0 0 156 156",children:h.jsx("path",{fill:"currentColor",d:"M110.85 120.575 43.7 120.483333 43.7083334 110.091667 110.85 110.191667 110.841667 120.583333 110.85 120.575ZM85.1333334 87.1916666 43.625 86.7083332 43.7083334 76.3166666 85.2083334 76.7916666 85.1333334 87.1916666 85.1333334 87.1916666ZM110.841667 53.4166666 43.7 53.3166666 43.7083334 42.925 110.85 43.025 110.841667 53.4166666ZM36 138C27.2916666 138 20.75 136.216667 16.4 132.666667 12.1333334 129.2 10 124.308333 10 118L10 95.3333332C10 91.0666666 9.25 88.1333332 7.7333334 86.5333332 6.3166668 84.8416666 3.7333334 84 0 84L0 72C3.7333334 72 6.3083334 71.2 7.7333334 69.6 9.2416668 67.9083334 10 64.9333334 10 60.6666666L10 38C10 31.775 12.1333334 26.8833334 16.4 23.3333332 20.7583334 19.7749998 27.2916666 18 36 18L40.6666668 18 40.6666668 30 36 30C34.0212222 29.9719277 32.1263151 30.7979128 30.8 32.2666666 29.3605875 33.8216362 28.5938182 35.8823287 28.6666668 38L28.6666668 60.6666666C28.6666668 67.5083332 26.6666668 72.4 22.6666668 75.3333332 20.9317416 76.7274684 18.8640675 77.6464347 16.6666668 78 18.8916668 78.35 20.8916668 79.2416666 22.6666668 80.6666666 26.6666668 83.95 28.6666668 88.8416666 28.6666668 95.3333332L28.6666668 118C28.6666668 120.308333 29.3750002 122.216667 30.8 123.733333 32.2166666 125.241667 33.9583334 126 36 126L40.6666668 126 40.6666668 138 36 138 36 138ZM114.116667 126 118.783333 126C120.833333 126 122.566667 125.241667 123.983333 123.733333 125.422746 122.178364 126.189515 120.117671 126.116667 118L126.116667 95.3333332C126.116667 88.8333332 128.116667 83.9499998 132.116667 80.6666666 133.9 79.2416666 135.9 78.35 138.116667 78 135.919156 77.6468047 133.851391 76.7277979 132.116667 75.3333332 128.116667 72.3999998 126.116667 67.5 126.116667 60.6666666L126.116667 38C126.189515 35.8823287 125.422746 33.8216361 123.983333 32.2666666 122.657018 30.7979128 120.762111 29.9719277 118.783333 30L114.116667 30 114.116667 18 118.783333 18C127.5 18 133.983333 19.775 138.25 23.3333332 142.608333 26.8833332 144.783333 31.7749998 144.783333 38L144.783333 60.6666666C144.783333 64.9333332 145.5 67.9083332 146.916667 69.6 148.433333 71.2 151.05 72 154.783333 72L154.783333 84C151.05 84 148.433333 84.8333334 146.916667 86.5333332 145.5 88.1333332 144.783333 91.0666666 144.783333 95.3333332L144.783333 118C144.783333 124.308333 142.616667 129.2 138.25 132.666667 133.983333 136.216667 127.5 138 118.783333 138L114.116667 138 114.116667 126 114.116667 126Z"})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:"```\n",suffix:"\n```"}),r=t.setSelectionRange(n),i="\n```\n",s="\n```\n";r.selectedText.length>=i.length+s.length-2&&r.selectedText.startsWith(i)&&r.selectedText.endsWith(s)?(i="```\n",s="\n```"):((r.selection.start>=1&&e.text.slice(r.selection.start-1,r.selection.start)===`
161
161
  `||r.selection.start===0)&&(i="```\n"),(r.selection.end<=e.text.length-1&&e.text.slice(r.selection.end,r.selection.end+1)===`
162
- `||r.selection.end===e.text.length)&&(s="\n```"));var a=Dt({text:e.text,selection:e.selection,prefix:i,suffix:s}),o=t.setSelectionRange(a);mt({api:t,selectedText:o.selectedText,selection:e.selection,prefix:i,suffix:s})}},lD={name:"code",keyCommand:"code",shortcuts:"ctrlcmd+j",prefix:"`",buttonProps:{"aria-label":"Insert code (ctrl + j)",title:"Insert code (ctrl + j)"},icon:h.jsx("svg",{width:"14",height:"14",role:"img",viewBox:"0 0 640 512",children:h.jsx("path",{fill:"currentColor",d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"})}),execute:(e,t)=>{if(e.selectedText.indexOf(`
163
- `)===-1){var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}else C0.execute(e,t)}},cD={name:"comment",keyCommand:"comment",shortcuts:"ctrlcmd+/",prefix:"<!-- ",suffix:" -->",buttonProps:{"aria-label":"Insert comment (ctrl + /)",title:"Insert comment (ctrl + /)"},icon:h.jsx("svg",{height:"1em",width:"1em",viewBox:"0 0 25 25",children:h.jsxs("g",{fill:"none",fillRule:"evenodd",children:[h.jsx("polygon",{points:".769 .727 24.981 .727 24.981 24.727 .769 24.727"}),h.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M12.625,23.8787879 L8.125,19.6969697 L5.125,19.6969697 C2.63971863,19.6969697 0.625,17.8247059 0.625,15.5151515 L0.625,7.15151515 C0.625,4.84196074 2.63971863,2.96969697 5.125,2.96969697 L20.125,2.96969697 C22.6102814,2.96969697 24.625,4.84196074 24.625,7.15151515 L24.625,15.5151515 C24.625,17.8247059 22.6102814,19.6969697 20.125,19.6969697 L17.125,19.6969697 L12.625,23.8787879"}),h.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M10.625,8.54545455 L7.25,11.3333333 L10.625,14.1212121 M15.6875,8.54545455 L19.0625,11.3333333 L15.6875,14.1212121"})]})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix})}},Ds={keyCommand:"divider"},dD={name:"fullscreen",keyCommand:"fullscreen",shortcuts:"ctrlcmd+0",value:"fullscreen",buttonProps:{"aria-label":"Toggle fullscreen (ctrl + 0)",title:"Toggle fullscreen (ctrl+ 0)"},icon:h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:h.jsx("path",{fill:"currentColor",d:"M118 171.133334L118 342.200271C118 353.766938 126.675 365.333605 141.133333 365.333605L382.634614 365.333605C394.201281 365.333605 405.767948 356.658605 405.767948 342.200271L405.767948 171.133334C405.767948 159.566667 397.092948 148 382.634614 148L141.133333 148C126.674999 148 117.999999 156.675 118 171.133334zM465.353591 413.444444L370 413.444444 370 471.222222 474.0221 471.222222C500.027624 471.222222 520.254143 451 520.254143 425L520.254143 321 462.464089 321 462.464089 413.444444 465.353591 413.444444zM471.0221 43L367 43 367 100.777778 462.353591 100.777778 462.353591 196.111111 520.143647 196.111111 520.143647 89.2222219C517.254144 63.2222219 497.027624 43 471.0221 43zM57.7900547 100.777778L153.143646 100.777778 153.143646 43 46.2320439 43C20.2265191 43 0 63.2222219 0 89.2222219L0 193.222222 57.7900547 193.222222 57.7900547 100.777778zM57.7900547 321L0 321 0 425C0 451 20.2265191 471.222222 46.2320439 471.222223L150.254143 471.222223 150.254143 413.444445 57.7900547 413.444445 57.7900547 321z"})}),execute:(e,t,n,r,i)=>{t.textArea.focus(),i&&n&&r&&n({fullscreen:!r.fullscreen})}};function hD(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var fD=(e,t)=>{var n=De({children:e,icon:h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:h.jsx("path",{fill:"currentColor",d:"M15.7083333,468 C7.03242448,468 0,462.030833 0,454.666667 L0,421.333333 C0,413.969167 7.03242448,408 15.7083333,408 L361.291667,408 C369.967576,408 377,413.969167 377,421.333333 L377,454.666667 C377,462.030833 369.967576,468 361.291667,468 L15.7083333,468 Z M21.6666667,366 C9.69989583,366 0,359.831861 0,352.222222 L0,317.777778 C0,310.168139 9.69989583,304 21.6666667,304 L498.333333,304 C510.300104,304 520,310.168139 520,317.777778 L520,352.222222 C520,359.831861 510.300104,366 498.333333,366 L21.6666667,366 Z M136.835938,64 L136.835937,126 L107.25,126 L107.25,251 L40.75,251 L40.75,126 L-5.68434189e-14,126 L-5.68434189e-14,64 L136.835938,64 Z M212,64 L212,251 L161.648438,251 L161.648438,64 L212,64 Z M378,64 L378,126 L343.25,126 L343.25,251 L281.75,251 L281.75,126 L238,126 L238,64 L378,64 Z M449.047619,189.550781 L520,189.550781 L520,251 L405,251 L405,64 L449.047619,64 L449.047619,189.550781 Z"})}),execute:()=>{}},t,{keyCommand:"group"});return Array.isArray(n.children)&&(n.children=n.children.map(r=>{var i=De({},(hD(r),r));return i.parent=n,De({},i)})),n},pD={name:"hr",keyCommand:"hr",shortcuts:"ctrlcmd+h",prefix:`
162
+ `||r.selection.end===e.text.length)&&(s="\n```"));var a=Dt({text:e.text,selection:e.selection,prefix:i,suffix:s}),o=t.setSelectionRange(a);mt({api:t,selectedText:o.selectedText,selection:e.selection,prefix:i,suffix:s})}},ED={name:"code",keyCommand:"code",shortcuts:"ctrlcmd+j",prefix:"`",buttonProps:{"aria-label":"Insert code (ctrl + j)",title:"Insert code (ctrl + j)"},icon:h.jsx("svg",{width:"14",height:"14",role:"img",viewBox:"0 0 640 512",children:h.jsx("path",{fill:"currentColor",d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"})}),execute:(e,t)=>{if(e.selectedText.indexOf(`
163
+ `)===-1){var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}else I0.execute(e,t)}},xD={name:"comment",keyCommand:"comment",shortcuts:"ctrlcmd+/",prefix:"<!-- ",suffix:" -->",buttonProps:{"aria-label":"Insert comment (ctrl + /)",title:"Insert comment (ctrl + /)"},icon:h.jsx("svg",{height:"1em",width:"1em",viewBox:"0 0 25 25",children:h.jsxs("g",{fill:"none",fillRule:"evenodd",children:[h.jsx("polygon",{points:".769 .727 24.981 .727 24.981 24.727 .769 24.727"}),h.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M12.625,23.8787879 L8.125,19.6969697 L5.125,19.6969697 C2.63971863,19.6969697 0.625,17.8247059 0.625,15.5151515 L0.625,7.15151515 C0.625,4.84196074 2.63971863,2.96969697 5.125,2.96969697 L20.125,2.96969697 C22.6102814,2.96969697 24.625,4.84196074 24.625,7.15151515 L24.625,15.5151515 C24.625,17.8247059 22.6102814,19.6969697 20.125,19.6969697 L17.125,19.6969697 L12.625,23.8787879"}),h.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M10.625,8.54545455 L7.25,11.3333333 L10.625,14.1212121 M15.6875,8.54545455 L19.0625,11.3333333 L15.6875,14.1212121"})]})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix})}},Ds={keyCommand:"divider"},yD={name:"fullscreen",keyCommand:"fullscreen",shortcuts:"ctrlcmd+0",value:"fullscreen",buttonProps:{"aria-label":"Toggle fullscreen (ctrl + 0)",title:"Toggle fullscreen (ctrl+ 0)"},icon:h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:h.jsx("path",{fill:"currentColor",d:"M118 171.133334L118 342.200271C118 353.766938 126.675 365.333605 141.133333 365.333605L382.634614 365.333605C394.201281 365.333605 405.767948 356.658605 405.767948 342.200271L405.767948 171.133334C405.767948 159.566667 397.092948 148 382.634614 148L141.133333 148C126.674999 148 117.999999 156.675 118 171.133334zM465.353591 413.444444L370 413.444444 370 471.222222 474.0221 471.222222C500.027624 471.222222 520.254143 451 520.254143 425L520.254143 321 462.464089 321 462.464089 413.444444 465.353591 413.444444zM471.0221 43L367 43 367 100.777778 462.353591 100.777778 462.353591 196.111111 520.143647 196.111111 520.143647 89.2222219C517.254144 63.2222219 497.027624 43 471.0221 43zM57.7900547 100.777778L153.143646 100.777778 153.143646 43 46.2320439 43C20.2265191 43 0 63.2222219 0 89.2222219L0 193.222222 57.7900547 193.222222 57.7900547 100.777778zM57.7900547 321L0 321 0 425C0 451 20.2265191 471.222222 46.2320439 471.222223L150.254143 471.222223 150.254143 413.444445 57.7900547 413.444445 57.7900547 321z"})}),execute:(e,t,n,r,i)=>{t.textArea.focus(),i&&n&&r&&n({fullscreen:!r.fullscreen})}};function TD(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var CD=(e,t)=>{var n=De({children:e,icon:h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:h.jsx("path",{fill:"currentColor",d:"M15.7083333,468 C7.03242448,468 0,462.030833 0,454.666667 L0,421.333333 C0,413.969167 7.03242448,408 15.7083333,408 L361.291667,408 C369.967576,408 377,413.969167 377,421.333333 L377,454.666667 C377,462.030833 369.967576,468 361.291667,468 L15.7083333,468 Z M21.6666667,366 C9.69989583,366 0,359.831861 0,352.222222 L0,317.777778 C0,310.168139 9.69989583,304 21.6666667,304 L498.333333,304 C510.300104,304 520,310.168139 520,317.777778 L520,352.222222 C520,359.831861 510.300104,366 498.333333,366 L21.6666667,366 Z M136.835938,64 L136.835937,126 L107.25,126 L107.25,251 L40.75,251 L40.75,126 L-5.68434189e-14,126 L-5.68434189e-14,64 L136.835938,64 Z M212,64 L212,251 L161.648438,251 L161.648438,64 L212,64 Z M378,64 L378,126 L343.25,126 L343.25,251 L281.75,251 L281.75,126 L238,126 L238,64 L378,64 Z M449.047619,189.550781 L520,189.550781 L520,251 L405,251 L405,64 L449.047619,64 L449.047619,189.550781 Z"})}),execute:()=>{}},t,{keyCommand:"group"});return Array.isArray(n.children)&&(n.children=n.children.map(r=>{var i=De({},(TD(r),r));return i.parent=n,De({},i)})),n},SD={name:"hr",keyCommand:"hr",shortcuts:"ctrlcmd+h",prefix:`
164
164
 
165
165
  ---
166
- `,suffix:"",buttonProps:{"aria-label":"Insert HR (ctrl + h)",title:"Insert HR (ctrl + h)"},icon:h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 175 175",children:h.jsx("path",{fill:"currentColor",d:"M0,129 L175,129 L175,154 L0,154 L0,129 Z M3,9 L28.2158203,9 L28.2158203,47.9824219 L55.7695313,47.9824219 L55.7695313,9 L81.0966797,9 L81.0966797,107.185547 L55.7695313,107.185547 L55.7695313,68.0214844 L28.2158203,68.0214844 L28.2158203,107.185547 L3,107.185547 L3,9 Z M93.1855469,100.603516 L93.1855469,19 L135.211914,19 C143.004922,19 148.960917,19.6679621 153.080078,21.0039063 C157.199239,22.3398504 160.520495,24.8168764 163.043945,28.4350586 C165.567395,32.0532407 166.829102,36.459935 166.829102,41.6552734 C166.829102,46.1826398 165.864267,50.0883625 163.93457,53.3725586 C162.004873,56.6567547 159.351579,59.3193257 155.974609,61.3603516 C153.822255,62.6591862 150.872089,63.7353473 147.124023,64.5888672 C150.129898,65.5908253 152.319329,66.5927684 153.692383,67.5947266 C154.620122,68.2626987 155.965323,69.6913953 157.728027,71.8808594 C159.490731,74.0703234 160.668942,75.7587831 161.262695,76.9462891 L173,100.603516 L144.953125,100.603516 L131.482422,75.6660156 C129.775382,72.4374839 128.253913,70.3408251 126.917969,69.3759766 C125.0996,68.1142515 123.040051,67.4833984 120.739258,67.4833984 L118.512695,67.4833984 L118.512695,100.603516 L93.1855469,100.603516 Z M118.512695,52.0644531 L129.144531,52.0644531 C130.294928,52.0644531 132.521468,51.6933631 135.824219,50.9511719 C137.494149,50.6171858 138.857905,49.7636787 139.915527,48.390625 C140.97315,47.0175713 141.501953,45.4404386 141.501953,43.6591797 C141.501953,41.0244009 140.667001,39.0019602 138.99707,37.5917969 C137.32714,36.1816336 134.191429,35.4765625 129.589844,35.4765625 L117.512695,35.4765625 L118.512695,52.0644531 Z",transform:"translate(0 9)"})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.length>=e.command.prefix.length&&r.selectedText.startsWith(e.command.prefix)?mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(r=t.setSelectionRange({start:e.selection.start,end:e.selection.start}),mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}))}},mD={name:"image",keyCommand:"image",shortcuts:"ctrlcmd+k",prefix:"![image](",suffix:")",buttonProps:{"aria-label":"Add image (ctrl + k)",title:"Add image (ctrl + k)"},icon:h.jsx("svg",{width:"13",height:"13",viewBox:"0 0 20 20",children:h.jsx("path",{fill:"currentColor",d:"M15 9c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4-7H1c-.55 0-1 .45-1 1v14c0 .55.45 1 1 1h18c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm-1 13l-6-5-2 2-4-5-4 8V4h16v11z"})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.includes("http")||r.selectedText.includes("www")?mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(n=Dt({text:e.text,selection:e.selection,prefix:"![",suffix:"]()"}),r=t.setSelectionRange(n),r.selectedText.length===0?mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"![image",suffix:"](url)"}):mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"![",suffix:"]()"}))}},gD={name:"italic",keyCommand:"italic",shortcuts:"ctrlcmd+i",prefix:"*",buttonProps:{"aria-label":"Add italic text (ctrl + i)",title:"Add italic text (ctrl + i)"},icon:h.jsx("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 320 512",children:h.jsx("path",{fill:"currentColor",d:"M204.758 416h-33.849l62.092-320h40.725a16 16 0 0 0 15.704-12.937l6.242-32C297.599 41.184 290.034 32 279.968 32H120.235a16 16 0 0 0-15.704 12.937l-6.242 32C96.362 86.816 103.927 96 113.993 96h33.846l-62.09 320H46.278a16 16 0 0 0-15.704 12.935l-6.245 32C22.402 470.815 29.967 480 40.034 480h158.479a16 16 0 0 0 15.704-12.935l6.245-32c1.927-9.88-5.638-19.065-15.704-19.065z"})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},bD={name:"link",keyCommand:"link",shortcuts:"ctrlcmd+l",prefix:"[",suffix:"](url)",buttonProps:{"aria-label":"Add a link (ctrl + l)",title:"Add a link (ctrl + l)"},icon:h.jsx("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 520 520",children:h.jsx("path",{fill:"currentColor",d:"M331.751196,182.121107 C392.438214,241.974735 391.605313,337.935283 332.11686,396.871226 C332.005129,396.991316 331.873084,397.121413 331.751196,397.241503 L263.493918,464.491645 C203.291404,523.80587 105.345257,523.797864 45.151885,464.491645 C-15.0506283,405.187427 -15.0506283,308.675467 45.151885,249.371249 L82.8416853,212.237562 C92.836501,202.39022 110.049118,208.9351 110.56511,222.851476 C111.223305,240.5867 114.451306,258.404985 120.407566,275.611815 C122.424812,281.438159 120.983487,287.882964 116.565047,292.23621 L103.272145,305.332975 C74.8052033,333.379887 73.9123737,379.047937 102.098973,407.369054 C130.563883,435.969378 177.350591,436.139505 206.033884,407.879434 L274.291163,340.6393 C302.9257,312.427264 302.805844,266.827265 274.291163,238.733318 C270.531934,235.036561 266.74528,232.16442 263.787465,230.157924 C259.544542,227.2873 256.928256,222.609848 256.731165,217.542518 C256.328935,206.967633 260.13184,196.070508 268.613213,187.714278 L289.998463,166.643567 C295.606326,161.118448 304.403592,160.439942 310.906317,164.911276 C318.353355,170.034591 325.328531,175.793397 331.751196,182.121107 Z M240.704978,55.4828366 L172.447607,122.733236 C172.325719,122.853326 172.193674,122.983423 172.081943,123.103513 C117.703294,179.334654 129.953294,261.569283 185.365841,328.828764 C191.044403,335.721376 198.762988,340.914712 206.209732,346.037661 C212.712465,350.509012 221.510759,349.829503 227.117615,344.305363 L248.502893,323.234572 C256.984277,314.87831 260.787188,303.981143 260.384957,293.406218 C260.187865,288.338869 257.571576,283.661398 253.328648,280.790763 C250.370829,278.78426 246.58417,275.912107 242.824936,272.215337 C214.310216,244.121282 206.209732,204.825874 229.906702,179.334654 L298.164073,112.094263 C326.847404,83.8340838 373.633159,84.0042113 402.099123,112.604645 C430.285761,140.92587 429.393946,186.594095 400.92595,214.641114 L387.63303,227.737929 C383.214584,232.091191 381.773257,238.536021 383.790506,244.362388 C389.746774,261.569283 392.974779,279.387637 393.632975,297.122928 C394.149984,311.039357 411.361608,317.584262 421.356437,307.736882 L459.046288,270.603053 C519.249898,211.29961 519.249898,114.787281 459.047304,55.4828366 C398.853851,-3.82360914 300.907572,-3.83161514 240.704978,55.4828366 Z"})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.includes("http")||r.selectedText.includes("www")?(n=Dt({text:e.text,selection:e.selection,prefix:"[](",suffix:")"}),r=t.setSelectionRange(n),mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"[](",suffix:")"})):r.selectedText.length===0?mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"[title",suffix:"](url)"}):mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix})}},_l=(e,t,n)=>{var r=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix}),i=t.setSelectionRange(r),s=y0(i.text,i.selection.start),a=Array(s+1).join(`
167
- `),o=T0(i.text,i.selection.end),u=Array(o+1).join(`
168
- `),{modifiedText:l,insertionLength:d}=Il(i.selectedText,n);if(d<0){var c=i.selection.start,m=i.selection.end;i.selection.start>0&&e.text.slice(i.selection.start-1,i.selection.start)===`
166
+ `,suffix:"",buttonProps:{"aria-label":"Insert HR (ctrl + h)",title:"Insert HR (ctrl + h)"},icon:h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 175 175",children:h.jsx("path",{fill:"currentColor",d:"M0,129 L175,129 L175,154 L0,154 L0,129 Z M3,9 L28.2158203,9 L28.2158203,47.9824219 L55.7695313,47.9824219 L55.7695313,9 L81.0966797,9 L81.0966797,107.185547 L55.7695313,107.185547 L55.7695313,68.0214844 L28.2158203,68.0214844 L28.2158203,107.185547 L3,107.185547 L3,9 Z M93.1855469,100.603516 L93.1855469,19 L135.211914,19 C143.004922,19 148.960917,19.6679621 153.080078,21.0039063 C157.199239,22.3398504 160.520495,24.8168764 163.043945,28.4350586 C165.567395,32.0532407 166.829102,36.459935 166.829102,41.6552734 C166.829102,46.1826398 165.864267,50.0883625 163.93457,53.3725586 C162.004873,56.6567547 159.351579,59.3193257 155.974609,61.3603516 C153.822255,62.6591862 150.872089,63.7353473 147.124023,64.5888672 C150.129898,65.5908253 152.319329,66.5927684 153.692383,67.5947266 C154.620122,68.2626987 155.965323,69.6913953 157.728027,71.8808594 C159.490731,74.0703234 160.668942,75.7587831 161.262695,76.9462891 L173,100.603516 L144.953125,100.603516 L131.482422,75.6660156 C129.775382,72.4374839 128.253913,70.3408251 126.917969,69.3759766 C125.0996,68.1142515 123.040051,67.4833984 120.739258,67.4833984 L118.512695,67.4833984 L118.512695,100.603516 L93.1855469,100.603516 Z M118.512695,52.0644531 L129.144531,52.0644531 C130.294928,52.0644531 132.521468,51.6933631 135.824219,50.9511719 C137.494149,50.6171858 138.857905,49.7636787 139.915527,48.390625 C140.97315,47.0175713 141.501953,45.4404386 141.501953,43.6591797 C141.501953,41.0244009 140.667001,39.0019602 138.99707,37.5917969 C137.32714,36.1816336 134.191429,35.4765625 129.589844,35.4765625 L117.512695,35.4765625 L118.512695,52.0644531 Z",transform:"translate(0 9)"})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.length>=e.command.prefix.length&&r.selectedText.startsWith(e.command.prefix)?mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(r=t.setSelectionRange({start:e.selection.start,end:e.selection.start}),mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}))}},AD={name:"image",keyCommand:"image",shortcuts:"ctrlcmd+k",prefix:"![image](",suffix:")",buttonProps:{"aria-label":"Add image (ctrl + k)",title:"Add image (ctrl + k)"},icon:h.jsx("svg",{width:"13",height:"13",viewBox:"0 0 20 20",children:h.jsx("path",{fill:"currentColor",d:"M15 9c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4-7H1c-.55 0-1 .45-1 1v14c0 .55.45 1 1 1h18c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm-1 13l-6-5-2 2-4-5-4 8V4h16v11z"})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.includes("http")||r.selectedText.includes("www")?mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(n=Dt({text:e.text,selection:e.selection,prefix:"![",suffix:"]()"}),r=t.setSelectionRange(n),r.selectedText.length===0?mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"![image",suffix:"](url)"}):mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"![",suffix:"]()"}))}},kD={name:"italic",keyCommand:"italic",shortcuts:"ctrlcmd+i",prefix:"*",buttonProps:{"aria-label":"Add italic text (ctrl + i)",title:"Add italic text (ctrl + i)"},icon:h.jsx("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 320 512",children:h.jsx("path",{fill:"currentColor",d:"M204.758 416h-33.849l62.092-320h40.725a16 16 0 0 0 15.704-12.937l6.242-32C297.599 41.184 290.034 32 279.968 32H120.235a16 16 0 0 0-15.704 12.937l-6.242 32C96.362 86.816 103.927 96 113.993 96h33.846l-62.09 320H46.278a16 16 0 0 0-15.704 12.935l-6.245 32C22.402 470.815 29.967 480 40.034 480h158.479a16 16 0 0 0 15.704-12.935l6.245-32c1.927-9.88-5.638-19.065-15.704-19.065z"})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},ID={name:"link",keyCommand:"link",shortcuts:"ctrlcmd+l",prefix:"[",suffix:"](url)",buttonProps:{"aria-label":"Add a link (ctrl + l)",title:"Add a link (ctrl + l)"},icon:h.jsx("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 520 520",children:h.jsx("path",{fill:"currentColor",d:"M331.751196,182.121107 C392.438214,241.974735 391.605313,337.935283 332.11686,396.871226 C332.005129,396.991316 331.873084,397.121413 331.751196,397.241503 L263.493918,464.491645 C203.291404,523.80587 105.345257,523.797864 45.151885,464.491645 C-15.0506283,405.187427 -15.0506283,308.675467 45.151885,249.371249 L82.8416853,212.237562 C92.836501,202.39022 110.049118,208.9351 110.56511,222.851476 C111.223305,240.5867 114.451306,258.404985 120.407566,275.611815 C122.424812,281.438159 120.983487,287.882964 116.565047,292.23621 L103.272145,305.332975 C74.8052033,333.379887 73.9123737,379.047937 102.098973,407.369054 C130.563883,435.969378 177.350591,436.139505 206.033884,407.879434 L274.291163,340.6393 C302.9257,312.427264 302.805844,266.827265 274.291163,238.733318 C270.531934,235.036561 266.74528,232.16442 263.787465,230.157924 C259.544542,227.2873 256.928256,222.609848 256.731165,217.542518 C256.328935,206.967633 260.13184,196.070508 268.613213,187.714278 L289.998463,166.643567 C295.606326,161.118448 304.403592,160.439942 310.906317,164.911276 C318.353355,170.034591 325.328531,175.793397 331.751196,182.121107 Z M240.704978,55.4828366 L172.447607,122.733236 C172.325719,122.853326 172.193674,122.983423 172.081943,123.103513 C117.703294,179.334654 129.953294,261.569283 185.365841,328.828764 C191.044403,335.721376 198.762988,340.914712 206.209732,346.037661 C212.712465,350.509012 221.510759,349.829503 227.117615,344.305363 L248.502893,323.234572 C256.984277,314.87831 260.787188,303.981143 260.384957,293.406218 C260.187865,288.338869 257.571576,283.661398 253.328648,280.790763 C250.370829,278.78426 246.58417,275.912107 242.824936,272.215337 C214.310216,244.121282 206.209732,204.825874 229.906702,179.334654 L298.164073,112.094263 C326.847404,83.8340838 373.633159,84.0042113 402.099123,112.604645 C430.285761,140.92587 429.393946,186.594095 400.92595,214.641114 L387.63303,227.737929 C383.214584,232.091191 381.773257,238.536021 383.790506,244.362388 C389.746774,261.569283 392.974779,279.387637 393.632975,297.122928 C394.149984,311.039357 411.361608,317.584262 421.356437,307.736882 L459.046288,270.603053 C519.249898,211.29961 519.249898,114.787281 459.047304,55.4828366 C398.853851,-3.82360914 300.907572,-3.83161514 240.704978,55.4828366 Z"})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.includes("http")||r.selectedText.includes("www")?(n=Dt({text:e.text,selection:e.selection,prefix:"[](",suffix:")"}),r=t.setSelectionRange(n),mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"[](",suffix:")"})):r.selectedText.length===0?mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"[title",suffix:"](url)"}):mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix})}},vl=(e,t,n)=>{var r=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix}),i=t.setSelectionRange(r),s=A0(i.text,i.selection.start),a=Array(s+1).join(`
167
+ `),o=k0(i.text,i.selection.end),u=Array(o+1).join(`
168
+ `),{modifiedText:l,insertionLength:d}=_l(i.selectedText,n);if(d<0){var c=i.selection.start,m=i.selection.end;i.selection.start>0&&e.text.slice(i.selection.start-1,i.selection.start)===`
169
169
  `&&(c-=1),i.selection.end<e.text.length-1&&e.text.slice(i.selection.end,i.selection.end+1)===`
170
- `&&(m+=1),t.setSelectionRange({start:c,end:m}),t.replaceSelection(""+l),t.setSelectionRange({start:c,end:c+l.length})}else{t.replaceSelection(""+a+l+u);var p=i.selection.start+s,g=p+l.length;t.setSelectionRange({start:p,end:g})}},ED={name:"unordered-list",keyCommand:"list",shortcuts:"ctrl+shift+u",prefix:"- ",buttonProps:{"aria-label":"Add unordered list (ctrl + shift + u)",title:"Add unordered list (ctrl + shift + u)"},icon:h.jsx("svg",{"data-name":"unordered-list",width:"12",height:"12",viewBox:"0 0 512 512",children:h.jsx("path",{fill:"currentColor",d:"M96 96c0 26.51-21.49 48-48 48S0 122.51 0 96s21.49-48 48-48 48 21.49 48 48zM48 208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm0 160c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm96-236h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"})}),execute:(e,t)=>{_l(e,t,"- ")}},xD={name:"ordered-list",keyCommand:"list",shortcuts:"ctrl+shift+o",prefix:"1. ",buttonProps:{"aria-label":"Add ordered list (ctrl + shift + o)",title:"Add ordered list (ctrl + shift + o)"},icon:h.jsx("svg",{"data-name":"ordered-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:h.jsx("path",{fill:"currentColor",d:"M3.263 139.527c0-7.477 3.917-11.572 11.573-11.572h15.131V88.078c0-5.163.534-10.503.534-10.503h-.356s-1.779 2.67-2.848 3.738c-4.451 4.273-10.504 4.451-15.666-1.068l-5.518-6.231c-5.342-5.341-4.984-11.216.534-16.379l21.72-19.938C32.815 33.602 36.732 32 42.785 32H54.89c7.656 0 11.749 3.916 11.749 11.572v84.384h15.488c7.655 0 11.572 4.094 11.572 11.572v8.901c0 7.477-3.917 11.572-11.572 11.572H14.836c-7.656 0-11.573-4.095-11.573-11.572v-8.902zM2.211 304.591c0-47.278 50.955-56.383 50.955-69.165 0-7.18-5.954-8.755-9.28-8.755-3.153 0-6.479 1.051-9.455 3.852-5.079 4.903-10.507 7.004-16.111 2.451l-8.579-6.829c-5.779-4.553-7.18-9.805-2.803-15.409C13.592 201.981 26.025 192 47.387 192c19.437 0 44.476 10.506 44.476 39.573 0 38.347-46.753 46.402-48.679 56.909h39.049c7.529 0 11.557 4.027 11.557 11.382v8.755c0 7.354-4.028 11.382-11.557 11.382h-67.94c-7.005 0-12.083-4.028-12.083-11.382v-4.028zM5.654 454.61l5.603-9.28c3.853-6.654 9.105-7.004 15.584-3.152 4.903 2.101 9.63 3.152 14.359 3.152 10.155 0 14.358-3.502 14.358-8.23 0-6.654-5.604-9.106-15.934-9.106h-4.728c-5.954 0-9.28-2.101-12.258-7.88l-1.05-1.926c-2.451-4.728-1.226-9.806 2.801-14.884l5.604-7.004c6.829-8.405 12.257-13.483 12.257-13.483v-.35s-4.203 1.051-12.608 1.051H16.685c-7.53 0-11.383-4.028-11.383-11.382v-8.755c0-7.53 3.853-11.382 11.383-11.382h58.484c7.529 0 11.382 4.027 11.382 11.382v3.327c0 5.778-1.401 9.806-5.079 14.183l-17.509 20.137c19.611 5.078 28.716 20.487 28.716 34.845 0 21.363-14.358 44.126-48.503 44.126-16.636 0-28.192-4.728-35.896-9.455-5.779-4.202-6.304-9.805-2.626-15.934zM144 132h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"})}),execute:(e,t)=>{_l(e,t,(n,r)=>r+1+". ")}},yD={name:"checked-list",keyCommand:"list",shortcuts:"ctrl+shift+c",prefix:"- [ ] ",buttonProps:{"aria-label":"Add checked list (ctrl + shift + c)",title:"Add checked list (ctrl + shift + c)"},icon:h.jsx("svg",{"data-name":"checked-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:h.jsx("path",{fill:"currentColor",d:"M208 132h288c8.8 0 16-7.2 16-16V76c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zM64 368c-26.5 0-48.6 21.5-48.6 48s22.1 48 48.6 48 48-21.5 48-48-21.5-48-48-48zm92.5-299l-72.2 72.2-15.6 15.6c-4.7 4.7-12.9 4.7-17.6 0L3.5 109.4c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.3c4.7-4.7 12.3-4.7 17 0l17 16.5c4.6 4.7 4.6 12.3-.1 17zm0 159.6l-72.2 72.2-15.7 15.7c-4.7 4.7-12.9 4.7-17.6 0L3.5 269c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.7c4.7-4.7 12.3-4.7 17 0l17 17c4.6 4.6 4.6 12.2-.1 16.9z"})}),execute:(e,t)=>{_l(e,t,(n,r)=>"- [ ] ")}},TD={name:"preview",keyCommand:"preview",value:"preview",shortcuts:"ctrlcmd+9",buttonProps:{"aria-label":"Preview code (ctrl + 9)",title:"Preview code (ctrl + 9)"},icon:h.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[h.jsx("polygon",{fill:"currentColor",points:"0 71.293 0 122 38.023 123 38.023 398 0 397 0 449.707 91.023 450.413 91.023 72.293"}),h.jsx("polygon",{fill:"currentColor",points:"148.023 72.293 520 71.293 520 122 200.023 124 200.023 397 520 396 520 449.707 148.023 450.413"})]}),execute:(e,t,n,r,i)=>{t.textArea.focus(),i&&n&&r&&n({preview:"preview"})}},CD={name:"edit",keyCommand:"preview",value:"edit",shortcuts:"ctrlcmd+7",buttonProps:{"aria-label":"Edit code (ctrl + 7)",title:"Edit code (ctrl + 7)"},icon:h.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[h.jsx("polygon",{fill:"currentColor",points:"0 71.293 0 122 319 122 319 397 0 397 0 449.707 372 449.413 372 71.293"}),h.jsx("polygon",{fill:"currentColor",points:"429 71.293 520 71.293 520 122 481 123 481 396 520 396 520 449.707 429 449.413"})]}),execute:(e,t,n,r,i)=>{t.textArea.focus(),i&&n&&r&&n({preview:"edit"})}},SD={name:"live",keyCommand:"preview",value:"live",shortcuts:"ctrlcmd+8",buttonProps:{"aria-label":"Live code (ctrl + 8)",title:"Live code (ctrl + 8)"},icon:h.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[h.jsx("polygon",{fill:"currentColor",points:"0 71.293 0 122 179 122 179 397 0 397 0 449.707 232 449.413 232 71.293"}),h.jsx("polygon",{fill:"currentColor",points:"289 71.293 520 71.293 520 122 341 123 341 396 520 396 520 449.707 289 449.413"})]}),execute:(e,t,n,r,i)=>{t.textArea.focus(),i&&n&&r&&n({preview:"live"})}},AD={name:"quote",keyCommand:"quote",shortcuts:"ctrlcmd+q",prefix:"> ",buttonProps:{"aria-label":"Insert a quote (ctrl + q)",title:"Insert a quote (ctrl + q)"},icon:h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:h.jsx("path",{fill:"currentColor",d:"M520,95.75 L520,225.75 C520,364.908906 457.127578,437.050625 325.040469,472.443125 C309.577578,476.586875 294.396016,464.889922 294.396016,448.881641 L294.396016,414.457031 C294.396016,404.242891 300.721328,395.025078 310.328125,391.554687 C377.356328,367.342187 414.375,349.711094 414.375,274.5 L341.25,274.5 C314.325781,274.5 292.5,252.674219 292.5,225.75 L292.5,95.75 C292.5,68.8257812 314.325781,47 341.25,47 L471.25,47 C498.174219,47 520,68.8257812 520,95.75 Z M178.75,47 L48.75,47 C21.8257813,47 0,68.8257812 0,95.75 L0,225.75 C0,252.674219 21.8257813,274.5 48.75,274.5 L121.875,274.5 C121.875,349.711094 84.8563281,367.342187 17.828125,391.554687 C8.22132813,395.025078 1.89601563,404.242891 1.89601563,414.457031 L1.89601563,448.881641 C1.89601563,464.889922 17.0775781,476.586875 32.5404687,472.443125 C164.627578,437.050625 227.5,364.908906 227.5,225.75 L227.5,95.75 C227.5,68.8257812 205.674219,47 178.75,47 Z"})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n),i=y0(r.text,r.selection.start),s=Array(i+1).join(`
171
- `),a=T0(r.text,r.selection.end),o=Array(a+1).join(`
172
- `),u=Il(r.selectedText,e.command.prefix);t.replaceSelection(""+s+u.modifiedText+o);var l=r.selection.start+i,d=l+u.modifiedText.length;t.setSelectionRange({start:l,end:d})}},kD={name:"strikethrough",keyCommand:"strikethrough",shortcuts:"ctrl+shift+x",buttonProps:{"aria-label":"Add strikethrough text (ctrl + shift + x)",title:"Add strikethrough text (ctrl + shift + x)"},prefix:"~~",icon:h.jsx("svg",{"data-name":"strikethrough",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:h.jsx("path",{fill:"currentColor",d:"M496 288H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h480c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16zm-214.666 16c27.258 12.937 46.524 28.683 46.524 56.243 0 33.108-28.977 53.676-75.621 53.676-32.325 0-76.874-12.08-76.874-44.271V368c0-8.837-7.164-16-16-16H113.75c-8.836 0-16 7.163-16 16v19.204c0 66.845 77.717 101.82 154.487 101.82 88.578 0 162.013-45.438 162.013-134.424 0-19.815-3.618-36.417-10.143-50.6H281.334zm-30.952-96c-32.422-13.505-56.836-28.946-56.836-59.683 0-33.92 30.901-47.406 64.962-47.406 42.647 0 64.962 16.593 64.962 32.985V136c0 8.837 7.164 16 16 16h45.613c8.836 0 16-7.163 16-16v-30.318c0-52.438-71.725-79.875-142.575-79.875-85.203 0-150.726 40.972-150.726 125.646 0 22.71 4.665 41.176 12.777 56.547h129.823z"})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},S0={name:"title1",keyCommand:"title1",shortcuts:"ctrlcmd+1",prefix:"# ",suffix:"",buttonProps:{"aria-label":"Insert title1 (ctrl + 1)",title:"Insert title1 (ctrl + 1)"},icon:h.jsx("div",{style:{fontSize:18,textAlign:"left"},children:"Title 1"}),execute:(e,t)=>{Kr({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}};function Kr(e){var{state:t,api:n,prefix:r,suffix:i=r}=e,s=_i({text:t.text,selection:t.selection}),a=n.setSelectionRange(s);mt({api:n,selectedText:a.selectedText,selection:t.selection,prefix:r,suffix:i})}De({},S0,{icon:h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:h.jsx("path",{fill:"currentColor",d:"M15.7083333,468 C7.03242448,468 0,462.030833 0,454.666667 L0,421.333333 C0,413.969167 7.03242448,408 15.7083333,408 L361.291667,408 C369.967576,408 377,413.969167 377,421.333333 L377,454.666667 C377,462.030833 369.967576,468 361.291667,468 L15.7083333,468 Z M21.6666667,366 C9.69989583,366 0,359.831861 0,352.222222 L0,317.777778 C0,310.168139 9.69989583,304 21.6666667,304 L498.333333,304 C510.300104,304 520,310.168139 520,317.777778 L520,352.222222 C520,359.831861 510.300104,366 498.333333,366 L21.6666667,366 Z M136.835938,64 L136.835937,126 L107.25,126 L107.25,251 L40.75,251 L40.75,126 L-5.68434189e-14,126 L-5.68434189e-14,64 L136.835938,64 Z M212,64 L212,251 L161.648438,251 L161.648438,64 L212,64 Z M378,64 L378,126 L343.25,126 L343.25,251 L281.75,251 L281.75,126 L238,126 L238,64 L378,64 Z M449.047619,189.550781 L520,189.550781 L520,251 L405,251 L405,64 L449.047619,64 L449.047619,189.550781 Z"})})});var ID={name:"title2",keyCommand:"title2",shortcuts:"ctrlcmd+2",prefix:"## ",suffix:"",buttonProps:{"aria-label":"Insert title2 (ctrl + 2)",title:"Insert title2 (ctrl + 2)"},icon:h.jsx("div",{style:{fontSize:16,textAlign:"left"},children:"Title 2"}),execute:(e,t)=>{Kr({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},_D={name:"title3",keyCommand:"title3",shortcuts:"ctrlcmd+3",prefix:"### ",suffix:"",buttonProps:{"aria-label":"Insert title3 (ctrl + 3)",title:"Insert title3 (ctrl + 3)"},icon:h.jsx("div",{style:{fontSize:15,textAlign:"left"},children:"Title 3"}),execute:(e,t)=>{Kr({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},vD={name:"title4",keyCommand:"title4",shortcuts:"ctrlcmd+4",prefix:"#### ",suffix:"",buttonProps:{"aria-label":"Insert title4 (ctrl + 4)",title:"Insert title4 (ctrl + 4)"},icon:h.jsx("div",{style:{fontSize:14,textAlign:"left"},children:"Title 4"}),execute:(e,t)=>{Kr({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},DD={name:"title5",keyCommand:"title5",shortcuts:"ctrlcmd+5",prefix:"##### ",suffix:"",buttonProps:{"aria-label":"Insert title5 (ctrl + 5)",title:"Insert title5 (ctrl + 5)"},icon:h.jsx("div",{style:{fontSize:12,textAlign:"left"},children:"Title 5"}),execute:(e,t)=>{Kr({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},wD={name:"title6",keyCommand:"title6",shortcuts:"ctrlcmd+6",prefix:"###### ",suffix:"",buttonProps:{"aria-label":"Insert title6 (ctrl + 6)",title:"Insert title6 (ctrl + 6)"},icon:h.jsx("div",{style:{fontSize:12,textAlign:"left"},children:"Title 6"}),execute:(e,t)=>{Kr({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},PD={name:"table",keyCommand:"table",prefix:`
170
+ `&&(m+=1),t.setSelectionRange({start:c,end:m}),t.replaceSelection(""+l),t.setSelectionRange({start:c,end:c+l.length})}else{t.replaceSelection(""+a+l+u);var p=i.selection.start+s,g=p+l.length;t.setSelectionRange({start:p,end:g})}},_D={name:"unordered-list",keyCommand:"list",shortcuts:"ctrl+shift+u",prefix:"- ",buttonProps:{"aria-label":"Add unordered list (ctrl + shift + u)",title:"Add unordered list (ctrl + shift + u)"},icon:h.jsx("svg",{"data-name":"unordered-list",width:"12",height:"12",viewBox:"0 0 512 512",children:h.jsx("path",{fill:"currentColor",d:"M96 96c0 26.51-21.49 48-48 48S0 122.51 0 96s21.49-48 48-48 48 21.49 48 48zM48 208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm0 160c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm96-236h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"})}),execute:(e,t)=>{vl(e,t,"- ")}},vD={name:"ordered-list",keyCommand:"list",shortcuts:"ctrl+shift+o",prefix:"1. ",buttonProps:{"aria-label":"Add ordered list (ctrl + shift + o)",title:"Add ordered list (ctrl + shift + o)"},icon:h.jsx("svg",{"data-name":"ordered-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:h.jsx("path",{fill:"currentColor",d:"M3.263 139.527c0-7.477 3.917-11.572 11.573-11.572h15.131V88.078c0-5.163.534-10.503.534-10.503h-.356s-1.779 2.67-2.848 3.738c-4.451 4.273-10.504 4.451-15.666-1.068l-5.518-6.231c-5.342-5.341-4.984-11.216.534-16.379l21.72-19.938C32.815 33.602 36.732 32 42.785 32H54.89c7.656 0 11.749 3.916 11.749 11.572v84.384h15.488c7.655 0 11.572 4.094 11.572 11.572v8.901c0 7.477-3.917 11.572-11.572 11.572H14.836c-7.656 0-11.573-4.095-11.573-11.572v-8.902zM2.211 304.591c0-47.278 50.955-56.383 50.955-69.165 0-7.18-5.954-8.755-9.28-8.755-3.153 0-6.479 1.051-9.455 3.852-5.079 4.903-10.507 7.004-16.111 2.451l-8.579-6.829c-5.779-4.553-7.18-9.805-2.803-15.409C13.592 201.981 26.025 192 47.387 192c19.437 0 44.476 10.506 44.476 39.573 0 38.347-46.753 46.402-48.679 56.909h39.049c7.529 0 11.557 4.027 11.557 11.382v8.755c0 7.354-4.028 11.382-11.557 11.382h-67.94c-7.005 0-12.083-4.028-12.083-11.382v-4.028zM5.654 454.61l5.603-9.28c3.853-6.654 9.105-7.004 15.584-3.152 4.903 2.101 9.63 3.152 14.359 3.152 10.155 0 14.358-3.502 14.358-8.23 0-6.654-5.604-9.106-15.934-9.106h-4.728c-5.954 0-9.28-2.101-12.258-7.88l-1.05-1.926c-2.451-4.728-1.226-9.806 2.801-14.884l5.604-7.004c6.829-8.405 12.257-13.483 12.257-13.483v-.35s-4.203 1.051-12.608 1.051H16.685c-7.53 0-11.383-4.028-11.383-11.382v-8.755c0-7.53 3.853-11.382 11.383-11.382h58.484c7.529 0 11.382 4.027 11.382 11.382v3.327c0 5.778-1.401 9.806-5.079 14.183l-17.509 20.137c19.611 5.078 28.716 20.487 28.716 34.845 0 21.363-14.358 44.126-48.503 44.126-16.636 0-28.192-4.728-35.896-9.455-5.779-4.202-6.304-9.805-2.626-15.934zM144 132h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"})}),execute:(e,t)=>{vl(e,t,(n,r)=>r+1+". ")}},DD={name:"checked-list",keyCommand:"list",shortcuts:"ctrl+shift+c",prefix:"- [ ] ",buttonProps:{"aria-label":"Add checked list (ctrl + shift + c)",title:"Add checked list (ctrl + shift + c)"},icon:h.jsx("svg",{"data-name":"checked-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:h.jsx("path",{fill:"currentColor",d:"M208 132h288c8.8 0 16-7.2 16-16V76c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zM64 368c-26.5 0-48.6 21.5-48.6 48s22.1 48 48.6 48 48-21.5 48-48-21.5-48-48-48zm92.5-299l-72.2 72.2-15.6 15.6c-4.7 4.7-12.9 4.7-17.6 0L3.5 109.4c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.3c4.7-4.7 12.3-4.7 17 0l17 16.5c4.6 4.7 4.6 12.3-.1 17zm0 159.6l-72.2 72.2-15.7 15.7c-4.7 4.7-12.9 4.7-17.6 0L3.5 269c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.7c4.7-4.7 12.3-4.7 17 0l17 17c4.6 4.6 4.6 12.2-.1 16.9z"})}),execute:(e,t)=>{vl(e,t,(n,r)=>"- [ ] ")}},wD={name:"preview",keyCommand:"preview",value:"preview",shortcuts:"ctrlcmd+9",buttonProps:{"aria-label":"Preview code (ctrl + 9)",title:"Preview code (ctrl + 9)"},icon:h.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[h.jsx("polygon",{fill:"currentColor",points:"0 71.293 0 122 38.023 123 38.023 398 0 397 0 449.707 91.023 450.413 91.023 72.293"}),h.jsx("polygon",{fill:"currentColor",points:"148.023 72.293 520 71.293 520 122 200.023 124 200.023 397 520 396 520 449.707 148.023 450.413"})]}),execute:(e,t,n,r,i)=>{t.textArea.focus(),i&&n&&r&&n({preview:"preview"})}},ND={name:"edit",keyCommand:"preview",value:"edit",shortcuts:"ctrlcmd+7",buttonProps:{"aria-label":"Edit code (ctrl + 7)",title:"Edit code (ctrl + 7)"},icon:h.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[h.jsx("polygon",{fill:"currentColor",points:"0 71.293 0 122 319 122 319 397 0 397 0 449.707 372 449.413 372 71.293"}),h.jsx("polygon",{fill:"currentColor",points:"429 71.293 520 71.293 520 122 481 123 481 396 520 396 520 449.707 429 449.413"})]}),execute:(e,t,n,r,i)=>{t.textArea.focus(),i&&n&&r&&n({preview:"edit"})}},PD={name:"live",keyCommand:"preview",value:"live",shortcuts:"ctrlcmd+8",buttonProps:{"aria-label":"Live code (ctrl + 8)",title:"Live code (ctrl + 8)"},icon:h.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[h.jsx("polygon",{fill:"currentColor",points:"0 71.293 0 122 179 122 179 397 0 397 0 449.707 232 449.413 232 71.293"}),h.jsx("polygon",{fill:"currentColor",points:"289 71.293 520 71.293 520 122 341 123 341 396 520 396 520 449.707 289 449.413"})]}),execute:(e,t,n,r,i)=>{t.textArea.focus(),i&&n&&r&&n({preview:"live"})}},RD={name:"quote",keyCommand:"quote",shortcuts:"ctrlcmd+q",prefix:"> ",buttonProps:{"aria-label":"Insert a quote (ctrl + q)",title:"Insert a quote (ctrl + q)"},icon:h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:h.jsx("path",{fill:"currentColor",d:"M520,95.75 L520,225.75 C520,364.908906 457.127578,437.050625 325.040469,472.443125 C309.577578,476.586875 294.396016,464.889922 294.396016,448.881641 L294.396016,414.457031 C294.396016,404.242891 300.721328,395.025078 310.328125,391.554687 C377.356328,367.342187 414.375,349.711094 414.375,274.5 L341.25,274.5 C314.325781,274.5 292.5,252.674219 292.5,225.75 L292.5,95.75 C292.5,68.8257812 314.325781,47 341.25,47 L471.25,47 C498.174219,47 520,68.8257812 520,95.75 Z M178.75,47 L48.75,47 C21.8257813,47 0,68.8257812 0,95.75 L0,225.75 C0,252.674219 21.8257813,274.5 48.75,274.5 L121.875,274.5 C121.875,349.711094 84.8563281,367.342187 17.828125,391.554687 C8.22132813,395.025078 1.89601563,404.242891 1.89601563,414.457031 L1.89601563,448.881641 C1.89601563,464.889922 17.0775781,476.586875 32.5404687,472.443125 C164.627578,437.050625 227.5,364.908906 227.5,225.75 L227.5,95.75 C227.5,68.8257812 205.674219,47 178.75,47 Z"})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n),i=A0(r.text,r.selection.start),s=Array(i+1).join(`
171
+ `),a=k0(r.text,r.selection.end),o=Array(a+1).join(`
172
+ `),u=_l(r.selectedText,e.command.prefix);t.replaceSelection(""+s+u.modifiedText+o);var l=r.selection.start+i,d=l+u.modifiedText.length;t.setSelectionRange({start:l,end:d})}},LD={name:"strikethrough",keyCommand:"strikethrough",shortcuts:"ctrl+shift+x",buttonProps:{"aria-label":"Add strikethrough text (ctrl + shift + x)",title:"Add strikethrough text (ctrl + shift + x)"},prefix:"~~",icon:h.jsx("svg",{"data-name":"strikethrough",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:h.jsx("path",{fill:"currentColor",d:"M496 288H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h480c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16zm-214.666 16c27.258 12.937 46.524 28.683 46.524 56.243 0 33.108-28.977 53.676-75.621 53.676-32.325 0-76.874-12.08-76.874-44.271V368c0-8.837-7.164-16-16-16H113.75c-8.836 0-16 7.163-16 16v19.204c0 66.845 77.717 101.82 154.487 101.82 88.578 0 162.013-45.438 162.013-134.424 0-19.815-3.618-36.417-10.143-50.6H281.334zm-30.952-96c-32.422-13.505-56.836-28.946-56.836-59.683 0-33.92 30.901-47.406 64.962-47.406 42.647 0 64.962 16.593 64.962 32.985V136c0 8.837 7.164 16 16 16h45.613c8.836 0 16-7.163 16-16v-30.318c0-52.438-71.725-79.875-142.575-79.875-85.203 0-150.726 40.972-150.726 125.646 0 22.71 4.665 41.176 12.777 56.547h129.823z"})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},_0={name:"title1",keyCommand:"title1",shortcuts:"ctrlcmd+1",prefix:"# ",suffix:"",buttonProps:{"aria-label":"Insert title1 (ctrl + 1)",title:"Insert title1 (ctrl + 1)"},icon:h.jsx("div",{style:{fontSize:18,textAlign:"left"},children:"Title 1"}),execute:(e,t)=>{Qr({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}};function Qr(e){var{state:t,api:n,prefix:r,suffix:i=r}=e,s=_i({text:t.text,selection:t.selection}),a=n.setSelectionRange(s);mt({api:n,selectedText:a.selectedText,selection:t.selection,prefix:r,suffix:i})}De({},_0,{icon:h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:h.jsx("path",{fill:"currentColor",d:"M15.7083333,468 C7.03242448,468 0,462.030833 0,454.666667 L0,421.333333 C0,413.969167 7.03242448,408 15.7083333,408 L361.291667,408 C369.967576,408 377,413.969167 377,421.333333 L377,454.666667 C377,462.030833 369.967576,468 361.291667,468 L15.7083333,468 Z M21.6666667,366 C9.69989583,366 0,359.831861 0,352.222222 L0,317.777778 C0,310.168139 9.69989583,304 21.6666667,304 L498.333333,304 C510.300104,304 520,310.168139 520,317.777778 L520,352.222222 C520,359.831861 510.300104,366 498.333333,366 L21.6666667,366 Z M136.835938,64 L136.835937,126 L107.25,126 L107.25,251 L40.75,251 L40.75,126 L-5.68434189e-14,126 L-5.68434189e-14,64 L136.835938,64 Z M212,64 L212,251 L161.648438,251 L161.648438,64 L212,64 Z M378,64 L378,126 L343.25,126 L343.25,251 L281.75,251 L281.75,126 L238,126 L238,64 L378,64 Z M449.047619,189.550781 L520,189.550781 L520,251 L405,251 L405,64 L449.047619,64 L449.047619,189.550781 Z"})})});var OD={name:"title2",keyCommand:"title2",shortcuts:"ctrlcmd+2",prefix:"## ",suffix:"",buttonProps:{"aria-label":"Insert title2 (ctrl + 2)",title:"Insert title2 (ctrl + 2)"},icon:h.jsx("div",{style:{fontSize:16,textAlign:"left"},children:"Title 2"}),execute:(e,t)=>{Qr({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},FD={name:"title3",keyCommand:"title3",shortcuts:"ctrlcmd+3",prefix:"### ",suffix:"",buttonProps:{"aria-label":"Insert title3 (ctrl + 3)",title:"Insert title3 (ctrl + 3)"},icon:h.jsx("div",{style:{fontSize:15,textAlign:"left"},children:"Title 3"}),execute:(e,t)=>{Qr({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},MD={name:"title4",keyCommand:"title4",shortcuts:"ctrlcmd+4",prefix:"#### ",suffix:"",buttonProps:{"aria-label":"Insert title4 (ctrl + 4)",title:"Insert title4 (ctrl + 4)"},icon:h.jsx("div",{style:{fontSize:14,textAlign:"left"},children:"Title 4"}),execute:(e,t)=>{Qr({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},BD={name:"title5",keyCommand:"title5",shortcuts:"ctrlcmd+5",prefix:"##### ",suffix:"",buttonProps:{"aria-label":"Insert title5 (ctrl + 5)",title:"Insert title5 (ctrl + 5)"},icon:h.jsx("div",{style:{fontSize:12,textAlign:"left"},children:"Title 5"}),execute:(e,t)=>{Qr({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},jD={name:"title6",keyCommand:"title6",shortcuts:"ctrlcmd+6",prefix:"###### ",suffix:"",buttonProps:{"aria-label":"Insert title6 (ctrl + 6)",title:"Insert title6 (ctrl + 6)"},icon:h.jsx("div",{style:{fontSize:12,textAlign:"left"},children:"Title 6"}),execute:(e,t)=>{Qr({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},HD={name:"table",keyCommand:"table",prefix:`
173
173
  | Header | Header |
174
174
  |--------|--------|
175
175
  | Cell | Cell |
176
176
  | Cell | Cell |
177
177
  | Cell | Cell |
178
178
 
179
- `,suffix:"",buttonProps:{"aria-label":"Add table",title:"Add table"},icon:h.jsx("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 512 512",children:h.jsx("path",{fill:"currentColor",d:"M64 256V160H224v96H64zm0 64H224v96H64V320zm224 96V320H448v96H288zM448 256H288V160H448v96zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.length>=e.command.prefix.length+e.command.suffix.length&&r.selectedText.startsWith(e.command.prefix)?mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(r=t.setSelectionRange({start:e.selection.start,end:e.selection.start}),mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}))}},ND={name:"help",keyCommand:"help",buttonProps:{"aria-label":"Open help",title:"Open help"},icon:h.jsx("svg",{viewBox:"0 0 16 16",width:"12px",height:"12px",children:h.jsx("path",{d:"M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm.9 13H7v-1.8h1.9V13Zm-.1-3.6v.5H7.1v-.6c.2-2.1 2-1.9 1.9-3.2.1-.7-.3-1.1-1-1.1-.8 0-1.2.7-1.2 1.6H5c0-1.7 1.2-3 2.9-3 2.3 0 3 1.4 3 2.3.1 2.3-1.9 2-2.1 3.5Z",fill:"currentColor"})}),execute:()=>{window.open("https://www.markdownguide.org/basic-syntax/","_blank","noreferrer")}},RD=()=>[uD,gD,kD,pD,fD([S0,ID,_D,vD,DD,wD],{name:"title",groupName:"title",buttonProps:{"aria-label":"Insert title",title:"Insert title"}}),Ds,bD,AD,lD,C0,cD,mD,PD,Ds,ED,xD,yD,Ds,ND],LD=()=>[CD,SD,TD,Ds,dD];function ia(e){var t;return{selection:{start:e.selectionStart,end:e.selectionEnd},text:e.value,selectedText:(t=e.value)==null?void 0:t.slice(e.selectionStart,e.selectionEnd)}}class vl{constructor(t){this.textArea=void 0,this.textArea=t}replaceSelection(t){return wr(this.textArea,t),ia(this.textArea)}setSelectionRange(t){return this.textArea.focus(),this.textArea.selectionStart=t.start,this.textArea.selectionEnd=t.end,ia(this.textArea)}}class Dl{constructor(t){this.textArea=void 0,this.textApi=void 0,this.textArea=t,this.textApi=new vl(t)}getState(){return this.textArea?ia(this.textArea):!1}executeCommand(t,n,r,i){t.execute&&t.execute(De({command:t},ia(this.textArea)),this.textApi,n,r,i)}}function ws(e){e.stopPropagation(),e.preventDefault()}function ch(e,t){ws(e);var n=e.target,r=new vl(n),i={start:n.selectionStart,end:n.selectionEnd};if(i=_i({text:n.value,selection:i}),!(t<0&&i.start<=0||t>0&&i.end>=n.value.length)){var s=n.value.slice(i.start,i.end);if(t<0){var a=_i({text:n.value,selection:{start:i.start-1,end:i.start-1}}),o=n.value.slice(a.start,a.end);r.setSelectionRange({start:a.start,end:i.end}),wr(n,s+`
179
+ `,suffix:"",buttonProps:{"aria-label":"Add table",title:"Add table"},icon:h.jsx("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 512 512",children:h.jsx("path",{fill:"currentColor",d:"M64 256V160H224v96H64zm0 64H224v96H64V320zm224 96V320H448v96H288zM448 256H288V160H448v96zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"})}),execute:(e,t)=>{var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.length>=e.command.prefix.length+e.command.suffix.length&&r.selectedText.startsWith(e.command.prefix)?mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(r=t.setSelectionRange({start:e.selection.start,end:e.selection.start}),mt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}))}},UD={name:"help",keyCommand:"help",buttonProps:{"aria-label":"Open help",title:"Open help"},icon:h.jsx("svg",{viewBox:"0 0 16 16",width:"12px",height:"12px",children:h.jsx("path",{d:"M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm.9 13H7v-1.8h1.9V13Zm-.1-3.6v.5H7.1v-.6c.2-2.1 2-1.9 1.9-3.2.1-.7-.3-1.1-1-1.1-.8 0-1.2.7-1.2 1.6H5c0-1.7 1.2-3 2.9-3 2.3 0 3 1.4 3 2.3.1 2.3-1.9 2-2.1 3.5Z",fill:"currentColor"})}),execute:()=>{window.open("https://www.markdownguide.org/basic-syntax/","_blank","noreferrer")}},zD=()=>[bD,kD,LD,SD,CD([_0,OD,FD,MD,BD,jD],{name:"title",groupName:"title",buttonProps:{"aria-label":"Insert title",title:"Insert title"}}),Ds,ID,RD,ED,I0,xD,AD,HD,Ds,_D,vD,DD,Ds,UD],$D=()=>[ND,PD,wD,Ds,yD];function ia(e){var t;return{selection:{start:e.selectionStart,end:e.selectionEnd},text:e.value,selectedText:(t=e.value)==null?void 0:t.slice(e.selectionStart,e.selectionEnd)}}class Dl{constructor(t){this.textArea=void 0,this.textArea=t}replaceSelection(t){return wr(this.textArea,t),ia(this.textArea)}setSelectionRange(t){return this.textArea.focus(),this.textArea.selectionStart=t.start,this.textArea.selectionEnd=t.end,ia(this.textArea)}}class wl{constructor(t){this.textArea=void 0,this.textApi=void 0,this.textArea=t,this.textApi=new Dl(t)}getState(){return this.textArea?ia(this.textArea):!1}executeCommand(t,n,r,i){t.execute&&t.execute(De({command:t},ia(this.textArea)),this.textApi,n,r,i)}}function ws(e){e.stopPropagation(),e.preventDefault()}function ch(e,t){ws(e);var n=e.target,r=new Dl(n),i={start:n.selectionStart,end:n.selectionEnd};if(i=_i({text:n.value,selection:i}),!(t<0&&i.start<=0||t>0&&i.end>=n.value.length)){var s=n.value.slice(i.start,i.end);if(t<0){var a=_i({text:n.value,selection:{start:i.start-1,end:i.start-1}}),o=n.value.slice(a.start,a.end);r.setSelectionRange({start:a.start,end:i.end}),wr(n,s+`
180
180
  `+o),r.setSelectionRange({start:a.start,end:a.start+s.length})}else{var u=_i({text:n.value,selection:{start:i.end+1,end:i.end+1}}),l=n.value.slice(u.start,u.end);r.setSelectionRange({start:i.start,end:u.end}),wr(n,l+`
181
- `+s),r.setSelectionRange({start:u.end-s.length,end:u.end})}}}function OD(e,t,n){t===void 0&&(t=2),n===void 0&&(n=!1);var r=e.target,i=r.value.substr(0,r.selectionStart),s=i.split(`
182
- `),a=s[s.length-1],o=new vl(r);if(!n&&e.code&&e.code.toLowerCase()==="tab"){ws(e);var u=new Array(t+1).join(" ");if(r.selectionStart!==r.selectionEnd){var l=r.value.substring(0,r.selectionStart).split(`
181
+ `+s),r.setSelectionRange({start:u.end-s.length,end:u.end})}}}function qD(e,t,n){t===void 0&&(t=2),n===void 0&&(n=!1);var r=e.target,i=r.value.substr(0,r.selectionStart),s=i.split(`
182
+ `),a=s[s.length-1],o=new Dl(r);if(!n&&e.code&&e.code.toLowerCase()==="tab"){ws(e);var u=new Array(t+1).join(" ");if(r.selectionStart!==r.selectionEnd){var l=r.value.substring(0,r.selectionStart).split(`
183
183
  `),d=r.value.substring(0,r.selectionEnd).split(`
184
184
  `),c=[];d.forEach((B,V)=>{B!==l[V]&&c.push(B)});var m=c.join(`
185
- `),p=r.value.substring(r.selectionStart,r.selectionEnd),g=r.value.substring(0,r.selectionStart).length;o.setSelectionRange({start:r.value.indexOf(m),end:r.selectionEnd});var b=Il(m,e.shiftKey?"":u),T=b.modifiedText;e.shiftKey&&(T=T.split(`
185
+ `),p=r.value.substring(r.selectionStart,r.selectionEnd),g=r.value.substring(0,r.selectionStart).length;o.setSelectionRange({start:r.value.indexOf(m),end:r.selectionEnd});var b=_l(m,e.shiftKey?"":u),T=b.modifiedText;e.shiftKey&&(T=T.split(`
186
186
  `).map(B=>B.replace(new RegExp("^"+u),"")).join(`
187
187
  `)),o.replaceSelection(T);var y=e.shiftKey?-t:t,C=e.shiftKey?-c.length*t:c.length*t;o.setSelectionRange({start:g+y,end:g+p.length+C})}else return wr(r,u)}else if(e.keyCode===13&&e.code.toLowerCase()==="enter"&&(/^(-|\*)\s/.test(a)||/^\d+.\s/.test(a))&&!e.shiftKey){ws(e);var S=`
188
188
  - `;return a.startsWith("*")&&(S=`
189
189
  * `),(a.startsWith("- [ ]")||a.startsWith("- [X]")||a.startsWith("- [x]"))&&(S=`
190
190
  - [ ] `),/^\d+.\s/.test(a)&&(S=`
191
- `+(parseInt(a)+1)+". "),wr(r,S)}else if(e.code&&e.code.toLowerCase()==="keyd"&&e.ctrlKey){ws(e);var P={start:r.selectionStart,end:r.selectionEnd},D=P;P=_i({text:r.value,selection:P});var w=r.value.slice(P.start,P.end);o.setSelectionRange({start:P.end,end:P.end}),wr(r,`
192
- `+w),o.setSelectionRange({start:D.start,end:D.end})}else e.code&&e.code.toLowerCase()==="arrowup"&&e.altKey?ch(e,-1):e.code&&e.code.toLowerCase()==="arrowdown"&&e.altKey&&ch(e,1)}var FD=["prefixCls","onChange"],MD=["markdown","commands","fullscreen","preview","highlightEnable","extraCommands","tabSize","defaultTabEnable","autoFocusEnd","textareaWarp","dispatch"];function BD(e){var{prefixCls:t,onChange:n}=e,r=Ks(e,FD),i=N.useContext(Yr),{markdown:s,commands:a,fullscreen:o,preview:u,highlightEnable:l,extraCommands:d,tabSize:c,defaultTabEnable:m,autoFocusEnd:p,textareaWarp:g,dispatch:b}=i;Ks(i,MD);var T=N.useRef(null),y=N.useRef(),C=N.useRef({fullscreen:o,preview:u});N.useEffect(()=>{C.current={fullscreen:o,preview:u,highlightEnable:l}},[o,u,l]),N.useEffect(()=>{if(T.current&&b){var P=new Dl(T.current);y.current=P,b({textarea:T.current,commandOrchestrator:P})}},[]),N.useEffect(()=>{if(p&&T.current&&g){T.current.focus();var P=T.current.value.length;T.current.setSelectionRange(P,P),setTimeout(()=>{g&&(g.scrollTop=g.scrollHeight),T.current&&(T.current.scrollTop=T.current.scrollHeight)},0)}},[g]);var S=P=>{OD(P,c,m),x0(P,[...a||[],...d||[]],y.current,b,C.current)};return N.useEffect(()=>(T.current&&T.current.addEventListener("keydown",S),()=>{T.current&&T.current.removeEventListener("keydown",S)}),[]),h.jsx("textarea",De({autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1},r,{ref:T,className:t+"-text-input "+(r.className?r.className:""),value:s,onChange:P=>{b&&b({markdown:P.target.value}),n&&n(P)}}))}var jD=["prefixCls","className","onScroll","renderTextarea"];function HD(e){var t=e||{},{prefixCls:n,className:r,onScroll:i,renderTextarea:s}=t,a=Ks(t,jD),{markdown:o,scrollTop:u,commands:l,extraCommands:d,dispatch:c}=N.useContext(Yr),m=N.useRef(null),p=N.useRef(),g=N.createRef();N.useEffect(()=>{var T={};g.current&&(T.textareaWarp=g.current||void 0,g.current.scrollTop=u||0),c&&c(De({},T))},[]),N.useEffect(()=>{if(m.current&&c){var T=new Dl(m.current);p.current=T,c({textarea:m.current,commandOrchestrator:T})}},[]);var b={WebkitTextFillColor:"initial",overflow:"auto"};return h.jsx("div",{ref:g,className:n+"-area "+(r||""),onScroll:i,children:h.jsx("div",{className:n+"-text",children:s?N.cloneElement(s(De({},a,{value:o,autoComplete:"off",autoCorrect:"off",spellCheck:"false",autoCapitalize:"off",className:n+"-text-input",style:{WebkitTextFillColor:"inherit",overflow:"auto"}}),{dispatch:c,onChange:a.onChange,shortcuts:x0,useContext:{commands:l,extraCommands:d,commandOrchestrator:p.current}}),{ref:m}):h.jsx(N.Fragment,{children:h.jsx(BD,De({prefixCls:n},a,{style:b}))})})})}function UD(e){var{prefixCls:t,groupName:n,commands:r,children:i}=e||{},{barPopup:s={}}=N.useContext(Yr);return N.useMemo(()=>h.jsx("div",{className:t+"-toolbar-child "+(n&&s[n]?"active":""),onClick:a=>a.stopPropagation(),children:Array.isArray(r)?h.jsx(A0,De({commands:r},e,{isChild:!0})):i}),[r,s,n,t])}function dh(e){var{prefixCls:t,overflow:n}=e,{fullscreen:r,preview:i,barPopup:s={},components:a,commandOrchestrator:o,dispatch:u}=N.useContext(Yr),l=N.useRef("");function d(c,m){if(u){var p={barPopup:De({},s)};c.keyCommand==="preview"&&(p.preview=c.value),c.keyCommand==="fullscreen"&&(p.fullscreen=!r),e.commands&&c.keyCommand==="group"?e.commands.forEach(g=>{m===g.groupName?p.barPopup[m]=!0:g.keyCommand&&(p.barPopup[g.groupName]=!1)}):(m||c.parent)&&Object.keys(p.barPopup||{}).forEach(g=>{p.barPopup[g]=!1}),Object.keys(p).length&&u(De({},p)),o&&o.executeCommand(c)}}return N.useEffect(()=>{document&&n&&(r?document.body.style.overflow="hidden":(l.current||(l.current=window.getComputedStyle(document.body,null).overflow),document.body.style.overflow=l.current))},[r,l,n]),h.jsx("ul",{children:(e.commands||[]).map((c,m)=>{if(c.keyCommand==="divider")return h.jsx("li",De({},c.liProps,{className:t+"-toolbar-divider"}),m);if(!c.keyCommand)return h.jsx(N.Fragment,{},m);var p=r&&c.keyCommand==="fullscreen"||c.keyCommand==="preview"&&i===c.value,g=c.children&&typeof c.children=="function"?c.children({getState:()=>o.getState(),textApi:o?o.textApi:void 0,close:()=>d({},c.groupName),execute:()=>d({execute:c.execute}),dispatch:u}):void 0,b=s&&i&&i==="preview"&&!/(preview|fullscreen)/.test(c.keyCommand),T=a?.toolbar||c.render,y=T&&typeof T=="function"?T(c,!!b,d,m):null;return h.jsxs("li",De({},c.liProps,{className:p?"active":"",children:[y&&N.isValidElement(y)&&y,!y&&!c.buttonProps&&c.icon,!y&&c.buttonProps&&N.createElement("button",De({type:"button",key:m,disabled:b,"data-name":c.name},c.buttonProps,{onClick:C=>{C.stopPropagation(),d(c,c.groupName)}}),c.icon),c.children&&h.jsx(UD,{overflow:n,groupName:c.groupName,prefixCls:t,children:g,commands:Array.isArray(c.children)?c.children:void 0})]}),m)})})}function A0(e){e===void 0&&(e={});var{prefixCls:t,isChild:n,className:r}=e,{commands:i,extraCommands:s}=N.useContext(Yr);return h.jsxs("div",{className:t+"-toolbar "+r,children:[h.jsx(dh,De({},e,{commands:e.commands||i||[]})),!n&&h.jsx(dh,De({},e,{commands:s||[]}))]})}function hh(e){var{hideToolbar:t,toolbarBottom:n,placement:r,overflow:i,prefixCls:s}=e;if(t||r==="bottom"&&!n||r==="top"&&n)return null;var a=n?"bottom":"";return h.jsx(A0,{prefixCls:s,overflow:i,className:a})}var zD=e=>{var{prefixCls:t,onChange:n}=e||{},r=N.useRef(null),i=N.useRef(),s=N.useRef(e.height);N.useEffect(()=>{s.current!==e.height&&(s.current=e.height)},[e.height]);function a(d){if(i.current){var c,m=d.clientY||((c=d.changedTouches[0])==null?void 0:c.clientY),p=i.current.height+m-i.current.dragY;p>=e.minHeight&&p<=e.maxHeight&&n&&n(i.current.height+(m-i.current.dragY))}}function o(){var d,c;i.current=void 0,document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",o),(d=r.current)==null||d.removeEventListener("touchmove",a),(c=r.current)==null||c.removeEventListener("touchend",o)}function u(d){var c,m,p;d.preventDefault();var g=d.clientY||((c=d.changedTouches[0])==null?void 0:c.clientY);i.current={height:s.current,dragY:g},document.addEventListener("mousemove",a),document.addEventListener("mouseup",o),(m=r.current)==null||m.addEventListener("touchmove",a,{passive:!1}),(p=r.current)==null||p.addEventListener("touchend",o,{passive:!1})}N.useEffect(()=>{if(document){var d,c;(d=r.current)==null||d.addEventListener("touchstart",u,{passive:!1}),(c=r.current)==null||c.addEventListener("mousedown",u)}return()=>{if(document){var m;(m=r.current)==null||m.removeEventListener("touchstart",u),document.removeEventListener("mousemove",a)}}},[]);var l=N.useMemo(()=>h.jsx("svg",{viewBox:"0 0 512 512",height:"100%",children:h.jsx("path",{fill:"currentColor",d:"M304 256c0 26.5-21.5 48-48 48s-48-21.5-48-48 21.5-48 48-48 48 21.5 48 48zm120-48c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48zm-336 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z"})}),[]);return h.jsx("div",{className:t+"-bar",ref:r,children:l})},$D=["prefixCls","className","value","commands","commandsFilter","direction","extraCommands","height","enableScroll","visibleDragbar","highlightEnable","preview","fullscreen","overflow","previewOptions","textareaProps","maxHeight","minHeight","autoFocus","autoFocusEnd","tabSize","defaultTabEnable","onChange","onStatistics","onHeightChange","hideToolbar","toolbarBottom","components","renderTextarea"];function qD(e){return e===void 0&&(e={}),Object.keys(e).forEach(t=>{e[t]=!1}),e}var VD=N.forwardRef((e,t)=>{var n=e||{},{prefixCls:r="w-md-editor",className:i,value:s,commands:a=RD(),commandsFilter:o,direction:u,extraCommands:l=LD(),height:d=200,enableScroll:c=!0,visibleDragbar:m=typeof e.visiableDragbar=="boolean"?e.visiableDragbar:!0,highlightEnable:p=!0,preview:g="live",fullscreen:b=!1,overflow:T=!0,previewOptions:y={},textareaProps:C,maxHeight:S=1200,minHeight:P=100,autoFocus:D,autoFocusEnd:w=!1,tabSize:B=2,defaultTabEnable:V=!1,onChange:Q,onStatistics:E,onHeightChange:L,hideToolbar:O,toolbarBottom:z=!1,components:M,renderTextarea:J}=n,oe=Ks(n,$D),he=a.map(Ce=>o?o(Ce,!1):Ce).filter(Boolean),fe=l.map(Ce=>o?o(Ce,!0):Ce).filter(Boolean),[G,_]=N.useReducer(aD,{markdown:s,preview:g,components:M,height:d,minHeight:P,highlightEnable:p,tabSize:B,defaultTabEnable:V,scrollTop:0,scrollTopPreview:0,commands:he,extraCommands:fe,fullscreen:b,barPopup:{}}),Ee=N.useRef(null),ue=N.useRef(null),I=N.useRef(c);N.useImperativeHandle(t,()=>De({},G,{container:Ee.current,dispatch:_})),N.useMemo(()=>I.current=c,[c]),N.useEffect(()=>{var Ce={};Ee.current&&(Ce.container=Ee.current||void 0),Ce.markdown=s||"",Ce.barPopup={},_&&_(De({},G,Ce))},[]);var de=[i,"wmde-markdown-var",u?r+"-"+u:null,r,G.preview?r+"-show-"+G.preview:null,G.fullscreen?r+"-fullscreen":null].filter(Boolean).join(" ").trim();N.useMemo(()=>s!==G.markdown&&_({markdown:s||""}),[s,G.markdown]),N.useMemo(()=>g!==G.preview&&_({preview:g}),[g]),N.useMemo(()=>B!==G.tabSize&&_({tabSize:B}),[B]),N.useMemo(()=>p!==G.highlightEnable&&_({highlightEnable:p}),[p]),N.useMemo(()=>D!==G.autoFocus&&_({autoFocus:D}),[D]),N.useMemo(()=>w!==G.autoFocusEnd&&_({autoFocusEnd:w}),[w]),N.useMemo(()=>b!==G.fullscreen&&_({fullscreen:b}),[b]),N.useMemo(()=>d!==G.height&&_({height:d}),[d]),N.useMemo(()=>d!==G.height&&L&&L(G.height,d,G),[d,L,G]),N.useMemo(()=>a!==G.commands&&_({commands:he}),[e.commands]),N.useMemo(()=>l!==G.extraCommands&&_({extraCommands:fe}),[e.extraCommands]);var pe=N.useRef(),q=N.useRef("preview"),re=N.useRef(!1);N.useMemo(()=>{pe.current=G.textareaWarp,G.textareaWarp&&(G.textareaWarp.addEventListener("mouseover",()=>{q.current="text"}),G.textareaWarp.addEventListener("mouseleave",()=>{q.current="preview"}))},[G.textareaWarp]);var te=(Ce,st)=>{if(I.current){var at=pe.current,Xe=ue.current?ue.current:void 0;if(re.current||(q.current=st,re.current=!0),at&&Xe){var rn=(at.scrollHeight-at.offsetHeight)/(Xe.scrollHeight-Xe.offsetHeight);Ce.target===at&&q.current==="text"&&(Xe.scrollTop=at.scrollTop/rn),Ce.target===Xe&&q.current==="preview"&&(at.scrollTop=Xe.scrollTop*rn);var se=0;q.current==="text"?se=at.scrollTop||0:q.current==="preview"&&(se=Xe.scrollTop||0),_({scrollTop:se})}}},we=r+"-preview "+(y.className||""),ne=Ce=>te(Ce,"preview"),U=N.useMemo(()=>h.jsx("div",{ref:ue,className:we,children:h.jsx(b0,De({},y,{onScroll:ne,source:G.markdown||""}))}),[we,y,G.markdown]),xe=M?.preview&&M?.preview(G.markdown||"",G,_);xe&&N.isValidElement(xe)&&(U=h.jsx("div",{className:we,ref:ue,onScroll:ne,children:xe}));var je=De({},oe.style,{height:G.height||"100%"}),ce=()=>_({barPopup:De({},qD(G.barPopup))}),zt=Ce=>_({height:Ce}),yt=Ce=>{if(Q&&Q(Ce.target.value,Ce,G),C&&C.onChange&&C.onChange(Ce),G.textarea&&G.textarea instanceof HTMLTextAreaElement&&E){var st=new Dl(G.textarea),at=st.getState()||{};E(De({},at,{lineCount:Ce.target.value.split(`
193
- `).length,length:Ce.target.value.length}))}};return h.jsx(Yr.Provider,{value:De({},G,{dispatch:_}),children:h.jsxs("div",De({ref:Ee,className:de},oe,{onClick:ce,style:je,children:[h.jsx(hh,{hideToolbar:O,toolbarBottom:z,prefixCls:r,overflow:T,placement:"top"}),h.jsxs("div",{className:r+"-content",children:[/(edit|live)/.test(G.preview||"")&&h.jsx(HD,De({className:r+"-input",prefixCls:r,autoFocus:D},C,{onChange:yt,renderTextarea:M?.textarea||J,onScroll:Ce=>te(Ce,"text")})),/(live|preview)/.test(G.preview||"")&&U]}),m&&!G.fullscreen&&h.jsx(zD,{prefixCls:r,height:G.height,maxHeight:S,minHeight:P,onChange:zt}),h.jsx(hh,{hideToolbar:O,toolbarBottom:z,prefixCls:r,overflow:T,placement:"bottom"})]}))})}),k0=VD;k0.Markdown=b0;function WD({cell:e,sourceAndPaths:t,onQueryChange:n,onSourceChange:r}){const i={query:e.value,malloyResult:e.result?JSON.parse(e.result):void 0,malloyQuery:e.queryInfo?JSON.parse(e.queryInfo):void 0,sourceName:e.sourceName,modelPath:e.modelPath};return h.jsx(Zu,{sourceAndPaths:t,existingQuery:i,existingSourceName:e.sourceName,onQueryChange:n,onSourceChange:r})}function GD({cell:e,expandCodeCell:t,expandEmbedding:n,hideEmbeddingIcons:r,editingMalloy:i,editingMarkdown:s,sourceAndPaths:a,onCellChange:o,onClose:u,onEdit:l,onDelete:d,addButtonCallback:c}){const[m,p]=N.useState(t),[g,b]=N.useState(n),[T,y]=N.useState(),[C]=N.useState(),[S,P]=N.useState(bi()),[D,w]=N.useState(!1),[B,V]=N.useState(e.sourceName?a.findIndex(I=>I.sourceInfo.name===e.sourceName):0);N.useEffect(()=>{e.isMarkdown||nr(e.value,"malloy").then(I=>{y(I)})},[e]);const[Q,E]=N.useState(e.value);N.useEffect(()=>{document.documentElement.setAttribute("data-color-mode","light")});const L=YD(I=>{o({...e,value:I})}),[O,z]=N.useState(!1),M=()=>{d(),z(!1)},J=a.length===0,oe=()=>{const I=a[B],de=I?.modelPath||e.modelPath||"",pe=I?.sourceInfo.name||e.sourceName||"";o({...e,value:S.query,result:S.malloyResult?JSON.stringify(S.malloyResult):void 0,queryInfo:S.malloyQuery?JSON.stringify(S.malloyQuery):void 0,sourceName:pe,modelPath:de})},he=h.jsx(x.Tooltip,{title:"Delete Cell",children:h.jsx(x.IconButton,{size:"small",onClick:()=>z(!0),children:h.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14zM10 11v6M14 11v6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),fe=h.jsxs(x.Dialog,{open:O,onClose:()=>z(!1),children:[h.jsx(x.DialogTitle,{children:"Confirm Delete"}),h.jsx(x.DialogContent,{children:h.jsx(x.Typography,{children:"Are you sure you want to delete this cell?"})}),h.jsxs(x.DialogActions,{children:[h.jsx(x.Button,{onClick:()=>z(!1),children:"Cancel"}),h.jsx(x.Button,{onClick:M,color:"error",children:"Delete"})]})]}),G=e.isMarkdown?h.jsxs(h.Fragment,{children:[s?h.jsx(x.Tooltip,{title:"Save",children:h.jsx(x.IconButton,{size:"small",onClick:u,children:h.jsx(ls,{})})}):h.jsx(x.Tooltip,{title:"Edit",children:h.jsx(x.IconButton,{size:"small",onClick:l,children:h.jsx(jc,{})})}),!s&&he]}):h.jsxs(h.Fragment,{children:[!i&&h.jsx(x.Tooltip,{title:m?"Hide Code":"View Code",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{p(!m)},children:h.jsx(_f,{})})}),!r&&!i&&e.result&&h.jsx(x.Tooltip,{title:g?"Hide Embedding":"View Embedding",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{b(!g)},children:h.jsx($i,{})})}),i&&h.jsx(x.Tooltip,{title:"Save",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{oe(),u()},children:h.jsx(ls,{})})}),!i&&h.jsx(x.Tooltip,{title:"Edit",children:h.jsx(x.IconButton,{size:"small",onClick:l,children:h.jsx(jc,{})})}),!i&&he]}),_=i||s,Ee=s?h.jsx(x.Tooltip,{title:"Save",children:h.jsx(x.IconButton,{size:"small",onClick:u,children:h.jsx(ls,{})})}):i?h.jsx(x.Tooltip,{title:"Save",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{oe(),u()},children:h.jsx(ls,{})})}):null,ue=D&&h.jsx(x.Box,{sx:{position:"absolute",top:"4px",right:"4px",display:"flex",gap:"8px",backgroundColor:"background.paper",border:"1px solid",borderColor:"divider",borderRadius:"8px",padding:"2px 4px",boxShadow:1,zIndex:10},children:!_&&h.jsxs(h.Fragment,{children:[c(!0),c(!1),G]})||Ee});return h.jsxs(ut,{sx:{position:"relative",marginTop:"5px",marginBottom:"5px",borderWidth:"1.5px",backgroundColor:"#fff",minHeight:"50px"},onMouseEnter:()=>w(!0),onMouseLeave:()=>{w(!1)},children:[ue,e.isMarkdown?h.jsx(h.Fragment,{children:s?h.jsx(k0,{value:Q,preview:"edit",autoFocus:!0,onChange:I=>{E(I),L(I)},onBlur:()=>{oe(),D||u()}}):h.jsx(x.Box,{sx:{px:.5,pt:0,mt:0,"& h1, & h2, & h3, & h4, & h5, & h6":{mt:.5,mb:.5},"& p":{mt:.5,mb:.5},"& ul, & ol":{mt:.5,mb:.5},"& li":{mt:0,mb:0},"& pre, & code":{mt:.5,mb:.5},"& blockquote":{mt:.5,mb:.5}},children:Q?h.jsx(x.Box,{onClick:l,sx:{cursor:"pointer"},children:h.jsx(mu,{children:Q})}):h.jsxs(x.Box,{onClick:l,sx:{cursor:"pointer"},children:[h.jsx(x.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"Markdown is empty"}),h.jsx(x.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Click to edit."})]})})}):h.jsxs(h.Fragment,{children:[h.jsx(x.Collapse,{in:g,timeout:"auto",unmountOnExit:!0,children:h.jsx(x.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:h.jsx(x.Typography,{component:"div",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:C}})})}),h.jsx(x.Collapse,{in:m,timeout:"auto",unmountOnExit:!0,children:h.jsx(x.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:h.jsx(x.Typography,{component:"div",className:"content",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:T}})})}),i&&(J?h.jsxs(h.Fragment,{children:[h.jsx(x.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"No Model Imports"}),h.jsx(x.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Please add a model import above."})]}):h.jsx(WD,{sourceAndPaths:a,onQueryChange:I=>{P(I)},cell:e,onSourceChange:V})),!i&&e.result&&h.jsx(ut,{variant:"outlined",sx:{borderRadius:0},children:h.jsx(vf,{result:e.result,minHeight:300,maxHeight:800})}),!i&&!e.result&&h.jsxs(x.Box,{onClick:l,sx:{cursor:"pointer"},children:[h.jsx(x.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"Explore is empty"}),h.jsx(x.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Click to edit."})]})]}),O&&fe]})}function YD(e,t=2e3){const n=N.useRef(void 0);return N.useCallback(r=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(r)},t)},[e,t])}const I0=N.createContext(void 0);function KD({children:e,workbookStorage:t}){const n=N.useMemo(()=>({workbookStorage:t}),[t]);return h.jsx(I0.Provider,{value:n,children:e})}function wl(){const e=N.useContext(I0);if(!e)throw new Error("useWorkbookStorage must be used within a WorkbookStorageProvider");return e}const QD=Me(h.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),XD=Me(h.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5z"})),ZD=new Ca(new Et);function JD({initialSelectedModels:e,onModelChange:t}){const{projectName:n,packageName:r,versionId:i}=pt(),{data:s,isLoading:a,isSuccess:o,isError:u,error:l}=xt({queryKey:["models",n,r,i],queryFn:y=>ZD.listModels(n,r,i,y)}),[d,c]=N.useState(e||[]),[m,p]=N.useState(null);N.useEffect(()=>{c(e||[])},[e]);const g=y=>{const C=d.filter(S=>S!==y);c(C),t(C)},b=y=>{const C=[...d,y];c(C),t(C),p(null)};let T=[];return o&&s?.data&&(T=s.data.filter(y=>!d.includes(y.path)).map(y=>y.path)),u?h.jsx(gt,{error:l,context:`${n} > ${r} > Model Picker`}):h.jsxs(h.Fragment,{children:[h.jsxs(x.FormControl,{fullWidth:!0,children:[a&&h.jsx(x.Typography,{children:"Loading..."}),h.jsxs(x.Stack,{direction:"row",spacing:1,children:[d.map(y=>h.jsx(x.Chip,{label:y,onDelete:()=>g(y),deleteIcon:h.jsx(QD,{}),sx:{marginBottom:"5px"}},y)),h.jsx(x.Button,{size:"small",startIcon:h.jsx(XD,{}),onClick:y=>p(y.currentTarget),disabled:a||u||T.length===0,children:"Add Model"})]})]}),h.jsxs(x.Menu,{anchorEl:m,open:!!m,onClose:()=>p(null),children:[h.jsx(x.Typography,{variant:"subtitle2",sx:{ml:1},children:"Models"}),h.jsx(x.Divider,{}),T.length===0?h.jsx(x.MenuItem,{disabled:!0,children:"No models available"}):T.map(y=>h.jsx(x.MenuItem,{onClick:()=>b(y),children:h.jsx(x.Typography,{variant:"body2",children:y})},y))]})]})}const ew=new Ca(new Et);function tw({workbookPath:e,expandCodeCells:t,expandEmbeddings:n,hideEmbeddingIcons:r}){const i=tl(),s=pt(),{projectName:a,packageName:o,versionId:u}=s,{server:l,getAccessToken:d}=ka(),{workbookStorage:c}=wl(),[m,p]=N.useState(void 0);if(!a||!o)throw new Error("Project and package must be provided via PubliserPackageProvider");if(!c)throw new Error("Workbook storage be provided via WorkbookStorageProvider");const[g,b]=N.useState(),[T,y]=N.useState(),[C,S]=N.useState(),[P,D]=N.useState([]),[w,B]=N.useState(null),[V,Q]=N.useState(null),E=!!w,L=()=>{B(null),Q(null)},O=(ue,I)=>{g.insertCell(I,{isMarkdown:ue,value:""}),fe(),ue?S(I):y(I),L()},[z,M]=N.useState(!1),J=()=>{M(!0)},oe=async ue=>{e&&c&&s&&await c.deleteWorkbook(s,e).then(()=>{p(void 0)}).catch(I=>{p(`Error deleting workbook: ${I.message}`)}),M(!1),i(`/${a}/${o}`,ue)},he=()=>{M(!1)},fe=N.useCallback(async()=>{try{b(await g.saveWorkbook()),p(void 0)}catch(ue){p(`Error saving workbook: ${ue.message}`)}},[g]);if(N.useEffect(()=>{if(!g)return;(async()=>{const I=new Map(P.map(({modelPath:q,sourceInfos:re})=>[q,re])),de=[],pe=[];for(const q of g.getModels())I.has(q)?de.push({modelPath:q,sourceInfos:I.get(q)}):(console.log("Fetching model from Publisher",q),pe.push(ew.getModel(a,o,q,u,await Hu(l,d)).then(re=>({modelPath:q,sourceInfos:re.data.sourceInfos.map(te=>JSON.parse(te))}))));if(pe.length>0){const q=await Promise.all(pe);D([...de,...q])}else D(de)})()},[d,g,o,a,l,u]),N.useEffect(()=>{e&&vr.loadWorkbook(c,s,e).then(ue=>{b(ue)})},[e,c,s]),!g)return h.jsx("div",{children:"Loading..."});const G=ue=>{const I=[];for(const de of ue)for(const pe of de.sourceInfos)I.push({modelPath:de.modelPath,sourceInfo:pe});return I},_=(ue,I)=>h.jsx(x.Button,{size:"small",startIcon:h.jsx(MT,{}),onClick:()=>O(ue,I),variant:"contained",sx:{backgroundColor:"#fff",color:de=>de.palette.mode==="dark"?de.palette.grey[100]:de.palette.grey[700],boxShadow:"none","&:hover":{backgroundColor:de=>de.palette.mode==="dark"?de.palette.grey[500]:de.palette.grey[300],boxShadow:"none"}},children:ue?"Markdown":"Explore"}),Ee=h.jsxs(x.Box,{sx:{display:"flex",gap:1,justifyContent:"center",flex:2},children:[_(!1,g.getCells().length),_(!0,g.getCells().length)]});return h.jsxs(ut,{variant:"outlined",children:[h.jsxs(Ut,{children:[m&&h.jsx(x.Box,{sx:{mb:2},children:h.jsx(x.Typography,{color:"error",variant:"body2",children:m})}),h.jsxs(gr,{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[h.jsxs(gr,{direction:"row",spacing:1,alignItems:"center",children:[h.jsx(x.Typography,{variant:"overline",sx:{fontSize:"13px",fontWeight:"bold",verticalAlign:"middle"},children:"Workbook"}),h.jsx(x.Typography,{variant:"subtitle2",sx:{fontSize:"13px",fontWeight:"normal",verticalAlign:"middle",ml:1},children:`${a} > ${o} > ${e.path}`})]}),h.jsxs(gr,{sx:{display:"flex",flexDirection:"row",gap:1},children:[h.jsx(x.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:h.jsx(nw,{workbookData:g})}),h.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:[h.jsx(x.Button,{color:"error",onClick:J,size:"small",children:"Delete"}),h.jsxs(x.Dialog,{open:z,onClose:he,children:[h.jsx(x.DialogTitle,{children:"Delete Workbook"}),h.jsx(x.DialogContent,{children:h.jsxs(x.DialogContentText,{children:['Are you sure you want to delete the workbook "',e.path,'"? This action cannot be undone.']})}),h.jsxs(x.DialogActions,{children:[h.jsx(x.Button,{onClick:he,color:"primary",size:"small",children:"Cancel"}),h.jsx(x.Button,{onClick:ue=>oe(ue),color:"error",autoFocus:!0,size:"small",children:"Delete"})]})]})]})]})]}),h.jsx(x.Divider,{}),h.jsxs(gr,{sx:{display:"flex",flexDirection:"row",width:"100%",mt:2},children:[h.jsx(x.Box,{sx:{flex:1},children:h.jsx(JD,{initialSelectedModels:g.getModels(),onModelChange:ue=>{b(g.setModels(ue)),fe()}})}),h.jsx(x.Box,{sx:{flex:1}})]})]}),h.jsx(Mu,{children:h.jsxs(gr,{children:[g.getCells().length===0&&h.jsxs(h.Fragment,{children:[h.jsx(x.Typography,{sx:{textAlign:"center",p:2,variant:"subtitle2",fontWeight:"medium"},children:"Workbook is empty"}),h.jsx(x.Typography,{variant:"body2",sx:{textAlign:"center",mb:2,variant:"body2"},children:"Click the + buttons to add a markdown or code cell."})]}),g.getCells().map((ue,I)=>h.jsx(N.Fragment,{children:h.jsx(GD,{cell:ue,addButtonCallback:de=>_(de,I),sourceAndPaths:G(P),expandCodeCell:t,expandEmbedding:n,hideEmbeddingIcons:r,editingMarkdown:C===I,editingMalloy:T===I,onDelete:()=>{b(g.deleteCell(I)),fe()},onCellChange:de=>{b(g.setCell(I,de)),fe()},onEdit:()=>{ue.isMarkdown?S(I):y(I)},onClose:()=>{ue.isMarkdown?S(void 0):y(void 0)}},`${I}-${ue.isMarkdown}-${e}-${a}-${o}`)},`${I}-${g.getCells().length}`)),Ee,h.jsxs(x.Menu,{anchorEl:w,open:E,onClose:L,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[h.jsx(x.MenuItem,{onClick:()=>O(!0,V??0),children:"Add Markdown"}),h.jsx(x.MenuItem,{onClick:()=>O(!1,V??0),children:"Add Malloy"})]}),h.jsx(gr,{sx:{flexDirection:"row",justifyContent:"flex-end",p:1}})]})})]})}function nw({workbookData:e}){const[t,n]=N.useState(!1),r=async()=>{if(!e)return;const i=e.toMalloyWorkbook();try{await navigator.clipboard.writeText(i),n(!0),setTimeout(()=>n(!1),1500)}catch{n(!1),alert("Failed to copy to clipboard")}};return h.jsx(x.Button,{color:"primary",onClick:r,size:"small",children:t?"Copied!":"Export"})}function _0({onWorkbookClick:e}){const{workbookStorage:t}=wl(),n=pt(),[r,i]=N.useState([]),[s,a]=N.useState(void 0);return N.useEffect(()=>{t&&t.listWorkspaces(n,!1).then(o=>{const u=[];Promise.all(o.map(async l=>{await t.listWorkbooks(l,n).then(d=>{u.push(...d)}).catch(d=>{a(`Error listing workbooks: ${d.message}`)})})).then(()=>{i(u),a(void 0)})})},[t,n]),h.jsxs(h.Fragment,{children:[s&&h.jsx(x.Box,{sx:{mb:2},children:h.jsx(x.Typography,{color:"error",variant:"body2",children:s})}),h.jsx(x.Divider,{}),h.jsx(x.Box,{sx:{maxHeight:"300px",overflow:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:"rgba(0,0,0,0.2)",borderRadius:"4px"}},children:h.jsxs(x.List,{dense:!0,children:[r.length===0&&h.jsx(x.ListItem,{children:h.jsx(x.ListItemText,{primary:"No workbooks found.",sx:{textAlign:"center"}})}),r.map(o=>h.jsx(x.ListItem,{onClick:u=>e(o,u),sx:{cursor:"pointer","&:hover":{backgroundColor:"action.hover"}},children:h.jsx(x.ListItemText,{primary:o.path})},o.path))]})})]})}const fh="Local";class rw{makeKey(t,n){let r=`BROWSER_NOTEBOOK_STORAGE/${t.projectName}/${t.packageName}`;return n&&(r+=`/${n}`),r}async listWorkspaces(t,n){return[{name:fh,description:"Stored locally- only accessible to this browser",writeable:!0}]}async listWorkbooks(t,n){const r=this.makeKey(n),i=[];for(let s=0;s<localStorage.length;s++){const a=localStorage.key(s);if(a&&a.startsWith(r+"/")){const o=a.substring(r.length+1);i.push({path:o,workspace:fh})}}return i}async getWorkbook(t,n){const r=this.makeKey(t,n.path),i=localStorage.getItem(r);if(i===null)throw new Error(`Notebook not found at path: ${n}`);return i}async deleteWorkbook(t,n){const r=this.makeKey(t,n.path);if(localStorage.getItem(r)===null)throw new Error(`Notebook not found at path: ${n}`);localStorage.removeItem(r)}async saveWorkbook(t,n,r){console.log("saveWorkbook",t,n,r);const i=this.makeKey(t,n.path);console.log("saveWorkbook",i),localStorage.setItem(i,r)}async moveWorkbook(t,n,r){const i=this.makeKey(t,n.path),s=this.makeKey(t,r.path),a=localStorage.getItem(i);if(a===null)throw new Error(`Notebook not found at path: ${n.path}`);localStorage.setItem(s,a),localStorage.removeItem(i)}}const iw=new Af(new Et);function sw(){const{projectName:e}=Qr(),{data:t,isSuccess:n,isError:r,error:i}=xt({queryKey:["about",e],queryFn:s=>iw.getProject(e,!1,s)});return h.jsxs(h.Fragment,{children:[!n&&!r&&h.jsx(bt,{text:"Fetching About..."}),n&&h.jsxs(ut,{variant:"outlined",sx:{p:2},children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",sx:{mb:1},children:"Readme"}),h.jsx(ut,{sx:{p:1},children:h.jsx(mu,{children:t.data.readme})})]}),r&&h.jsx(gt,{error:i,context:`${e} > About`})]})}const aw=new Sf(new Et);function v0({navigate:e}){const{projectName:t}=Qr(),{data:n,isSuccess:r,isError:i,error:s}=xt({queryKey:["packages",t],queryFn:a=>aw.listPackages(t,a)});return h.jsxs(h.Fragment,{children:[!r&&!i&&h.jsx(bt,{text:"Fetching Packages..."}),r&&h.jsxs(ut,{variant:"outlined",sx:{p:2},children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",sx:{mb:1},children:"Packages"}),h.jsx(x.Grid,{container:!0,spacing:2,columns:12,children:n.data.sort((a,o)=>a.name.localeCompare(o.name)).map(a=>h.jsx(x.Grid,{size:{xs:12,sm:12,md:12,lg:4},children:h.jsx(ut,{variant:"outlined",sx:{cursor:"pointer",transition:"all 0.2s ease-in-out","&:hover":{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",transform:"translateY(-2px)"}},onClick:o=>e(a.name+"/",o),children:h.jsxs(Ut,{children:[h.jsx(x.Typography,{variant:"overline",color:"primary.main",children:a.name}),h.jsx(x.Box,{sx:{maxHeight:"120px",overflowY:"auto"},children:h.jsx(x.Typography,{variant:"body2",children:a.description})})]})})},a.name))})]}),i&&h.jsx(gt,{error:s,context:`${t} > Packages`})]})}const D0=N.createContext(void 0);function Qr(){const e=N.useContext(D0);if(!e)throw new Error("useProject must be used within a ProjectProvider");return e}function ow({children:e,projectName:t}){return h.jsx(D0.Provider,{value:{projectName:t},children:e})}function uw({navigate:e}){return h.jsxs(x.Grid,{container:!0,spacing:2,columns:12,children:[h.jsx(x.Grid,{size:{xs:12,md:12},children:h.jsx(v0,{navigate:e})}),h.jsx(x.Grid,{size:{xs:12,md:12},children:h.jsx(sw,{})})]})}const lw=Me(h.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M8 17c-.55 0-1-.45-1-1v-3c0-.55.45-1 1-1s1 .45 1 1v3c0 .55-.45 1-1 1m4 0c-.55 0-1-.45-1-1v-1c0-.55.45-1 1-1s1 .45 1 1v1c0 .55-.45 1-1 1m0-5c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m4 5c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v8c0 .55-.45 1-1 1"})),cw=Me(h.jsx("path",{d:"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42s1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1"})),ph=Me(h.jsx("path",{d:"m19.46 8 .79-1.75L22 5.46c.39-.18.39-.73 0-.91l-1.75-.79L19.46 2c-.18-.39-.73-.39-.91 0l-.79 1.75-1.76.79c-.39.18-.39.73 0 .91l1.75.79.79 1.76c.18.39.74.39.92 0M11.5 9.5 9.91 6c-.35-.78-1.47-.78-1.82 0L6.5 9.5 3 11.09c-.78.36-.78 1.47 0 1.82l3.5 1.59L8.09 18c.36.78 1.47.78 1.82 0l1.59-3.5 3.5-1.59c.78-.36.78-1.47 0-1.82zm7.04 6.5-.79 1.75-1.75.79c-.39.18-.39.73 0 .91l1.75.79.79 1.76c.18.39.73.39.91 0l.79-1.75 1.76-.79c.39-.18.39-.73 0-.91l-1.75-.79-.79-1.76c-.18-.39-.74-.39-.92 0"})),dw=Me(h.jsx("path",{d:"M8.7 15.9 4.8 12l3.9-3.9c.39-.39.39-1.01 0-1.4a.984.984 0 0 0-1.4 0l-4.59 4.59c-.39.39-.39 1.02 0 1.41l4.59 4.6c.39.39 1.01.39 1.4 0s.39-1.01 0-1.4m6.6 0 3.9-3.9-3.9-3.9a.984.984 0 0 1 0-1.4c.39-.39 1.01-.39 1.4 0l4.59 4.59c.39.39.39 1.02 0 1.41l-4.59 4.6c-.39.39-1.01.39-1.4 0a.984.984 0 0 1 0-1.4"})),hw=Me(h.jsx("path",{d:"M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1 1.1-.49 1.1-1.1-.49-1.1-1.1-1.1M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m2.19 12.19L6 18l3.81-8.19L18 6z"})),fw=Me([h.jsx("path",{d:"M13 8.57c-.79 0-1.43.64-1.43 1.43s.64 1.43 1.43 1.43 1.43-.64 1.43-1.43-.64-1.43-1.43-1.43"},"0"),h.jsx("path",{d:"M13.21 3c-3.84-.11-7 2.87-7.19 6.64L4.1 12.2c-.25.33-.01.8.4.8H6v3c0 1.1.9 2 2 2h1v2c0 .55.45 1 1 1h5c.55 0 1-.45 1-1v-3.68c2.44-1.16 4.1-3.68 4-6.58-.14-3.62-3.18-6.63-6.79-6.74M16 10c0 .13-.01.26-.02.39l.83.66c.08.06.1.16.05.25l-.8 1.39c-.05.09-.16.12-.24.09l-.99-.4c-.21.16-.43.29-.67.39L14 13.83c-.01.1-.1.17-.2.17h-1.6c-.1 0-.18-.07-.2-.17l-.15-1.06c-.25-.1-.47-.23-.68-.39l-.99.4c-.09.03-.2 0-.25-.09l-.8-1.39c-.05-.08-.03-.19.05-.25l.84-.66c-.01-.13-.02-.26-.02-.39s.02-.27.04-.39l-.85-.66c-.08-.06-.1-.16-.05-.26l.8-1.38c.05-.09.15-.12.24-.09l1 .4c.2-.15.43-.29.67-.39L12 6.17c.02-.1.1-.17.2-.17h1.6c.1 0 .18.07.2.17l.15 1.06c.24.1.46.23.67.39l1-.4c.09-.03.2 0 .24.09l.8 1.38c.05.09.03.2-.05.26l-.85.66c.03.12.04.25.04.39"},"1")]),mh=Me(h.jsx("path",{d:"M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2m0-3h2v2H4zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2m4 1H4V5h2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2m0-3h2v2H4z"})),pw=new Af(new Et),mw=e=>{if(!e)return"Explore semantic models, run queries, and build dashboards";const t=e.replace(/^#+\s+/gm,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/`([^`]+)`/g,"$1").trim(),r=t.split(/\n\s*\n/)[0]||t;if(r.length<=120)return r;const i=r.substring(0,120).split(" ");return i.pop(),i.join(" ")+"..."};function gw({navigate:e}){const{data:t,isSuccess:n,isError:r,error:i}=xt({queryKey:["projects"],queryFn:s=>pw.listProjects(s)});return r?h.jsx(gt,{error:i,context:"Projects List"}):n?h.jsxs(x.Container,{maxWidth:"lg",sx:{py:4},children:[h.jsxs(x.Box,{sx:{textAlign:"center",mb:6},children:[h.jsxs(x.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[h.jsx(ph,{sx:{fontSize:32,color:"primary.main"}}),h.jsx(x.Typography,{variant:"h3",component:"h1",fontWeight:700,children:"Publisher"})]}),h.jsx(x.Typography,{variant:"h5",color:"text.secondary",sx:{mb:3,maxWidth:600,mx:"auto"},children:"The open-source semantic model server for the Malloy data language"}),h.jsx(x.Typography,{variant:"body1",color:"text.secondary",sx:{maxWidth:800,mx:"auto"},children:"Define semantic models once — and use them everywhere. Publisher serves Malloy models through clean APIs, enabling consistent, interpretable, and AI-ready data access for tools, applications, and agents."})]}),h.jsxs(x.Grid,{container:!0,spacing:3,sx:{mb:6},children:[h.jsx(x.Grid,{size:{xs:12,md:4},children:h.jsx(x.Card,{variant:"outlined",onClick:()=>{window.open("https://github.com/malloydata/publisher/blob/main/README.md#ad-hoc-data-analysis","_blank")},sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2}},children:h.jsxs(x.CardContent,{sx:{p:3},children:[h.jsxs(x.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[h.jsx(lw,{sx:{color:"info.main",fontSize:28}}),h.jsx(x.Typography,{variant:"h6",fontWeight:600,children:"Ad Hoc Analysis"})]}),h.jsx(x.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Use Explorer, a visual query builder that allows analysts to browse semantic sources, build queries, and run nested logic — all without writing code."}),h.jsx(x.Chip,{label:"No-code",size:"small",color:"primary",variant:"outlined"})]})})}),h.jsx(x.Grid,{size:{xs:12,md:4},children:h.jsx(x.Card,{variant:"outlined",onClick:()=>{window.open("https://github.com/malloydata/publisher/blob/main/README.md#notebook-based-dashboards","_blank")},sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2}},children:h.jsxs(x.CardContent,{sx:{p:3},children:[h.jsxs(x.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[h.jsx(dw,{sx:{color:"warning.main",fontSize:28}}),h.jsx(x.Typography,{variant:"h6",fontWeight:600,children:"Notebook Dashboards"})]}),h.jsx(x.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Create shareable, code-first dashboards using Malloy notebooks. Include text, charts, and reusable views — all versioned alongside your models."}),h.jsx(x.Chip,{label:"Versioned",size:"small",color:"warning",variant:"outlined"})]})})}),h.jsx(x.Grid,{size:{xs:12,md:4},children:h.jsx(x.Card,{variant:"outlined",onClick:()=>{window.open("https://github.com/malloydata/publisher/blob/main/README.md#mcp-based-ai-data-agents","_blank")},sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2}},children:h.jsxs(x.CardContent,{sx:{p:3},children:[h.jsxs(x.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[h.jsx(fw,{sx:{color:"success.main",fontSize:28}}),h.jsx(x.Typography,{variant:"h6",fontWeight:600,children:"AI Data Agents"})]}),h.jsx(x.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Expose your semantic models via the Model Context Protocol (MCP), enabling AI agents to discover sources and ask well-formed questions."}),h.jsx(x.Chip,{label:"AI-Ready",size:"small",color:"success",variant:"outlined"})]})})})]}),h.jsx(x.Divider,{sx:{my:4}}),t.data.length>0?h.jsxs(h.Fragment,{children:[h.jsxs(x.Box,{sx:{textAlign:"center",mb:4},children:[h.jsxs(x.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[h.jsx(mh,{sx:{color:"primary.main",fontSize:24}}),h.jsx(x.Typography,{variant:"h4",fontWeight:600,children:"Select a Project"})]}),h.jsx(x.Typography,{variant:"body1",color:"text.secondary",children:"Choose a project to explore its semantic models and start analyzing your data"})]}),h.jsx(x.Grid,{container:!0,spacing:3,justifyContent:"center",children:t.data.map(s=>h.jsx(x.Grid,{size:{xs:12,sm:6,md:4},children:h.jsx(x.Card,{variant:"outlined",sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2,borderColor:"primary.main"}},onClick:a=>e(`/${s.name}/`,a),children:h.jsxs(x.CardContent,{sx:{p:3,textAlign:"center"},children:[h.jsx(hw,{sx:{fontSize:48,color:"primary.main",mb:2}}),h.jsx(x.Typography,{variant:"h6",fontWeight:600,gutterBottom:!0,children:s.name}),h.jsx(x.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:mw(s.readme)}),h.jsx(x.Button,{variant:"contained",color:"secondary",endIcon:h.jsx(cw,{}),fullWidth:!0,children:"Open Project"})]})})},s.name))})]}):h.jsxs(x.Box,{sx:{textAlign:"center",mb:4},children:[h.jsxs(x.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[h.jsx(mh,{sx:{color:"primary.main",fontSize:24}}),h.jsx(x.Typography,{variant:"h4",fontWeight:600,children:"Get Started"})]}),h.jsx(x.Typography,{variant:"body1",color:"text.secondary",sx:{mb:3},children:"No projects found. Create your first Malloy project to start exploring semantic models and building data experiences."}),h.jsx(x.Button,{variant:"contained",size:"large",color:"primary",startIcon:h.jsx(ph,{}),href:"https://github.com/malloydata/publisher/blob/main/README.md#server-configuration",target:"_blank",rel:"noopener noreferrer",children:"Learn How to Create Models"})]}),h.jsx(x.Box,{sx:{textAlign:"center",mt:6,pt:4,borderTop:1,borderColor:"divider"},children:h.jsxs(x.Typography,{variant:"body2",color:"text.secondary",children:["Publisher is built on fully open infrastructure and designed for the AI era. Join the"," ",h.jsx("a",{href:"https://join.slack.com/t/malloy-community/shared_invite/zt-1kgfwgi5g-CrsdaRqs81QY67QW0~t_uw",target:"_blank",rel:"noopener noreferrer",style:{color:"primary.main",textDecoration:"underline"},children:"Malloy Slack community"})," ","to ask questions, share ideas, and contribute to the future of data modeling."]})})]}):h.jsx(bt,{text:"Loading projects..."})}function bw(){const e=bh.useParams(),{packageName:t,projectName:n}=e,{workbookStorage:r}=wl(),[i,s]=N.useState(""),[a,o]=N.useState(""),[u,l]=N.useState([]),[d,c]=N.useState(null),[m,p]=N.useState(!1),[g,b]=N.useState(!1),T=tl(),y=!!d,C=V=>{c(V.currentTarget)},S=()=>{c(null)},P=()=>{b(!1)},D=()=>{p(!1),s(""),o("")};N.useEffect(()=>{m&&r&&e&&r.listWorkspaces(e,!0).then(V=>{l(V),V.length===1&&o(V[0].name)}).catch(V=>{console.error("Error fetching workspaces:",V),l([])})},[m,r,e]);const w=(V,Q)=>{b(!1),T(`/${n}/${t}/workbook/${encodeURIComponent(V.workspace)}/${encodeURIComponent(V.path)}`,Q)},B=V=>{p(!1);const Q=`${encodeURIComponent(a)}/${encodeURIComponent(i)}`;T(`/${n}/${t}/workbook/${Q}`,V),s(""),o("")};return!n||!t?null:h.jsxs(h.Fragment,{children:[h.jsx(x.Button,{"aria-controls":y?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":y?"true":void 0,onClick:C,variant:"contained",sx:{height:"40px",px:2,backgroundColor:"#fbbb04","&:hover":{backgroundColor:"#eab308"}},children:"Analyze Package"}),h.jsxs(x.Menu,{id:"basic-menu",anchorEl:d,open:y,onClose:S,MenuListProps:{"aria-labelledby":"basic-button",sx:{py:.5}},children:[h.jsxs(x.MenuItem,{onClick:()=>{p(!0),S()},sx:{py:1,px:2},children:[h.jsx(x.ListItemIcon,{children:h.jsx(Ps.Add,{fontSize:"small"})}),h.jsxs(x.ListItemText,{children:[h.jsx(x.Typography,{variant:"body2",fontWeight:500,children:"New Workbook"}),h.jsx(x.Typography,{variant:"caption",color:"text.secondary",children:"Create a new analysis workbook"})]})]}),h.jsxs(x.MenuItem,{onClick:()=>{b(!0),S()},sx:{py:1,px:2},children:[h.jsx(x.ListItemIcon,{children:h.jsx(Ps.Launch,{fontSize:"small"})}),h.jsxs(x.ListItemText,{children:[h.jsx(x.Typography,{variant:"body2",fontWeight:500,children:"Open Workbook"}),h.jsx(x.Typography,{variant:"caption",color:"text.secondary",children:"Open an existing workbook"})]})]})]}),h.jsxs(x.Dialog,{open:m,onClose:D,maxWidth:"sm",fullWidth:!0,children:[h.jsxs(x.DialogTitle,{sx:{pb:1,pt:2,px:2},children:[h.jsx(x.Typography,{fontWeight:600,sx:{fontSize:"1.5rem",mb:.5},children:"Create New Workbook"}),h.jsx(x.Typography,{variant:"body2",color:"text.secondary",children:"Start a new analysis workbook to explore your data"})]}),h.jsx(x.DialogContent,{sx:{px:2,pb:2},children:h.jsxs(x.Stack,{spacing:2,sx:{mt:1},children:[u.length>1?h.jsxs(x.FormControl,{fullWidth:!0,size:"small",children:[h.jsx(x.InputLabel,{children:"Workspace"}),h.jsx(x.Select,{value:a,label:"Workspace",onChange:V=>o(V.target.value),children:u.map(V=>h.jsx(x.MenuItem,{value:V.name,children:h.jsxs(x.Box,{children:[h.jsx(x.Typography,{variant:"body2",fontWeight:500,children:V.name}),h.jsx(x.Typography,{variant:"caption",color:"text.secondary",children:V.description})]})},V.name))})]}):u.length===1?h.jsxs(x.Box,{sx:{p:2,border:1,borderColor:"divider",borderRadius:1,backgroundColor:"grey.50"},children:[h.jsxs(x.Typography,{variant:"body2",fontWeight:500,gutterBottom:!0,children:["Workspace: ",u[0].name]}),h.jsx(x.Typography,{variant:"caption",color:"text.secondary",children:u[0].description})]}):null,h.jsx(x.FormControl,{fullWidth:!0,children:h.jsx(x.TextField,{label:"Workbook Name",value:i,onChange:V=>s(V.target.value),placeholder:"Enter workbook name...",fullWidth:!0,autoFocus:!0,size:"small"})}),h.jsxs(x.Stack,{direction:"row",spacing:1,justifyContent:"flex-end",children:[h.jsx(x.Button,{onClick:D,variant:"outlined",size:"small",children:"Cancel"}),h.jsx(x.Button,{onClick:V=>B(V),variant:"contained",disabled:!i.trim()||u.length>1&&!a,size:"small",children:"Create Workbook"})]})]})})]}),h.jsxs(x.Dialog,{open:g,onClose:P,maxWidth:"md",fullWidth:!0,children:[h.jsxs(x.DialogTitle,{sx:{pb:1,pt:2,px:2},children:[h.jsx(x.Typography,{fontWeight:600,sx:{mb:.5,fontSize:"1.5rem"},children:"Open Workbook"}),h.jsx(x.Typography,{variant:"body2",color:"text.secondary",children:"Select an existing workbook to continue your analysis"})]}),h.jsx(x.DialogContent,{sx:{px:2,pb:2},children:h.jsx(ju,{projectName:n,packageName:t,children:h.jsx(_0,{onWorkbookClick:w})})})]})]})}const Pl=new Tf(new Et);function Ew({connectionName:e}){const{projectName:t}=Qr(),[n,r]=N.useState(void 0),[i,s]=N.useState(null),[a,o]=N.useState(!1),{data:u,isSuccess:l,isError:d,error:c,isLoading:m}=xt({queryKey:["tablePath",t,e],queryFn:p=>Pl.listSchemas(t,e,p)});return h.jsxs(x.Grid,{container:!0,spacing:2,children:[h.jsx(x.Grid,{size:{xs:12,md:6},children:h.jsxs(x.Paper,{sx:{p:2},children:[h.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1},children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Table Paths"}),h.jsx(x.FormControlLabel,{control:h.jsx(x.Switch,{checked:a,onChange:p=>o(p.target.checked)}),label:"Hidden Schemas"})]}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{mt:"10px",maxHeight:"600px",overflowY:"auto"},children:[m&&h.jsx(bt,{text:"Fetching Table Paths..."}),d&&h.jsx(gt,{error:c,context:`${t} > ${e}`}),l&&u.data.length===0&&h.jsx(x.Typography,{variant:"body2",children:"No Schemas"}),l&&u.data.length>0&&h.jsx(x.List,{dense:!0,disablePadding:!0,children:u.data.filter(({isHidden:p})=>a||!p).sort((p,g)=>p.isDefault===g.isDefault?0:p.isDefault?-1:1).map(p=>h.jsx(x.ListItemButton,{selected:i===p.name,onClick:()=>s(p.name),children:h.jsx(x.ListItemText,{primary:p.name})},p.name))})]})]})}),h.jsx(x.Grid,{size:{xs:12,md:6},children:i&&h.jsx(x.Paper,{sx:{p:2},children:h.jsx(yw,{connectionName:e,schemaName:i,onTableClick:p=>{r(p)}})})}),n&&h.jsx(xw,{connectionName:e,schemaName:i,tableName:n,onClose:()=>r(void 0)})]})}function xw({connectionName:e,schemaName:t,tableName:n,onClose:r}){const{projectName:i}=Qr(),{data:s,isSuccess:a,isError:o,error:u,isLoading:l}=xt({queryKey:["tablePathSchema",i,e,t,n],queryFn:d=>Pl.getTablesource(i,e,n,`${t}.${n}`,d)});return a&&s&&console.log(s),h.jsxs(x.Dialog,{open:!0,onClose:r,maxWidth:"sm",fullWidth:!0,children:[h.jsxs(x.DialogTitle,{children:["Table: ",t,".",n,h.jsx(x.Typography,{fontSize:"large",variant:"body2",fontFamily:"monospace",component:"span",children:n}),h.jsx(x.IconButton,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8},children:h.jsx(x.Box,{sx:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:"X"})})]}),h.jsxs(x.DialogContent,{children:[l&&h.jsx(bt,{text:"Fetching Table Details..."}),o&&h.jsx(gt,{error:u,context:`${i} > ${e} > ${t}.${n}`}),a&&s&&h.jsx(x.TableContainer,{children:h.jsxs(x.Table,{size:"small",sx:{"& .MuiTableCell-root":{padding:"10px"}},children:[h.jsx(x.TableHead,{children:h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:"NAME"}),h.jsx(x.TableCell,{children:"TYPE"})]})}),h.jsx(x.TableBody,{children:s.data.columns?.map(d=>h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:d.name}),h.jsx(x.TableCell,{children:d.type})]},d.name))})]})})]})]})}function yw({connectionName:e,schemaName:t,onTableClick:n}){const{projectName:r}=Qr(),{data:i,isSuccess:s,isError:a,error:o,isLoading:u}=xt({queryKey:["tablesInSchema",r,e,t],queryFn:l=>Pl.listTables(r,e,t,l)});return h.jsxs(h.Fragment,{children:[h.jsxs(x.Typography,{variant:"overline",fontWeight:"bold",children:["Tables in ",t]}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{mt:"10px",maxHeight:"600px",overflowY:"auto"},children:[u&&h.jsx(bt,{text:"Fetching Tables..."}),a&&h.jsx(gt,{error:o,context:`${r} > ${e} > ${t}`}),s&&i.data.length===0&&h.jsx(x.Typography,{variant:"body2",children:"No Tables"}),s&&i.data.length>0&&h.jsx(x.List,{dense:!0,disablePadding:!0,children:i.data.map(l=>h.jsx(x.ListItemButton,{onClick:()=>n(l),children:h.jsx(x.ListItemText,{primary:l})},l))})]})]})}const Tw=new Bu(new Et);function Cw({modelPath:e,query:t,sourceName:n,queryName:r,enabled:i=!0}){const{projectName:s,packageName:a,versionId:o}=pt(),{data:u,isSuccess:l,isError:d,error:c,isLoading:m}=xt({queryKey:["rawQueryData",s,a,e,o,t,n,r],queryFn:g=>Tw.executeQuery(s,a,e,t,n,r,o,g),enabled:i});return{data:l&&u?.data?.result?(()=>{try{return JSON.parse(u.data.result).data?.array_value||[]}catch(g){return console.error("Failed to parse query result:",g),[]}})():[],isSuccess:l,isError:d,error:c,isLoading:m}}Ve.defaults.baseURL="IfYouAreSeeingThis_baseURL_IsNotSet";exports.AnalyzePackageButton=bw;exports.BrowserWorkbookStorage=rw;exports.ConnectionExplorer=Ew;exports.EmbeddedQueryResult=Ox;exports.Home=gw;exports.Loading=bt;exports.Model=OT;exports.ModelExplorer=sp;exports.Models=ip;exports.Notebook=Df;exports.Package=_T;exports.PackageProvider=ju;exports.Packages=v0;exports.Project=uw;exports.ProjectProvider=ow;exports.PublisherPackageProvider=ju;exports.QueryResult=zu;exports.ServerProvider=BT;exports.SourceExplorerComponent=Ju;exports.SourcesExplorer=Zu;exports.Workbook=tw;exports.WorkbookList=_0;exports.WorkbookManager=vr;exports.WorkbookStorageProvider=KD;exports.createEmbeddedQueryResult=Uu;exports.useModelData=el;exports.usePackage=pt;exports.useProject=Qr;exports.usePublisherPackage=pt;exports.useRawQueryData=Cw;exports.useRouterClickHandler=tl;exports.useServer=ka;
191
+ `+(parseInt(a)+1)+". "),wr(r,S)}else if(e.code&&e.code.toLowerCase()==="keyd"&&e.ctrlKey){ws(e);var N={start:r.selectionStart,end:r.selectionEnd},D=N;N=_i({text:r.value,selection:N});var w=r.value.slice(N.start,N.end);o.setSelectionRange({start:N.end,end:N.end}),wr(r,`
192
+ `+w),o.setSelectionRange({start:D.start,end:D.end})}else e.code&&e.code.toLowerCase()==="arrowup"&&e.altKey?ch(e,-1):e.code&&e.code.toLowerCase()==="arrowdown"&&e.altKey&&ch(e,1)}var VD=["prefixCls","onChange"],WD=["markdown","commands","fullscreen","preview","highlightEnable","extraCommands","tabSize","defaultTabEnable","autoFocusEnd","textareaWarp","dispatch"];function GD(e){var{prefixCls:t,onChange:n}=e,r=Ks(e,VD),i=P.useContext(Kr),{markdown:s,commands:a,fullscreen:o,preview:u,highlightEnable:l,extraCommands:d,tabSize:c,defaultTabEnable:m,autoFocusEnd:p,textareaWarp:g,dispatch:b}=i;Ks(i,WD);var T=P.useRef(null),y=P.useRef(),C=P.useRef({fullscreen:o,preview:u});P.useEffect(()=>{C.current={fullscreen:o,preview:u,highlightEnable:l}},[o,u,l]),P.useEffect(()=>{if(T.current&&b){var N=new wl(T.current);y.current=N,b({textarea:T.current,commandOrchestrator:N})}},[]),P.useEffect(()=>{if(p&&T.current&&g){T.current.focus();var N=T.current.value.length;T.current.setSelectionRange(N,N),setTimeout(()=>{g&&(g.scrollTop=g.scrollHeight),T.current&&(T.current.scrollTop=T.current.scrollHeight)},0)}},[g]);var S=N=>{qD(N,c,m),S0(N,[...a||[],...d||[]],y.current,b,C.current)};return P.useEffect(()=>(T.current&&T.current.addEventListener("keydown",S),()=>{T.current&&T.current.removeEventListener("keydown",S)}),[]),h.jsx("textarea",De({autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1},r,{ref:T,className:t+"-text-input "+(r.className?r.className:""),value:s,onChange:N=>{b&&b({markdown:N.target.value}),n&&n(N)}}))}var YD=["prefixCls","className","onScroll","renderTextarea"];function KD(e){var t=e||{},{prefixCls:n,className:r,onScroll:i,renderTextarea:s}=t,a=Ks(t,YD),{markdown:o,scrollTop:u,commands:l,extraCommands:d,dispatch:c}=P.useContext(Kr),m=P.useRef(null),p=P.useRef(),g=P.createRef();P.useEffect(()=>{var T={};g.current&&(T.textareaWarp=g.current||void 0,g.current.scrollTop=u||0),c&&c(De({},T))},[]),P.useEffect(()=>{if(m.current&&c){var T=new wl(m.current);p.current=T,c({textarea:m.current,commandOrchestrator:T})}},[]);var b={WebkitTextFillColor:"initial",overflow:"auto"};return h.jsx("div",{ref:g,className:n+"-area "+(r||""),onScroll:i,children:h.jsx("div",{className:n+"-text",children:s?P.cloneElement(s(De({},a,{value:o,autoComplete:"off",autoCorrect:"off",spellCheck:"false",autoCapitalize:"off",className:n+"-text-input",style:{WebkitTextFillColor:"inherit",overflow:"auto"}}),{dispatch:c,onChange:a.onChange,shortcuts:S0,useContext:{commands:l,extraCommands:d,commandOrchestrator:p.current}}),{ref:m}):h.jsx(P.Fragment,{children:h.jsx(GD,De({prefixCls:n},a,{style:b}))})})})}function QD(e){var{prefixCls:t,groupName:n,commands:r,children:i}=e||{},{barPopup:s={}}=P.useContext(Kr);return P.useMemo(()=>h.jsx("div",{className:t+"-toolbar-child "+(n&&s[n]?"active":""),onClick:a=>a.stopPropagation(),children:Array.isArray(r)?h.jsx(v0,De({commands:r},e,{isChild:!0})):i}),[r,s,n,t])}function dh(e){var{prefixCls:t,overflow:n}=e,{fullscreen:r,preview:i,barPopup:s={},components:a,commandOrchestrator:o,dispatch:u}=P.useContext(Kr),l=P.useRef("");function d(c,m){if(u){var p={barPopup:De({},s)};c.keyCommand==="preview"&&(p.preview=c.value),c.keyCommand==="fullscreen"&&(p.fullscreen=!r),e.commands&&c.keyCommand==="group"?e.commands.forEach(g=>{m===g.groupName?p.barPopup[m]=!0:g.keyCommand&&(p.barPopup[g.groupName]=!1)}):(m||c.parent)&&Object.keys(p.barPopup||{}).forEach(g=>{p.barPopup[g]=!1}),Object.keys(p).length&&u(De({},p)),o&&o.executeCommand(c)}}return P.useEffect(()=>{document&&n&&(r?document.body.style.overflow="hidden":(l.current||(l.current=window.getComputedStyle(document.body,null).overflow),document.body.style.overflow=l.current))},[r,l,n]),h.jsx("ul",{children:(e.commands||[]).map((c,m)=>{if(c.keyCommand==="divider")return h.jsx("li",De({},c.liProps,{className:t+"-toolbar-divider"}),m);if(!c.keyCommand)return h.jsx(P.Fragment,{},m);var p=r&&c.keyCommand==="fullscreen"||c.keyCommand==="preview"&&i===c.value,g=c.children&&typeof c.children=="function"?c.children({getState:()=>o.getState(),textApi:o?o.textApi:void 0,close:()=>d({},c.groupName),execute:()=>d({execute:c.execute}),dispatch:u}):void 0,b=s&&i&&i==="preview"&&!/(preview|fullscreen)/.test(c.keyCommand),T=a?.toolbar||c.render,y=T&&typeof T=="function"?T(c,!!b,d,m):null;return h.jsxs("li",De({},c.liProps,{className:p?"active":"",children:[y&&P.isValidElement(y)&&y,!y&&!c.buttonProps&&c.icon,!y&&c.buttonProps&&P.createElement("button",De({type:"button",key:m,disabled:b,"data-name":c.name},c.buttonProps,{onClick:C=>{C.stopPropagation(),d(c,c.groupName)}}),c.icon),c.children&&h.jsx(QD,{overflow:n,groupName:c.groupName,prefixCls:t,children:g,commands:Array.isArray(c.children)?c.children:void 0})]}),m)})})}function v0(e){e===void 0&&(e={});var{prefixCls:t,isChild:n,className:r}=e,{commands:i,extraCommands:s}=P.useContext(Kr);return h.jsxs("div",{className:t+"-toolbar "+r,children:[h.jsx(dh,De({},e,{commands:e.commands||i||[]})),!n&&h.jsx(dh,De({},e,{commands:s||[]}))]})}function hh(e){var{hideToolbar:t,toolbarBottom:n,placement:r,overflow:i,prefixCls:s}=e;if(t||r==="bottom"&&!n||r==="top"&&n)return null;var a=n?"bottom":"";return h.jsx(v0,{prefixCls:s,overflow:i,className:a})}var XD=e=>{var{prefixCls:t,onChange:n}=e||{},r=P.useRef(null),i=P.useRef(),s=P.useRef(e.height);P.useEffect(()=>{s.current!==e.height&&(s.current=e.height)},[e.height]);function a(d){if(i.current){var c,m=d.clientY||((c=d.changedTouches[0])==null?void 0:c.clientY),p=i.current.height+m-i.current.dragY;p>=e.minHeight&&p<=e.maxHeight&&n&&n(i.current.height+(m-i.current.dragY))}}function o(){var d,c;i.current=void 0,document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",o),(d=r.current)==null||d.removeEventListener("touchmove",a),(c=r.current)==null||c.removeEventListener("touchend",o)}function u(d){var c,m,p;d.preventDefault();var g=d.clientY||((c=d.changedTouches[0])==null?void 0:c.clientY);i.current={height:s.current,dragY:g},document.addEventListener("mousemove",a),document.addEventListener("mouseup",o),(m=r.current)==null||m.addEventListener("touchmove",a,{passive:!1}),(p=r.current)==null||p.addEventListener("touchend",o,{passive:!1})}P.useEffect(()=>{if(document){var d,c;(d=r.current)==null||d.addEventListener("touchstart",u,{passive:!1}),(c=r.current)==null||c.addEventListener("mousedown",u)}return()=>{if(document){var m;(m=r.current)==null||m.removeEventListener("touchstart",u),document.removeEventListener("mousemove",a)}}},[]);var l=P.useMemo(()=>h.jsx("svg",{viewBox:"0 0 512 512",height:"100%",children:h.jsx("path",{fill:"currentColor",d:"M304 256c0 26.5-21.5 48-48 48s-48-21.5-48-48 21.5-48 48-48 48 21.5 48 48zm120-48c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48zm-336 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z"})}),[]);return h.jsx("div",{className:t+"-bar",ref:r,children:l})},ZD=["prefixCls","className","value","commands","commandsFilter","direction","extraCommands","height","enableScroll","visibleDragbar","highlightEnable","preview","fullscreen","overflow","previewOptions","textareaProps","maxHeight","minHeight","autoFocus","autoFocusEnd","tabSize","defaultTabEnable","onChange","onStatistics","onHeightChange","hideToolbar","toolbarBottom","components","renderTextarea"];function JD(e){return e===void 0&&(e={}),Object.keys(e).forEach(t=>{e[t]=!1}),e}var ew=P.forwardRef((e,t)=>{var n=e||{},{prefixCls:r="w-md-editor",className:i,value:s,commands:a=zD(),commandsFilter:o,direction:u,extraCommands:l=$D(),height:d=200,enableScroll:c=!0,visibleDragbar:m=typeof e.visiableDragbar=="boolean"?e.visiableDragbar:!0,highlightEnable:p=!0,preview:g="live",fullscreen:b=!1,overflow:T=!0,previewOptions:y={},textareaProps:C,maxHeight:S=1200,minHeight:N=100,autoFocus:D,autoFocusEnd:w=!1,tabSize:B=2,defaultTabEnable:V=!1,onChange:Q,onStatistics:E,onHeightChange:L,hideToolbar:O,toolbarBottom:z=!1,components:M,renderTextarea:J}=n,oe=Ks(n,ZD),he=a.map(Ce=>o?o(Ce,!1):Ce).filter(Boolean),fe=l.map(Ce=>o?o(Ce,!0):Ce).filter(Boolean),[G,_]=P.useReducer(mD,{markdown:s,preview:g,components:M,height:d,minHeight:N,highlightEnable:p,tabSize:B,defaultTabEnable:V,scrollTop:0,scrollTopPreview:0,commands:he,extraCommands:fe,fullscreen:b,barPopup:{}}),Ee=P.useRef(null),ue=P.useRef(null),I=P.useRef(c);P.useImperativeHandle(t,()=>De({},G,{container:Ee.current,dispatch:_})),P.useMemo(()=>I.current=c,[c]),P.useEffect(()=>{var Ce={};Ee.current&&(Ce.container=Ee.current||void 0),Ce.markdown=s||"",Ce.barPopup={},_&&_(De({},G,Ce))},[]);var de=[i,"wmde-markdown-var",u?r+"-"+u:null,r,G.preview?r+"-show-"+G.preview:null,G.fullscreen?r+"-fullscreen":null].filter(Boolean).join(" ").trim();P.useMemo(()=>s!==G.markdown&&_({markdown:s||""}),[s,G.markdown]),P.useMemo(()=>g!==G.preview&&_({preview:g}),[g]),P.useMemo(()=>B!==G.tabSize&&_({tabSize:B}),[B]),P.useMemo(()=>p!==G.highlightEnable&&_({highlightEnable:p}),[p]),P.useMemo(()=>D!==G.autoFocus&&_({autoFocus:D}),[D]),P.useMemo(()=>w!==G.autoFocusEnd&&_({autoFocusEnd:w}),[w]),P.useMemo(()=>b!==G.fullscreen&&_({fullscreen:b}),[b]),P.useMemo(()=>d!==G.height&&_({height:d}),[d]),P.useMemo(()=>d!==G.height&&L&&L(G.height,d,G),[d,L,G]),P.useMemo(()=>a!==G.commands&&_({commands:he}),[e.commands]),P.useMemo(()=>l!==G.extraCommands&&_({extraCommands:fe}),[e.extraCommands]);var pe=P.useRef(),q=P.useRef("preview"),re=P.useRef(!1);P.useMemo(()=>{pe.current=G.textareaWarp,G.textareaWarp&&(G.textareaWarp.addEventListener("mouseover",()=>{q.current="text"}),G.textareaWarp.addEventListener("mouseleave",()=>{q.current="preview"}))},[G.textareaWarp]);var te=(Ce,st)=>{if(I.current){var at=pe.current,Xe=ue.current?ue.current:void 0;if(re.current||(q.current=st,re.current=!0),at&&Xe){var rn=(at.scrollHeight-at.offsetHeight)/(Xe.scrollHeight-Xe.offsetHeight);Ce.target===at&&q.current==="text"&&(Xe.scrollTop=at.scrollTop/rn),Ce.target===Xe&&q.current==="preview"&&(at.scrollTop=Xe.scrollTop*rn);var se=0;q.current==="text"?se=at.scrollTop||0:q.current==="preview"&&(se=Xe.scrollTop||0),_({scrollTop:se})}}},we=r+"-preview "+(y.className||""),ne=Ce=>te(Ce,"preview"),U=P.useMemo(()=>h.jsx("div",{ref:ue,className:we,children:h.jsx(T0,De({},y,{onScroll:ne,source:G.markdown||""}))}),[we,y,G.markdown]),xe=M?.preview&&M?.preview(G.markdown||"",G,_);xe&&P.isValidElement(xe)&&(U=h.jsx("div",{className:we,ref:ue,onScroll:ne,children:xe}));var je=De({},oe.style,{height:G.height||"100%"}),ce=()=>_({barPopup:De({},JD(G.barPopup))}),zt=Ce=>_({height:Ce}),yt=Ce=>{if(Q&&Q(Ce.target.value,Ce,G),C&&C.onChange&&C.onChange(Ce),G.textarea&&G.textarea instanceof HTMLTextAreaElement&&E){var st=new wl(G.textarea),at=st.getState()||{};E(De({},at,{lineCount:Ce.target.value.split(`
193
+ `).length,length:Ce.target.value.length}))}};return h.jsx(Kr.Provider,{value:De({},G,{dispatch:_}),children:h.jsxs("div",De({ref:Ee,className:de},oe,{onClick:ce,style:je,children:[h.jsx(hh,{hideToolbar:O,toolbarBottom:z,prefixCls:r,overflow:T,placement:"top"}),h.jsxs("div",{className:r+"-content",children:[/(edit|live)/.test(G.preview||"")&&h.jsx(KD,De({className:r+"-input",prefixCls:r,autoFocus:D},C,{onChange:yt,renderTextarea:M?.textarea||J,onScroll:Ce=>te(Ce,"text")})),/(live|preview)/.test(G.preview||"")&&U]}),m&&!G.fullscreen&&h.jsx(XD,{prefixCls:r,height:G.height,maxHeight:S,minHeight:N,onChange:zt}),h.jsx(hh,{hideToolbar:O,toolbarBottom:z,prefixCls:r,overflow:T,placement:"bottom"})]}))})}),D0=ew;D0.Markdown=T0;function tw({cell:e,sourceAndPaths:t,onQueryChange:n,onSourceChange:r}){const i={query:e.value,malloyResult:e.result?JSON.parse(e.result):void 0,malloyQuery:e.queryInfo?JSON.parse(e.queryInfo):void 0,sourceName:e.sourceName,modelPath:e.modelPath};return h.jsx(Ju,{sourceAndPaths:t,existingQuery:i,existingSourceName:e.sourceName,onQueryChange:n,onSourceChange:r})}function nw({cell:e,expandCodeCell:t,expandEmbedding:n,hideEmbeddingIcons:r,editingMalloy:i,editingMarkdown:s,sourceAndPaths:a,onCellChange:o,onClose:u,onEdit:l,onDelete:d,addButtonCallback:c}){const[m,p]=P.useState(t),[g,b]=P.useState(n),[T,y]=P.useState(),[C]=P.useState(),[S,N]=P.useState(bi()),[D,w]=P.useState(!1),[B,V]=P.useState(e.sourceName?a.findIndex(I=>I.sourceInfo.name===e.sourceName):0);P.useEffect(()=>{e.isMarkdown||nr(e.value,"malloy").then(I=>{y(I)})},[e]);const[Q,E]=P.useState(e.value);P.useEffect(()=>{document.documentElement.setAttribute("data-color-mode","light")});const L=rw(I=>{o({...e,value:I})}),[O,z]=P.useState(!1),M=()=>{d(),z(!1)},J=a.length===0,oe=()=>{const I=a[B],de=I?.modelPath||e.modelPath||"",pe=I?.sourceInfo.name||e.sourceName||"";o({...e,value:S.query,result:S.malloyResult?JSON.stringify(S.malloyResult):void 0,queryInfo:S.malloyQuery?JSON.stringify(S.malloyQuery):void 0,sourceName:pe,modelPath:de})},he=h.jsx(x.Tooltip,{title:"Delete Cell",children:h.jsx(x.IconButton,{size:"small",onClick:()=>z(!0),children:h.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14zM10 11v6M14 11v6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),fe=h.jsxs(x.Dialog,{open:O,onClose:()=>z(!1),children:[h.jsx(x.DialogTitle,{children:"Confirm Delete"}),h.jsx(x.DialogContent,{children:h.jsx(x.Typography,{children:"Are you sure you want to delete this cell?"})}),h.jsxs(x.DialogActions,{children:[h.jsx(x.Button,{onClick:()=>z(!1),children:"Cancel"}),h.jsx(x.Button,{onClick:M,color:"error",children:"Delete"})]})]}),G=e.isMarkdown?h.jsxs(h.Fragment,{children:[s?h.jsx(x.Tooltip,{title:"Save",children:h.jsx(x.IconButton,{size:"small",onClick:u,children:h.jsx(ls,{})})}):h.jsx(x.Tooltip,{title:"Edit",children:h.jsx(x.IconButton,{size:"small",onClick:l,children:h.jsx(jc,{})})}),!s&&he]}):h.jsxs(h.Fragment,{children:[!i&&h.jsx(x.Tooltip,{title:m?"Hide Code":"View Code",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{p(!m)},children:h.jsx(_f,{})})}),!r&&!i&&e.result&&h.jsx(x.Tooltip,{title:g?"Hide Embedding":"View Embedding",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{b(!g)},children:h.jsx($i,{})})}),i&&h.jsx(x.Tooltip,{title:"Save",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{oe(),u()},children:h.jsx(ls,{})})}),!i&&h.jsx(x.Tooltip,{title:"Edit",children:h.jsx(x.IconButton,{size:"small",onClick:l,children:h.jsx(jc,{})})}),!i&&he]}),_=i||s,Ee=s?h.jsx(x.Tooltip,{title:"Save",children:h.jsx(x.IconButton,{size:"small",onClick:u,children:h.jsx(ls,{})})}):i?h.jsx(x.Tooltip,{title:"Save",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{oe(),u()},children:h.jsx(ls,{})})}):null,ue=D&&h.jsx(x.Box,{sx:{position:"absolute",top:"4px",right:"4px",display:"flex",gap:"8px",backgroundColor:"background.paper",border:"1px solid",borderColor:"divider",borderRadius:"8px",padding:"2px 4px",boxShadow:1,zIndex:10},children:!_&&h.jsxs(h.Fragment,{children:[c(!0),c(!1),G]})||Ee});return h.jsxs(ut,{sx:{position:"relative",marginTop:"5px",marginBottom:"5px",borderWidth:"1.5px",backgroundColor:"#fff",minHeight:"50px"},onMouseEnter:()=>w(!0),onMouseLeave:()=>{w(!1)},children:[ue,e.isMarkdown?h.jsx(h.Fragment,{children:s?h.jsx(D0,{value:Q,preview:"edit",autoFocus:!0,onChange:I=>{E(I),L(I)},onBlur:()=>{oe(),D||u()}}):h.jsx(x.Box,{sx:{px:.5,pt:0,mt:0,"& h1, & h2, & h3, & h4, & h5, & h6":{mt:.5,mb:.5},"& p":{mt:.5,mb:.5},"& ul, & ol":{mt:.5,mb:.5},"& li":{mt:0,mb:0},"& pre, & code":{mt:.5,mb:.5},"& blockquote":{mt:.5,mb:.5}},children:Q?h.jsx(x.Box,{onClick:l,sx:{cursor:"pointer"},children:h.jsx(mu,{children:Q})}):h.jsxs(x.Box,{onClick:l,sx:{cursor:"pointer"},children:[h.jsx(x.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"Markdown is empty"}),h.jsx(x.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Click to edit."})]})})}):h.jsxs(h.Fragment,{children:[h.jsx(x.Collapse,{in:g,timeout:"auto",unmountOnExit:!0,children:h.jsx(x.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:h.jsx(x.Typography,{component:"div",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:C}})})}),h.jsx(x.Collapse,{in:m,timeout:"auto",unmountOnExit:!0,children:h.jsx(x.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:h.jsx(x.Typography,{component:"div",className:"content",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:T}})})}),i&&(J?h.jsxs(h.Fragment,{children:[h.jsx(x.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"No Model Imports"}),h.jsx(x.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Please add a model import above."})]}):h.jsx(tw,{sourceAndPaths:a,onQueryChange:I=>{N(I)},cell:e,onSourceChange:V})),!i&&e.result&&h.jsx(ut,{variant:"outlined",sx:{borderRadius:0},children:h.jsx(vf,{result:e.result,minHeight:300,maxHeight:800})}),!i&&!e.result&&h.jsxs(x.Box,{onClick:l,sx:{cursor:"pointer"},children:[h.jsx(x.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"Explore is empty"}),h.jsx(x.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Click to edit."})]})]}),O&&fe]})}function rw(e,t=2e3){const n=P.useRef(void 0);return P.useCallback(r=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(r)},t)},[e,t])}const w0=P.createContext(void 0);function iw({children:e,workbookStorage:t}){const n=P.useMemo(()=>({workbookStorage:t}),[t]);return h.jsx(w0.Provider,{value:n,children:e})}function Nl(){const e=P.useContext(w0);if(!e)throw new Error("useWorkbookStorage must be used within a WorkbookStorageProvider");return e}const sw=Oe(h.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),aw=Oe(h.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5z"})),ow=new Ca(new Et);function uw({initialSelectedModels:e,onModelChange:t}){const{projectName:n,packageName:r,versionId:i}=pt(),{data:s,isLoading:a,isSuccess:o,isError:u,error:l}=xt({queryKey:["models",n,r,i],queryFn:y=>ow.listModels(n,r,i,y)}),[d,c]=P.useState(e||[]),[m,p]=P.useState(null);P.useEffect(()=>{c(e||[])},[e]);const g=y=>{const C=d.filter(S=>S!==y);c(C),t(C)},b=y=>{const C=[...d,y];c(C),t(C),p(null)};let T=[];return o&&s?.data&&(T=s.data.filter(y=>!d.includes(y.path)).map(y=>y.path)),u?h.jsx(gt,{error:l,context:`${n} > ${r} > Model Picker`}):h.jsxs(h.Fragment,{children:[h.jsxs(x.FormControl,{fullWidth:!0,children:[a&&h.jsx(x.Typography,{children:"Loading..."}),h.jsxs(x.Stack,{direction:"row",spacing:1,children:[d.map(y=>h.jsx(x.Chip,{label:y,onDelete:()=>g(y),deleteIcon:h.jsx(sw,{}),sx:{marginBottom:"5px"}},y)),h.jsx(x.Button,{size:"small",startIcon:h.jsx(aw,{}),onClick:y=>p(y.currentTarget),disabled:a||u||T.length===0,children:"Add Model"})]})]}),h.jsxs(x.Menu,{anchorEl:m,open:!!m,onClose:()=>p(null),children:[h.jsx(x.Typography,{variant:"subtitle2",sx:{ml:1},children:"Models"}),h.jsx(x.Divider,{}),T.length===0?h.jsx(x.MenuItem,{disabled:!0,children:"No models available"}):T.map(y=>h.jsx(x.MenuItem,{onClick:()=>b(y),children:h.jsx(x.Typography,{variant:"body2",children:y})},y))]})]})}const lw=new Ca(new Et);function cw({workbookPath:e,expandCodeCells:t,expandEmbeddings:n,hideEmbeddingIcons:r}){const i=nl(),s=pt(),{projectName:a,packageName:o,versionId:u}=s,{server:l,getAccessToken:d}=ka(),{workbookStorage:c}=Nl(),[m,p]=P.useState(void 0);if(!a||!o)throw new Error("Project and package must be provided via PubliserPackageProvider");if(!c)throw new Error("Workbook storage be provided via WorkbookStorageProvider");const[g,b]=P.useState(),[T,y]=P.useState(),[C,S]=P.useState(),[N,D]=P.useState([]),[w,B]=P.useState(null),[V,Q]=P.useState(null),E=!!w,L=()=>{B(null),Q(null)},O=(ue,I)=>{g.insertCell(I,{isMarkdown:ue,value:""}),fe(),ue?S(I):y(I),L()},[z,M]=P.useState(!1),J=()=>{M(!0)},oe=async ue=>{e&&c&&s&&await c.deleteWorkbook(s,e).then(()=>{p(void 0)}).catch(I=>{p(`Error deleting workbook: ${I.message}`)}),M(!1),i(`/${a}/${o}`,ue)},he=()=>{M(!1)},fe=P.useCallback(async()=>{try{b(await g.saveWorkbook()),p(void 0)}catch(ue){p(`Error saving workbook: ${ue.message}`)}},[g]);if(P.useEffect(()=>{if(!g)return;(async()=>{const I=new Map(N.map(({modelPath:q,sourceInfos:re})=>[q,re])),de=[],pe=[];for(const q of g.getModels())I.has(q)?de.push({modelPath:q,sourceInfos:I.get(q)}):(console.log("Fetching model from Publisher",q),pe.push(lw.getModel(a,o,q,u,await Hu(l,d)).then(re=>({modelPath:q,sourceInfos:re.data.sourceInfos.map(te=>JSON.parse(te))}))));if(pe.length>0){const q=await Promise.all(pe);D([...de,...q])}else D(de)})()},[d,g,o,a,l,u]),P.useEffect(()=>{e&&vr.loadWorkbook(c,s,e).then(ue=>{b(ue)})},[e,c,s]),!g)return h.jsx("div",{children:"Loading..."});const G=ue=>{const I=[];for(const de of ue)for(const pe of de.sourceInfos)I.push({modelPath:de.modelPath,sourceInfo:pe});return I},_=(ue,I)=>h.jsx(x.Button,{size:"small",startIcon:h.jsx(WT,{}),onClick:()=>O(ue,I),variant:"contained",sx:{backgroundColor:"#fff",color:de=>de.palette.mode==="dark"?de.palette.grey[100]:de.palette.grey[700],boxShadow:"none","&:hover":{backgroundColor:de=>de.palette.mode==="dark"?de.palette.grey[500]:de.palette.grey[300],boxShadow:"none"}},children:ue?"Markdown":"Explore"}),Ee=h.jsxs(x.Box,{sx:{display:"flex",gap:1,justifyContent:"center",flex:2},children:[_(!1,g.getCells().length),_(!0,g.getCells().length)]});return h.jsxs(ut,{variant:"outlined",children:[h.jsxs(Ut,{children:[m&&h.jsx(x.Box,{sx:{mb:2},children:h.jsx(x.Typography,{color:"error",variant:"body2",children:m})}),h.jsxs(gr,{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[h.jsxs(gr,{direction:"row",spacing:1,alignItems:"center",children:[h.jsx(x.Typography,{variant:"overline",sx:{fontSize:"13px",fontWeight:"bold",verticalAlign:"middle"},children:"Workbook"}),h.jsx(x.Typography,{variant:"subtitle2",sx:{fontSize:"13px",fontWeight:"normal",verticalAlign:"middle",ml:1},children:`${a} > ${o} > ${e.path}`})]}),h.jsxs(gr,{sx:{display:"flex",flexDirection:"row",gap:1},children:[h.jsx(x.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:h.jsx(dw,{workbookData:g})}),h.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:[h.jsx(x.Button,{color:"error",onClick:J,size:"small",children:"Delete"}),h.jsxs(x.Dialog,{open:z,onClose:he,children:[h.jsx(x.DialogTitle,{children:"Delete Workbook"}),h.jsx(x.DialogContent,{children:h.jsxs(x.DialogContentText,{children:['Are you sure you want to delete the workbook "',e.path,'"? This action cannot be undone.']})}),h.jsxs(x.DialogActions,{children:[h.jsx(x.Button,{onClick:he,color:"primary",size:"small",children:"Cancel"}),h.jsx(x.Button,{onClick:ue=>oe(ue),color:"error",autoFocus:!0,size:"small",children:"Delete"})]})]})]})]})]}),h.jsx(x.Divider,{}),h.jsxs(gr,{sx:{display:"flex",flexDirection:"row",width:"100%",mt:2},children:[h.jsx(x.Box,{sx:{flex:1},children:h.jsx(uw,{initialSelectedModels:g.getModels(),onModelChange:ue=>{b(g.setModels(ue)),fe()}})}),h.jsx(x.Box,{sx:{flex:1}})]})]}),h.jsx(Mu,{children:h.jsxs(gr,{children:[g.getCells().length===0&&h.jsxs(h.Fragment,{children:[h.jsx(x.Typography,{sx:{textAlign:"center",p:2,variant:"subtitle2",fontWeight:"medium"},children:"Workbook is empty"}),h.jsx(x.Typography,{variant:"body2",sx:{textAlign:"center",mb:2,variant:"body2"},children:"Click the + buttons to add a markdown or code cell."})]}),g.getCells().map((ue,I)=>h.jsx(P.Fragment,{children:h.jsx(nw,{cell:ue,addButtonCallback:de=>_(de,I),sourceAndPaths:G(N),expandCodeCell:t,expandEmbedding:n,hideEmbeddingIcons:r,editingMarkdown:C===I,editingMalloy:T===I,onDelete:()=>{b(g.deleteCell(I)),fe()},onCellChange:de=>{b(g.setCell(I,de)),fe()},onEdit:()=>{ue.isMarkdown?S(I):y(I)},onClose:()=>{ue.isMarkdown?S(void 0):y(void 0)}},`${I}-${ue.isMarkdown}-${e}-${a}-${o}`)},`${I}-${g.getCells().length}`)),Ee,h.jsxs(x.Menu,{anchorEl:w,open:E,onClose:L,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[h.jsx(x.MenuItem,{onClick:()=>O(!0,V??0),children:"Add Markdown"}),h.jsx(x.MenuItem,{onClick:()=>O(!1,V??0),children:"Add Malloy"})]}),h.jsx(gr,{sx:{flexDirection:"row",justifyContent:"flex-end",p:1}})]})})]})}function dw({workbookData:e}){const[t,n]=P.useState(!1),r=async()=>{if(!e)return;const i=e.toMalloyWorkbook();try{await navigator.clipboard.writeText(i),n(!0),setTimeout(()=>n(!1),1500)}catch{n(!1),alert("Failed to copy to clipboard")}};return h.jsx(x.Button,{color:"primary",onClick:r,size:"small",children:t?"Copied!":"Export"})}function N0({onWorkbookClick:e}){const{workbookStorage:t}=Nl(),n=pt(),[r,i]=P.useState([]),[s,a]=P.useState(void 0);return P.useEffect(()=>{t&&t.listWorkspaces(n,!1).then(o=>{const u=[];Promise.all(o.map(async l=>{await t.listWorkbooks(l,n).then(d=>{u.push(...d)}).catch(d=>{a(`Error listing workbooks: ${d.message}`)})})).then(()=>{i(u),a(void 0)})})},[t,n]),h.jsxs(h.Fragment,{children:[s&&h.jsx(x.Box,{sx:{mb:2},children:h.jsx(x.Typography,{color:"error",variant:"body2",children:s})}),h.jsx(x.Divider,{}),h.jsx(x.Box,{sx:{maxHeight:"300px",overflow:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:"rgba(0,0,0,0.2)",borderRadius:"4px"}},children:h.jsxs(x.List,{dense:!0,children:[r.length===0&&h.jsx(x.ListItem,{children:h.jsx(x.ListItemText,{primary:"No workbooks found.",sx:{textAlign:"center"}})}),r.map(o=>h.jsx(x.ListItem,{onClick:u=>e(o,u),sx:{cursor:"pointer","&:hover":{backgroundColor:"action.hover"}},children:h.jsx(x.ListItemText,{primary:o.path})},o.path))]})})]})}const fh="Local";class hw{makeKey(t,n){let r=`BROWSER_NOTEBOOK_STORAGE/${t.projectName}/${t.packageName}`;return n&&(r+=`/${n}`),r}async listWorkspaces(t,n){return[{name:fh,description:"Stored locally- only accessible to this browser",writeable:!0}]}async listWorkbooks(t,n){const r=this.makeKey(n),i=[];for(let s=0;s<localStorage.length;s++){const a=localStorage.key(s);if(a&&a.startsWith(r+"/")){const o=a.substring(r.length+1);i.push({path:o,workspace:fh})}}return i}async getWorkbook(t,n){const r=this.makeKey(t,n.path),i=localStorage.getItem(r);if(i===null)throw new Error(`Notebook not found at path: ${n}`);return i}async deleteWorkbook(t,n){const r=this.makeKey(t,n.path);if(localStorage.getItem(r)===null)throw new Error(`Notebook not found at path: ${n}`);localStorage.removeItem(r)}async saveWorkbook(t,n,r){console.log("saveWorkbook",t,n,r);const i=this.makeKey(t,n.path);console.log("saveWorkbook",i),localStorage.setItem(i,r)}async moveWorkbook(t,n,r){const i=this.makeKey(t,n.path),s=this.makeKey(t,r.path),a=localStorage.getItem(i);if(a===null)throw new Error(`Notebook not found at path: ${n.path}`);localStorage.setItem(s,a),localStorage.removeItem(i)}}const fw=Oe(h.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M8 17c-.55 0-1-.45-1-1v-3c0-.55.45-1 1-1s1 .45 1 1v3c0 .55-.45 1-1 1m4 0c-.55 0-1-.45-1-1v-1c0-.55.45-1 1-1s1 .45 1 1v1c0 .55-.45 1-1 1m0-5c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m4 5c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v8c0 .55-.45 1-1 1"})),pw=Oe(h.jsx("path",{d:"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42s1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1"})),ph=Oe(h.jsx("path",{d:"m19.46 8 .79-1.75L22 5.46c.39-.18.39-.73 0-.91l-1.75-.79L19.46 2c-.18-.39-.73-.39-.91 0l-.79 1.75-1.76.79c-.39.18-.39.73 0 .91l1.75.79.79 1.76c.18.39.74.39.92 0M11.5 9.5 9.91 6c-.35-.78-1.47-.78-1.82 0L6.5 9.5 3 11.09c-.78.36-.78 1.47 0 1.82l3.5 1.59L8.09 18c.36.78 1.47.78 1.82 0l1.59-3.5 3.5-1.59c.78-.36.78-1.47 0-1.82zm7.04 6.5-.79 1.75-1.75.79c-.39.18-.39.73 0 .91l1.75.79.79 1.76c.18.39.73.39.91 0l.79-1.75 1.76-.79c.39-.18.39-.73 0-.91l-1.75-.79-.79-1.76c-.18-.39-.74-.39-.92 0"})),mw=Oe(h.jsx("path",{d:"M8.7 15.9 4.8 12l3.9-3.9c.39-.39.39-1.01 0-1.4a.984.984 0 0 0-1.4 0l-4.59 4.59c-.39.39-.39 1.02 0 1.41l4.59 4.6c.39.39 1.01.39 1.4 0s.39-1.01 0-1.4m6.6 0 3.9-3.9-3.9-3.9a.984.984 0 0 1 0-1.4c.39-.39 1.01-.39 1.4 0l4.59 4.59c.39.39.39 1.02 0 1.41l-4.59 4.6c-.39.39-1.01.39-1.4 0a.984.984 0 0 1 0-1.4"})),gw=Oe(h.jsx("path",{d:"M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1 1.1-.49 1.1-1.1-.49-1.1-1.1-1.1M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m2.19 12.19L6 18l3.81-8.19L18 6z"})),bw=Oe([h.jsx("path",{d:"M13 8.57c-.79 0-1.43.64-1.43 1.43s.64 1.43 1.43 1.43 1.43-.64 1.43-1.43-.64-1.43-1.43-1.43"},"0"),h.jsx("path",{d:"M13.21 3c-3.84-.11-7 2.87-7.19 6.64L4.1 12.2c-.25.33-.01.8.4.8H6v3c0 1.1.9 2 2 2h1v2c0 .55.45 1 1 1h5c.55 0 1-.45 1-1v-3.68c2.44-1.16 4.1-3.68 4-6.58-.14-3.62-3.18-6.63-6.79-6.74M16 10c0 .13-.01.26-.02.39l.83.66c.08.06.1.16.05.25l-.8 1.39c-.05.09-.16.12-.24.09l-.99-.4c-.21.16-.43.29-.67.39L14 13.83c-.01.1-.1.17-.2.17h-1.6c-.1 0-.18-.07-.2-.17l-.15-1.06c-.25-.1-.47-.23-.68-.39l-.99.4c-.09.03-.2 0-.25-.09l-.8-1.39c-.05-.08-.03-.19.05-.25l.84-.66c-.01-.13-.02-.26-.02-.39s.02-.27.04-.39l-.85-.66c-.08-.06-.1-.16-.05-.26l.8-1.38c.05-.09.15-.12.24-.09l1 .4c.2-.15.43-.29.67-.39L12 6.17c.02-.1.1-.17.2-.17h1.6c.1 0 .18.07.2.17l.15 1.06c.24.1.46.23.67.39l1-.4c.09-.03.2 0 .24.09l.8 1.38c.05.09.03.2-.05.26l-.85.66c.03.12.04.25.04.39"},"1")]),mh=Oe(h.jsx("path",{d:"M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2m0-3h2v2H4zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2m4 1H4V5h2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2m0-3h2v2H4z"})),Ew=new Af(new Et),xw=e=>{if(!e)return"Explore semantic models, run queries, and build dashboards";const t=e.replace(/^#+\s+/gm,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/`([^`]+)`/g,"$1").trim(),r=t.split(/\n\s*\n/)[0]||t;if(r.length<=120)return r;const i=r.substring(0,120).split(" ");return i.pop(),i.join(" ")+"..."};function yw({navigate:e}){const{data:t,isSuccess:n,isError:r,error:i}=xt({queryKey:["projects"],queryFn:s=>Ew.listProjects(s)});return r?h.jsx(gt,{error:i,context:"Projects List"}):n?h.jsxs(x.Container,{maxWidth:"lg",sx:{py:4},children:[h.jsxs(x.Box,{sx:{textAlign:"center",mb:6},children:[h.jsxs(x.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[h.jsx(ph,{sx:{fontSize:32,color:"primary.main"}}),h.jsx(x.Typography,{variant:"h3",component:"h1",fontWeight:700,children:"Publisher"})]}),h.jsx(x.Typography,{variant:"h5",color:"text.secondary",sx:{mb:3,maxWidth:600,mx:"auto"},children:"The open-source semantic model server for the Malloy data language"}),h.jsx(x.Typography,{variant:"body1",color:"text.secondary",sx:{maxWidth:800,mx:"auto"},children:"Define semantic models once — and use them everywhere. Publisher serves Malloy models through clean APIs, enabling consistent, interpretable, and AI-ready data access for tools, applications, and agents."})]}),h.jsxs(x.Grid,{container:!0,spacing:3,sx:{mb:6},children:[h.jsx(x.Grid,{size:{xs:12,md:4},children:h.jsx(x.Card,{variant:"outlined",onClick:()=>{window.open("https://github.com/malloydata/publisher/blob/main/README.md#ad-hoc-data-analysis","_blank")},sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2}},children:h.jsxs(x.CardContent,{sx:{p:3},children:[h.jsxs(x.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[h.jsx(fw,{sx:{color:"info.main",fontSize:28}}),h.jsx(x.Typography,{variant:"h6",fontWeight:600,children:"Ad Hoc Analysis"})]}),h.jsx(x.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Use Explorer, a visual query builder that allows analysts to browse semantic sources, build queries, and run nested logic — all without writing code."}),h.jsx(x.Chip,{label:"No-code",size:"small",color:"primary",variant:"outlined"})]})})}),h.jsx(x.Grid,{size:{xs:12,md:4},children:h.jsx(x.Card,{variant:"outlined",onClick:()=>{window.open("https://github.com/malloydata/publisher/blob/main/README.md#notebook-based-dashboards","_blank")},sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2}},children:h.jsxs(x.CardContent,{sx:{p:3},children:[h.jsxs(x.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[h.jsx(mw,{sx:{color:"warning.main",fontSize:28}}),h.jsx(x.Typography,{variant:"h6",fontWeight:600,children:"Notebook Dashboards"})]}),h.jsx(x.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Create shareable, code-first dashboards using Malloy notebooks. Include text, charts, and reusable views — all versioned alongside your models."}),h.jsx(x.Chip,{label:"Versioned",size:"small",color:"warning",variant:"outlined"})]})})}),h.jsx(x.Grid,{size:{xs:12,md:4},children:h.jsx(x.Card,{variant:"outlined",onClick:()=>{window.open("https://github.com/malloydata/publisher/blob/main/README.md#mcp-based-ai-data-agents","_blank")},sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2}},children:h.jsxs(x.CardContent,{sx:{p:3},children:[h.jsxs(x.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[h.jsx(bw,{sx:{color:"success.main",fontSize:28}}),h.jsx(x.Typography,{variant:"h6",fontWeight:600,children:"AI Data Agents"})]}),h.jsx(x.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Expose your semantic models via the Model Context Protocol (MCP), enabling AI agents to discover sources and ask well-formed questions."}),h.jsx(x.Chip,{label:"AI-Ready",size:"small",color:"success",variant:"outlined"})]})})})]}),h.jsx(x.Divider,{sx:{my:4}}),t.data.length>0?h.jsxs(h.Fragment,{children:[h.jsxs(x.Box,{sx:{textAlign:"center",mb:4},children:[h.jsxs(x.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[h.jsx(mh,{sx:{color:"primary.main",fontSize:24}}),h.jsx(x.Typography,{variant:"h4",fontWeight:600,children:"Select a Project"})]}),h.jsx(x.Typography,{variant:"body1",color:"text.secondary",children:"Choose a project to explore its semantic models and start analyzing your data"})]}),h.jsx(x.Grid,{container:!0,spacing:3,justifyContent:"center",children:t.data.map(s=>h.jsx(x.Grid,{size:{xs:12,sm:6,md:4},children:h.jsx(x.Card,{variant:"outlined",sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2,borderColor:"primary.main"}},onClick:a=>e(`/${s.name}/`,a),children:h.jsxs(x.CardContent,{sx:{p:3,textAlign:"center"},children:[h.jsx(gw,{sx:{fontSize:48,color:"primary.main",mb:2}}),h.jsx(x.Typography,{variant:"h6",fontWeight:600,gutterBottom:!0,children:s.name}),h.jsx(x.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:xw(s.readme)}),h.jsx(x.Button,{variant:"contained",color:"secondary",endIcon:h.jsx(pw,{}),fullWidth:!0,children:"Open Project"})]})})},s.name))})]}):h.jsxs(x.Box,{sx:{textAlign:"center",mb:4},children:[h.jsxs(x.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[h.jsx(mh,{sx:{color:"primary.main",fontSize:24}}),h.jsx(x.Typography,{variant:"h4",fontWeight:600,children:"Get Started"})]}),h.jsx(x.Typography,{variant:"body1",color:"text.secondary",sx:{mb:3},children:"No projects found. Create your first Malloy project to start exploring semantic models and building data experiences."}),h.jsx(x.Button,{variant:"contained",size:"large",color:"primary",startIcon:h.jsx(ph,{}),href:"https://github.com/malloydata/publisher/blob/main/README.md#server-configuration",target:"_blank",rel:"noopener noreferrer",children:"Learn How to Create Models"})]}),h.jsx(x.Box,{sx:{textAlign:"center",mt:6,pt:4,borderTop:1,borderColor:"divider"},children:h.jsxs(x.Typography,{variant:"body2",color:"text.secondary",children:["Publisher is built on fully open infrastructure and designed for the AI era. Join the"," ",h.jsx("a",{href:"https://join.slack.com/t/malloy-community/shared_invite/zt-1kgfwgi5g-CrsdaRqs81QY67QW0~t_uw",target:"_blank",rel:"noopener noreferrer",style:{color:"primary.main",textDecoration:"underline"},children:"Malloy Slack community"})," ","to ask questions, share ideas, and contribute to the future of data modeling."]})})]}):h.jsx(bt,{text:"Loading projects..."})}function Tw(){const e=bh.useParams(),{packageName:t,projectName:n}=e,{workbookStorage:r}=Nl(),[i,s]=P.useState(""),[a,o]=P.useState(""),[u,l]=P.useState([]),[d,c]=P.useState(null),[m,p]=P.useState(!1),[g,b]=P.useState(!1),T=nl(),y=!!d,C=V=>{c(V.currentTarget)},S=()=>{c(null)},N=()=>{b(!1)},D=()=>{p(!1),s(""),o("")};P.useEffect(()=>{m&&r&&e&&r.listWorkspaces(e,!0).then(V=>{l(V),V.length===1&&o(V[0].name)}).catch(V=>{console.error("Error fetching workspaces:",V),l([])})},[m,r,e]);const w=(V,Q)=>{b(!1),T(`/${n}/${t}/workbook/${encodeURIComponent(V.workspace)}/${encodeURIComponent(V.path)}`,Q)},B=V=>{p(!1);const Q=`${encodeURIComponent(a)}/${encodeURIComponent(i)}`;T(`/${n}/${t}/workbook/${Q}`,V),s(""),o("")};return!n||!t?null:h.jsxs(h.Fragment,{children:[h.jsx(x.Button,{"aria-controls":y?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":y?"true":void 0,onClick:C,variant:"contained",sx:{height:"40px",px:2,backgroundColor:"#fbbb04","&:hover":{backgroundColor:"#eab308"}},children:"Analyze Package"}),h.jsxs(x.Menu,{id:"basic-menu",anchorEl:d,open:y,onClose:S,MenuListProps:{"aria-labelledby":"basic-button",sx:{py:.5}},children:[h.jsxs(x.MenuItem,{onClick:()=>{p(!0),S()},sx:{py:1,px:2},children:[h.jsx(x.ListItemIcon,{children:h.jsx(Ns.Add,{fontSize:"small"})}),h.jsxs(x.ListItemText,{children:[h.jsx(x.Typography,{variant:"body2",fontWeight:500,children:"New Workbook"}),h.jsx(x.Typography,{variant:"caption",color:"text.secondary",children:"Create a new analysis workbook"})]})]}),h.jsxs(x.MenuItem,{onClick:()=>{b(!0),S()},sx:{py:1,px:2},children:[h.jsx(x.ListItemIcon,{children:h.jsx(Ns.Launch,{fontSize:"small"})}),h.jsxs(x.ListItemText,{children:[h.jsx(x.Typography,{variant:"body2",fontWeight:500,children:"Open Workbook"}),h.jsx(x.Typography,{variant:"caption",color:"text.secondary",children:"Open an existing workbook"})]})]})]}),h.jsxs(x.Dialog,{open:m,onClose:D,maxWidth:"sm",fullWidth:!0,children:[h.jsxs(x.DialogTitle,{sx:{pb:1,pt:2,px:2},children:[h.jsx(x.Typography,{fontWeight:600,sx:{fontSize:"1.5rem",mb:.5},children:"Create New Workbook"}),h.jsx(x.Typography,{variant:"body2",color:"text.secondary",children:"Start a new analysis workbook to explore your data"})]}),h.jsx(x.DialogContent,{sx:{px:2,pb:2},children:h.jsxs(x.Stack,{spacing:2,sx:{mt:1},children:[u.length>1?h.jsxs(x.FormControl,{fullWidth:!0,size:"small",children:[h.jsx(x.InputLabel,{children:"Workspace"}),h.jsx(x.Select,{value:a,label:"Workspace",onChange:V=>o(V.target.value),children:u.map(V=>h.jsx(x.MenuItem,{value:V.name,children:h.jsxs(x.Box,{children:[h.jsx(x.Typography,{variant:"body2",fontWeight:500,children:V.name}),h.jsx(x.Typography,{variant:"caption",color:"text.secondary",children:V.description})]})},V.name))})]}):u.length===1?h.jsxs(x.Box,{sx:{p:2,border:1,borderColor:"divider",borderRadius:1,backgroundColor:"grey.50"},children:[h.jsxs(x.Typography,{variant:"body2",fontWeight:500,gutterBottom:!0,children:["Workspace: ",u[0].name]}),h.jsx(x.Typography,{variant:"caption",color:"text.secondary",children:u[0].description})]}):null,h.jsx(x.FormControl,{fullWidth:!0,children:h.jsx(x.TextField,{label:"Workbook Name",value:i,onChange:V=>s(V.target.value),placeholder:"Enter workbook name...",fullWidth:!0,autoFocus:!0,size:"small"})}),h.jsxs(x.Stack,{direction:"row",spacing:1,justifyContent:"flex-end",children:[h.jsx(x.Button,{onClick:D,variant:"outlined",size:"small",children:"Cancel"}),h.jsx(x.Button,{onClick:V=>B(V),variant:"contained",disabled:!i.trim()||u.length>1&&!a,size:"small",children:"Create Workbook"})]})]})})]}),h.jsxs(x.Dialog,{open:g,onClose:N,maxWidth:"md",fullWidth:!0,children:[h.jsxs(x.DialogTitle,{sx:{pb:1,pt:2,px:2},children:[h.jsx(x.Typography,{fontWeight:600,sx:{mb:.5,fontSize:"1.5rem"},children:"Open Workbook"}),h.jsx(x.Typography,{variant:"body2",color:"text.secondary",children:"Select an existing workbook to continue your analysis"})]}),h.jsx(x.DialogContent,{sx:{px:2,pb:2},children:h.jsx(ju,{projectName:n,packageName:t,children:h.jsx(N0,{onWorkbookClick:w})})})]})]})}const Cw=new Bu(new Et);function Sw({modelPath:e,query:t,sourceName:n,queryName:r,enabled:i=!0}){const{projectName:s,packageName:a,versionId:o}=pt(),{data:u,isSuccess:l,isError:d,error:c,isLoading:m}=xt({queryKey:["rawQueryData",s,a,e,o,t,n,r],queryFn:g=>Cw.executeQuery(s,a,e,t,n,r,o,g),enabled:i});return{data:l&&u?.data?.result?(()=>{try{return JSON.parse(u.data.result).data?.array_value||[]}catch(g){return console.error("Failed to parse query result:",g),[]}})():[],isSuccess:l,isError:d,error:c,isLoading:m}}Ve.defaults.baseURL="IfYouAreSeeingThis_baseURL_IsNotSet";exports.AnalyzePackageButton=Tw;exports.BrowserWorkbookStorage=hw;exports.ConnectionExplorer=Lf;exports.EmbeddedQueryResult=Mx;exports.Home=yw;exports.Loading=bt;exports.Model=qT;exports.ModelExplorer=lp;exports.Models=up;exports.Notebook=Df;exports.Package=FT;exports.PackageProvider=ju;exports.Packages=Nf;exports.Project=Kx;exports.ProjectProvider=Rf;exports.PublisherPackageProvider=ju;exports.QueryResult=zu;exports.ServerProvider=GT;exports.SourceExplorerComponent=el;exports.SourcesExplorer=Ju;exports.Workbook=cw;exports.WorkbookList=N0;exports.WorkbookManager=vr;exports.WorkbookStorageProvider=iw;exports.createEmbeddedQueryResult=Uu;exports.useModelData=tl;exports.usePackage=pt;exports.useProject=$r;exports.usePublisherPackage=pt;exports.useRawQueryData=Sw;exports.useRouterClickHandler=nl;exports.useServer=ka;