@malloy-publisher/sdk 0.0.201 → 0.0.203

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,229 +0,0 @@
1
- "use strict";var ry=Object.create;var Xd=Object.defineProperty;var oy=Object.getOwnPropertyDescriptor;var ay=Object.getOwnPropertyNames;var iy=Object.getPrototypeOf,sy=Object.prototype.hasOwnProperty;var ly=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ay(t))!sy.call(e,o)&&o!==n&&Xd(e,o,{get:()=>t[o],enumerable:!(r=oy(t,o))||r.enumerable});return e};var jl=(e,t,n)=>(n=e!=null?ry(iy(e)):{},ly(t||!e||!e.__esModule?Xd(n,"default",{value:e,enumerable:!0}):n,e));const c=require("react/jsx-runtime"),P=require("@mui/material"),H=require("react"),wr=require("@tanstack/react-query"),it=require("./ServerProvider-BSyxB6sf.cjs.js"),Ts=require("markdown-to-jsx"),fn=require("@mui/icons-material"),Rt=require("@mui/system"),uy=require("@emotion/styled"),cy=require("@emotion/react"),$a=require("react-dom"),dy=require("react-router-dom");function Tm(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 I=Tm(H),fy=Tm($a),Zd=e=>e,py=()=>{let e=Zd;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Zd}}},vm=py();function Cr(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 De(e){if(typeof e!="string")throw new Error(Cr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Jd(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function Wn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $l={exports:{}},Hl,ef;function hy(){if(ef)return Hl;ef=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Hl=e,Hl}var Ul,tf;function my(){if(tf)return Ul;tf=1;var e=hy();function t(){}function n(){}return n.resetWarningCache=t,Ul=function(){function r(i,s,l,u,d,f){if(f!==e){var h=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 h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},Ul}var nf;function gy(){return nf||(nf=1,$l.exports=my()()),$l.exports}var by=gy();const ce=Wn(by);function Sm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Sm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ae(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Sm(e))&&(r&&(r+=" "),r+=t);return r}function Fe(e,t,n=void 0){const r={};for(const o in e){const a=e[o];let i="",s=!0;for(let l=0;l<a.length;l+=1){const u=a[l];u&&(i+=(s===!0?"":" ")+t(u),s=!1,n&&n[u]&&(i+=" "+n[u]))}r[o]=i}return r}var zl={exports:{}},gt={};/**
2
- * @license React
3
- * react-is.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var rf;function yy(){if(rf)return gt;rf=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),i=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function m(b){if(typeof b=="object"&&b!==null){var y=b.$$typeof;switch(y){case e:switch(b=b.type,b){case n:case o:case r:case l:case u:case h:return b;default:switch(b=b&&b.$$typeof,b){case i:case s:case f:case d:return b;case a:return b;default:return y}}case t:return y}}}return gt.ContextConsumer=a,gt.ContextProvider=i,gt.Element=e,gt.ForwardRef=s,gt.Fragment=n,gt.Lazy=f,gt.Memo=d,gt.Portal=t,gt.Profiler=o,gt.StrictMode=r,gt.Suspense=l,gt.SuspenseList=u,gt.isContextConsumer=function(b){return m(b)===a},gt.isContextProvider=function(b){return m(b)===i},gt.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},gt.isForwardRef=function(b){return m(b)===s},gt.isFragment=function(b){return m(b)===n},gt.isLazy=function(b){return m(b)===f},gt.isMemo=function(b){return m(b)===d},gt.isPortal=function(b){return m(b)===t},gt.isProfiler=function(b){return m(b)===o},gt.isStrictMode=function(b){return m(b)===r},gt.isSuspense=function(b){return m(b)===l},gt.isSuspenseList=function(b){return m(b)===u},gt.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===o||b===r||b===l||b===u||typeof b=="object"&&b!==null&&(b.$$typeof===f||b.$$typeof===d||b.$$typeof===i||b.$$typeof===a||b.$$typeof===s||b.$$typeof===p||b.getModuleId!==void 0)},gt.typeOf=m,gt}var of;function xy(){return of||(of=1,zl.exports=yy()),zl.exports}var km=xy();function ar(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 Dm(e){if(I.isValidElement(e)||km.isValidElementType(e)||!ar(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Dm(e[n])}),t}function tn(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return ar(e)&&ar(t)&&Object.keys(t).forEach(o=>{I.isValidElement(t[o])||km.isValidElementType(t[o])?r[o]=t[o]:ar(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&ar(e[o])?r[o]=tn(e[o],t[o],n):n.clone?r[o]=ar(t[o])?Dm(t[o]):t[o]:r[o]=t[o]}),r}function Wa(e,t){return t?tn(e,t,{clone:!1}):e}function af(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,o)=>{const a=/min-width:\s*([0-9.]+)/;return+(r.match(a)?.[1]||0)-+(o.match(a)?.[1]||0)});return n.length?n.reduce((r,o)=>{const a=t[o];return delete r[o],r[o]=a,r},{...t}):t}function Ey(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function Cy(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(a)}function Ty(e){const t=(a,i)=>a.replace("@media",i?`@container ${i}`:"@container");function n(a,i){a.up=(...s)=>t(e.breakpoints.up(...s),i),a.down=(...s)=>t(e.breakpoints.down(...s),i),a.between=(...s)=>t(e.breakpoints.between(...s),i),a.only=(...s)=>t(e.breakpoints.only(...s),i),a.not=(...s)=>{const l=t(e.breakpoints.not(...s),i);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=a=>(n(r,a),r);return n(o),{...e,containerQueries:o}}const Xs={xs:0,sm:600,md:900,lg:1200,xl:1536},sf={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Xs[e]}px)`},vy={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Xs[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Tr(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const a=r.breakpoints||sf;return t.reduce((i,s,l)=>(i[a.up(a.keys[l])]=n(t[l]),i),{})}if(typeof t=="object"){const a=r.breakpoints||sf;return Object.keys(t).reduce((i,s)=>{if(Ey(a.keys,s)){const l=Cy(r.containerQueries?r:vy,s);l&&(i[l]=n(t[s],s))}else if(Object.keys(a.values||Xs).includes(s)){const l=a.up(s);i[l]=n(t[s],s)}else{const l=s;i[l]=t[l]}return i},{})}return n(t)}function Sy(e={}){return e.keys?.reduce((n,r)=>{const o=e.up(r);return n[o]={},n},{})||{}}function lf(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function Zs(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,a)=>o&&o[a]?o[a]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function vs(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=Zs(e,n)||r,t&&(o=t(o,r,e)),o}function jt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,a=i=>{if(i[t]==null)return null;const s=i[t],l=i.theme,u=Zs(l,r)||{};return Tr(i,s,f=>{let h=vs(u,o,f);return f===h&&typeof f=="string"&&(h=vs(u,o,`${t}${f==="default"?"":De(f)}`,f)),n===!1?h:{[n]:h}})};return a.propTypes={},a.filterProps=[t],a}function ky(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Dy={m:"margin",p:"padding"},wy={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},uf={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Ay=ky(e=>{if(e.length>2)if(uf[e])e=uf[e];else return[e];const[t,n]=e.split(""),r=Dy[t],o=wy[n]||"";return Array.isArray(o)?o.map(a=>r+a):[r+o]}),kc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Dc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...kc,...Dc];function Ei(e,t,n,r){const o=Zs(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?a=>typeof a=="string"?a:typeof o=="string"?o.startsWith("var(")&&a===0?0:o.startsWith("var(")&&a===1?o:`calc(${a} * ${o})`:o*a:Array.isArray(o)?a=>{if(typeof a=="string")return a;const i=Math.abs(a),s=o[i];return a>=0?s:typeof s=="number"?-s:typeof s=="string"&&s.startsWith("var(")?`calc(-1 * ${s})`:`-${s}`}:typeof o=="function"?o:()=>{}}function wc(e){return Ei(e,"spacing",8)}function Ci(e,t){return typeof t=="string"||t==null?t:e(t)}function Iy(e,t){return n=>e.reduce((r,o)=>(r[o]=Ci(t,n),r),{})}function Py(e,t,n,r){if(!t.includes(n))return null;const o=Ay(n),a=Iy(o,r),i=e[n];return Tr(e,i,a)}function wm(e,t){const n=wc(e.theme);return Object.keys(e).map(r=>Py(e,t,r,n)).reduce(Wa,{})}function Lt(e){return wm(e,kc)}Lt.propTypes={};Lt.filterProps=kc;function Ft(e){return wm(e,Dc)}Ft.propTypes={};Ft.filterProps=Dc;function Js(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(a=>{r[a]=o}),r),{}),n=r=>Object.keys(r).reduce((o,a)=>t[a]?Wa(o,t[a](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Rn(e){return typeof e!="number"?e:`${e}px solid`}function jn(e,t){return jt({prop:e,themeKey:"borders",transform:t})}const Ry=jn("border",Rn),My=jn("borderTop",Rn),Oy=jn("borderRight",Rn),Ny=jn("borderBottom",Rn),Ly=jn("borderLeft",Rn),Fy=jn("borderColor"),_y=jn("borderTopColor"),By=jn("borderRightColor"),jy=jn("borderBottomColor"),$y=jn("borderLeftColor"),Hy=jn("outline",Rn),Uy=jn("outlineColor"),el=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ei(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Ci(t,r)});return Tr(e,e.borderRadius,n)}return null};el.propTypes={};el.filterProps=["borderRadius"];Js(Ry,My,Oy,Ny,Ly,Fy,_y,By,jy,$y,el,Hy,Uy);const tl=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ei(e.theme,"spacing",8),n=r=>({gap:Ci(t,r)});return Tr(e,e.gap,n)}return null};tl.propTypes={};tl.filterProps=["gap"];const nl=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ei(e.theme,"spacing",8),n=r=>({columnGap:Ci(t,r)});return Tr(e,e.columnGap,n)}return null};nl.propTypes={};nl.filterProps=["columnGap"];const rl=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ei(e.theme,"spacing",8),n=r=>({rowGap:Ci(t,r)});return Tr(e,e.rowGap,n)}return null};rl.propTypes={};rl.filterProps=["rowGap"];const zy=jt({prop:"gridColumn"}),Vy=jt({prop:"gridRow"}),Wy=jt({prop:"gridAutoFlow"}),qy=jt({prop:"gridAutoColumns"}),Yy=jt({prop:"gridAutoRows"}),Ky=jt({prop:"gridTemplateColumns"}),Gy=jt({prop:"gridTemplateRows"}),Qy=jt({prop:"gridTemplateAreas"}),Xy=jt({prop:"gridArea"});Js(tl,nl,rl,zy,Vy,Wy,qy,Yy,Ky,Gy,Qy,Xy);function Ho(e,t){return t==="grey"?t:e}const Zy=jt({prop:"color",themeKey:"palette",transform:Ho}),Jy=jt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ho}),ex=jt({prop:"backgroundColor",themeKey:"palette",transform:Ho});Js(Zy,Jy,ex);function Cn(e){return e<=1&&e!==0?`${e*100}%`:e}const tx=jt({prop:"width",transform:Cn}),Ac=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const r=e.theme?.breakpoints?.values?.[n]||Xs[n];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Cn(n)}};return Tr(e,e.maxWidth,t)}return null};Ac.filterProps=["maxWidth"];const nx=jt({prop:"minWidth",transform:Cn}),rx=jt({prop:"height",transform:Cn}),ox=jt({prop:"maxHeight",transform:Cn}),ax=jt({prop:"minHeight",transform:Cn});jt({prop:"size",cssProperty:"width",transform:Cn});jt({prop:"size",cssProperty:"height",transform:Cn});const ix=jt({prop:"boxSizing"});Js(tx,Ac,nx,rx,ox,ax,ix);const Ti={border:{themeKey:"borders",transform:Rn},borderTop:{themeKey:"borders",transform:Rn},borderRight:{themeKey:"borders",transform:Rn},borderBottom:{themeKey:"borders",transform:Rn},borderLeft:{themeKey:"borders",transform:Rn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Rn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:el},color:{themeKey:"palette",transform:Ho},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ho},backgroundColor:{themeKey:"palette",transform:Ho},p:{style:Ft},pt:{style:Ft},pr:{style:Ft},pb:{style:Ft},pl:{style:Ft},px:{style:Ft},py:{style:Ft},padding:{style:Ft},paddingTop:{style:Ft},paddingRight:{style:Ft},paddingBottom:{style:Ft},paddingLeft:{style:Ft},paddingX:{style:Ft},paddingY:{style:Ft},paddingInline:{style:Ft},paddingInlineStart:{style:Ft},paddingInlineEnd:{style:Ft},paddingBlock:{style:Ft},paddingBlockStart:{style:Ft},paddingBlockEnd:{style:Ft},m:{style:Lt},mt:{style:Lt},mr:{style:Lt},mb:{style:Lt},ml:{style:Lt},mx:{style:Lt},my:{style:Lt},margin:{style:Lt},marginTop:{style:Lt},marginRight:{style:Lt},marginBottom:{style:Lt},marginLeft:{style:Lt},marginX:{style:Lt},marginY:{style:Lt},marginInline:{style:Lt},marginInlineStart:{style:Lt},marginInlineEnd:{style:Lt},marginBlock:{style:Lt},marginBlockStart:{style:Lt},marginBlockEnd:{style:Lt},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:tl},rowGap:{style:rl},columnGap:{style:nl},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Cn},maxWidth:{style:Ac},minWidth:{transform:Cn},height:{transform:Cn},maxHeight:{transform:Cn},minHeight:{transform:Cn},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 sx(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function lx(e,t){return typeof e=="function"?e(t):e}function ux(){function e(n,r,o,a){const i={[n]:r,theme:o},s=a[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:d,style:f}=s;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=Zs(o,u)||{};return f?f(i):Tr(i,r,m=>{let b=vs(h,d,m);return m===b&&typeof m=="string"&&(b=vs(h,d,`${n}${m==="default"?"":De(m)}`,m)),l===!1?b:{[l]:b}})}function t(n){const{sx:r,theme:o={},nested:a}=n||{};if(!r)return null;const i=o.unstable_sxConfig??Ti;function s(l){let u=l;if(typeof l=="function")u=l(o);else if(typeof l!="object")return l;if(!u)return null;const d=Sy(o.breakpoints),f=Object.keys(d);let h=d;return Object.keys(u).forEach(p=>{const m=lx(u[p],o);if(m!=null)if(typeof m=="object")if(i[p])h=Wa(h,e(p,m,o,i));else{const b=Tr({theme:o},m,y=>({[p]:y}));sx(b,m)?h[p]=t({sx:m,theme:o,nested:!0}):h=Wa(h,b)}else h=Wa(h,e(p,m,o,i))}),!a&&o.modularCssLayers?{"@layer sx":af(o,lf(f,h))}:af(o,lf(f,h))}return Array.isArray(r)?r.map(s):s(r)}return t}const Go=ux();Go.filterProps=["sx"];const cx=e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??Ti;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t};function dx(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=cx(n);let a;return Array.isArray(t)?a=[r,...t]:typeof t=="function"?a=(...i)=>{const s=t(...i);return ar(s)?{...r,...s}:r}:a={...r,...t},{...o,sx:a}}function fx(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Ic(e,t=0,n=1){return fx(e,t,n)}function px(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,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function zr(e){if(e.type)return e;if(e.charAt(0)==="#")return zr(px(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Cr(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=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(o))throw new Error(Cr(10,o))}else r=r.split(",");return r=r.map(a=>parseFloat(a)),{type:n,values:r,colorSpace:o}}const hx=e=>{const t=zr(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},Ha=(e,t)=>{try{return hx(e)}catch{return e}};function ol(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,a)=>a<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Am(e){e=zr(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,a=r*Math.min(o,1-o),i=(u,d=(u+n/30)%12)=>o-a*Math.max(Math.min(d-3,9-d,1),-1);let s="rgb";const l=[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),ol({type:s,values:l})}function Nu(e){e=zr(e);let t=e.type==="hsl"||e.type==="hsla"?zr(Am(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 mx(e,t){const n=Nu(e),r=Nu(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Ss(e,t){return e=zr(e),t=Ic(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,ol(e)}function Gr(e,t,n){try{return Ss(e,t)}catch{return e}}function al(e,t){if(e=zr(e),t=Ic(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 ol(e)}function ft(e,t,n){try{return al(e,t)}catch{return e}}function il(e,t){if(e=zr(e),t=Ic(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 ol(e)}function pt(e,t,n){try{return il(e,t)}catch{return e}}function Lu(e,t=.15){return Nu(e)>.5?al(e,t):il(e,t)}function ji(e,t,n){try{return Lu(e,t)}catch{return e}}const li={black:"#000",white:"#fff"},gx={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"},ko={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Do={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Ta={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},wo={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Ao={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Io={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Im(){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:li.white,default:li.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 Pm=Im();function Rm(){return{text:{primary:li.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:li.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 Fu=Rm();function cf(e,t,n,r){const o=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=il(e.main,o):t==="dark"&&(e.dark=al(e.main,a)))}function df(e,t,n,r,o){const a=o.light||o,i=o.dark||o*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(a*100).toFixed(0)}%)`:n==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(i*100).toFixed(0)}%)`))}function bx(e="light"){return e==="dark"?{main:wo[200],light:wo[50],dark:wo[400]}:{main:wo[700],light:wo[400],dark:wo[800]}}function yx(e="light"){return e==="dark"?{main:ko[200],light:ko[50],dark:ko[400]}:{main:ko[500],light:ko[300],dark:ko[700]}}function xx(e="light"){return e==="dark"?{main:Do[500],light:Do[300],dark:Do[700]}:{main:Do[700],light:Do[400],dark:Do[800]}}function Ex(e="light"){return e==="dark"?{main:Ao[400],light:Ao[300],dark:Ao[700]}:{main:Ao[700],light:Ao[500],dark:Ao[900]}}function Cx(e="light"){return e==="dark"?{main:Io[400],light:Io[300],dark:Io[700]}:{main:Io[800],light:Io[500],dark:Io[900]}}function Tx(e="light"){return e==="dark"?{main:Ta[400],light:Ta[300],dark:Ta[700]}:{main:"#ed6c02",light:Ta[500],dark:Ta[900]}}function vx(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function Pc(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:o,...a}=e,i=e.primary||bx(t),s=e.secondary||yx(t),l=e.error||xx(t),u=e.info||Ex(t),d=e.success||Cx(t),f=e.warning||Tx(t);function h(y){return o?vx(y):mx(y,Fu.text.primary)>=n?Fu.text.primary:Pm.text.primary}const p=({color:y,name:x,mainShade:E=500,lightShade:v=300,darkShade:S=700})=>{if(y={...y},!y.main&&y[E]&&(y.main=y[E]),!y.hasOwnProperty("main"))throw new Error(Cr(11,x?` (${x})`:"",E));if(typeof y.main!="string")throw new Error(Cr(12,x?` (${x})`:"",JSON.stringify(y.main)));return o?(df(o,y,"light",v,r),df(o,y,"dark",S,r)):(cf(y,"light",v,r),cf(y,"dark",S,r)),y.contrastText||(y.contrastText=h(y.main)),y};let m;return t==="light"?m=Im():t==="dark"&&(m=Rm()),tn({common:{...li},mode:t,primary:p({color:i,name:"primary"}),secondary:p({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:l,name:"error"}),warning:p({color:f,name:"warning"}),info:p({color:u,name:"info"}),success:p({color:d,name:"success"}),grey:gx,contrastThreshold:n,getContrastText:h,augmentColor:p,tonalOffset:r,...m},a)}function Sx(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=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(o){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 kx={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 Dx(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var wx=/[A-Z]|^ms/g,Ax=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Mm=function(t){return t.charCodeAt(1)===45},ff=function(t){return t!=null&&typeof t!="boolean"},Vl=Dx(function(e){return Mm(e)?e:e.replace(wx,"-$&").toLowerCase()}),pf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Ax,function(r,o,a){return Hr={name:o,styles:a,next:Hr},o})}return kx[t]!==1&&!Mm(t)&&typeof n=="number"&&n!==0?n+"px":n};function ks(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 o=n;if(o.anim===1)return Hr={name:o.name,styles:o.styles,next:Hr},o.name;var a=n;if(a.styles!==void 0){var i=a.next;if(i!==void 0)for(;i!==void 0;)Hr={name:i.name,styles:i.styles,next:Hr},i=i.next;var s=a.styles+";";return s}return Ix(e,t,n)}}var l=n;return l}function Ix(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=ks(e,t,n[o])+";";else for(var a in n){var i=n[a];if(typeof i!="object"){var s=i;ff(s)&&(r+=Vl(a)+":"+pf(a,s)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&t==null)for(var l=0;l<i.length;l++)ff(i[l])&&(r+=Vl(a)+":"+pf(a,i[l])+";");else{var u=ks(e,t,i);switch(a){case"animation":case"animationName":{r+=Vl(a)+":"+u+";";break}default:r+=a+"{"+u+"}"}}}return r}var hf=/label:\s*([^\s;{]+)\s*(;|$)/g,Hr;function Px(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,o="";Hr=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,o+=ks(n,t,a);else{var i=a;o+=i[0]}for(var s=1;s<e.length;s++)if(o+=ks(n,t,e[s]),r){var l=a;o+=l[s]}hf.lastIndex=0;for(var u="",d;(d=hf.exec(o))!==null;)u+="-"+d[1];var f=Sx(o)+u;return{name:f,styles:o,next:Hr}}function Rx(e,t){return uy(e,t)}function Mx(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const mf=[];function io(e){return mf[0]=e,Px(mf)}const Wt=typeof window<"u"?I.useLayoutEffect:I.useEffect;function Ox(e){return Object.keys(e).length===0}function Om(e=null){const t=I.useContext(cy.ThemeContext);return!t||Ox(t)?e:t}const Nx=I.createContext(),qn=()=>I.useContext(Nx)??!1;function ui(e,t,n=!1){const r={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const a=o;if(a==="components"||a==="slots")r[a]={...e[a],...r[a]};else if(a==="componentsProps"||a==="slotProps"){const i=e[a],s=t[a];if(!s)r[a]=i||{};else if(!i)r[a]=s;else{r[a]={...s};for(const l in i)if(Object.prototype.hasOwnProperty.call(i,l)){const u=l;r[a][u]=ui(i[u],s[u],n)}}}else a==="className"&&n&&t.className?r.className=Ae(e?.className,t?.className):a==="style"&&n&&t.style?r.style={...e?.style,...t?.style}:r[a]===void 0&&(r[a]=e[a])}return r}const Lx=I.createContext(void 0);function Fx(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?ui(o.defaultProps,r,t.components.mergeClassNameAndStyle):!o.styleOverrides&&!o.variants?ui(o,r,t.components.mergeClassNameAndStyle):r}function _x({props:e,name:t}){const n=I.useContext(Lx);return Fx({props:e,name:t,theme:{components:n}})}let gf=0;function Bx(e){const[t,n]=I.useState(e),r=e||t;return I.useEffect(()=>{t==null&&(gf+=1,n(`mui-${gf}`))},[t]),r}const jx={...I},bf=jx.useId;function Yn(e){if(bf!==void 0){const t=bf();return e??t}return Bx(e)}const $x=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 Hx(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,a=$x(t),i=Object.keys(a);function s(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function l(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function u(h,p){const m=i.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(m!==-1&&typeof t[i[m]]=="number"?t[i[m]]:p)-r/100}${n})`}function d(h){return i.indexOf(h)+1<i.length?u(h,i[i.indexOf(h)+1]):s(h)}function f(h){const p=i.indexOf(h);return p===0?s(i[1]):p===i.length-1?l(i[p]):u(h,i[i.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:i,values:a,up:s,down:l,between:u,only:d,not:f,unit:n,...o}}const Ux={borderRadius:4};function zx(e=8,t=wc({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(a=>{const i=t(a);return typeof i=="number"?`${i}px`:i}).join(" ");return n.mui=!0,n}function Vx(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 Rc(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:a={},...i}=e,s=Hx(n),l=zx(o);let u=tn({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...Ux,...a}},i);return u=Ty(u),u.applyStyles=Vx,u=t.reduce((d,f)=>tn(d,f),u),u.unstable_sxConfig={...Ti,...i?.unstable_sxConfig},u.unstable_sx=function(f){return Go({sx:f,theme:this})},u}const Wx=Rc();function qx(e=Wx){return Om(e)}const yf=(e,t,n,r=[])=>{let o=e;t.forEach((a,i)=>{i===t.length-1?Array.isArray(o)?o[Number(a)]=n:o&&typeof o=="object"&&(o[a]=n):o&&typeof o=="object"&&(o[a]||(o[a]=r.includes(a)?[]:{}),o=o[a])})},Yx=(e,t,n)=>{function r(o,a=[],i=[]){Object.entries(o).forEach(([s,l])=>{(!n||n&&!n([...a,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...a,s],Array.isArray(l)?[...i,s]:i):t([...a,s],l,i))})}r(e)},Kx=(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 Wl(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},a={},i={};return Yx(e,(s,l,u)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const d=`--${n?`${n}-`:""}${s.join("-")}`,f=Kx(s,l);Object.assign(o,{[d]:f}),yf(a,s,`var(${d})`,u),yf(i,s,`var(${d}, ${f})`,u)}},s=>s[0]==="vars"),{css:o,vars:a,varsWithDefaults:i}}function Gx(e,t={}){const{getSelector:n=x,disableCssColorScheme:r,colorSchemeSelector:o,enableContrastVars:a}=t,{colorSchemes:i={},components:s,defaultColorScheme:l="light",...u}=e,{vars:d,css:f,varsWithDefaults:h}=Wl(u,t);let p=h;const m={},{[l]:b,...y}=i;if(Object.entries(y||{}).forEach(([S,k])=>{const{vars:C,css:L,varsWithDefaults:F}=Wl(k,t);p=tn(p,F),m[S]={css:L,vars:C}}),b){const{css:S,vars:k,varsWithDefaults:C}=Wl(b,t);p=tn(p,C),m[l]={css:S,vars:k}}function x(S,k){let C=o;if(o==="class"&&(C=".%s"),o==="data"&&(C="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(C=`[${o}="%s"]`),S){if(C==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${i[S]?.palette?.mode||S})`]:{":root":k}};if(C)return e.defaultColorScheme===S?`:root, ${C.replace("%s",String(S))}`:C.replace("%s",String(S))}return":root"}return{vars:p,generateThemeVars:()=>{let S={...d};return Object.entries(m).forEach(([,{vars:k}])=>{S=tn(S,k)}),S},generateStyleSheets:()=>{const S=[],k=e.defaultColorScheme||"light";function C(B,R){Object.keys(R).length&&S.push(typeof B=="string"?{[B]:{...R}}:B)}C(n(void 0,{...f}),f);const{[k]:L,...F}=m;if(L){const{css:B}=L,R=i[k]?.palette?.mode,_=!r&&R?{colorScheme:R,...B}:{...B};C(n(k,{..._}),_)}return Object.entries(F).forEach(([B,{css:R}])=>{const _=i[B]?.palette?.mode,T=!r&&_?{colorScheme:_,...R}:{...R};C(n(B,{...T}),T)}),a&&S.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),S}}}function Qx(e){const t={};return Object.entries(e).forEach(r=>{const[o,a]=r;typeof a=="object"&&(t[o]=`${a.fontStyle?`${a.fontStyle} `:""}${a.fontVariant?`${a.fontVariant} `:""}${a.fontWeight?`${a.fontWeight} `:""}${a.fontStretch?`${a.fontStretch} `:""}${a.fontSize||""}${a.lineHeight?`/${a.lineHeight} `:""}${a.fontFamily||""}`)}),t}function Xx(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 Zx={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 _e(e,t,n="Mui"){const r=Zx[t];return r?`${n}-${r}`:`${vm.generate(e)}-${t}`}function Jx(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function e2(e){return Math.round(e*1e5)/1e5}const xf={textTransform:"uppercase"},Ef='"Roboto", "Helvetica", "Arial", sans-serif';function t2(e,t){const{fontFamily:n=Ef,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:a=400,fontWeightMedium:i=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:u,pxToRem:d,...f}=typeof t=="function"?t(e):t,h=r/14,p=d||(y=>`${y/l*h}rem`),m=(y,x,E,v,S)=>({fontFamily:n,fontWeight:y,fontSize:p(x),lineHeight:E,...n===Ef?{letterSpacing:`${e2(v/x)}em`}:{},...S,...u}),b={h1:m(o,96,1.167,-1.5),h2:m(o,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(i,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(i,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(i,14,1.75,.4,xf),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,xf),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return tn({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:a,fontWeightMedium:i,fontWeightBold:s,...b},f,{clone:!1})}const n2=.2,r2=.14,o2=.12;function It(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${n2})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${r2})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${o2})`].join(",")}const a2=["none",It(0,2,1,-1,0,1,1,0,0,1,3,0),It(0,3,1,-2,0,2,2,0,0,1,5,0),It(0,3,3,-2,0,3,4,0,0,1,8,0),It(0,2,4,-1,0,4,5,0,0,1,10,0),It(0,3,5,-1,0,5,8,0,0,1,14,0),It(0,3,5,-1,0,6,10,0,0,1,18,0),It(0,4,5,-2,0,7,10,1,0,2,16,1),It(0,5,5,-3,0,8,10,1,0,3,14,2),It(0,5,6,-3,0,9,12,1,0,3,16,2),It(0,6,6,-3,0,10,14,1,0,4,18,3),It(0,6,7,-4,0,11,15,1,0,4,20,3),It(0,7,8,-4,0,12,17,2,0,5,22,4),It(0,7,8,-4,0,13,19,2,0,5,24,4),It(0,7,9,-4,0,14,21,2,0,5,26,4),It(0,8,9,-5,0,15,22,2,0,6,28,5),It(0,8,10,-5,0,16,24,2,0,6,30,5),It(0,8,11,-5,0,17,26,2,0,6,32,5),It(0,9,11,-5,0,18,28,2,0,7,34,6),It(0,9,12,-6,0,19,29,2,0,7,36,6),It(0,10,13,-6,0,20,31,3,0,8,38,7),It(0,10,13,-6,0,21,33,3,0,8,40,7),It(0,10,14,-6,0,22,35,3,0,8,42,7),It(0,11,14,-7,0,23,36,3,0,9,44,8),It(0,11,15,-7,0,24,38,3,0,9,46,8)],i2={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)"},s2={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Cf(e){return`${Math.round(e)}ms`}function l2(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function u2(e){const t={...i2,...e.easing},n={...s2,...e.duration};return{getAutoHeightDuration:l2,create:(o=["all"],a={})=>{const{duration:i=n.standard,easing:s=t.easeInOut,delay:l=0,...u}=a;return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof i=="string"?i:Cf(i)} ${s} ${typeof l=="string"?l:Cf(l)}`).join(",")},...e,easing:t,duration:n}}const c2={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function d2(e){return ar(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Nm(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let a=0;a<o.length;a++){const[i,s]=o[a];!d2(s)||i.startsWith("unstable_")?delete r[i]:ar(s)&&(r[i]={...s},n(r[i]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
10
-
11
- const theme = ${JSON.stringify(t,null,2)};
12
-
13
- theme.breakpoints = createBreakpoints(theme.breakpoints || {});
14
- theme.transitions = createTransitions(theme.transitions || {});
15
-
16
- export default theme;`}function Tf(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const f2=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let r=0;r<t.length;r+=1)n+=+t[r];return n};function p2(e){Object.assign(e,{alpha(t,n){const r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:Ss(t,f2(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Tf(n)})`:il(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Tf(n)})`:al(t,n)}})}function _u(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:a={},transitions:i={},typography:s={},shape:l,colorSpace:u,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(Cr(20));const f=Pc({...a,colorSpace:u}),h=Rc(e);let p=tn(h,{mixins:Jx(h.breakpoints,r),palette:f,shadows:a2.slice(),typography:t2(f,s),transitions:u2(i),zIndex:{...c2}});return p=tn(p,d),p=t.reduce((m,b)=>tn(m,b),p),p.unstable_sxConfig={...Ti,...d?.unstable_sxConfig},p.unstable_sx=function(b){return Go({sx:b,theme:this})},p.toRuntimeSource=Nm,p2(p),p}function Bu(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 h2=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Bu(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Lm(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Fm(e){return e==="dark"?h2:[]}function m2(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:o,...a}=e,i=Pc({...t,colorSpace:o});return{palette:i,opacity:{...Lm(i.mode),...n},overlays:r||Fm(i.mode),...a}}function g2(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const b2=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],y2=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let a=o;if(o==="class"&&(a=".%s"),o==="data"&&(a="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(a=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const i={};return b2(e.cssVarPrefix).forEach(s=>{i[s]=n[s],delete n[s]}),a==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:a?{[a.replace("%s",t)]:i,[`${r}, ${a.replace("%s",t)}`]:n}:{[r]:{...n,...i}}}if(a&&a!=="media")return`${r}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(a)return a.replace("%s",String(t))}return r};function x2(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function he(e,t,n){!e[t]&&n&&(e[t]=n)}function Ua(e){return typeof e!="string"||!e.startsWith("hsl")?e:Am(e)}function mr(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Ha(Ua(e[t])))}function E2(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Zn=e=>{try{return e()}catch{}},C2=(e="mui")=>Rt.unstable_createGetCssVar(e);function ql(e,t,n,r,o){if(!n)return;n=n===!0?{}:n;const a=o==="dark"?"dark":"light";if(!r){t[o]=m2({...n,palette:{mode:a,...n?.palette},colorSpace:e});return}const{palette:i,...s}=_u({...r,palette:{mode:a,...n?.palette},colorSpace:e});return t[o]={...n,palette:i,opacity:{...Lm(a),...n?.opacity},overlays:n?.overlays||Fm(a)},s}function T2(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:a="mui",nativeColor:i=!1,shouldSkipGeneratingVar:s=g2,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:u=":root",...d}=e,f=Object.keys(n)[0],h=r||(n.light&&f!=="light"?"light":f),p=C2(a),{[h]:m,light:b,dark:y,...x}=n,E={...x};let v=m;if((h==="dark"&&!("dark"in n)||h==="light"&&!("light"in n))&&(v=!0),!v)throw new Error(Cr(21,h));let S;i&&(S="oklch");const k=ql(S,E,v,d,h);b&&!E.light&&ql(S,E,b,void 0,"light"),y&&!E.dark&&ql(S,E,y,void 0,"dark");let C={defaultColorScheme:h,...k,cssVarPrefix:a,colorSchemeSelector:l,rootSelector:u,getCssVar:p,colorSchemes:E,font:{...Qx(k.typography),...k.font},spacing:E2(d.spacing)};Object.keys(C.colorSchemes).forEach(_=>{const T=C.colorSchemes[_].palette,O=w=>{const M=w.split("-"),V=M[1],z=M[2];return p(w,T[V][z])};T.mode==="light"&&(he(T.common,"background","#fff"),he(T.common,"onBackground","#000")),T.mode==="dark"&&(he(T.common,"background","#000"),he(T.common,"onBackground","#fff"));function A(w,M,V){if(S){let z;return w===Gr&&(z=`transparent ${((1-V)*100).toFixed(0)}%`),w===ft&&(z=`#000 ${(V*100).toFixed(0)}%`),w===pt&&(z=`#fff ${(V*100).toFixed(0)}%`),`color-mix(in ${S}, ${M}, ${z})`}return w(M,V)}if(x2(T,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),T.mode==="light"){he(T.Alert,"errorColor",A(ft,T.error.light,.6)),he(T.Alert,"infoColor",A(ft,T.info.light,.6)),he(T.Alert,"successColor",A(ft,T.success.light,.6)),he(T.Alert,"warningColor",A(ft,T.warning.light,.6)),he(T.Alert,"errorFilledBg",O("palette-error-main")),he(T.Alert,"infoFilledBg",O("palette-info-main")),he(T.Alert,"successFilledBg",O("palette-success-main")),he(T.Alert,"warningFilledBg",O("palette-warning-main")),he(T.Alert,"errorFilledColor",Zn(()=>T.getContrastText(T.error.main))),he(T.Alert,"infoFilledColor",Zn(()=>T.getContrastText(T.info.main))),he(T.Alert,"successFilledColor",Zn(()=>T.getContrastText(T.success.main))),he(T.Alert,"warningFilledColor",Zn(()=>T.getContrastText(T.warning.main))),he(T.Alert,"errorStandardBg",A(pt,T.error.light,.9)),he(T.Alert,"infoStandardBg",A(pt,T.info.light,.9)),he(T.Alert,"successStandardBg",A(pt,T.success.light,.9)),he(T.Alert,"warningStandardBg",A(pt,T.warning.light,.9)),he(T.Alert,"errorIconColor",O("palette-error-main")),he(T.Alert,"infoIconColor",O("palette-info-main")),he(T.Alert,"successIconColor",O("palette-success-main")),he(T.Alert,"warningIconColor",O("palette-warning-main")),he(T.AppBar,"defaultBg",O("palette-grey-100")),he(T.Avatar,"defaultBg",O("palette-grey-400")),he(T.Button,"inheritContainedBg",O("palette-grey-300")),he(T.Button,"inheritContainedHoverBg",O("palette-grey-A100")),he(T.Chip,"defaultBorder",O("palette-grey-400")),he(T.Chip,"defaultAvatarColor",O("palette-grey-700")),he(T.Chip,"defaultIconColor",O("palette-grey-700")),he(T.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),he(T.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),he(T.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),he(T.LinearProgress,"primaryBg",A(pt,T.primary.main,.62)),he(T.LinearProgress,"secondaryBg",A(pt,T.secondary.main,.62)),he(T.LinearProgress,"errorBg",A(pt,T.error.main,.62)),he(T.LinearProgress,"infoBg",A(pt,T.info.main,.62)),he(T.LinearProgress,"successBg",A(pt,T.success.main,.62)),he(T.LinearProgress,"warningBg",A(pt,T.warning.main,.62)),he(T.Skeleton,"bg",S?A(Gr,T.text.primary,.11):`rgba(${O("palette-text-primaryChannel")} / 0.11)`),he(T.Slider,"primaryTrack",A(pt,T.primary.main,.62)),he(T.Slider,"secondaryTrack",A(pt,T.secondary.main,.62)),he(T.Slider,"errorTrack",A(pt,T.error.main,.62)),he(T.Slider,"infoTrack",A(pt,T.info.main,.62)),he(T.Slider,"successTrack",A(pt,T.success.main,.62)),he(T.Slider,"warningTrack",A(pt,T.warning.main,.62));const w=S?A(ft,T.background.default,.6825):ji(T.background.default,.8);he(T.SnackbarContent,"bg",w),he(T.SnackbarContent,"color",Zn(()=>S?Fu.text.primary:T.getContrastText(w))),he(T.SpeedDialAction,"fabHoverBg",ji(T.background.paper,.15)),he(T.StepConnector,"border",O("palette-grey-400")),he(T.StepContent,"border",O("palette-grey-400")),he(T.Switch,"defaultColor",O("palette-common-white")),he(T.Switch,"defaultDisabledColor",O("palette-grey-100")),he(T.Switch,"primaryDisabledColor",A(pt,T.primary.main,.62)),he(T.Switch,"secondaryDisabledColor",A(pt,T.secondary.main,.62)),he(T.Switch,"errorDisabledColor",A(pt,T.error.main,.62)),he(T.Switch,"infoDisabledColor",A(pt,T.info.main,.62)),he(T.Switch,"successDisabledColor",A(pt,T.success.main,.62)),he(T.Switch,"warningDisabledColor",A(pt,T.warning.main,.62)),he(T.TableCell,"border",A(pt,A(Gr,T.divider,1),.88)),he(T.Tooltip,"bg",A(Gr,T.grey[700],.92))}if(T.mode==="dark"){he(T.Alert,"errorColor",A(pt,T.error.light,.6)),he(T.Alert,"infoColor",A(pt,T.info.light,.6)),he(T.Alert,"successColor",A(pt,T.success.light,.6)),he(T.Alert,"warningColor",A(pt,T.warning.light,.6)),he(T.Alert,"errorFilledBg",O("palette-error-dark")),he(T.Alert,"infoFilledBg",O("palette-info-dark")),he(T.Alert,"successFilledBg",O("palette-success-dark")),he(T.Alert,"warningFilledBg",O("palette-warning-dark")),he(T.Alert,"errorFilledColor",Zn(()=>T.getContrastText(T.error.dark))),he(T.Alert,"infoFilledColor",Zn(()=>T.getContrastText(T.info.dark))),he(T.Alert,"successFilledColor",Zn(()=>T.getContrastText(T.success.dark))),he(T.Alert,"warningFilledColor",Zn(()=>T.getContrastText(T.warning.dark))),he(T.Alert,"errorStandardBg",A(ft,T.error.light,.9)),he(T.Alert,"infoStandardBg",A(ft,T.info.light,.9)),he(T.Alert,"successStandardBg",A(ft,T.success.light,.9)),he(T.Alert,"warningStandardBg",A(ft,T.warning.light,.9)),he(T.Alert,"errorIconColor",O("palette-error-main")),he(T.Alert,"infoIconColor",O("palette-info-main")),he(T.Alert,"successIconColor",O("palette-success-main")),he(T.Alert,"warningIconColor",O("palette-warning-main")),he(T.AppBar,"defaultBg",O("palette-grey-900")),he(T.AppBar,"darkBg",O("palette-background-paper")),he(T.AppBar,"darkColor",O("palette-text-primary")),he(T.Avatar,"defaultBg",O("palette-grey-600")),he(T.Button,"inheritContainedBg",O("palette-grey-800")),he(T.Button,"inheritContainedHoverBg",O("palette-grey-700")),he(T.Chip,"defaultBorder",O("palette-grey-700")),he(T.Chip,"defaultAvatarColor",O("palette-grey-300")),he(T.Chip,"defaultIconColor",O("palette-grey-300")),he(T.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),he(T.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),he(T.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),he(T.LinearProgress,"primaryBg",A(ft,T.primary.main,.5)),he(T.LinearProgress,"secondaryBg",A(ft,T.secondary.main,.5)),he(T.LinearProgress,"errorBg",A(ft,T.error.main,.5)),he(T.LinearProgress,"infoBg",A(ft,T.info.main,.5)),he(T.LinearProgress,"successBg",A(ft,T.success.main,.5)),he(T.LinearProgress,"warningBg",A(ft,T.warning.main,.5)),he(T.Skeleton,"bg",S?A(Gr,T.text.primary,.13):`rgba(${O("palette-text-primaryChannel")} / 0.13)`),he(T.Slider,"primaryTrack",A(ft,T.primary.main,.5)),he(T.Slider,"secondaryTrack",A(ft,T.secondary.main,.5)),he(T.Slider,"errorTrack",A(ft,T.error.main,.5)),he(T.Slider,"infoTrack",A(ft,T.info.main,.5)),he(T.Slider,"successTrack",A(ft,T.success.main,.5)),he(T.Slider,"warningTrack",A(ft,T.warning.main,.5));const w=S?A(pt,T.background.default,.985):ji(T.background.default,.98);he(T.SnackbarContent,"bg",w),he(T.SnackbarContent,"color",Zn(()=>S?Pm.text.primary:T.getContrastText(w))),he(T.SpeedDialAction,"fabHoverBg",ji(T.background.paper,.15)),he(T.StepConnector,"border",O("palette-grey-600")),he(T.StepContent,"border",O("palette-grey-600")),he(T.Switch,"defaultColor",O("palette-grey-300")),he(T.Switch,"defaultDisabledColor",O("palette-grey-600")),he(T.Switch,"primaryDisabledColor",A(ft,T.primary.main,.55)),he(T.Switch,"secondaryDisabledColor",A(ft,T.secondary.main,.55)),he(T.Switch,"errorDisabledColor",A(ft,T.error.main,.55)),he(T.Switch,"infoDisabledColor",A(ft,T.info.main,.55)),he(T.Switch,"successDisabledColor",A(ft,T.success.main,.55)),he(T.Switch,"warningDisabledColor",A(ft,T.warning.main,.55)),he(T.TableCell,"border",A(ft,A(Gr,T.divider,1),.68)),he(T.Tooltip,"bg",A(Gr,T.grey[700],.92))}mr(T.background,"default"),mr(T.background,"paper"),mr(T.common,"background"),mr(T.common,"onBackground"),mr(T,"divider"),Object.keys(T).forEach(w=>{const M=T[w];w!=="tonalOffset"&&M&&typeof M=="object"&&(M.main&&he(T[w],"mainChannel",Ha(Ua(M.main))),M.light&&he(T[w],"lightChannel",Ha(Ua(M.light))),M.dark&&he(T[w],"darkChannel",Ha(Ua(M.dark))),M.contrastText&&he(T[w],"contrastTextChannel",Ha(Ua(M.contrastText))),w==="text"&&(mr(T[w],"primary"),mr(T[w],"secondary")),w==="action"&&(M.active&&mr(T[w],"active"),M.selected&&mr(T[w],"selected")))})}),C=t.reduce((_,T)=>tn(_,T),C);const L={prefix:a,disableCssColorScheme:o,shouldSkipGeneratingVar:s,getSelector:y2(C),enableContrastVars:i},{vars:F,generateThemeVars:B,generateStyleSheets:R}=Gx(C,L);return C.vars=F,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([_,T])=>{C[_]=T}),C.generateThemeVars=B,C.generateStyleSheets=R,C.generateSpacing=function(){return Rt.createSpacing(d.spacing,wc(this))},C.getColorSchemeSelector=Xx(l),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=s,C.unstable_sxConfig={...Ti,...d?.unstable_sxConfig},C.unstable_sx=function(T){return Go({sx:T,theme:this})},C.toRuntimeSource=Nm,C}function vf(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Pc({...n===!0?{}:n.palette,mode:t})})}function _m(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:a=n?.mode,...i}=e,s=a||"light",l=o?.[s],u={...o,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return _u(e,...t);let d=n;"palette"in e||u[s]&&(u[s]!==!0?d=u[s].palette:s==="dark"&&(d={mode:"dark"}));const f=_u({...e,palette:d},...t);return f.defaultColorScheme=s,f.colorSchemes=u,f.palette.mode==="light"&&(f.colorSchemes.light={...u.light!==!0&&u.light,palette:f.palette},vf(f,"dark",u.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:f.palette},vf(f,"light",u.light)),f}return!n&&!("light"in u)&&s==="light"&&(u.light=!0),T2({...i,colorSchemes:u,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}const sl=_m(),aa="$$material";function yo(){const e=Rt.useTheme(sl);return e[aa]||e}function v2(e){return c.jsx(Rt.GlobalStyles,{...e,defaultTheme:sl,themeId:aa})}function S2(e){const{variants:t,...n}=e,r={variants:t,style:io(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=io(o.style))}),r}const k2=Rc();function Yl(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function ro(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function D2(e){return e?(t,n)=>n[e]:null}function w2(e,t,n){e.theme=P2(e.theme)?n:e.theme[t]||e.theme}function ts(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(o=>ts(e,o,n));if(Array.isArray(r?.variants)){let o;if(r.isProcessed)o=n?ro(r.style,n):r.style;else{const{variants:a,...i}=r;o=n?ro(io(i),n):i}return Bm(e,r.variants,[o],n)}return r?.isProcessed?n?ro(io(r.style),n):r.style:n?ro(io(r),n):r}function Bm(e,t,n=[],r=void 0){let o;e:for(let a=0;a<t.length;a+=1){const i=t[a];if(typeof i.props=="function"){if(o??={...e,...e.ownerState,ownerState:e.ownerState},!i.props(o))continue}else for(const s in i.props)if(e[s]!==i.props[s]&&e.ownerState?.[s]!==i.props[s])continue e;typeof i.style=="function"?(o??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?ro(io(i.style(o)),r):i.style(o))):n.push(r?ro(io(i.style),r):i.style)}return n}function A2(e={}){const{themeId:t,defaultTheme:n=k2,rootShouldForwardProp:r=Yl,slotShouldForwardProp:o=Yl}=e;function a(s){w2(s,t,n)}return(s,l={})=>{Mx(s,C=>C.filter(L=>L!==Go));const{name:u,slot:d,skipVariantsResolver:f,skipSx:h,overridesResolver:p=D2(M2(d)),...m}=l,b=u&&u.startsWith("Mui")||d?"components":"custom",y=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,x=h||!1;let E=Yl;d==="Root"||d==="root"?E=r:d?E=o:R2(s)&&(E=void 0);const v=Rx(s,{shouldForwardProp:E,label:I2(),...m}),S=C=>{if(C.__emotion_real===C)return C;if(typeof C=="function")return function(F){return ts(F,C,F.theme.modularCssLayers?b:void 0)};if(ar(C)){const L=S2(C);return function(B){return L.variants?ts(B,L,B.theme.modularCssLayers?b:void 0):B.theme.modularCssLayers?ro(L.style,b):L.style}}return C},k=(...C)=>{const L=[],F=C.map(S),B=[];if(L.push(a),u&&p&&B.push(function(O){const w=O.theme.components?.[u]?.styleOverrides;if(!w)return null;const M={};for(const V in w)M[V]=ts(O,w[V],O.theme.modularCssLayers?"theme":void 0);return p(O,M)}),u&&!y&&B.push(function(O){const w=O.theme?.components?.[u]?.variants;return w?Bm(O,w,[],O.theme.modularCssLayers?"theme":void 0):null}),x||B.push(Go),Array.isArray(F[0])){const T=F.shift(),O=new Array(L.length).fill(""),A=new Array(B.length).fill("");let w;w=[...O,...T,...A],w.raw=[...O,...T.raw,...A],L.unshift(w)}const R=[...L,...F,...B],_=v(...R);return s.muiName&&(_.muiName=s.muiName),_};return v.withConfig&&(k.withConfig=v.withConfig),k}}function I2(e,t){return void 0}function P2(e){for(const t in e)return!1;return!0}function R2(e){return typeof e=="string"&&e.charCodeAt(0)>96}function M2(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function jm(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const kn=e=>jm(e)&&e!=="classes",le=A2({themeId:aa,defaultTheme:sl,rootShouldForwardProp:kn});function O2(e){return function(n){return c.jsx(v2,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function N2(){return dx}const et=Rt.unstable_memoTheme;function Qe(e){return _x(e)}function Le(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=_e(e,o,n)}),r}function L2(e){return _e("MuiSvgIcon",e)}Le("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const F2=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${De(t)}`,`fontSize${De(n)}`]};return Fe(o,L2,r)},_2=le("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${De(n.color)}`],t[`fontSize${De(n.fontSize)}`]]}})(et(({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}}]}))),Ds=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiSvgIcon"}),{children:o,className:a,color:i="inherit",component:s="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24",...p}=r,m=I.isValidElement(o)&&o.type==="svg",b={...r,color:i,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:m},y={};d||(y.viewBox=h);const x=F2(b);return c.jsxs(_2,{as:s,className:Ae(x.root,a),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n,...y,...p,...m&&o.props,ownerState:b,children:[m?o.props.children:o,f?c.jsx("title",{children:f}):null]})});Ds.muiName="SvgIcon";function xt(e,t){function n(r,o){return c.jsx(Ds,{"data-testid":void 0,ref:o,...r,children:e})}return n.muiName=Ds.muiName,I.memo(I.forwardRef(n))}function $m(e,t=166){let n;function r(...o){const a=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(a,t)}return r.clear=()=>{clearTimeout(n)},r}function ns(e,t){return I.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}function Vt(e){return e&&e.ownerDocument||document}function vr(e){return Vt(e).defaultView||window}function ju(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Nn(e){const{controlled:t,default:n,name:r,state:o="value"}=e,{current:a}=I.useRef(t!==void 0),[i,s]=I.useState(n),l=a?t:i,u=I.useCallback(d=>{a||s(d)},[]);return[l,u]}function Pe(e){const t=I.useRef(e);return Wt(()=>{t.current=e}),I.useRef((...n)=>(0,t.current)(...n)).current}function ct(...e){const t=I.useRef(void 0),n=I.useCallback(r=>{const o=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const i=a,s=i(r);return typeof s=="function"?s:()=>{i(null)}}return a.current=r,()=>{a.current=null}});return()=>{o.forEach(a=>a?.())}},e);return I.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function B2(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function j2(e,t){if(!e)return t;function n(i,s){const l={};return Object.keys(s).forEach(u=>{B2(u,s[u])&&typeof i[u]=="function"&&(l[u]=(...d)=>{i[u](...d),s[u](...d)})}),l}if(typeof e=="function"||typeof t=="function")return i=>{const s=typeof t=="function"?t(i):t,l=typeof e=="function"?e({...i,...s}):e,u=Ae(i?.className,s?.className,l?.className),d=n(l,s);return{...s,...l,...d,...!!u&&{className:u},...s?.style&&l?.style&&{style:{...s.style,...l.style}},...s?.sx&&l?.sx&&{sx:[...Array.isArray(s.sx)?s.sx:[s.sx],...Array.isArray(l.sx)?l.sx:[l.sx]]}}};const r=t,o=n(e,r),a=Ae(r?.className,e?.className);return{...t,...e,...o,...!!a&&{className:a},...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 Mc=xt(c.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),Po=Rt.createStack({createStyledComponent:le("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Qe({props:e,name:"MuiStack"})});class Uo{constructor(t,n){this.workbookData=n,this.workbookStorage=t,this.workbookData?this.isSaved=!0:(this.workbookData={models:[],cells:[],workbookPath:void 0},this.isSaved=!1)}isSaved;workbookStorage;getWorkbookData(){return this.workbookData}getWorkbookPath(){return this.workbookData.workbookPath}async renameWorkbook(t){if(this.workbookData.workbookPath.path!==t)try{await this.workbookStorage.moveWorkbook(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.workbookData.workbookPath,JSON.stringify(this.workbookData)),this.isSaved=!0}return new Uo(this.workbookStorage,this.workbookData)}toMalloyWorkbook(){return this.workbookData.cells.map(t=>t.isMarkdown?`>>>markdown
17
- `+t.value:`>>>malloy
18
- import {${t.sourceName}}" from '${t.modelPath}'"
19
- `+t.value+`
20
- `).join(`
21
- `)}static newWorkbook(t){return new Uo(t,void 0)}static async loadWorkbook(t,n){let r;try{const o=await t.getWorkbook(n);o&&(r=JSON.parse(o))}catch{r={models:[],cells:[],workbookPath:n}}return new Uo(t,r)}}const so={teal:"#14b3cb",orange:"#e47404",darkBlue:"#1474a4"},$2='"JetBrains Mono", "ui-monospace", "SFMono-Regular", "Menlo", monospace',ws=P.styled(P.Card)({display:"flex",flexDirection:"column",height:"100%",boxShadow:"none",border:"none",backgroundColor:"transparent"}),Hm=P.styled(P.CardContent)({display:"flex",flexDirection:"column",padding:"0",flexGrow:1}),Oc=P.styled(P.CardMedia)({padding:"0"}),H2=P.styled("div")({backgroundColor:"#ffffff",padding:"0 8px 0px 8px",borderRadius:"12px",boxShadow:"none",border:"none",maxWidth:"1200px",margin:"0 auto"});P.styled("div")({marginBottom:"40px",paddingBottom:"24px",borderBottom:"1px solid #f0f0f0"});const U2=P.styled("div")({marginBottom:"48px",padding:"0",backgroundColor:"transparent",border:"none",boxShadow:"none"}),$u=P.styled("div")({marginBottom:"0",padding:"0",backgroundColor:"transparent",border:"none",boxShadow:"none"}),rs=P.styled("div")({backgroundColor:"transparent",paddingTop:"12px",paddingBottom:"2px",borderRadius:"8px",border:"none",boxShadow:"none",marginBottom:"0"});P.styled("div")({backgroundColor:"#f8f9fa",padding:"16px",borderRadius:"8px",border:"1px solid #e9ecef",fontFamily:"'Monaco', 'Menlo', 'Ubuntu Mono', monospace",fontSize:"13px",lineHeight:"1.5",overflowX:"auto"});P.styled("div")({backgroundColor:"#f8f9fa",padding:"12px 16px",borderRadius:"8px",border:"1px solid #e9ecef",marginBottom:"16px",display:"flex",justifyContent:"space-between",alignItems:"center"});const z2=P.styled("div")({height:"100%"});P.styled("div")({height:"30px",backgroundColor:"rgba(225, 240, 255, 1)",display:"flex",padding:"4px",alignItems:"center"});const Um=P.styled("div")({height:"75vh",width:"100%",overflowY:"auto"});P.styled("div")({position:"relative",height:"100%",flex:"0 0 auto"});const V2=P.styled(P.Card)({backgroundColor:"#ffffff",padding:"24px",borderRadius:"8px",border:"1px solid #f0f0f0",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.04)",height:"100%",transition:"box-shadow 0.2s ease-in-out","&:hover":{boxShadow:"0 2px 6px rgba(0, 0, 0, 0.08)"}}),W2=P.styled(P.CardContent)({padding:"0","&:last-child":{paddingBottom:"0"}}),q2=P.styled("div")(({theme:e})=>({fontSize:"0.875rem",fontWeight:500,color:e.palette.text.secondary,marginBottom:"16px",paddingBottom:"8px",borderBottom:`1px solid ${e.palette.divider}`}));P.styled("div")({padding:"32px",maxWidth:"1400px",margin:"0 auto",minHeight:"100vh"});const $i=xt(c.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),zm=xt(c.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"})),Sf=xt(c.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"})),Nc=xt(c.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"}));function K(){return K=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},K.apply(null,arguments)}function Ue(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 Hu(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const i=n.slice(o,r).trim();(i||!a)&&t.push(i),o=r+1,r=n.indexOf(",",o)}return t}function ll(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Y2=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,K2=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,G2={};function kf(e,t){return(G2.jsx?K2:Y2).test(e)}const Q2=/[ \t\n\f\r]/g;function Lc(e){return typeof e=="object"?e.type==="text"?Df(e.value):!1:Df(e)}function Df(e){return e.replace(Q2,"")===""}let vi=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};vi.prototype.normal={};vi.prototype.property={};vi.prototype.space=void 0;function Vm(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new vi(n,r,t)}function ci(e){return e.toLowerCase()}let gn=class{constructor(t,n){this.attribute=n,this.property=t}};gn.prototype.attribute="";gn.prototype.booleanish=!1;gn.prototype.boolean=!1;gn.prototype.commaOrSpaceSeparated=!1;gn.prototype.commaSeparated=!1;gn.prototype.defined=!1;gn.prototype.mustUseProperty=!1;gn.prototype.number=!1;gn.prototype.overloadedBoolean=!1;gn.prototype.property="";gn.prototype.spaceSeparated=!1;gn.prototype.space=void 0;let X2=0;const Ge=xo(),$t=xo(),Uu=xo(),Se=xo(),Ct=xo(),zo=xo(),bn=xo();function xo(){return 2**++X2}const zu=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:$t,commaOrSpaceSeparated:bn,commaSeparated:zo,number:Se,overloadedBoolean:Uu,spaceSeparated:Ct},Symbol.toStringTag,{value:"Module"})),Kl=Object.keys(zu);let Fc=class extends gn{constructor(t,n,r,o){let a=-1;if(super(t,n),wf(this,"space",o),typeof r=="number")for(;++a<Kl.length;){const i=Kl[a];wf(this,Kl[a],(r&zu[i])===zu[i])}}};Fc.prototype.defined=!0;function wf(e,t,n){n&&(e[t]=n)}function ia(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Fc(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ci(r)]=r,n[ci(a.attribute)]=r}return new vi(t,n,e.space)}const Wm=ia({properties:{ariaActiveDescendant:null,ariaAtomic:$t,ariaAutoComplete:null,ariaBusy:$t,ariaChecked:$t,ariaColCount:Se,ariaColIndex:Se,ariaColSpan:Se,ariaControls:Ct,ariaCurrent:null,ariaDescribedBy:Ct,ariaDetails:null,ariaDisabled:$t,ariaDropEffect:Ct,ariaErrorMessage:null,ariaExpanded:$t,ariaFlowTo:Ct,ariaGrabbed:$t,ariaHasPopup:null,ariaHidden:$t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ct,ariaLevel:Se,ariaLive:null,ariaModal:$t,ariaMultiLine:$t,ariaMultiSelectable:$t,ariaOrientation:null,ariaOwns:Ct,ariaPlaceholder:null,ariaPosInSet:Se,ariaPressed:$t,ariaReadOnly:$t,ariaRelevant:null,ariaRequired:$t,ariaRoleDescription:Ct,ariaRowCount:Se,ariaRowIndex:Se,ariaRowSpan:Se,ariaSelected:$t,ariaSetSize:Se,ariaSort:null,ariaValueMax:Se,ariaValueMin:Se,ariaValueNow:Se,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function qm(e,t){return t in e?e[t]:t}function Ym(e,t){return qm(e,t.toLowerCase())}const Z2=ia({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:zo,acceptCharset:Ct,accessKey:Ct,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:Ct,autoFocus:Ge,autoPlay:Ge,blocking:Ct,capture:null,charSet:null,checked:Ge,cite:null,className:Ct,cols:Se,colSpan:null,content:null,contentEditable:$t,controls:Ge,controlsList:Ct,coords:Se|zo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Uu,draggable:$t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:Ct,height:Se,hidden:Uu,high:Se,href:null,hrefLang:null,htmlFor:Ct,httpEquiv:Ct,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:Ct,itemRef:Ct,itemScope:Ge,itemType:Ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:Se,manifest:null,max:null,maxLength:Se,media:null,method:null,min:null,minLength:Se,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,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:Ge,optimum:Se,pattern:null,ping:Ct,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:Ct,required:Ge,reversed:Ge,rows:Se,rowSpan:Se,sandbox:Ct,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shape:null,size:Se,sizes:null,slot:null,span:Se,spellCheck:$t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Se,step:null,style:null,tabIndex:Se,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:$t,width:Se,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ct,axis:null,background:null,bgColor:null,border:Se,borderColor:null,bottomMargin:Se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:Se,leftMargin:Se,link:null,longDesc:null,lowSrc:null,marginHeight:Se,marginWidth:Se,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:Se,rules:null,scheme:null,scrolling:$t,standby:null,summary:null,text:null,topMargin:Se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Se,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:Se,security:null,unselectable:null},space:"html",transform:Ym}),J2=ia({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:bn,accentHeight:Se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Se,amplitude:Se,arabicForm:null,ascent:Se,attributeName:null,attributeType:null,azimuth:Se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Se,by:null,calcMode:null,capHeight:Se,className:Ct,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:Se,diffuseConstant:Se,direction:null,display:null,dur:null,divisor:Se,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:Se,enableBackground:null,end:null,event:null,exponent:Se,externalResourcesRequired:null,fill:null,fillOpacity:Se,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:zo,g2:zo,glyphName:zo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Se,horizOriginX:Se,horizOriginY:Se,id:null,ideographic:Se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Se,k:Se,k1:Se,k2:Se,k3:Se,k4:Se,kernelMatrix:bn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Se,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:Se,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:Se,overlineThickness:Se,paintOrder:null,panose1:null,path:null,pathLength:Se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Se,pointsAtY:Se,pointsAtZ:Se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:bn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:bn,rev:bn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:bn,requiredFeatures:bn,requiredFonts:bn,requiredFormats:bn,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:Se,specularExponent:Se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Se,strikethroughThickness:Se,string:null,stroke:null,strokeDashArray:bn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Se,strokeOpacity:Se,strokeWidth:null,style:null,surfaceScale:Se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:bn,tabIndex:Se,tableValues:null,target:null,targetX:Se,targetY:Se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:bn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Se,underlineThickness:Se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Se,values:null,vAlphabetic:Se,vMathematical:Se,vectorEffect:null,vHanging:Se,vIdeographic:Se,version:null,vertAdvY:Se,vertOriginX:Se,vertOriginY:Se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:qm}),Km=ia({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()}}),Gm=ia({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ym}),Qm=ia({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),eE={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"},tE=/[A-Z]/g,Af=/-[a-z]/g,nE=/^data[-\w.:]+$/i;function Si(e,t){const n=ci(t);let r=t,o=gn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&nE.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Af,oE);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Af.test(a)){let i=a.replace(tE,rE);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}o=Fc}return new o(r,t)}function rE(e){return"-"+e.toLowerCase()}function oE(e){return e.charAt(1).toUpperCase()}const sa=Vm([Wm,Z2,Km,Gm,Qm],"html"),Vr=Vm([Wm,J2,Km,Gm,Qm],"svg");function Vu(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function ul(e){return e.join(" ").trim()}var Ro={},Gl,If;function aE(){if(If)return Gl;If=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
22
- `,u="/",d="*",f="",h="comment",p="declaration";Gl=function(b,y){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];y=y||{};var x=1,E=1;function v(O){var A=O.match(t);A&&(x+=A.length);var w=O.lastIndexOf(l);E=~w?O.length-w:E+O.length}function S(){var O={line:x,column:E};return function(A){return A.position=new k(O),F(),A}}function k(O){this.start=O,this.end={line:x,column:E},this.source=y.source}k.prototype.content=b;function C(O){var A=new Error(y.source+":"+x+":"+E+": "+O);if(A.reason=O,A.filename=y.source,A.line=x,A.column=E,A.source=b,!y.silent)throw A}function L(O){var A=O.exec(b);if(A){var w=A[0];return v(w),b=b.slice(w.length),A}}function F(){L(n)}function B(O){var A;for(O=O||[];A=R();)A!==!1&&O.push(A);return O}function R(){var O=S();if(!(u!=b.charAt(0)||d!=b.charAt(1))){for(var A=2;f!=b.charAt(A)&&(d!=b.charAt(A)||u!=b.charAt(A+1));)++A;if(A+=2,f===b.charAt(A-1))return C("End of comment missing");var w=b.slice(2,A-2);return E+=2,v(w),b=b.slice(A),E+=2,O({type:h,comment:w})}}function _(){var O=S(),A=L(r);if(A){if(R(),!L(o))return C("property missing ':'");var w=L(a),M=O({type:p,property:m(A[0].replace(e,f)),value:w?m(w[0].replace(e,f)):f});return L(i),M}}function T(){var O=[];B(O);for(var A;A=_();)A!==!1&&(O.push(A),B(O));return O}return F(),T()};function m(b){return b?b.replace(s,f):f}return Gl}var Pf;function iE(){if(Pf)return Ro;Pf=1;var e=Ro&&Ro.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.default=n;var t=e(aE());function n(r,o){var a=null;if(!r||typeof r!="string")return a;var i=(0,t.default)(r),s=typeof o=="function";return i.forEach(function(l){if(l.type==="declaration"){var u=l.property,d=l.value;s?o(u,d,l):d&&(a=a||{},a[u]=d)}}),a}return Ro}var va={},Rf;function sE(){if(Rf)return va;Rf=1,Object.defineProperty(va,"__esModule",{value:!0}),va.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(u){return!u||n.test(u)||e.test(u)},i=function(u,d){return d.toUpperCase()},s=function(u,d){return"".concat(d,"-")},l=function(u,d){return d===void 0&&(d={}),a(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(o,s):u=u.replace(r,s),u.replace(t,i))};return va.camelCase=l,va}var Sa,Mf;function lE(){if(Mf)return Sa;Mf=1;var e=Sa&&Sa.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(iE()),n=sE();function r(o,a){var i={};return!o||typeof o!="string"||(0,t.default)(o,function(s,l){s&&l&&(i[(0,n.camelCase)(s,a)]=l)}),i}return r.default=r,Sa=r,Sa}var uE=lE();const cE=Wn(uE),cl=Xm("end"),cr=Xm("start");function Xm(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 dE(e){const t=cr(e),n=cl(e);if(t&&n)return{start:t,end:n}}function qa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Of(e.position):"start"in e||"end"in e?Of(e):"line"in e||"column"in e?Wu(e):""}function Wu(e){return Nf(e&&e.line)+":"+Nf(e&&e.column)}function Of(e){return Wu(e&&e.start)+"-"+Wu(e&&e.end)}function Nf(e){return e&&typeof e=="number"?e:1}class nn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},i=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?o=t:!a.cause&&t&&(i=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?a.ruleId=r:(a.source=r.slice(0,l),a.ruleId=r.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=s?s.line:void 0,this.name=qa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=i&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}nn.prototype.file="";nn.prototype.name="";nn.prototype.reason="";nn.prototype.message="";nn.prototype.stack="";nn.prototype.column=void 0;nn.prototype.line=void 0;nn.prototype.ancestors=void 0;nn.prototype.cause=void 0;nn.prototype.fatal=void 0;nn.prototype.place=void 0;nn.prototype.ruleId=void 0;nn.prototype.source=void 0;const _c={}.hasOwnProperty,fE=new Map,pE=/[A-Z]/g,hE=new Set(["table","tbody","thead","tfoot","tr"]),mE=new Set(["td","th"]),Zm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function gE(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=SE(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=vE(n,t.jsx,t.jsxs)}const o={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"?Vr:sa,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Jm(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function Jm(e,t,n){if(t.type==="element")return bE(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return yE(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return EE(e,t,n);if(t.type==="mdxjsEsm")return xE(e,t);if(t.type==="root")return CE(e,t,n);if(t.type==="text")return TE(e,t)}function bE(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Vr,e.schema=o),e.ancestors.push(t);const a=t0(e,t.tagName,!1),i=kE(e,t);let s=jc(e,t);return hE.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!Lc(l):!0})),e0(e,i,a,t),Bc(i,s),e.ancestors.pop(),e.schema=r,e.create(t,a,i,n)}function yE(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)}di(e,t.position)}function xE(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);di(e,t.position)}function EE(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Vr,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:t0(e,t.name,!0),i=DE(e,t),s=jc(e,t);return e0(e,i,a,t),Bc(i,s),e.ancestors.pop(),e.schema=r,e.create(t,a,i,n)}function CE(e,t,n){const r={};return Bc(r,jc(e,t)),e.create(t,e.Fragment,r,n)}function TE(e,t){return t.value}function e0(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Bc(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function vE(e,t,n){return r;function r(o,a,i,s){const u=Array.isArray(i.children)?n:t;return s?u(a,i,s):u(a,i)}}function SE(e,t){return n;function n(r,o,a,i){const s=Array.isArray(a.children),l=cr(r);return t(o,a,i,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function kE(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&_c.call(t.properties,o)){const a=wE(e,o,t.properties[o]);if(a){const[i,s]=a;e.tableCellAlignToStyle&&i==="align"&&typeof s=="string"&&mE.has(t.tagName)?r=s:n[i]=s}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function DE(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const i=a.expression;i.type;const s=i.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else di(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else di(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function jc(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:fE;for(;++r<t.children.length;){const a=t.children[r];let i;if(e.passKeys){const l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){const u=o.get(l)||0;i=l+"-"+u,o.set(l,u+1)}}const s=Jm(e,a,i);s!==void 0&&n.push(s)}return n}function wE(e,t,n){const r=Si(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ll(n):ul(n)),r.property==="style"){let o=typeof n=="object"?n:AE(e,String(n));return e.stylePropertyNameCase==="css"&&(o=IE(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?eE[r.property]||r.property:r.attribute,n]}}function AE(e,t){try{return cE(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new nn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Zm+"#cannot-parse-style-attribute",o}}function t0(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,i;for(;++a<o.length;){const s=kf(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};i=i?{type:"MemberExpression",object:i,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=i}else r=kf(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return _c.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);di(e)}function di(e,t){const n=new nn("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=Zm+"#cannot-handle-mdx-estrees-without-createevaluater",n}function IE(e){const t={};let n;for(n in e)_c.call(e,n)&&(t[PE(n)]=e[n]);return t}function PE(e){let t=e.replace(pE,RE);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function RE(e){return"-"+e.toLowerCase()}const Ql={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"]},ME={};function $c(e,t){const n=ME,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return n0(e,r,o)}function n0(e,t,n){if(OE(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 Lf(e.children,t,n)}return Array.isArray(e)?Lf(e,t,n):""}function Lf(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=n0(e[o],t,n);return r.join("")}function OE(e){return!!(e&&typeof e=="object")}const Ff=document.createElement("i");function Hc(e){const t="&"+e+";";Ff.innerHTML=t;const n=Ff.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function vn(e,t,n,r){const o=e.length;let a=0,i;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function Mn(e,t){return e.length>0?(vn(e,e.length,0,t),e):t}const _f={}.hasOwnProperty;function r0(e){const t={};let n=-1;for(;++n<e.length;)NE(t,e[n]);return t}function NE(e,t){let n;for(n in t){const o=(_f.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let i;if(a)for(i in a){_f.call(o,i)||(o[i]=[]);const s=a[i];LE(o[i],Array.isArray(s)?s:s?[s]:[])}}}function LE(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);vn(e,0,0,r)}function o0(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 Vn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const on=Wr(/[A-Za-z]/),en=Wr(/[\dA-Za-z]/),FE=Wr(/[#-'*+\--9=?A-Z^-~]/);function As(e){return e!==null&&(e<32||e===127)}const qu=Wr(/\d/),_E=Wr(/[\dA-Fa-f]/),BE=Wr(/[!-/:-@[-`{-~]/);function $e(e){return e!==null&&e<-2}function yt(e){return e!==null&&(e<0||e===32)}function nt(e){return e===-2||e===-1||e===32}const dl=Wr(/\p{P}|\p{S}/u),fo=Wr(/\s/);function Wr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function la(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let i="";if(a===37&&en(e.charCodeAt(n+1))&&en(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(i=String.fromCharCode(a,s),o=1):i="�"}else i=String.fromCharCode(a);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+o+1,i=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function at(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return i;function i(l){return nt(l)?(e.enter(n),s(l)):t(l)}function s(l){return nt(l)&&a++<o?(e.consume(l),s):(e.exit(n),t(l))}}const jE={tokenize:$E};function $E(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),at(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),a(s)}function a(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,i(s)}function i(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return $e(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),i)}}const HE={tokenize:UE},Bf={tokenize:zE};function UE(e){const t=this,n=[];let r=0,o,a,i;return s;function s(v){if(r<n.length){const S=n[r];return t.containerState=S[1],e.attempt(S[0].continuation,l,u)(v)}return u(v)}function l(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&E();const S=t.events.length;let k=S,C;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){C=t.events[k][1].end;break}x(r);let L=S;for(;L<t.events.length;)t.events[L][1].end={...C},L++;return vn(t.events,k+1,0,t.events.slice(S)),t.events.length=L,u(v)}return s(v)}function u(v){if(r===n.length){if(!o)return h(v);if(o.currentConstruct&&o.currentConstruct.concrete)return m(v);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Bf,d,f)(v)}function d(v){return o&&E(),x(r),h(v)}function f(v){return t.parser.lazy[t.now().line]=r!==n.length,i=t.now().offset,m(v)}function h(v){return t.containerState={},e.attempt(Bf,p,m)(v)}function p(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function m(v){if(v===null){o&&E(),x(0),e.consume(v);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),b(v)}function b(v){if(v===null){y(e.exit("chunkFlow"),!0),x(0),e.consume(v);return}return $e(v)?(e.consume(v),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(v),b)}function y(v,S){const k=t.sliceStream(v);if(S&&k.push(null),v.previous=a,a&&(a.next=v),a=v,o.defineSkip(v.start),o.write(k),t.parser.lazy[v.start.line]){let C=o.events.length;for(;C--;)if(o.events[C][1].start.offset<i&&(!o.events[C][1].end||o.events[C][1].end.offset>i))return;const L=t.events.length;let F=L,B,R;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){if(B){R=t.events[F][1].end;break}B=!0}for(x(r),C=L;C<t.events.length;)t.events[C][1].end={...R},C++;vn(t.events,F+1,0,t.events.slice(L)),t.events.length=C}}function x(v){let S=n.length;for(;S-- >v;){const k=n[S];t.containerState=k[1],k[0].exit.call(t,e)}n.length=v}function E(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function zE(e,t,n){return at(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Qo(e){if(e===null||yt(e)||fo(e))return 1;if(dl(e))return 2}function fl(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Yu={name:"attention",resolveAll:VE,tokenize:WE};function VE(e,t){let n=-1,r,o,a,i,s,l,u,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;l=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 f={...e[r][1].end},h={...e[n][1].start};jf(f,-l),jf(h,l),i={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},a={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:l>1?"strong":"emphasis",start:{...i.start},end:{...s.end}},e[r][1].end={...i.start},e[n][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Mn(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Mn(u,[["enter",o,t],["enter",i,t],["exit",i,t],["enter",a,t]]),u=Mn(u,fl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Mn(u,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=Mn(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,vn(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function WE(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Qo(r);let a;return i;function i(l){return a=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===a)return e.consume(l),s;const u=e.exit("attentionSequence"),d=Qo(l),f=!d||d===2&&o||n.includes(l),h=!o||o===2&&d||n.includes(r);return u._open=!!(a===42?f:f&&(o||!h)),u._close=!!(a===42?h:h&&(d||!f)),t(l)}}function jf(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const qE={name:"autolink",tokenize:YE};function YE(e,t,n){let r=0;return o;function o(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return on(p)?(e.consume(p),i):p===64?n(p):u(p)}function i(p){return p===43||p===45||p===46||en(p)?(r=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||en(p))&&r++<32?(e.consume(p),s):(r=0,u(p))}function l(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||As(p)?n(p):(e.consume(p),l)}function u(p){return p===64?(e.consume(p),d):FE(p)?(e.consume(p),u):n(p)}function d(p){return en(p)?f(p):n(p)}function f(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):h(p)}function h(p){if((p===45||en(p))&&r++<63){const m=p===45?h:f;return e.consume(p),m}return n(p)}}const ki={partial:!0,tokenize:KE};function KE(e,t,n){return r;function r(a){return nt(a)?at(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||$e(a)?t(a):n(a)}}const a0={continuation:{tokenize:QE},exit:XE,name:"blockQuote",tokenize:GE};function GE(e,t,n){const r=this;return o;function o(i){if(i===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),a}return n(i)}function a(i){return nt(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function QE(e,t,n){const r=this;return o;function o(i){return nt(i)?at(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):a(i)}function a(i){return e.attempt(a0,t,n)(i)}}function XE(e){e.exit("blockQuote")}const i0={name:"characterEscape",tokenize:ZE};function ZE(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return BE(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const s0={name:"characterReference",tokenize:JE};function JE(e,t,n){const r=this;let o=0,a,i;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),a=31,i=en,d(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,i=_E,d):(e.enter("characterReferenceValue"),a=7,i=qu,d(f))}function d(f){if(f===59&&o){const h=e.exit("characterReferenceValue");return i===en&&!Hc(r.sliceSerialize(h))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return i(f)&&o++<a?(e.consume(f),d):n(f)}}const $f={partial:!0,tokenize:tC},Hf={concrete:!0,name:"codeFenced",tokenize:eC};function eC(e,t,n){const r=this,o={partial:!0,tokenize:k};let a=0,i=0,s;return l;function l(C){return u(C)}function u(C){const L=r.events[r.events.length-1];return a=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,s=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(C)}function d(C){return C===s?(i++,e.consume(C),d):i<3?n(C):(e.exit("codeFencedFenceSequence"),nt(C)?at(e,f,"whitespace")(C):f(C))}function f(C){return C===null||$e(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check($f,b,S)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===null||$e(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(C)):nt(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),at(e,p,"whitespace")(C)):C===96&&C===s?n(C):(e.consume(C),h)}function p(C){return C===null||$e(C)?f(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(C))}function m(C){return C===null||$e(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(C)):C===96&&C===s?n(C):(e.consume(C),m)}function b(C){return e.attempt(o,S,y)(C)}function y(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),x}function x(C){return a>0&&nt(C)?at(e,E,"linePrefix",a+1)(C):E(C)}function E(C){return C===null||$e(C)?e.check($f,b,S)(C):(e.enter("codeFlowValue"),v(C))}function v(C){return C===null||$e(C)?(e.exit("codeFlowValue"),E(C)):(e.consume(C),v)}function S(C){return e.exit("codeFenced"),t(C)}function k(C,L,F){let B=0;return R;function R(w){return C.enter("lineEnding"),C.consume(w),C.exit("lineEnding"),_}function _(w){return C.enter("codeFencedFence"),nt(w)?at(C,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):T(w)}function T(w){return w===s?(C.enter("codeFencedFenceSequence"),O(w)):F(w)}function O(w){return w===s?(B++,C.consume(w),O):B>=i?(C.exit("codeFencedFenceSequence"),nt(w)?at(C,A,"whitespace")(w):A(w)):F(w)}function A(w){return w===null||$e(w)?(C.exit("codeFencedFence"),L(w)):F(w)}}}function tC(e,t,n){const r=this;return o;function o(i){return i===null?n(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a)}function a(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}const Xl={name:"codeIndented",tokenize:rC},nC={partial:!0,tokenize:oC};function rC(e,t,n){const r=this;return o;function o(u){return e.enter("codeIndented"),at(e,a,"linePrefix",5)(u)}function a(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?i(u):n(u)}function i(u){return u===null?l(u):$e(u)?e.attempt(nC,i,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||$e(u)?(e.exit("codeFlowValue"),i(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function oC(e,t,n){const r=this;return o;function o(i){return r.parser.lazy[r.now().line]?n(i):$e(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o):at(e,a,"linePrefix",5)(i)}function a(i){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):$e(i)?o(i):n(i)}}const aC={name:"codeText",previous:sC,resolve:iC,tokenize:lC};function iC(e){let t=e.length-4,n=3,r,o;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;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function sC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function lC(e,t,n){let r=0,o,a;return i;function i(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(a=e.enter("codeTextSequence"),o=0,d(f)):$e(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||$e(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),u)}function d(f){return f===96?(e.consume(f),o++,d):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",u(f))}}class uC{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 o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&ka(this.left,r),a.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),ka(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ka(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);ka(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ka(this.left,n.reverse())}}}function ka(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 l0(e){const t={};let n=-1,r,o,a,i,s,l,u;const d=new uC(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"&&(l=r[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,cC(d,n)),n=t[n],u=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(i=d.get(a),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank")i[0]==="enter"&&(o&&(d.get(o)[1].type="lineEndingBlank"),i[1].type="lineEnding",o=a);else if(!(i[1].type==="linePrefix"||i[1].type==="listItemIndent"))break;o&&(r[1].end={...d.get(o)[1].start},s=d.slice(o,n),s.unshift(r),d.splice(o,n-o+1,s))}}return vn(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function cC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const s=i.events,l=[],u={};let d,f,h=-1,p=n,m=0,b=0;const y=[b];for(;p;){for(;e.get(++o)[1]!==p;);a.push(o),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),f&&i.defineSkip(p.start),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(d),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++h<s.length;)s[h][0]==="exit"&&s[h-1][0]==="enter"&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(b=h+1,y.push(b),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(i.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),h=y.length;h--;){const x=s.slice(y[h],y[h+1]),E=a.pop();l.push([E,E+x.length-1]),e.splice(E,2,x)}for(l.reverse(),h=-1;++h<l.length;)u[m+l[h][0]]=m+l[h][1],m+=l[h][1]-l[h][0]-1;return u}const dC={resolve:pC,tokenize:hC},fC={partial:!0,tokenize:mC};function pC(e){return l0(e),e}function hC(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?a(s):$e(s)?e.check(fC,i,a)(s):(e.consume(s),o)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function i(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function mC(e,t,n){const r=this;return o;function o(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),at(e,a,"linePrefix")}function a(i){if(i===null||$e(i))return n(i);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function u0(e,t,n,r,o,a,i,s,l){const u=l||Number.POSITIVE_INFINITY;let d=0;return f;function f(x){return x===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(x),e.exit(a),h):x===null||x===32||x===41||As(x)?n(x):(e.enter(r),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),b(x))}function h(x){return x===62?(e.enter(a),e.consume(x),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===62?(e.exit("chunkString"),e.exit(s),h(x)):x===null||x===60||$e(x)?n(x):(e.consume(x),x===92?m:p)}function m(x){return x===60||x===62||x===92?(e.consume(x),p):p(x)}function b(x){return!d&&(x===null||x===41||yt(x))?(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(r),t(x)):d<u&&x===40?(e.consume(x),d++,b):x===41?(e.consume(x),d--,b):x===null||x===32||x===40||As(x)?n(x):(e.consume(x),x===92?y:b)}function y(x){return x===40||x===41||x===92?(e.consume(x),b):b(x)}}function c0(e,t,n,r,o,a){const i=this;let s=0,l;return u;function u(p){return e.enter(r),e.enter(o),e.consume(p),e.exit(o),e.enter(a),d}function d(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in i.parser.constructs?n(p):p===93?(e.exit(a),e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):$e(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||$e(p)||s++>999?(e.exit("chunkString"),d(p)):(e.consume(p),l||(l=!nt(p)),p===92?h:f)}function h(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}function d0(e,t,n,r,o,a){let i;return s;function s(h){return h===34||h===39||h===40?(e.enter(r),e.enter(o),e.consume(h),e.exit(o),i=h===40?41:h,l):n(h)}function l(h){return h===i?(e.enter(o),e.consume(h),e.exit(o),e.exit(r),t):(e.enter(a),u(h))}function u(h){return h===i?(e.exit(a),l(i)):h===null?n(h):$e(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),at(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===i||h===null||$e(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?f:d)}function f(h){return h===i||h===92?(e.consume(h),d):d(h)}}function Ya(e,t){let n;return r;function r(o){return $e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):nt(o)?at(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const gC={name:"definition",tokenize:yC},bC={partial:!0,tokenize:xC};function yC(e,t,n){const r=this;let o;return a;function a(p){return e.enter("definition"),i(p)}function i(p){return c0.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return o=Vn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return yt(p)?Ya(e,u)(p):u(p)}function u(p){return u0(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(bC,f,f)(p)}function f(p){return nt(p)?at(e,h,"whitespace")(p):h(p)}function h(p){return p===null||$e(p)?(e.exit("definition"),r.parser.defined.push(o),t(p)):n(p)}}function xC(e,t,n){return r;function r(s){return yt(s)?Ya(e,o)(s):n(s)}function o(s){return d0(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return nt(s)?at(e,i,"whitespace")(s):i(s)}function i(s){return s===null||$e(s)?t(s):n(s)}}const EC={name:"hardBreakEscape",tokenize:CC};function CC(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return $e(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const TC={name:"headingAtx",resolve:vC,tokenize:SC};function vC(e,t){let n=e.length-2,r=3,o,a;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&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},vn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function SC(e,t,n){let r=0;return o;function o(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),i(d)}function i(d){return d===35&&r++<6?(e.consume(d),i):d===null||yt(d)?(e.exit("atxHeadingSequence"),s(d)):n(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),l(d)):d===null||$e(d)?(e.exit("atxHeading"),t(d)):nt(d)?at(e,s,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function l(d){return d===35?(e.consume(d),l):(e.exit("atxHeadingSequence"),s(d))}function u(d){return d===null||d===35||yt(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),u)}}const kC=["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"],Uf=["pre","script","style","textarea"],DC={concrete:!0,name:"htmlFlow",resolveTo:IC,tokenize:PC},wC={partial:!0,tokenize:MC},AC={partial:!0,tokenize:RC};function IC(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 PC(e,t,n){const r=this;let o,a,i,s,l;return u;function u(N){return d(N)}function d(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),f}function f(N){return N===33?(e.consume(N),h):N===47?(e.consume(N),a=!0,b):N===63?(e.consume(N),o=3,r.interrupt?t:D):on(N)?(e.consume(N),i=String.fromCharCode(N),y):n(N)}function h(N){return N===45?(e.consume(N),o=2,p):N===91?(e.consume(N),o=5,s=0,m):on(N)?(e.consume(N),o=4,r.interrupt?t:D):n(N)}function p(N){return N===45?(e.consume(N),r.interrupt?t:D):n(N)}function m(N){const ae="CDATA[";return N===ae.charCodeAt(s++)?(e.consume(N),s===ae.length?r.interrupt?t:T:m):n(N)}function b(N){return on(N)?(e.consume(N),i=String.fromCharCode(N),y):n(N)}function y(N){if(N===null||N===47||N===62||yt(N)){const ae=N===47,Q=i.toLowerCase();return!ae&&!a&&Uf.includes(Q)?(o=1,r.interrupt?t(N):T(N)):kC.includes(i.toLowerCase())?(o=6,ae?(e.consume(N),x):r.interrupt?t(N):T(N)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):a?E(N):v(N))}return N===45||en(N)?(e.consume(N),i+=String.fromCharCode(N),y):n(N)}function x(N){return N===62?(e.consume(N),r.interrupt?t:T):n(N)}function E(N){return nt(N)?(e.consume(N),E):R(N)}function v(N){return N===47?(e.consume(N),R):N===58||N===95||on(N)?(e.consume(N),S):nt(N)?(e.consume(N),v):R(N)}function S(N){return N===45||N===46||N===58||N===95||en(N)?(e.consume(N),S):k(N)}function k(N){return N===61?(e.consume(N),C):nt(N)?(e.consume(N),k):v(N)}function C(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),l=N,L):nt(N)?(e.consume(N),C):F(N)}function L(N){return N===l?(e.consume(N),l=null,B):N===null||$e(N)?n(N):(e.consume(N),L)}function F(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||yt(N)?k(N):(e.consume(N),F)}function B(N){return N===47||N===62||nt(N)?v(N):n(N)}function R(N){return N===62?(e.consume(N),_):n(N)}function _(N){return N===null||$e(N)?T(N):nt(N)?(e.consume(N),_):n(N)}function T(N){return N===45&&o===2?(e.consume(N),M):N===60&&o===1?(e.consume(N),V):N===62&&o===4?(e.consume(N),Y):N===63&&o===3?(e.consume(N),D):N===93&&o===5?(e.consume(N),U):$e(N)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(wC,te,O)(N)):N===null||$e(N)?(e.exit("htmlFlowData"),O(N)):(e.consume(N),T)}function O(N){return e.check(AC,A,te)(N)}function A(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),w}function w(N){return N===null||$e(N)?O(N):(e.enter("htmlFlowData"),T(N))}function M(N){return N===45?(e.consume(N),D):T(N)}function V(N){return N===47?(e.consume(N),i="",z):T(N)}function z(N){if(N===62){const ae=i.toLowerCase();return Uf.includes(ae)?(e.consume(N),Y):T(N)}return on(N)&&i.length<8?(e.consume(N),i+=String.fromCharCode(N),z):T(N)}function U(N){return N===93?(e.consume(N),D):T(N)}function D(N){return N===62?(e.consume(N),Y):N===45&&o===2?(e.consume(N),D):T(N)}function Y(N){return N===null||$e(N)?(e.exit("htmlFlowData"),te(N)):(e.consume(N),Y)}function te(N){return e.exit("htmlFlow"),t(N)}}function RC(e,t,n){const r=this;return o;function o(i){return $e(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a):n(i)}function a(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}function MC(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ki,t,n)}}const OC={name:"htmlText",tokenize:NC};function NC(e,t,n){const r=this;let o,a,i;return s;function s(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),l}function l(D){return D===33?(e.consume(D),u):D===47?(e.consume(D),k):D===63?(e.consume(D),v):on(D)?(e.consume(D),F):n(D)}function u(D){return D===45?(e.consume(D),d):D===91?(e.consume(D),a=0,m):on(D)?(e.consume(D),E):n(D)}function d(D){return D===45?(e.consume(D),p):n(D)}function f(D){return D===null?n(D):D===45?(e.consume(D),h):$e(D)?(i=f,V(D)):(e.consume(D),f)}function h(D){return D===45?(e.consume(D),p):f(D)}function p(D){return D===62?M(D):D===45?h(D):f(D)}function m(D){const Y="CDATA[";return D===Y.charCodeAt(a++)?(e.consume(D),a===Y.length?b:m):n(D)}function b(D){return D===null?n(D):D===93?(e.consume(D),y):$e(D)?(i=b,V(D)):(e.consume(D),b)}function y(D){return D===93?(e.consume(D),x):b(D)}function x(D){return D===62?M(D):D===93?(e.consume(D),x):b(D)}function E(D){return D===null||D===62?M(D):$e(D)?(i=E,V(D)):(e.consume(D),E)}function v(D){return D===null?n(D):D===63?(e.consume(D),S):$e(D)?(i=v,V(D)):(e.consume(D),v)}function S(D){return D===62?M(D):v(D)}function k(D){return on(D)?(e.consume(D),C):n(D)}function C(D){return D===45||en(D)?(e.consume(D),C):L(D)}function L(D){return $e(D)?(i=L,V(D)):nt(D)?(e.consume(D),L):M(D)}function F(D){return D===45||en(D)?(e.consume(D),F):D===47||D===62||yt(D)?B(D):n(D)}function B(D){return D===47?(e.consume(D),M):D===58||D===95||on(D)?(e.consume(D),R):$e(D)?(i=B,V(D)):nt(D)?(e.consume(D),B):M(D)}function R(D){return D===45||D===46||D===58||D===95||en(D)?(e.consume(D),R):_(D)}function _(D){return D===61?(e.consume(D),T):$e(D)?(i=_,V(D)):nt(D)?(e.consume(D),_):B(D)}function T(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),o=D,O):$e(D)?(i=T,V(D)):nt(D)?(e.consume(D),T):(e.consume(D),A)}function O(D){return D===o?(e.consume(D),o=void 0,w):D===null?n(D):$e(D)?(i=O,V(D)):(e.consume(D),O)}function A(D){return D===null||D===34||D===39||D===60||D===61||D===96?n(D):D===47||D===62||yt(D)?B(D):(e.consume(D),A)}function w(D){return D===47||D===62||yt(D)?B(D):n(D)}function M(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),t):n(D)}function V(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),z}function z(D){return nt(D)?at(e,U,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):U(D)}function U(D){return e.enter("htmlTextData"),i(D)}}const Uc={name:"labelEnd",resolveAll:BC,resolveTo:jC,tokenize:$C},LC={tokenize:HC},FC={tokenize:UC},_C={tokenize:zC};function BC(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 o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&vn(e,0,e.length,n),e}function jC(e,t){let n=e.length,r=0,o,a,i,s;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(i){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(i=n);const l={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[a][1].start},end:{...e[i][1].end}},d={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[i-2][1].start}};return s=[["enter",l,t],["enter",u,t]],s=Mn(s,e.slice(a+1,a+r+3)),s=Mn(s,[["enter",d,t]]),s=Mn(s,fl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,i-3),t)),s=Mn(s,[["exit",d,t],e[i-2],e[i-1],["exit",u,t]]),s=Mn(s,e.slice(i+1)),s=Mn(s,[["exit",l,t]]),vn(e,a,e.length,s),e}function $C(e,t,n){const r=this;let o=r.events.length,a,i;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return s;function s(h){return a?a._inactive?f(h):(i=r.parser.defined.includes(Vn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),l):n(h)}function l(h){return h===40?e.attempt(LC,d,i?d:f)(h):h===91?e.attempt(FC,d,i?u:f)(h):i?d(h):f(h)}function u(h){return e.attempt(_C,d,f)(h)}function d(h){return t(h)}function f(h){return a._balanced=!0,n(h)}}function HC(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),o}function o(f){return yt(f)?Ya(e,a)(f):a(f)}function a(f){return f===41?d(f):u0(e,i,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function i(f){return yt(f)?Ya(e,l)(f):d(f)}function s(f){return n(f)}function l(f){return f===34||f===39||f===40?d0(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function u(f){return yt(f)?Ya(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function UC(e,t,n){const r=this;return o;function o(s){return c0.call(r,e,a,i,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(Vn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function i(s){return n(s)}}function zC(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const VC={name:"labelStartImage",resolveAll:Uc.resolveAll,tokenize:WC};function WC(e,t,n){const r=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),i):n(s)}function i(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const qC={name:"labelStartLink",resolveAll:Uc.resolveAll,tokenize:YC};function YC(e,t,n){const r=this;return o;function o(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),a}function a(i){return i===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(i):t(i)}}const Zl={name:"lineEnding",tokenize:KC};function KC(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),at(e,t,"linePrefix")}}const os={name:"thematicBreak",tokenize:GC};function GC(e,t,n){let r=0,o;return a;function a(u){return e.enter("thematicBreak"),i(u)}function i(u){return o=u,s(u)}function s(u){return u===o?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||$e(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===o?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),nt(u)?at(e,s,"whitespace")(u):s(u))}}const ln={continuation:{tokenize:JC},exit:tT,name:"list",tokenize:ZC},QC={partial:!0,tokenize:nT},XC={partial:!0,tokenize:eT};function ZC(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,i=0;return s;function s(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:qu(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(os,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return qu(p)&&++i<10?(e.consume(p),l):(!r.interrupt||i<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(ki,r.interrupt?n:d,e.attempt(QC,h,f))}function d(p){return r.containerState.initialBlankLine=!0,a++,h(p)}function f(p){return nt(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function JC(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ki,o,a);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,at(e,t,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!nt(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(XC,t,i)(s))}function i(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,at(e,e.attempt(ln,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function eT(e,t,n){const r=this;return at(e,o,"listItemIndent",r.containerState.size+1);function o(a){const i=r.events[r.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(a):n(a)}}function tT(e){e.exit(this.containerState.type)}function nT(e,t,n){const r=this;return at(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const i=r.events[r.events.length-1];return!nt(a)&&i&&i[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const zf={name:"setextUnderline",resolveTo:rT,tokenize:oT};function rT(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const i={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",i,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=i,e.push(["exit",i,t]),e}function oT(e,t,n){const r=this;let o;return a;function a(u){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),o=u,i(u)):n(u)}function i(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===o?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),nt(u)?at(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||$e(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const aT={tokenize:iT};function iT(e){const t=this,n=e.attempt(ki,r,e.attempt(this.parser.constructs.flowInitial,o,at(e,e.attempt(this.parser.constructs.flow,o,e.attempt(dC,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const sT={resolveAll:p0()},lT=f0("string"),uT=f0("text");function f0(e){return{resolveAll:p0(e==="text"?cT:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,i,s);return i;function i(d){return u(d)?a(d):s(d)}function s(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),l}function l(d){return u(d)?(n.exit("data"),a(d)):(n.consume(d),l)}function u(d){if(d===null)return!0;const f=o[d];let h=-1;if(f)for(;++h<f.length;){const p=f[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function p0(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function cT(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],o=t.sliceStream(r);let a=o.length,i=-1,s=0,l;for(;a--;){const u=o[a];if(typeof u=="string"){for(i=u.length;u.charCodeAt(i-1)===32;)s++,i--;if(i)break;i=-1}else if(u===-2)l=!0,s++;else if(u!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?i:r.start._bufferIndex+i,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const dT={42:ln,43:ln,45:ln,48:ln,49:ln,50:ln,51:ln,52:ln,53:ln,54:ln,55:ln,56:ln,57:ln,62:a0},fT={91:gC},pT={[-2]:Xl,[-1]:Xl,32:Xl},hT={35:TC,42:os,45:[zf,os],60:DC,61:zf,95:os,96:Hf,126:Hf},mT={38:s0,92:i0},gT={[-5]:Zl,[-4]:Zl,[-3]:Zl,33:VC,38:s0,42:Yu,60:[qE,OC],91:qC,92:[EC,i0],93:Uc,95:Yu,96:aC},bT={null:[Yu,sT]},yT={null:[42,95]},xT={null:[]},ET=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:yT,contentInitial:fT,disable:xT,document:dT,flow:hT,flowInitial:pT,insideSpan:bT,string:mT,text:gT},Symbol.toStringTag,{value:"Module"}));function CT(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 o={},a=[];let i=[],s=[];const l={attempt:L(k),check:L(C),consume:E,enter:v,exit:S,interrupt:L(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:m,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:f};let d=t.tokenize.call(u,l);return t.resolveAll&&a.push(t),u;function f(_){return i=Mn(i,_),y(),i[i.length-1]!==null?[]:(F(t,0),u.events=fl(a,u.events,u),u.events)}function h(_,T){return vT(p(_),T)}function p(_){return TT(i,_)}function m(){const{_bufferIndex:_,_index:T,line:O,column:A,offset:w}=r;return{_bufferIndex:_,_index:T,line:O,column:A,offset:w}}function b(_){o[_.line]=_.column,R()}function y(){let _;for(;r._index<i.length;){const T=i[r._index];if(typeof T=="string")for(_=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===_&&r._bufferIndex<T.length;)x(T.charCodeAt(r._bufferIndex));else x(T)}}function x(_){d=d(_)}function E(_){$e(_)?(r.line++,r.column=1,r.offset+=_===-3?2:1,R()):_!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=_}function v(_,T){const O=T||{};return O.type=_,O.start=m(),u.events.push(["enter",O,u]),s.push(O),O}function S(_){const T=s.pop();return T.end=m(),u.events.push(["exit",T,u]),T}function k(_,T){F(_,T.from)}function C(_,T){T.restore()}function L(_,T){return O;function O(A,w,M){let V,z,U,D;return Array.isArray(A)?te(A):"tokenize"in A?te([A]):Y(A);function Y(q){return X;function X(G){const ee=G!==null&&q[G],oe=G!==null&&q.null,ne=[...Array.isArray(ee)?ee:ee?[ee]:[],...Array.isArray(oe)?oe:oe?[oe]:[]];return te(ne)(G)}}function te(q){return V=q,z=0,q.length===0?M:N(q[z])}function N(q){return X;function X(G){return D=B(),U=q,q.partial||(u.currentConstruct=q),q.name&&u.parser.constructs.disable.null.includes(q.name)?Q():q.tokenize.call(T?Object.assign(Object.create(u),T):u,l,ae,Q)(G)}}function ae(q){return _(U,D),w}function Q(q){return D.restore(),++z<V.length?N(V[z]):M}}}function F(_,T){_.resolveAll&&!a.includes(_)&&a.push(_),_.resolve&&vn(u.events,T,u.events.length-T,_.resolve(u.events.slice(T),u)),_.resolveTo&&(u.events=_.resolveTo(u.events,u))}function B(){const _=m(),T=u.previous,O=u.currentConstruct,A=u.events.length,w=Array.from(s);return{from:A,restore:M};function M(){r=_,u.previous=T,u.currentConstruct=O,u.events.length=A,s=w,R()}}function R(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function TT(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let i;if(n===o)i=[e[n].slice(r,a)];else{if(i=e.slice(n,o),r>-1){const s=i[0];typeof s=="string"?i[0]=s.slice(r):i.shift()}a>0&&i.push(e[o].slice(0,a))}return i}function vT(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let i;if(typeof a=="string")i=a;else switch(a){case-5:{i="\r";break}case-4:{i=`
23
- `;break}case-3:{i=`\r
24
- `;break}case-2:{i=t?" ":" ";break}case-1:{if(!t&&o)continue;i=" ";break}default:i=String.fromCharCode(a)}o=a===-2,r.push(i)}return r.join("")}function ST(e){const r={constructs:r0([ET,...(e||{}).extensions||[]]),content:o(jE),defined:[],document:o(HE),flow:o(aT),lazy:{},string:o(lT),text:o(uT)};return r;function o(a){return i;function i(s){return CT(r,a,s)}}}function kT(e){for(;!l0(e););return e}const Vf=/[\0\t\n\r]/g;function DT(){let e=1,t="",n=!0,r;return o;function o(a,i,s){const l=[];let u,d,f,h,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(i||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(Vf.lastIndex=f,u=Vf.exec(a),h=u&&u.index!==void 0?u.index:a.length,p=a.charCodeAt(h),!u){t=a.slice(f);break}if(p===10&&f===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<h&&(l.push(a.slice(f,h)),e+=h-f),p){case 0:{l.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,l.push(-2);e++<d;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}f=h+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const wT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function AT(e){return e.replace(wT,IT)}function IT(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return o0(n.slice(a?2:1),a?16:10)}return Hc(n)||e}const h0={}.hasOwnProperty;function PT(e,t,n){return typeof t!="string"&&(n=t,t=void 0),RT(n)(kT(ST(n).document().write(DT()(e,t,!0))))}function RT(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ie),autolinkProtocol:B,autolinkEmail:B,atxHeading:a(ye),blockQuote:a(oe),characterEscape:B,characterReference:B,codeFenced:a(ne),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:a(ne,i),codeText:a(pe,i),codeTextData:B,data:B,codeFlowValue:B,definition:a(Z),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:a(J),hardBreakEscape:a(de),hardBreakTrailing:a(de),htmlFlow:a(be,i),htmlFlowData:B,htmlText:a(be,i),htmlTextData:B,image:a(ie),label:i,link:a(Ie),listItem:a(Ve),listItemValue:h,listOrdered:a(ve,f),listUnordered:a(ve),paragraph:a(we),reference:N,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:a(ye),strong:a(At),thematicBreak:a(Ye)},exit:{atxHeading:l(),atxHeadingSequence:k,autolink:l(),autolinkEmail:ee,autolinkProtocol:G,blockQuote:l(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:Q,characterReferenceMarkerNumeric:Q,characterReferenceValue:q,characterReference:X,codeFenced:l(y),codeFencedFence:b,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:R,codeIndented:l(x),codeText:l(w),codeTextData:R,data:R,definition:l(),definitionDestinationString:S,definitionLabelString:E,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(T),hardBreakTrailing:l(T),htmlFlow:l(O),htmlFlowData:R,htmlText:l(A),htmlTextData:R,image:l(V),label:U,labelText:z,lineEnding:_,link:l(M),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ae,resourceDestinationString:D,resourceTitleString:Y,resource:te,setextHeading:l(F),setextHeadingLineSequence:L,setextHeadingText:C,strong:l(),thematicBreak:l()}};m0(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ue){let Ce={type:"root",children:[]};const Oe={stack:[Ce],tokenStack:[],config:t,enter:s,exit:u,buffer:i,resume:d,data:n},He=[];let je=-1;for(;++je<ue.length;)if(ue[je][1].type==="listOrdered"||ue[je][1].type==="listUnordered")if(ue[je][0]==="enter")He.push(je);else{const Ne=He.pop();je=o(ue,Ne,je)}for(je=-1;++je<ue.length;){const Ne=t[ue[je][0]];h0.call(Ne,ue[je][1].type)&&Ne[ue[je][1].type].call(Object.assign({sliceSerialize:ue[je][2].sliceSerialize},Oe),ue[je][1])}if(Oe.tokenStack.length>0){const Ne=Oe.tokenStack[Oe.tokenStack.length-1];(Ne[1]||Wf).call(Oe,void 0,Ne[0])}for(Ce.position={start:Fr(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:Fr(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},je=-1;++je<t.transforms.length;)Ce=t.transforms[je](Ce)||Ce;return Ce}function o(ue,Ce,Oe){let He=Ce-1,je=-1,Ne=!1,ot,Et,mt,se;for(;++He<=Oe;){const xe=ue[He];switch(xe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{xe[0]==="enter"?je++:je--,se=void 0;break}case"lineEndingBlank":{xe[0]==="enter"&&(ot&&!se&&!je&&!mt&&(mt=He),se=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:se=void 0}if(!je&&xe[0]==="enter"&&xe[1].type==="listItemPrefix"||je===-1&&xe[0]==="exit"&&(xe[1].type==="listUnordered"||xe[1].type==="listOrdered")){if(ot){let Re=He;for(Et=void 0;Re--;){const Be=ue[Re];if(Be[1].type==="lineEnding"||Be[1].type==="lineEndingBlank"){if(Be[0]==="exit")continue;Et&&(ue[Et][1].type="lineEndingBlank",Ne=!0),Be[1].type="lineEnding",Et=Re}else if(!(Be[1].type==="linePrefix"||Be[1].type==="blockQuotePrefix"||Be[1].type==="blockQuotePrefixWhitespace"||Be[1].type==="blockQuoteMarker"||Be[1].type==="listItemIndent"))break}mt&&(!Et||mt<Et)&&(ot._spread=!0),ot.end=Object.assign({},Et?ue[Et][1].start:xe[1].end),ue.splice(Et||He,0,["exit",ot,xe[2]]),He++,Oe++}if(xe[1].type==="listItemPrefix"){const Re={type:"listItem",_spread:!1,start:Object.assign({},xe[1].start),end:void 0};ot=Re,ue.splice(He,0,["enter",Re,xe[2]]),He++,Oe++,mt=void 0,se=!0}}}return ue[Ce][1]._spread=Ne,Oe}function a(ue,Ce){return Oe;function Oe(He){s.call(this,ue(He),He),Ce&&Ce.call(this,He)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(ue,Ce,Oe){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([Ce,Oe||void 0]),ue.position={start:Fr(Ce.start),end:void 0}}function l(ue){return Ce;function Ce(Oe){ue&&ue.call(this,Oe),u.call(this,Oe)}}function u(ue,Ce){const Oe=this.stack.pop(),He=this.tokenStack.pop();if(He)He[0].type!==ue.type&&(Ce?Ce.call(this,ue,He[0]):(He[1]||Wf).call(this,ue,He[0]));else throw new Error("Cannot close `"+ue.type+"` ("+qa({start:ue.start,end:ue.end})+"): it’s not open");Oe.position.end=Fr(ue.end)}function d(){return $c(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(ue){if(this.data.expectingFirstListItemValue){const Ce=this.stack[this.stack.length-2];Ce.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function p(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.lang=ue}function m(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.meta=ue}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ue.replace(/(\r?\n|\r)$/g,"")}function E(ue){const Ce=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=Ce,Oe.identifier=Vn(this.sliceSerialize(ue)).toLowerCase()}function v(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=ue}function S(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=ue}function k(ue){const Ce=this.stack[this.stack.length-1];if(!Ce.depth){const Oe=this.sliceSerialize(ue).length;Ce.depth=Oe}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function L(ue){const Ce=this.stack[this.stack.length-1];Ce.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function F(){this.data.setextHeadingSlurpLineEnding=void 0}function B(ue){const Oe=this.stack[this.stack.length-1].children;let He=Oe[Oe.length-1];(!He||He.type!=="text")&&(He=rt(),He.position={start:Fr(ue.start),end:void 0},Oe.push(He)),this.stack.push(He)}function R(ue){const Ce=this.stack.pop();Ce.value+=this.sliceSerialize(ue),Ce.position.end=Fr(ue.end)}function _(ue){const Ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=Ce.children[Ce.children.length-1];Oe.position.end=Fr(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ce.type)&&(B.call(this,ue),R.call(this,ue))}function T(){this.data.atHardBreak=!0}function O(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ue}function A(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ue}function w(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ue}function M(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=Ce,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function V(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=Ce,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function z(ue){const Ce=this.sliceSerialize(ue),Oe=this.stack[this.stack.length-2];Oe.label=AT(Ce),Oe.identifier=Vn(Ce).toLowerCase()}function U(){const ue=this.stack[this.stack.length-1],Ce=this.resume(),Oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Oe.type==="link"){const He=ue.children;Oe.children=He}else Oe.alt=Ce}function D(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=ue}function Y(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=ue}function te(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function ae(ue){const Ce=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=Ce,Oe.identifier=Vn(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function Q(ue){this.data.characterReferenceType=ue.type}function q(ue){const Ce=this.sliceSerialize(ue),Oe=this.data.characterReferenceType;let He;Oe?(He=o0(Ce,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):He=Hc(Ce);const je=this.stack[this.stack.length-1];je.value+=He}function X(ue){const Ce=this.stack.pop();Ce.position.end=Fr(ue.end)}function G(ue){R.call(this,ue);const Ce=this.stack[this.stack.length-1];Ce.url=this.sliceSerialize(ue)}function ee(ue){R.call(this,ue);const Ce=this.stack[this.stack.length-1];Ce.url="mailto:"+this.sliceSerialize(ue)}function oe(){return{type:"blockquote",children:[]}}function ne(){return{type:"code",lang:null,meta:null,value:""}}function pe(){return{type:"inlineCode",value:""}}function Z(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function J(){return{type:"emphasis",children:[]}}function ye(){return{type:"heading",depth:0,children:[]}}function de(){return{type:"break"}}function be(){return{type:"html",value:""}}function ie(){return{type:"image",title:null,url:"",alt:null}}function Ie(){return{type:"link",title:null,url:"",children:[]}}function ve(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function Ve(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function we(){return{type:"paragraph",children:[]}}function At(){return{type:"strong",children:[]}}function rt(){return{type:"text",value:""}}function Ye(){return{type:"thematicBreak"}}}function Fr(e){return{line:e.line,column:e.column,offset:e.offset}}function m0(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?m0(e,r):MT(e,r)}}function MT(e,t){let n;for(n in t)if(h0.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 Wf(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qa({start:t.start,end:t.end})+") is still open")}function OT(e){const t=this;t.parser=n;function n(r){return PT(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function NT(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 LT(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
25
- `}]}function FT(e,t){const n=t.value?t.value+`
26
- `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function _T(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BT(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jT(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=la(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let i,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=a+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function $T(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 HT(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function g0(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 o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const i=o[o.length-1];return i&&i.type==="text"?i.value+=r:o.push({type:"text",value:r}),o}function UT(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return g0(e,t);const o={src:la(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function zT(e,t){const n={src:la(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 VT(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 WT(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return g0(e,t);const o={href:la(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function qT(e,t){const n={href:la(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 YT(e,t,n){const r=e.all(t),o=n?KT(n):b0(t),a={},i=[];if(typeof t.checked=="boolean"){const d=r[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const d=r[s];(o||s!==0||d.type!=="element"||d.tagName!=="p")&&i.push({type:"text",value:`
27
- `}),d.type==="element"&&d.tagName==="p"&&!o?i.push(...d.children):i.push(d)}const l=r[r.length-1];l&&(o||l.type!=="element"||l.tagName!=="p")&&i.push({type:"text",value:`
28
- `});const u={type:"element",tagName:"li",properties:a,children:i};return e.patch(t,u),e.applyData(t,u)}function KT(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=b0(n[r])}return t}function b0(e){const t=e.spread;return t??e.children.length>1}function GT(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const i=r[o];if(i.type==="element"&&i.tagName==="li"&&i.properties&&Array.isArray(i.properties.className)&&i.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function QT(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function XT(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ZT(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JT(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const i={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],i),o.push(i)}if(n.length>0){const i={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=cr(t.children[1]),l=cl(t.children[t.children.length-1]);s&&l&&(i.position={start:s,end:l}),o.push(i)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function ev(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",i=n&&n.type==="table"?n.align:void 0,s=i?i.length:t.children.length;let l=-1;const u=[];for(;++l<s;){const f=t.children[l],h={},p=i?i[l]:void 0;p&&(h.align=p);let m={type:"element",tagName:a,properties:h,children:[]};f&&(m.children=e.all(f),e.patch(f,m),m=e.applyData(f,m)),u.push(m)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function tv(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const qf=9,Yf=32;function nv(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(Kf(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(Kf(t.slice(o),o>0,!1)),a.join("")}function Kf(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===qf||a===Yf;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===qf||a===Yf;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function rv(e,t){const n={type:"text",value:nv(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ov(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const av={blockquote:NT,break:LT,code:FT,delete:_T,emphasis:BT,footnoteReference:jT,heading:$T,html:HT,imageReference:UT,image:zT,inlineCode:VT,linkReference:WT,link:qT,listItem:YT,list:GT,paragraph:QT,root:XT,strong:ZT,table:JT,tableCell:tv,tableRow:ev,text:rv,thematicBreak:ov,toml:Hi,yaml:Hi,definition:Hi,footnoteDefinition:Hi};function Hi(){}const y0=-1,pl=0,Ka=1,Is=2,zc=3,Vc=4,Wc=5,qc=6,x0=7,E0=8,Gf=typeof self=="object"?self:globalThis,iv=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,i]=t[o];switch(a){case pl:case y0:return n(i,o);case Ka:{const s=n([],o);for(const l of i)s.push(r(l));return s}case Is:{const s=n({},o);for(const[l,u]of i)s[r(l)]=r(u);return s}case zc:return n(new Date(i),o);case Vc:{const{source:s,flags:l}=i;return n(new RegExp(s,l),o)}case Wc:{const s=n(new Map,o);for(const[l,u]of i)s.set(r(l),r(u));return s}case qc:{const s=n(new Set,o);for(const l of i)s.add(r(l));return s}case x0:{const{name:s,message:l}=i;return n(new Gf[s](l),o)}case E0:return n(BigInt(i),o);case"BigInt":return n(Object(BigInt(i)),o);case"ArrayBuffer":return n(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:s}=new Uint8Array(i);return n(new DataView(s),i)}}return n(new Gf[a](i),o)};return r},Qf=e=>iv(new Map,e)(0),Mo="",{toString:sv}={},{keys:lv}=Object,Da=e=>{const t=typeof e;if(t!=="object"||!e)return[pl,t];const n=sv.call(e).slice(8,-1);switch(n){case"Array":return[Ka,Mo];case"Object":return[Is,Mo];case"Date":return[zc,Mo];case"RegExp":return[Vc,Mo];case"Map":return[Wc,Mo];case"Set":return[qc,Mo];case"DataView":return[Ka,n]}return n.includes("Array")?[Ka,n]:n.includes("Error")?[x0,n]:[Is,n]},Ui=([e,t])=>e===pl&&(t==="function"||t==="symbol"),uv=(e,t,n,r)=>{const o=(i,s)=>{const l=r.push(i)-1;return n.set(s,l),l},a=i=>{if(n.has(i))return n.get(i);let[s,l]=Da(i);switch(s){case pl:{let d=i;switch(l){case"bigint":s=E0,d=i.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);d=null;break;case"undefined":return o([y0],i)}return o([s,d],i)}case Ka:{if(l){let h=i;return l==="DataView"?h=new Uint8Array(i.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(i)),o([l,[...h]],i)}const d=[],f=o([s,d],i);for(const h of i)d.push(a(h));return f}case Is:{if(l)switch(l){case"BigInt":return o([l,i.toString()],i);case"Boolean":case"Number":case"String":return o([l,i.valueOf()],i)}if(t&&"toJSON"in i)return a(i.toJSON());const d=[],f=o([s,d],i);for(const h of lv(i))(e||!Ui(Da(i[h])))&&d.push([a(h),a(i[h])]);return f}case zc:return o([s,i.toISOString()],i);case Vc:{const{source:d,flags:f}=i;return o([s,{source:d,flags:f}],i)}case Wc:{const d=[],f=o([s,d],i);for(const[h,p]of i)(e||!(Ui(Da(h))||Ui(Da(p))))&&d.push([a(h),a(p)]);return f}case qc:{const d=[],f=o([s,d],i);for(const h of i)(e||!Ui(Da(h)))&&d.push(a(h));return f}}const{message:u}=i;return o([s,{name:l,message:u}],i)};return a},Xf=(e,{json:t,lossy:n}={})=>{const r=[];return uv(!(t||n),!!t,new Map,r)(e),r},po=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Qf(Xf(e,t)):structuredClone(e):(e,t)=>Qf(Xf(e,t));function cv(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 dv(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function fv(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||cv,r=e.options.footnoteBackLabel||dv,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const d=e.all(u),f=String(u.identifier).toUpperCase(),h=la(f.toLowerCase());let p=0;const m=[],b=e.footnoteCounts.get(f);for(;b!==void 0&&++p<=b;){m.length>0&&m.push({type:"text",value:" "});let E=typeof n=="string"?n:n(l,p);typeof E=="string"&&(E={type:"text",value:E}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const y=d[d.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const E=y.children[y.children.length-1];E&&E.type==="text"?E.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...m)}else d.push(...m);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(d,!0)};e.patch(u,x),s.push(x)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...po(i),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
29
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
30
- `}]}}const hl=(function(e){if(e==null)return gv;if(typeof e=="function")return ml(e);if(typeof e=="object")return Array.isArray(e)?pv(e):hv(e);if(typeof e=="string")return mv(e);throw new Error("Expected function, string, or object as test")});function pv(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=hl(e[n]);return ml(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function hv(e){const t=e;return ml(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function mv(e){return ml(t);function t(n){return n&&n.type===e}}function ml(e){return t;function t(n,r,o){return!!(bv(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function gv(){return!0}function bv(e){return e!==null&&typeof e=="object"&&"type"in e}const C0=[],yv=!0,Ps=!1,Ga="skip";function T0(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=hl(o),i=r?-1:1;s(e,void 0,[])();function s(l,u,d){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=C0,m,b,y;if((!t||a(l,u,d[d.length-1]||void 0))&&(p=xv(n(l,d)),p[0]===Ps))return p;if("children"in l&&l.children){const x=l;if(x.children&&p[0]!==Ga)for(b=(r?x.children.length:-1)+i,y=d.concat(x);b>-1&&b<x.children.length;){const E=x.children[b];if(m=s(E,b,y)(),m[0]===Ps)return m;b=typeof m[1]=="number"?m[1]:b+i}}return p}}}function xv(e){return Array.isArray(e)?e:typeof e=="number"?[yv,e]:e==null?C0:[e]}function pn(e,t,n,r){let o,a,i;typeof t=="function"&&typeof n!="function"?(a=void 0,i=t,o=n):(a=t,i=n,o=r),T0(e,a,s,o);function s(l,u){const d=u[u.length-1],f=d?d.children.indexOf(l):void 0;return i(l,f,d)}}const Ku={}.hasOwnProperty,Ev={};function Cv(e,t){const n=t||Ev,r=new Map,o=new Map,a=new Map,i={...av,...n.handlers},s={all:u,applyData:vv,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:i,one:l,options:n,patch:Tv,wrap:kv};return pn(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?r:o,h=String(d.identifier).toUpperCase();f.has(h)||f.set(h,d)}}),s;function l(d,f){const h=d.type,p=s.handlers[h];if(Ku.call(s.handlers,h)&&p)return p(s,d,f);if(s.options.passThrough&&s.options.passThrough.includes(h)){if("children"in d){const{children:b,...y}=d,x=po(y);return x.children=s.all(d),x}return po(d)}return(s.options.unknownHandler||Sv)(s,d,f)}function u(d){const f=[];if("children"in d){const h=d.children;let p=-1;for(;++p<h.length;){const m=s.one(h[p],d);if(m){if(p&&h[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Zf(m.value)),!Array.isArray(m)&&m.type==="element")){const b=m.children[0];b&&b.type==="text"&&(b.value=Zf(b.value))}Array.isArray(m)?f.push(...m):f.push(m)}}}return f}}function Tv(e,t){e.position&&(t.position=dE(e))}function vv(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const i="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:i}}n.type==="element"&&a&&Object.assign(n.properties,po(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function Sv(e,t){const n=t.data||{},r="value"in t&&!(Ku.call(n,"hProperties")||Ku.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 kv(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
31
- `});++r<e.length;)r&&n.push({type:"text",value:`
32
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
33
- `}),n}function Zf(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Jf(e,t){const n=Cv(e,t),r=n.one(e,void 0),o=fv(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
34
- `},o),a}function Dv(e,t){return e&&"run"in e?async function(n,r){const o=Jf(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Jf(n,{file:r,...e||t})}}function ep(e){if(e)throw e}var Jl,tp;function wv(){if(tp)return Jl;tp=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},a=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!f)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},i=function(u,d){n&&d.name==="__proto__"?n(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},s=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(r)return r(u,d).value}else return;return u[d]};return Jl=function l(){var u,d,f,h,p,m,b=arguments[0],y=1,x=arguments.length,E=!1;for(typeof b=="boolean"&&(E=b,b=arguments[1]||{},y=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});y<x;++y)if(u=arguments[y],u!=null)for(d in u)f=s(b,d),h=s(u,d),b!==h&&(E&&h&&(a(h)||(p=o(h)))?(p?(p=!1,m=f&&o(f)?f:[]):m=f&&a(f)?f:{},i(b,{name:d,newValue:l(E,m,h)})):typeof h<"u"&&i(b,{name:d,newValue:h}));return b},Jl}var Av=wv();const eu=Wn(Av);function Gu(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 Iv(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const i=o.pop();if(typeof i!="function")throw new TypeError("Expected function as last argument, not "+i);s(null,...o);function s(l,...u){const d=e[++a];let f=-1;if(l){i(l);return}for(;++f<o.length;)(u[f]===null||u[f]===void 0)&&(u[f]=o[f]);o=u,d?Pv(d,s)(...u):i(null,...u)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function Pv(e,t){let n;return r;function r(...i){const s=e.length>i.length;let l;s&&i.push(o);try{l=e.apply(this,i)}catch(u){const d=u;if(s&&n)throw d;return o(d)}s||(l&&l.then&&typeof l.then=="function"?l.then(a,o):l instanceof Error?o(l):a(l))}function o(i,...s){n||(n=!0,t(i,...s))}function a(i){o(null,i)}}const nr={basename:Rv,dirname:Mv,extname:Ov,join:Nv,sep:"/"};function Rv(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Di(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let i=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else i<0&&(a=!0,i=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(r=o):(s=-1,r=i));return n===r?r=i:r<0&&(r=e.length),e.slice(n,r)}function Mv(e){if(Di(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 Ov(e){Di(e);let t=e.length,n=-1,r=0,o=-1,a=0,i;for(;t--;){const s=e.codePointAt(t);if(s===47){if(i){r=t+1;break}continue}n<0&&(i=!0,n=t+1),s===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function Nv(...e){let t=-1,n;for(;++t<e.length;)Di(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Lv(n)}function Lv(e){Di(e);const t=e.codePointAt(0)===47;let n=Fv(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Fv(e,t){let n="",r=0,o=-1,a=0,i=-1,s,l;for(;++i<=e.length;){if(i<e.length)s=e.codePointAt(i);else{if(s===47)break;s=47}if(s===47){if(!(o===i-1||a===1))if(o!==i-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),o=i,a=0;continue}}else if(n.length>0){n="",r=0,o=i,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,i):n=e.slice(o+1,i),r=i-o-1;o=i,a=0}else s===46&&a>-1?a++:a=-1}return n}function Di(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _v={cwd:Bv};function Bv(){return"/"}function Qu(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function jv(e){if(typeof e=="string")e=new URL(e);else if(!Qu(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 $v(e)}function $v(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 o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const tu=["history","path","basename","stem","extname","dirname"];class v0{constructor(t){let n;t?Qu(t)?n={path:t}:typeof t=="string"||Hv(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":_v.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<tu.length;){const a=tu[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)tu.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?nr.basename(this.path):void 0}set basename(t){ru(t,"basename"),nu(t,"basename"),this.path=nr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?nr.dirname(this.path):void 0}set dirname(t){np(this.basename,"dirname"),this.path=nr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?nr.extname(this.path):void 0}set extname(t){if(nu(t,"extname"),np(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=nr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Qu(t)&&(t=jv(t)),ru(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?nr.basename(this.path,this.extname):void 0}set stem(t){ru(t,"stem"),nu(t,"stem"),this.path=nr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new nn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function nu(e,t){if(e&&e.includes(nr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+nr.sep+"`")}function ru(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function np(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Hv(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Uv=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),zv={}.hasOwnProperty;class Yc extends Uv{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=Iv()}copy(){const t=new Yc;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(eu(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(iu("data",this.frozen),this.namespace[t]=n,this):zv.call(this.namespace,t)&&this.namespace[t]||void 0:t?(iu("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 o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=zi(t),r=this.parser||this.Parser;return ou("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ou("process",this.parser||this.Parser),au("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,i){const s=zi(t),l=r.parse(s);r.run(l,s,function(d,f,h){if(d||!f||!h)return u(d);const p=f,m=r.stringify(p,h);qv(m)?h.value=m:h.result=m,u(d,h)});function u(d,f){d||!f?i(d):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),ou("processSync",this.parser||this.Parser),au("processSync",this.compiler||this.Compiler),this.process(t,o),op("processSync","process",n),r;function o(a,i){n=!0,ep(a),r=i}}run(t,n,r){rp(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(i,s){const l=zi(n);o.run(t,l,u);function u(d,f,h){const p=f||t;d?s(d):i?i(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),op("runSync","run",r),o;function a(i,s){ep(i),o=s,r=!0}}stringify(t,n){this.freeze();const r=zi(n),o=this.compiler||this.Compiler;return au("stringify",o),rp(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(iu("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):i(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...f]=u;l(d,f)}else i(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function i(u){if(!("plugins"in u)&&!("settings"in u))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");s(u.plugins),u.settings&&(o.settings=eu(!0,o.settings,u.settings))}function s(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const f=u[d];a(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,d){let f=-1,h=-1;for(;++f<r.length;)if(r[f][0]===u){h=f;break}if(h===-1)r.push([u,...d]);else if(d.length>0){let[p,...m]=d;const b=r[h][1];Gu(b)&&Gu(p)&&(p=eu(!0,b,p)),r[h]=[u,p,...m]}}}}const Vv=new Yc().freeze();function ou(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function au(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function iu(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 rp(e){if(!Gu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function op(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function zi(e){return Wv(e)?e:new v0(e)}function Wv(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function qv(e){return typeof e=="string"||Yv(e)}function Yv(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Kv="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ap=[],ip={allowDangerousHtml:!0},Gv=/^(https?|ircs?|mailto|xmpp)$/i,Qv=[{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 Xv(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,a=e.components,i=e.disallowedElements,s=e.rehypePlugins||ap,l=e.remarkPlugins||ap,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ip}:ip,d=e.skipHtml,f=e.unwrapDisallowed,h=e.urlTransform||Zv,p=Vv().use(OT).use(l).use(Dv,u).use(s),m=new v0;typeof r=="string"&&(m.value=r);for(const E of Qv)Object.hasOwn(e,E.from)&&(""+E.from+(E.to?"use `"+E.to+"` instead":"remove it")+Kv+E.id,void 0);const b=p.parse(m);let y=p.runSync(b,m);return o&&(y={type:"element",tagName:"div",properties:{className:o},children:y.type==="root"?y.children:[y]}),pn(y,x),gE(y,{Fragment:c.Fragment,components:a,ignoreInvalidStyle:!0,jsx:c.jsx,jsxs:c.jsxs,passKeys:!0,passNode:!0});function x(E,v,S){if(E.type==="raw"&&S&&typeof v=="number")return d?S.children.splice(v,1):S.children[v]={type:"text",value:E.value},v;if(E.type==="element"){let k;for(k in Ql)if(Object.hasOwn(Ql,k)&&Object.hasOwn(E.properties,k)){const C=E.properties[k],L=Ql[k];(L===null||L.includes(E.tagName))&&(E.properties[k]=h(String(C||""),k,E))}}if(E.type==="element"){let k=t?!t.includes(E.tagName):i?i.includes(E.tagName):!1;if(!k&&n&&typeof v=="number"&&(k=!n(E,v,S)),k&&S&&typeof v=="number")return f&&E.children?S.children.splice(v,1,...E.children):S.children.splice(v,1),v}}}function Zv(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||Gv.test(e.slice(0,t))?e:""}function Xu(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function Jv(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function eS(e,t,n){const o=hl((n||{}).ignore||[]),a=tS(t);let i=-1;for(;++i<a.length;)T0(e,"text",s);function s(u,d){let f=-1,h;for(;++f<d.length;){const p=d[f],m=h?h.children:void 0;if(o(p,m?m.indexOf(p):void 0,h))return;h=p}if(h)return l(u,d)}function l(u,d){const f=d[d.length-1],h=a[i][0],p=a[i][1];let m=0;const y=f.children.indexOf(u);let x=!1,E=[];h.lastIndex=0;let v=h.exec(u.value);for(;v;){const S=v.index,k={index:v.index,input:v.input,stack:[...d,u]};let C=p(...v,k);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?h.lastIndex=S+1:(m!==S&&E.push({type:"text",value:u.value.slice(m,S)}),Array.isArray(C)?E.push(...C):C&&E.push(C),m=S+v[0].length,x=!0),!h.global)break;v=h.exec(u.value)}return x?(m<u.value.length&&E.push({type:"text",value:u.value.slice(m)}),f.children.splice(y,1,...E)):E=[u],y+E.length}}function tS(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 o=n[r];t.push([nS(o[0]),rS(o[1])])}return t}function nS(e){return typeof e=="string"?new RegExp(Jv(e),"g"):e}function rS(e){return typeof e=="function"?e:function(){return e}}const su="phrasing",lu=["autolink","link","image","label"];function oS(){return{transforms:[dS],enter:{literalAutolink:iS,literalAutolinkEmail:uu,literalAutolinkHttp:uu,literalAutolinkWww:uu},exit:{literalAutolink:cS,literalAutolinkEmail:uS,literalAutolinkHttp:sS,literalAutolinkWww:lS}}}function aS(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:su,notInConstruct:lu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:su,notInConstruct:lu},{character:":",before:"[ps]",after:"\\/",inConstruct:su,notInConstruct:lu}]}}function iS(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function uu(e){this.config.enter.autolinkProtocol.call(this,e)}function sS(e){this.config.exit.autolinkProtocol.call(this,e)}function lS(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 uS(e){this.config.exit.autolinkEmail.call(this,e)}function cS(e){this.exit(e)}function dS(e){eS(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,fS],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,pS]],{ignore:["link","linkReference"]})}function fS(e,t,n,r,o){let a="";if(!S0(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!hS(n)))return!1;const i=mS(n+r);if(!i[0])return!1;const s={type:"link",title:null,url:a+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[s,{type:"text",value:i[1]}]:s}function pS(e,t,n,r){return!S0(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function hS(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 mS(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 o=Xu(e,"(");let a=Xu(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function S0(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||fo(n)||dl(n))&&(!t||n!==47)}k0.peek=SS;function gS(){this.buffer()}function bS(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function yS(){this.buffer()}function xS(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ES(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Vn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function CS(e){this.exit(e)}function TS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Vn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vS(e){this.exit(e)}function SS(){return"["}function k0(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const i=n.enter("footnoteReference"),s=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),s(),i(),a+=o.move("]"),a}function kS(){return{enter:{gfmFootnoteCallString:gS,gfmFootnoteCall:bS,gfmFootnoteDefinitionLabelString:yS,gfmFootnoteDefinition:xS},exit:{gfmFootnoteCallString:ES,gfmFootnoteCall:CS,gfmFootnoteDefinitionLabelString:TS,gfmFootnoteDefinition:vS}}}function DS(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:k0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,i){const s=a.createTracker(i);let l=s.move("[^");const u=a.enter("footnoteDefinition"),d=a.enter("label");return l+=s.move(a.safe(a.associationId(r),{before:l,after:"]"})),d(),l+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),l+=s.move((t?`
35
- `:" ")+a.indentLines(a.containerFlow(r,s.current()),t?D0:wS))),u(),l}}function wS(e,t,n){return t===0?e:D0(e,t,n)}function D0(e,t,n){return(n?"":" ")+e}const AS=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];w0.peek=OS;function IS(){return{canContainEols:["delete"],enter:{strikethrough:RS},exit:{strikethrough:MS}}}function PS(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:AS}],handlers:{delete:w0}}}function RS(e){this.enter({type:"delete",children:[]},e)}function MS(e){this.exit(e)}function w0(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let i=o.move("~~");return i+=n.containerPhrasing(e,{...o.current(),before:i,after:"~"}),i+=o.move("~~"),a(),i}function OS(){return"~"}function NS(e){return e.length}function LS(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||NS,a=[],i=[],s=[],l=[];let u=0,d=-1;for(;++d<e.length;){const b=[],y=[];let x=-1;for(e[d].length>u&&(u=e[d].length);++x<e[d].length;){const E=FS(e[d][x]);if(n.alignDelimiters!==!1){const v=o(E);y[x]=v,(l[x]===void 0||v>l[x])&&(l[x]=v)}b.push(E)}i[d]=b,s[d]=y}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<u;)a[f]=sp(r[f]);else{const b=sp(r);for(;++f<u;)a[f]=b}f=-1;const h=[],p=[];for(;++f<u;){const b=a[f];let y="",x="";b===99?(y=":",x=":"):b===108?y=":":b===114&&(x=":");let E=n.alignDelimiters===!1?1:Math.max(1,l[f]-y.length-x.length);const v=y+"-".repeat(E)+x;n.alignDelimiters!==!1&&(E=y.length+E+x.length,E>l[f]&&(l[f]=E),p[f]=E),h[f]=v}i.splice(1,0,h),s.splice(1,0,p),d=-1;const m=[];for(;++d<i.length;){const b=i[d],y=s[d];f=-1;const x=[];for(;++f<u;){const E=b[f]||"";let v="",S="";if(n.alignDelimiters!==!1){const k=l[f]-(y[f]||0),C=a[f];C===114?v=" ".repeat(k):C===99?k%2?(v=" ".repeat(k/2+.5),S=" ".repeat(k/2-.5)):(v=" ".repeat(k/2),S=v):S=" ".repeat(k)}n.delimiterStart!==!1&&!f&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&E==="")&&(n.delimiterStart!==!1||f)&&x.push(" "),n.alignDelimiters!==!1&&x.push(v),x.push(E),n.alignDelimiters!==!1&&x.push(S),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||f!==u-1)&&x.push("|")}m.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return m.join(`
36
- `)}function FS(e){return e==null?"":String(e)}function sp(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}const lp={}.hasOwnProperty;function gl(e,t){const n=t||{};function r(o,...a){let i=r.invalid;const s=r.handlers;if(o&&lp.call(o,e)){const l=String(o[e]);i=lp.call(s,l)?s[l]:r.unknown}if(i)return i.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function _S(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const i=n.indentLines(n.containerFlow(e,a.current()),BS);return o(),i}function BS(e,t,n){return">"+(n?"":" ")+e}function jS(e,t){return up(e,t.inConstruct,!0)&&!up(e,t.notInConstruct,!1)}function up(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 cp(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
37
- `&&jS(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
38
- `}function $S(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,i=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>i&&(i=a):a=1,o=r+t.length,r=n.indexOf(t,o);return i}function HS(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 US(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 zS(e,t,n,r){const o=US(n),a=e.value||"",i=o==="`"?"GraveAccent":"Tilde";if(HS(e,n)){const f=n.enter("codeIndented"),h=n.indentLines(a,VS);return f(),h}const s=n.createTracker(r),l=o.repeat(Math.max($S(a,o)+1,3)),u=n.enter("codeFenced");let d=s.move(l);if(e.lang){const f=n.enter(`codeFencedLang${i}`);d+=s.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${i}`);d+=s.move(" "),d+=s.move(n.safe(e.meta,{before:d,after:`
39
- `,encode:["`"],...s.current()})),f()}return d+=s.move(`
40
- `),a&&(d+=s.move(a+`
41
- `)),d+=s.move(l),u(),d}function VS(e,t,n){return(n?"":" ")+e}function Kc(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 WS(e,t,n,r){const o=Kc(n),a=o==='"'?"Quote":"Apostrophe",i=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":`
42
- `,...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),u+=l.move(" "+o),u+=l.move(n.safe(e.title,{before:u,after:o,...l.current()})),u+=l.move(o),s()),i(),u}function qS(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 fi(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Rs(e,t,n){const r=Qo(e),o=Qo(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}A0.peek=YS;function A0(e,t,n,r){const o=qS(n),a=n.enter("emphasis"),i=n.createTracker(r),s=i.move(o);let l=i.move(n.containerPhrasing(e,{after:o,before:s,...i.current()}));const u=l.charCodeAt(0),d=Rs(r.before.charCodeAt(r.before.length-1),u,o);d.inside&&(l=fi(u)+l.slice(1));const f=l.charCodeAt(l.length-1),h=Rs(r.after.charCodeAt(0),f,o);h.inside&&(l=l.slice(0,-1)+fi(f));const p=i.move(o);return a(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},s+l+p}function YS(e,t,n){return n.options.emphasis||"*"}function KS(e,t){let n=!1;return pn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ps}),!!((!e.depth||e.depth<3)&&$c(e)&&(t.options.setext||n))}function GS(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(KS(e,n)){const d=n.enter("headingSetext"),f=n.enter("phrasing"),h=n.containerPhrasing(e,{...a.current(),before:`
43
- `,after:`
44
- `});return f(),d(),h+`
45
- `+(o===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
46
- `))+1))}const i="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");a.move(i+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
47
- `,...a.current()});return/^[\t ]/.test(u)&&(u=fi(u.charCodeAt(0))+u.slice(1)),u=u?i+" "+u:i,n.options.closeAtx&&(u+=" "+i),l(),s(),u}I0.peek=QS;function I0(e){return e.value||""}function QS(){return"<"}P0.peek=XS;function P0(e,t,n,r){const o=Kc(n),a=o==='"'?"Quote":"Apostrophe",i=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),u+=l.move(" "+o),u+=l.move(n.safe(e.title,{before:u,after:o,...l.current()})),u+=l.move(o),s()),u+=l.move(")"),i(),u}function XS(){return"!"}R0.peek=ZS;function R0(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const u=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),i();const d=n.stack;n.stack=[],i=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=d,a(),o==="full"||!u||u!==f?l+=s.move(f+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function ZS(){return"!"}M0.peek=JS;function M0(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const i=n.unsafe[a],s=n.compilePattern(i);let l;if(i.atBreak)for(;l=s.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return o+r+o}function JS(){return"`"}function O0(e,t){const n=$c(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))}N0.peek=e3;function N0(e,t,n,r){const o=Kc(n),a=o==='"'?"Quote":"Apostrophe",i=n.createTracker(r);let s,l;if(O0(e,n)){const d=n.stack;n.stack=[],s=n.enter("autolink");let f=i.move("<");return f+=i.move(n.containerPhrasing(e,{before:f,after:">",...i.current()})),f+=i.move(">"),s(),n.stack=d,f}s=n.enter("link"),l=n.enter("label");let u=i.move("[");return u+=i.move(n.containerPhrasing(e,{before:u,after:"](",...i.current()})),u+=i.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=i.move("<"),u+=i.move(n.safe(e.url,{before:u,after:">",...i.current()})),u+=i.move(">")):(l=n.enter("destinationRaw"),u+=i.move(n.safe(e.url,{before:u,after:e.title?" ":")",...i.current()}))),l(),e.title&&(l=n.enter(`title${a}`),u+=i.move(" "+o),u+=i.move(n.safe(e.title,{before:u,after:o,...i.current()})),u+=i.move(o),l()),u+=i.move(")"),s(),u}function e3(e,t,n){return O0(e,n)?"<":"["}L0.peek=t3;function L0(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),i();const d=n.stack;n.stack=[],i=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=d,a(),o==="full"||!u||u!==f?l+=s.move(f+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function t3(){return"["}function Gc(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 n3(e){const t=Gc(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 r3(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 F0(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 o3(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let i=e.ordered?r3(n):Gc(n);const s=e.ordered?i==="."?")":".":n3(n);let l=t&&n.bulletLastUsed?i===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((i==="*"||i==="-")&&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&&(l=!0),F0(n)===i&&d){let f=-1;for(;++f<e.children.length;){const h=e.children[f];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(i=s),n.bulletCurrent=i;const u=n.containerFlow(e,r);return n.bulletLastUsed=i,n.bulletCurrent=a,o(),u}function a3(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 i3(e,t,n,r){const o=a3(n);let a=n.bulletCurrent||Gc(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let i=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(i=Math.ceil(i/4)*4);const s=n.createTracker(r);s.move(a+" ".repeat(i-a.length)),s.shift(i);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),d);return l(),u;function d(f,h,p){return h?(p?"":" ".repeat(i))+f:(p?a:a+" ".repeat(i-a.length))+f}}function s3(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),i=n.containerPhrasing(e,r);return a(),o(),i}const l3=hl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function u3(e,t,n,r){return(e.children.some(function(i){return l3(i)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function c3(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}_0.peek=d3;function _0(e,t,n,r){const o=c3(n),a=n.enter("strong"),i=n.createTracker(r),s=i.move(o+o);let l=i.move(n.containerPhrasing(e,{after:o,before:s,...i.current()}));const u=l.charCodeAt(0),d=Rs(r.before.charCodeAt(r.before.length-1),u,o);d.inside&&(l=fi(u)+l.slice(1));const f=l.charCodeAt(l.length-1),h=Rs(r.after.charCodeAt(0),f,o);h.inside&&(l=l.slice(0,-1)+fi(f));const p=i.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},s+l+p}function d3(e,t,n){return n.options.strong||"*"}function f3(e,t,n,r){return n.safe(e.value,r)}function p3(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 h3(e,t,n){const r=(F0(n)+(n.options.ruleSpaces?" ":"")).repeat(p3(n));return n.options.ruleSpaces?r.slice(0,-1):r}const B0={blockquote:_S,break:cp,code:zS,definition:WS,emphasis:A0,hardBreak:cp,heading:GS,html:I0,image:P0,imageReference:R0,inlineCode:M0,link:N0,linkReference:L0,list:o3,listItem:i3,paragraph:s3,root:u3,strong:_0,text:f3,thematicBreak:h3};function m3(){return{enter:{table:g3,tableData:dp,tableHeader:dp,tableRow:y3},exit:{codeText:x3,table:b3,tableData:cu,tableHeader:cu,tableRow:cu}}}function g3(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 b3(e){this.exit(e),this.data.inTable=void 0}function y3(e){this.enter({type:"tableRow",children:[]},e)}function cu(e){this.exit(e)}function dp(e){this.enter({type:"tableCell",children:[]},e)}function x3(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,E3));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function E3(e,t){return t==="|"?t:e}function C3(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
48
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:i,tableCell:l,tableRow:s}};function i(p,m,b,y){return u(d(p,b,y),p.align)}function s(p,m,b,y){const x=f(p,b,y),E=u([x]);return E.slice(0,E.indexOf(`
49
- `))}function l(p,m,b,y){const x=b.enter("tableCell"),E=b.enter("phrasing"),v=b.containerPhrasing(p,{...y,before:a,after:a});return E(),x(),v}function u(p,m){return LS(p,{align:m,alignDelimiters:r,padding:n,stringLength:o})}function d(p,m,b){const y=p.children;let x=-1;const E=[],v=m.enter("table");for(;++x<y.length;)E[x]=f(y[x],m,b);return v(),E}function f(p,m,b){const y=p.children;let x=-1;const E=[],v=m.enter("tableRow");for(;++x<y.length;)E[x]=l(y[x],p,m,b);return v(),E}function h(p,m,b){let y=B0.inlineCode(p,m,b);return b.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function T3(){return{exit:{taskListCheckValueChecked:fp,taskListCheckValueUnchecked:fp,paragraph:S3}}}function v3(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:k3}}}function fp(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function S3(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 o=t.children;let a=-1,i;for(;++a<o.length;){const s=o[a];if(s.type==="paragraph"){i=s;break}}i===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 k3(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",i="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(i);let l=B0.listItem(e,t,n,{...r,...s.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(d){return d+i}}function D3(){return[oS(),kS(),IS(),m3(),T3()]}function w3(e){return{extensions:[aS(),DS(e),PS(),C3(e),v3()]}}const A3={tokenize:N3,partial:!0},j0={tokenize:L3,partial:!0},$0={tokenize:F3,partial:!0},H0={tokenize:_3,partial:!0},I3={tokenize:B3,partial:!0},U0={name:"wwwAutolink",tokenize:M3,previous:V0},z0={name:"protocolAutolink",tokenize:O3,previous:W0},Ar={name:"emailAutolink",tokenize:R3,previous:q0},dr={};function P3(){return{text:dr}}let Qr=48;for(;Qr<123;)dr[Qr]=Ar,Qr++,Qr===58?Qr=65:Qr===91&&(Qr=97);dr[43]=Ar;dr[45]=Ar;dr[46]=Ar;dr[95]=Ar;dr[72]=[Ar,z0];dr[104]=[Ar,z0];dr[87]=[Ar,U0];dr[119]=[Ar,U0];function R3(e,t,n){const r=this;let o,a;return i;function i(f){return!Zu(f)||!q0.call(r,r.previous)||Qc(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Zu(f)?(e.consume(f),s):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(I3,d,u)(f):f===45||f===95||en(f)?(a=!0,e.consume(f),l):d(f)}function u(f){return e.consume(f),o=!0,l}function d(f){return a&&o&&on(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function M3(e,t,n){const r=this;return o;function o(i){return i!==87&&i!==119||!V0.call(r,r.previous)||Qc(r.events)?n(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(A3,e.attempt(j0,e.attempt($0,a),n),n)(i))}function a(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}function O3(e,t,n){const r=this;let o="",a=!1;return i;function i(f){return(f===72||f===104)&&W0.call(r,r.previous)&&!Qc(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(on(f)&&o.length<5)return o+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const h=o.toLowerCase();if(h==="http"||h==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),a?u:(a=!0,l)):n(f)}function u(f){return f===null||As(f)||yt(f)||fo(f)||dl(f)?n(f):e.attempt(j0,e.attempt($0,d),n)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function N3(e,t,n){let r=0;return o;function o(i){return(i===87||i===119)&&r<3?(r++,e.consume(i),o):i===46&&r===3?(e.consume(i),a):n(i)}function a(i){return i===null?n(i):t(i)}}function L3(e,t,n){let r,o,a;return i;function i(u){return u===46||u===95?e.check(H0,l,s)(u):u===null||yt(u)||fo(u)||u!==45&&dl(u)?l(u):(a=!0,e.consume(u),i)}function s(u){return u===95?r=!0:(o=r,r=void 0),e.consume(u),i}function l(u){return o||r||!a?n(u):t(u)}}function F3(e,t){let n=0,r=0;return o;function o(i){return i===40?(n++,e.consume(i),o):i===41&&r<n?a(i):i===33||i===34||i===38||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===93||i===95||i===126?e.check(H0,t,a)(i):i===null||yt(i)||fo(i)?t(i):(e.consume(i),o)}function a(i){return i===41&&r++,e.consume(i),o}}function _3(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),a):s===93?(e.consume(s),o):s===60||s===null||yt(s)||fo(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||yt(s)||fo(s)?t(s):r(s)}function a(s){return on(s)?i(s):n(s)}function i(s){return s===59?(e.consume(s),r):on(s)?(e.consume(s),i):n(s)}}function B3(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return en(a)?n(a):t(a)}}function V0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yt(e)}function W0(e){return!on(e)}function q0(e){return!(e===47||Zu(e))}function Zu(e){return e===43||e===45||e===46||e===95||en(e)}function Qc(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 j3={tokenize:Y3,partial:!0};function $3(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:V3,continuation:{tokenize:W3},exit:q3}},text:{91:{name:"gfmFootnoteCall",tokenize:z3},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:H3,resolveTo:U3}}}}function H3(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;o--;){const l=r.events[o][1];if(l.type==="labelImage"){i=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!i||!i._balanced)return n(l);const u=Vn(r.sliceSerialize({start:i.end,end:r.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function U3(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)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function z3(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,i;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(a>999||f===93&&!i||f===null||f===91||yt(f))return n(f);if(f===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return o.includes(Vn(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return yt(f)||(i=!0),a++,e.consume(f),f===92?d:u}function d(f){return f===91||f===92||f===93?(e.consume(f),a++,u):u(f)}}function V3(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,i=0,s;return l;function l(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(m)}function d(m){if(i>999||m===93&&!s||m===null||m===91||yt(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return a=Vn(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return yt(m)||(s=!0),i++,e.consume(m),m===92?f:d}function f(m){return m===91||m===92||m===93?(e.consume(m),i++,d):d(m)}function h(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),o.includes(a)||o.push(a),at(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function W3(e,t,n){return e.check(ki,t,e.attempt(j3,t,n))}function q3(e){e.exit("gfmFootnoteDefinition")}function Y3(e,t,n){const r=this;return at(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const i=r.events[r.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(a):n(a)}}function K3(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(i,s){let l=-1;for(;++l<i.length;)if(i[l][0]==="enter"&&i[l][1].type==="strikethroughSequenceTemporary"&&i[l][1]._close){let u=l;for(;u--;)if(i[u][0]==="exit"&&i[u][1].type==="strikethroughSequenceTemporary"&&i[u][1]._open&&i[l][1].end.offset-i[l][1].start.offset===i[u][1].end.offset-i[u][1].start.offset){i[l][1].type="strikethroughSequence",i[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},i[u][1].start),end:Object.assign({},i[l][1].end)},f={type:"strikethroughText",start:Object.assign({},i[u][1].end),end:Object.assign({},i[l][1].start)},h=[["enter",d,s],["enter",i[u][1],s],["exit",i[u][1],s],["enter",f,s]],p=s.parser.constructs.insideSpan.null;p&&vn(h,h.length,0,fl(p,i.slice(u+1,l),s)),vn(h,h.length,0,[["exit",f,s],["enter",i[l][1],s],["exit",i[l][1],s],["exit",d,s]]),vn(i,u-1,l-u+3,h),l=u+h.length-2;break}}for(l=-1;++l<i.length;)i[l][1].type==="strikethroughSequenceTemporary"&&(i[l][1].type="data");return i}function a(i,s,l){const u=this.previous,d=this.events;let f=0;return h;function h(m){return u===126&&d[d.length-1][1].type!=="characterEscape"?l(m):(i.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const b=Qo(u);if(m===126)return f>1?l(m):(i.consume(m),f++,p);if(f<2&&!n)return l(m);const y=i.exit("strikethroughSequenceTemporary"),x=Qo(m);return y._open=!x||x===2&&!!b,y._close=!b||b===2&&!!x,s(m)}}}class G3{constructor(){this.map=[]}add(t,n,r){Q3(this,t,n,r)}consume(t){if(this.map.sort(function(a,i){return a[0]-i[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 o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function Q3(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function X3(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Z3(){return{flow:{null:{name:"table",tokenize:J3,resolveAll:ek}}}}function J3(e,t,n){const r=this;let o=0,a=0,i;return s;function s(R){let _=r.events.length-1;for(;_>-1;){const A=r.events[_][1].type;if(A==="lineEnding"||A==="linePrefix")_--;else break}const T=_>-1?r.events[_][1].type:null,O=T==="tableHead"||T==="tableRow"?C:l;return O===C&&r.parser.lazy[r.now().line]?n(R):O(R)}function l(R){return e.enter("tableHead"),e.enter("tableRow"),u(R)}function u(R){return R===124||(i=!0,a+=1),d(R)}function d(R){return R===null?n(R):$e(R)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),p):n(R):nt(R)?at(e,d,"whitespace")(R):(a+=1,i&&(i=!1,o+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),i=!0,d):(e.enter("data"),f(R)))}function f(R){return R===null||R===124||yt(R)?(e.exit("data"),d(R)):(e.consume(R),R===92?h:f)}function h(R){return R===92||R===124?(e.consume(R),f):f(R)}function p(R){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(R):(e.enter("tableDelimiterRow"),i=!1,nt(R)?at(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):m(R))}function m(R){return R===45||R===58?y(R):R===124?(i=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),b):k(R)}function b(R){return nt(R)?at(e,y,"whitespace")(R):y(R)}function y(R){return R===58?(a+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),x):R===45?(a+=1,x(R)):R===null||$e(R)?S(R):k(R)}function x(R){return R===45?(e.enter("tableDelimiterFiller"),E(R)):k(R)}function E(R){return R===45?(e.consume(R),E):R===58?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(R))}function v(R){return nt(R)?at(e,S,"whitespace")(R):S(R)}function S(R){return R===124?m(R):R===null||$e(R)?!i||o!==a?k(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(R)):k(R)}function k(R){return n(R)}function C(R){return e.enter("tableRow"),L(R)}function L(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),L):R===null||$e(R)?(e.exit("tableRow"),t(R)):nt(R)?at(e,L,"whitespace")(R):(e.enter("data"),F(R))}function F(R){return R===null||R===124||yt(R)?(e.exit("data"),L(R)):(e.consume(R),R===92?B:F)}function B(R){return R===92||R===124?(e.consume(R),F):F(R)}}function ek(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],i=[0,0,0,0],s=!1,l=0,u,d,f;const h=new G3;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(s=!1,l!==0&&(pp(h,t,l,u,d),d=void 0,l=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],i=[0,n+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",d,t]])),o=m.type==="tableDelimiterRow"?2:d?3:1):o&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,i[2]===0&&(a[1]!==0&&(i[0]=i[1],f=Vi(h,t,a,o,void 0,f),a=[0,0,0,0]),i[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(i[0]=i[1],f=Vi(h,t,a,o,void 0,f)),a=i,i=[a[1],n,0,0])):m.type==="tableHead"?(s=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,a[1]!==0?(i[0]=i[1],f=Vi(h,t,a,o,n,f)):i[1]!==0&&(f=Vi(h,t,i,o,n,f)),o=0):o&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(i[3]=n)}for(l!==0&&pp(h,t,l,u,d),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=X3(t.events,n))}return e}function Vi(e,t,n,r,o,a){const i=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},Fo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const l=Fo(t.events,n[1]);if(a={type:i,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const u=Fo(t.events,n[2]),d=Fo(t.events,n[3]),f={type:s,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,b=n[3]-n[2]-1;e.add(m,b,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return o!==void 0&&(a.end=Object.assign({},Fo(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function pp(e,t,n,r,o){const a=[],i=Fo(t.events,n);o&&(o.end=Object.assign({},i),a.push(["exit",o,t])),r.end=Object.assign({},i),a.push(["exit",r,t]),e.add(n+1,0,a)}function Fo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const tk={name:"tasklistCheck",tokenize:rk};function nk(){return{text:{91:tk}}}function rk(e,t,n){const r=this;return o;function o(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),a)}function a(l){return yt(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),i):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),i):n(l)}function i(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return $e(l)?t(l):nt(l)?e.check({tokenize:ok},t,n)(l):n(l)}}function ok(e,t,n){return at(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function ak(e){return r0([P3(),$3(),K3(e),Z3(),nk()])}const ik={};function sk(e){const t=this,n=e||ik,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),i=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(ak(n)),a.push(D3()),i.push(w3(n))}const hp=/[#.]/g;function lk(e,t){const n=e||"",r={};let o=0,a,i;for(;o<n.length;){hp.lastIndex=o;const s=hp.exec(n),l=n.slice(o,s?s.index:n.length);l&&(a?a==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:i=l,o+=l.length),s&&(a=s[0],o++)}return{type:"element",tagName:i||t||"div",properties:r,children:[]}}function Y0(e,t,n){const r=n?fk(n):void 0;function o(a,i,...s){let l;if(a==null){l={type:"root",children:[]};const u=i;s.unshift(u)}else{l=lk(a,t);const u=l.tagName.toLowerCase(),d=r?r.get(u):void 0;if(l.tagName=d||u,uk(i))s.unshift(i);else for(const[f,h]of Object.entries(i))ck(e,l.properties,f,h)}for(const u of s)Ju(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return o}function uk(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 o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const a=o;for(const i of a)if(typeof i!="number"&&typeof i!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function ck(e,t,n,r){const o=Si(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?o.spaceSeparated?a=Vu(r):o.commaSeparated?a=Hu(r):o.commaOrSpaceSeparated?a=Vu(Hu(r).join(" ")):a=mp(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?dk(r):String(r);if(Array.isArray(a)){const i=[];for(const s of a)i.push(mp(o,o.property,s));a=i}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function Ju(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)Ju(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Ju(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function mp(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ci(n)===ci(t)))return!0}return n}function dk(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function fk(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const pk=["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"],hk=Y0(sa,"div"),mk=Y0(Vr,"g",pk);function gk(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let i=0;for(;;){let s=n[i];if(s===void 0){const l=gp(t,n[i-1]);s=l===-1?t.length+1:l+1,n[i]=s}if(s>a)return{line:i+1,column:a-(i>0?n[i-1]:0)+1,offset:a};i++}}}function o(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const s=n[n.length-1],l=gp(t,s),u=l===-1?t.length+1:l+1;if(s===u)break;n.push(u)}const i=(a.line>1?n[a.line-2]:0)+a.column-1;if(i<n[a.line-1])return i}}}function gp(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
50
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const oo={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/"},K0={}.hasOwnProperty,bk=Object.prototype;function yk(e,t){const n=t||{};return Xc({file:n.file||void 0,location:!1,schema:n.space==="svg"?Vr:sa,verbose:n.verbose||!1},e)}function Xc(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},as(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:G0(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),i=gk(a),s=i.toPoint(0),l=i.toPoint(a.length);n.position={start:s,end:l}}return n}case"#documentType":{const r=t;return n={type:"doctype"},as(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},as(e,r,n),n}default:return n=xk(e,t),n}}function G0(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=Xc(e,t[n]);r.push(o)}return r}function xk(e,t){const n=e.schema;e.schema=t.namespaceURI===oo.svg?Vr:sa;let r=-1;const o={};for(;++r<t.attrs.length;){const s=t.attrs[r],l=(s.prefix?s.prefix+":":"")+s.name;K0.call(bk,l)||(o[l]=s.value)}const i=(e.schema.space==="svg"?mk:hk)(t.tagName,o,G0(e,t.childNodes));if(as(e,t,i),i.tagName==="template"){const s=t,l=s.sourceCodeLocation,u=l&&l.startTag&&Bo(l.startTag),d=l&&l.endTag&&Bo(l.endTag),f=Xc(e,s.content);u&&d&&e.file&&(f.position={start:u.end,end:d.start}),i.content=f}return e.schema=n,i}function as(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Ek(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Ek(e,t,n){const r=Bo(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const a={};let i;if(n.attrs)for(i in n.attrs)K0.call(n.attrs,i)&&(a[Si(e.schema,i).property]=Bo(n.attrs[i]));n.startTag;const s=Bo(n.startTag),l=n.endTag?Bo(n.endTag):void 0,u={opening:s};l&&(u.closing=l),u.properties=a,t.data={position:u}}}return r}function Bo(e){const t=bp({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=bp({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function bp(e){return e.line&&e.column?e:void 0}class wi{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}wi.prototype.property={};wi.prototype.normal={};wi.prototype.space=null;function Q0(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new wi(n,r,t)}function ec(e){return e.toLowerCase()}class $n{constructor(t,n){this.property=t,this.attribute=n}}$n.prototype.space=null;$n.prototype.boolean=!1;$n.prototype.booleanish=!1;$n.prototype.overloadedBoolean=!1;$n.prototype.number=!1;$n.prototype.commaSeparated=!1;$n.prototype.spaceSeparated=!1;$n.prototype.commaOrSpaceSeparated=!1;$n.prototype.mustUseProperty=!1;$n.prototype.defined=!1;let Ck=0;const Ke=Eo(),Ht=Eo(),X0=Eo(),ke=Eo(),Tt=Eo(),Vo=Eo(),yn=Eo();function Eo(){return 2**++Ck}const tc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ke,booleanish:Ht,commaOrSpaceSeparated:yn,commaSeparated:Vo,number:ke,overloadedBoolean:X0,spaceSeparated:Tt},Symbol.toStringTag,{value:"Module"})),du=Object.keys(tc);class Zc extends $n{constructor(t,n,r,o){let a=-1;if(super(t,n),yp(this,"space",o),typeof r=="number")for(;++a<du.length;){const i=du[a];yp(this,du[a],(r&tc[i])===tc[i])}}}Zc.prototype.defined=!0;function yp(e,t,n){n&&(e[t]=n)}const Tk={}.hasOwnProperty;function ua(e){const t={},n={};let r;for(r in e.properties)if(Tk.call(e.properties,r)){const o=e.properties[r],a=new Zc(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ec(r)]=r,n[ec(a.attribute)]=r}return new wi(t,n,e.space)}const Z0=ua({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}}),J0=ua({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function eg(e,t){return t in e?e[t]:t}function tg(e,t){return eg(e,t.toLowerCase())}const ng=ua({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:tg,properties:{xmlns:null,xmlnsXLink:null}}),rg=ua({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ht,ariaAutoComplete:null,ariaBusy:Ht,ariaChecked:Ht,ariaColCount:ke,ariaColIndex:ke,ariaColSpan:ke,ariaControls:Tt,ariaCurrent:null,ariaDescribedBy:Tt,ariaDetails:null,ariaDisabled:Ht,ariaDropEffect:Tt,ariaErrorMessage:null,ariaExpanded:Ht,ariaFlowTo:Tt,ariaGrabbed:Ht,ariaHasPopup:null,ariaHidden:Ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Tt,ariaLevel:ke,ariaLive:null,ariaModal:Ht,ariaMultiLine:Ht,ariaMultiSelectable:Ht,ariaOrientation:null,ariaOwns:Tt,ariaPlaceholder:null,ariaPosInSet:ke,ariaPressed:Ht,ariaReadOnly:Ht,ariaRelevant:null,ariaRequired:Ht,ariaRoleDescription:Tt,ariaRowCount:ke,ariaRowIndex:ke,ariaRowSpan:ke,ariaSelected:Ht,ariaSetSize:ke,ariaSort:null,ariaValueMax:ke,ariaValueMin:ke,ariaValueNow:ke,ariaValueText:null,role:null}}),vk=ua({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:tg,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Vo,acceptCharset:Tt,accessKey:Tt,action:null,allow:null,allowFullScreen:Ke,allowPaymentRequest:Ke,allowUserMedia:Ke,alt:null,as:null,async:Ke,autoCapitalize:null,autoComplete:Tt,autoFocus:Ke,autoPlay:Ke,blocking:Tt,capture:null,charSet:null,checked:Ke,cite:null,className:Tt,cols:ke,colSpan:null,content:null,contentEditable:Ht,controls:Ke,controlsList:Tt,coords:ke|Vo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ke,defer:Ke,dir:null,dirName:null,disabled:Ke,download:X0,draggable:Ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ke,formTarget:null,headers:Tt,height:ke,hidden:Ke,high:ke,href:null,hrefLang:null,htmlFor:Tt,httpEquiv:Tt,id:null,imageSizes:null,imageSrcSet:null,inert:Ke,inputMode:null,integrity:null,is:null,isMap:Ke,itemId:null,itemProp:Tt,itemRef:Tt,itemScope:Ke,itemType:Tt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ke,low:ke,manifest:null,max:null,maxLength:ke,media:null,method:null,min:null,minLength:ke,multiple:Ke,muted:Ke,name:null,nonce:null,noModule:Ke,noValidate:Ke,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:Ke,optimum:ke,pattern:null,ping:Tt,placeholder:null,playsInline:Ke,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ke,referrerPolicy:null,rel:Tt,required:Ke,reversed:Ke,rows:ke,rowSpan:ke,sandbox:Tt,scope:null,scoped:Ke,seamless:Ke,selected:Ke,shadowRootClonable:Ke,shadowRootDelegatesFocus:Ke,shadowRootMode:null,shape:null,size:ke,sizes:null,slot:null,span:ke,spellCheck:Ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ke,step:null,style:null,tabIndex:ke,target:null,title:null,translate:null,type:null,typeMustMatch:Ke,useMap:null,value:Ht,width:ke,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Tt,axis:null,background:null,bgColor:null,border:ke,borderColor:null,bottomMargin:ke,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ke,declare:Ke,event:null,face:null,frame:null,frameBorder:null,hSpace:ke,leftMargin:ke,link:null,longDesc:null,lowSrc:null,marginHeight:ke,marginWidth:ke,noResize:Ke,noHref:Ke,noShade:Ke,noWrap:Ke,object:null,profile:null,prompt:null,rev:null,rightMargin:ke,rules:null,scheme:null,scrolling:Ht,standby:null,summary:null,text:null,topMargin:ke,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ke,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ke,disableRemotePlayback:Ke,prefix:null,property:null,results:ke,security:null,unselectable:null}}),Sk=ua({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:eg,properties:{about:yn,accentHeight:ke,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ke,amplitude:ke,arabicForm:null,ascent:ke,attributeName:null,attributeType:null,azimuth:ke,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ke,by:null,calcMode:null,capHeight:ke,className:Tt,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:ke,diffuseConstant:ke,direction:null,display:null,dur:null,divisor:ke,dominantBaseline:null,download:Ke,dx:null,dy:null,edgeMode:null,editable:null,elevation:ke,enableBackground:null,end:null,event:null,exponent:ke,externalResourcesRequired:null,fill:null,fillOpacity:ke,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:Vo,g2:Vo,glyphName:Vo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ke,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ke,horizOriginX:ke,horizOriginY:ke,id:null,ideographic:ke,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ke,k:ke,k1:ke,k2:ke,k3:ke,k4:ke,kernelMatrix:yn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ke,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:ke,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:ke,overlineThickness:ke,paintOrder:null,panose1:null,path:null,pathLength:ke,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Tt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ke,pointsAtY:ke,pointsAtZ:ke,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:yn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:yn,rev:yn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:yn,requiredFeatures:yn,requiredFonts:yn,requiredFormats:yn,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:ke,specularExponent:ke,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ke,strikethroughThickness:ke,string:null,stroke:null,strokeDashArray:yn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ke,strokeOpacity:ke,strokeWidth:null,style:null,surfaceScale:ke,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:yn,tabIndex:ke,tableValues:null,target:null,targetX:ke,targetY:ke,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:yn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ke,underlineThickness:ke,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ke,values:null,vAlphabetic:ke,vMathematical:ke,vectorEffect:null,vHanging:ke,vIdeographic:ke,version:null,vertAdvY:ke,vertOriginX:ke,vertOriginY:ke,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ke,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),kk=/^data[-\w.:]+$/i,xp=/-[a-z]/g,Dk=/[A-Z]/g;function wk(e,t){const n=ec(t);let r=t,o=$n;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&kk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(xp,Ik);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!xp.test(a)){let i=a.replace(Dk,Ak);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}o=Zc}return new o(r,t)}function Ak(e){return"-"+e.toLowerCase()}function Ik(e){return e.charAt(1).toUpperCase()}const Pk=Q0([J0,Z0,ng,rg,vk],"html"),og=Q0([J0,Z0,ng,rg,Sk],"svg"),Rk={},Mk={}.hasOwnProperty,ag=gl("type",{handlers:{root:Nk,element:jk,text:_k,comment:Bk,doctype:Fk}});function Ok(e,t){const r=(t||Rk).space;return ag(e,r==="svg"?og:Pk)}function Nk(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Jc(e.children,n,t),ca(e,n),n}function Lk(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Jc(e.children,n,t),ca(e,n),n}function Fk(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return ca(e,t),t}function _k(e){const t={nodeName:"#text",value:e.value,parentNode:null};return ca(e,t),t}function Bk(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return ca(e,t),t}function jk(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=og);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&Mk.call(e.properties,a)){const l=$k(r,a,e.properties[a]);l&&o.push(l)}}const i=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:oo[i],childNodes:[],parentNode:null};return s.childNodes=Jc(e.children,s,r),ca(e,s),e.tagName==="template"&&e.content&&(s.content=Lk(e.content,r)),s}function $k(e,t,n){const r=wk(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?ll(n):ul(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=oo[r.space]}return o}function Jc(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=ag(e[r],n);a.parentNode=t,o.push(a)}return o}function ca(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 ig=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Hk=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]),Pt="�";var j;(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"})(j||(j={}));const sn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function sg(e){return e>=55296&&e<=57343}function Uk(e){return e>=56320&&e<=57343}function zk(e,t){return(e-55296)*1024+9216+t}function lg(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ug(e){return e>=64976&&e<=65007||Hk.has(e)}var fe;(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"})(fe||(fe={}));const Vk=65536;class Wk{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:o,offset:a}=this,i=o+n,s=a+n;return{code:t,startLine:r,endLine:r,startCol:i,endCol:i,startOffset:s,endOffset:s}}_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(Uk(n))return this.pos++,this._addGap(),zk(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,j.EOF;return this._err(fe.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,j.EOF;const r=this.html.charCodeAt(n);return r===j.CARRIAGE_RETURN?j.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,j.EOF;let t=this.html.charCodeAt(this.pos);return t===j.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,j.LINE_FEED):t===j.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,sg(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===j.LINE_FEED||t===j.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){lg(t)?this._err(fe.controlCharacterInInputStream):ug(t)&&this._err(fe.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ze;(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"})(Ze||(Ze={}));function cg(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 qk=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))),Yk=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]]);function Kk(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Yk.get(e))!==null&&t!==void 0?t:e}var Qt;(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"})(Qt||(Qt={}));const Gk=32;var Ur;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ur||(Ur={}));function nc(e){return e>=Qt.ZERO&&e<=Qt.NINE}function Qk(e){return e>=Qt.UPPER_A&&e<=Qt.UPPER_F||e>=Qt.LOWER_A&&e<=Qt.LOWER_F}function Xk(e){return e>=Qt.UPPER_A&&e<=Qt.UPPER_Z||e>=Qt.LOWER_A&&e<=Qt.LOWER_Z||nc(e)}function Zk(e){return e===Qt.EQUALS||Xk(e)}var Kt;(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"})(Kt||(Kt={}));var yr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(yr||(yr={}));class Jk{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Kt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=yr.Strict}startEntity(t){this.decodeMode=t,this.state=Kt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Kt.EntityStart:return t.charCodeAt(n)===Qt.NUM?(this.state=Kt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Kt.NamedEntity,this.stateNamedEntity(t,n));case Kt.NumericStart:return this.stateNumericStart(t,n);case Kt.NumericDecimal:return this.stateNumericDecimal(t,n);case Kt.NumericHex:return this.stateNumericHex(t,n);case Kt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Gk)===Qt.LOWER_X?(this.state=Kt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Kt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(nc(o)||Qk(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(nc(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,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===Qt.SEMI)this.consumed+=1;else if(this.decodeMode===yr.Strict)return 0;return this.emitCodePoint(Kk(this.result),this.consumed),this.errors&&(t!==Qt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],a=(o&Ur.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const i=t.charCodeAt(n);if(this.treeIndex=e6(r,o,this.treeIndex+Math.max(1,a),i),this.treeIndex<0)return this.result===0||this.decodeMode===yr.Attribute&&(a===0||Zk(i))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Ur.VALUE_LENGTH)>>14,a!==0){if(i===Qt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==yr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&Ur.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Ur.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Kt.NamedEntity:return this.result!==0&&(this.decodeMode!==yr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Kt.NumericDecimal:return this.emitNumericEntity(0,2);case Kt.NumericHex:return this.emitNumericEntity(0,3);case Kt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Kt.EntityStart:return 0}}}function e6(e,t,n,r){const o=(t&Ur.BRANCH_LENGTH)>>7,a=t&Ur.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const l=r-a;return l<0||l>=o?-1:e[n+l]-1}let i=n,s=i+o-1;for(;i<=s;){const l=i+s>>>1,u=e[l];if(u<r)i=l+1;else if(u>r)s=l-1;else return e[l+o]}return-1}var Ee;(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/"})(Ee||(Ee={}));var lo;(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"})(lo||(lo={}));var On;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(On||(On={}));var re;(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"})(re||(re={}));var g;(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"})(g||(g={}));const t6=new Map([[re.A,g.A],[re.ADDRESS,g.ADDRESS],[re.ANNOTATION_XML,g.ANNOTATION_XML],[re.APPLET,g.APPLET],[re.AREA,g.AREA],[re.ARTICLE,g.ARTICLE],[re.ASIDE,g.ASIDE],[re.B,g.B],[re.BASE,g.BASE],[re.BASEFONT,g.BASEFONT],[re.BGSOUND,g.BGSOUND],[re.BIG,g.BIG],[re.BLOCKQUOTE,g.BLOCKQUOTE],[re.BODY,g.BODY],[re.BR,g.BR],[re.BUTTON,g.BUTTON],[re.CAPTION,g.CAPTION],[re.CENTER,g.CENTER],[re.CODE,g.CODE],[re.COL,g.COL],[re.COLGROUP,g.COLGROUP],[re.DD,g.DD],[re.DESC,g.DESC],[re.DETAILS,g.DETAILS],[re.DIALOG,g.DIALOG],[re.DIR,g.DIR],[re.DIV,g.DIV],[re.DL,g.DL],[re.DT,g.DT],[re.EM,g.EM],[re.EMBED,g.EMBED],[re.FIELDSET,g.FIELDSET],[re.FIGCAPTION,g.FIGCAPTION],[re.FIGURE,g.FIGURE],[re.FONT,g.FONT],[re.FOOTER,g.FOOTER],[re.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[re.FORM,g.FORM],[re.FRAME,g.FRAME],[re.FRAMESET,g.FRAMESET],[re.H1,g.H1],[re.H2,g.H2],[re.H3,g.H3],[re.H4,g.H4],[re.H5,g.H5],[re.H6,g.H6],[re.HEAD,g.HEAD],[re.HEADER,g.HEADER],[re.HGROUP,g.HGROUP],[re.HR,g.HR],[re.HTML,g.HTML],[re.I,g.I],[re.IMG,g.IMG],[re.IMAGE,g.IMAGE],[re.INPUT,g.INPUT],[re.IFRAME,g.IFRAME],[re.KEYGEN,g.KEYGEN],[re.LABEL,g.LABEL],[re.LI,g.LI],[re.LINK,g.LINK],[re.LISTING,g.LISTING],[re.MAIN,g.MAIN],[re.MALIGNMARK,g.MALIGNMARK],[re.MARQUEE,g.MARQUEE],[re.MATH,g.MATH],[re.MENU,g.MENU],[re.META,g.META],[re.MGLYPH,g.MGLYPH],[re.MI,g.MI],[re.MO,g.MO],[re.MN,g.MN],[re.MS,g.MS],[re.MTEXT,g.MTEXT],[re.NAV,g.NAV],[re.NOBR,g.NOBR],[re.NOFRAMES,g.NOFRAMES],[re.NOEMBED,g.NOEMBED],[re.NOSCRIPT,g.NOSCRIPT],[re.OBJECT,g.OBJECT],[re.OL,g.OL],[re.OPTGROUP,g.OPTGROUP],[re.OPTION,g.OPTION],[re.P,g.P],[re.PARAM,g.PARAM],[re.PLAINTEXT,g.PLAINTEXT],[re.PRE,g.PRE],[re.RB,g.RB],[re.RP,g.RP],[re.RT,g.RT],[re.RTC,g.RTC],[re.RUBY,g.RUBY],[re.S,g.S],[re.SCRIPT,g.SCRIPT],[re.SEARCH,g.SEARCH],[re.SECTION,g.SECTION],[re.SELECT,g.SELECT],[re.SOURCE,g.SOURCE],[re.SMALL,g.SMALL],[re.SPAN,g.SPAN],[re.STRIKE,g.STRIKE],[re.STRONG,g.STRONG],[re.STYLE,g.STYLE],[re.SUB,g.SUB],[re.SUMMARY,g.SUMMARY],[re.SUP,g.SUP],[re.TABLE,g.TABLE],[re.TBODY,g.TBODY],[re.TEMPLATE,g.TEMPLATE],[re.TEXTAREA,g.TEXTAREA],[re.TFOOT,g.TFOOT],[re.TD,g.TD],[re.TH,g.TH],[re.THEAD,g.THEAD],[re.TITLE,g.TITLE],[re.TR,g.TR],[re.TRACK,g.TRACK],[re.TT,g.TT],[re.U,g.U],[re.UL,g.UL],[re.SVG,g.SVG],[re.VAR,g.VAR],[re.WBR,g.WBR],[re.XMP,g.XMP]]);function da(e){var t;return(t=t6.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const Te=g,n6={[Ee.HTML]:new Set([Te.ADDRESS,Te.APPLET,Te.AREA,Te.ARTICLE,Te.ASIDE,Te.BASE,Te.BASEFONT,Te.BGSOUND,Te.BLOCKQUOTE,Te.BODY,Te.BR,Te.BUTTON,Te.CAPTION,Te.CENTER,Te.COL,Te.COLGROUP,Te.DD,Te.DETAILS,Te.DIR,Te.DIV,Te.DL,Te.DT,Te.EMBED,Te.FIELDSET,Te.FIGCAPTION,Te.FIGURE,Te.FOOTER,Te.FORM,Te.FRAME,Te.FRAMESET,Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6,Te.HEAD,Te.HEADER,Te.HGROUP,Te.HR,Te.HTML,Te.IFRAME,Te.IMG,Te.INPUT,Te.LI,Te.LINK,Te.LISTING,Te.MAIN,Te.MARQUEE,Te.MENU,Te.META,Te.NAV,Te.NOEMBED,Te.NOFRAMES,Te.NOSCRIPT,Te.OBJECT,Te.OL,Te.P,Te.PARAM,Te.PLAINTEXT,Te.PRE,Te.SCRIPT,Te.SECTION,Te.SELECT,Te.SOURCE,Te.STYLE,Te.SUMMARY,Te.TABLE,Te.TBODY,Te.TD,Te.TEMPLATE,Te.TEXTAREA,Te.TFOOT,Te.TH,Te.THEAD,Te.TITLE,Te.TR,Te.TRACK,Te.UL,Te.WBR,Te.XMP]),[Ee.MATHML]:new Set([Te.MI,Te.MO,Te.MN,Te.MS,Te.MTEXT,Te.ANNOTATION_XML]),[Ee.SVG]:new Set([Te.TITLE,Te.FOREIGN_OBJECT,Te.DESC]),[Ee.XLINK]:new Set,[Ee.XML]:new Set,[Ee.XMLNS]:new Set},rc=new Set([Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6]);re.STYLE,re.SCRIPT,re.XMP,re.IFRAME,re.NOEMBED,re.NOFRAMES,re.PLAINTEXT;var $;(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"})($||($={}));const Bt={DATA:$.DATA,RCDATA:$.RCDATA,RAWTEXT:$.RAWTEXT,SCRIPT_DATA:$.SCRIPT_DATA,PLAINTEXT:$.PLAINTEXT,CDATA_SECTION:$.CDATA_SECTION};function r6(e){return e>=j.DIGIT_0&&e<=j.DIGIT_9}function za(e){return e>=j.LATIN_CAPITAL_A&&e<=j.LATIN_CAPITAL_Z}function o6(e){return e>=j.LATIN_SMALL_A&&e<=j.LATIN_SMALL_Z}function Br(e){return o6(e)||za(e)}function Ep(e){return Br(e)||r6(e)}function Wi(e){return e+32}function dg(e){return e===j.SPACE||e===j.LINE_FEED||e===j.TABULATION||e===j.FORM_FEED}function Cp(e){return dg(e)||e===j.SOLIDUS||e===j.GREATER_THAN_SIGN}function a6(e){return e===j.NULL?fe.nullCharacterReference:e>1114111?fe.characterReferenceOutsideUnicodeRange:sg(e)?fe.surrogateCharacterReference:ug(e)?fe.noncharacterCharacterReference:lg(e)||e===j.CARRIAGE_RETURN?fe.controlCharacterReference:null}class i6{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=$.DATA,this.returnState=$.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Wk(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Jk(qk,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(fe.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(fe.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=a6(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.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:Ze.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ze.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ze.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ze.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(cg(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(fe.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=da(t.tagName),t.type===Ze.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(fe.endTagWithAttributes),t.selfClosing&&this._err(fe.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 Ze.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ze.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ze.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:Ze.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=dg(t)?Ze.WHITESPACE_CHARACTER:t===j.NULL?Ze.NULL_CHARACTER:Ze.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ze.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=$.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?yr.Attribute:yr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===$.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===$.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===$.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case $.DATA:{this._stateData(t);break}case $.RCDATA:{this._stateRcdata(t);break}case $.RAWTEXT:{this._stateRawtext(t);break}case $.SCRIPT_DATA:{this._stateScriptData(t);break}case $.PLAINTEXT:{this._statePlaintext(t);break}case $.TAG_OPEN:{this._stateTagOpen(t);break}case $.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case $.TAG_NAME:{this._stateTagName(t);break}case $.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case $.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case $.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case $.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case $.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case $.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case $.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case $.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case $.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case $.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case $.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case $.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case $.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case $.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case $.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case $.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case $.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case $.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case $.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case $.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case $.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case $.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case $.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case $.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case $.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case $.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case $.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case $.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case $.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case $.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case $.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case $.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case $.BOGUS_COMMENT:{this._stateBogusComment(t);break}case $.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case $.COMMENT_START:{this._stateCommentStart(t);break}case $.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case $.COMMENT:{this._stateComment(t);break}case $.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case $.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case $.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case $.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case $.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case $.COMMENT_END:{this._stateCommentEnd(t);break}case $.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case $.DOCTYPE:{this._stateDoctype(t);break}case $.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case $.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case $.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case $.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case $.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case $.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case $.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case $.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case $.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case $.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case $.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case $.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case $.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case $.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case $.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case $.CDATA_SECTION:{this._stateCdataSection(t);break}case $.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case $.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case $.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case $.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case j.LESS_THAN_SIGN:{this.state=$.TAG_OPEN;break}case j.AMPERSAND:{this._startCharacterReference();break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this._emitCodePoint(t);break}case j.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case j.AMPERSAND:{this._startCharacterReference();break}case j.LESS_THAN_SIGN:{this.state=$.RCDATA_LESS_THAN_SIGN;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this._emitChars(Pt);break}case j.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case j.LESS_THAN_SIGN:{this.state=$.RAWTEXT_LESS_THAN_SIGN;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this._emitChars(Pt);break}case j.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case j.LESS_THAN_SIGN:{this.state=$.SCRIPT_DATA_LESS_THAN_SIGN;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this._emitChars(Pt);break}case j.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case j.NULL:{this._err(fe.unexpectedNullCharacter),this._emitChars(Pt);break}case j.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Br(t))this._createStartTagToken(),this.state=$.TAG_NAME,this._stateTagName(t);else switch(t){case j.EXCLAMATION_MARK:{this.state=$.MARKUP_DECLARATION_OPEN;break}case j.SOLIDUS:{this.state=$.END_TAG_OPEN;break}case j.QUESTION_MARK:{this._err(fe.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=$.BOGUS_COMMENT,this._stateBogusComment(t);break}case j.EOF:{this._err(fe.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(fe.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=$.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Br(t))this._createEndTagToken(),this.state=$.TAG_NAME,this._stateTagName(t);else switch(t){case j.GREATER_THAN_SIGN:{this._err(fe.missingEndTagName),this.state=$.DATA;break}case j.EOF:{this._err(fe.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(fe.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=$.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:{this.state=$.BEFORE_ATTRIBUTE_NAME;break}case j.SOLIDUS:{this.state=$.SELF_CLOSING_START_TAG;break}case j.GREATER_THAN_SIGN:{this.state=$.DATA,this.emitCurrentTagToken();break}case j.NULL:{this._err(fe.unexpectedNullCharacter),n.tagName+=Pt;break}case j.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(za(t)?Wi(t):t)}}_stateRcdataLessThanSign(t){t===j.SOLIDUS?this.state=$.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=$.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Br(t)?(this.state=$.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=$.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 j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=$.BEFORE_ATTRIBUTE_NAME,!1;case j.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=$.SELF_CLOSING_START_TAG,!1;case j.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=$.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=$.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===j.SOLIDUS?this.state=$.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=$.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Br(t)?(this.state=$.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=$.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=$.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case j.SOLIDUS:{this.state=$.SCRIPT_DATA_END_TAG_OPEN;break}case j.EXCLAMATION_MARK:{this.state=$.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=$.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Br(t)?(this.state=$.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=$.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=$.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===j.HYPHEN_MINUS?(this.state=$.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=$.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===j.HYPHEN_MINUS?(this.state=$.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=$.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case j.HYPHEN_MINUS:{this.state=$.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case j.LESS_THAN_SIGN:{this.state=$.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this._emitChars(Pt);break}case j.EOF:{this._err(fe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case j.HYPHEN_MINUS:{this.state=$.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case j.LESS_THAN_SIGN:{this.state=$.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this.state=$.SCRIPT_DATA_ESCAPED,this._emitChars(Pt);break}case j.EOF:{this._err(fe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=$.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case j.HYPHEN_MINUS:{this._emitChars("-");break}case j.LESS_THAN_SIGN:{this.state=$.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case j.GREATER_THAN_SIGN:{this.state=$.SCRIPT_DATA,this._emitChars(">");break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this.state=$.SCRIPT_DATA_ESCAPED,this._emitChars(Pt);break}case j.EOF:{this._err(fe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=$.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===j.SOLIDUS?this.state=$.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Br(t)?(this._emitChars("<"),this.state=$.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=$.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Br(t)?(this.state=$.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=$.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=$.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(sn.SCRIPT,!1)&&Cp(this.preprocessor.peek(sn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<sn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=$.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case j.HYPHEN_MINUS:{this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case j.LESS_THAN_SIGN:{this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this._emitChars(Pt);break}case j.EOF:{this._err(fe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case j.HYPHEN_MINUS:{this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case j.LESS_THAN_SIGN:{this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pt);break}case j.EOF:{this._err(fe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case j.HYPHEN_MINUS:{this._emitChars("-");break}case j.LESS_THAN_SIGN:{this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case j.GREATER_THAN_SIGN:{this.state=$.SCRIPT_DATA,this._emitChars(">");break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pt);break}case j.EOF:{this._err(fe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===j.SOLIDUS?(this.state=$.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(sn.SCRIPT,!1)&&Cp(this.preprocessor.peek(sn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<sn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=$.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:break;case j.SOLIDUS:case j.GREATER_THAN_SIGN:case j.EOF:{this.state=$.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case j.EQUALS_SIGN:{this._err(fe.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=$.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=$.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:case j.SOLIDUS:case j.GREATER_THAN_SIGN:case j.EOF:{this._leaveAttrName(),this.state=$.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case j.EQUALS_SIGN:{this._leaveAttrName(),this.state=$.BEFORE_ATTRIBUTE_VALUE;break}case j.QUOTATION_MARK:case j.APOSTROPHE:case j.LESS_THAN_SIGN:{this._err(fe.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this.currentAttr.name+=Pt;break}default:this.currentAttr.name+=String.fromCodePoint(za(t)?Wi(t):t)}}_stateAfterAttributeName(t){switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:break;case j.SOLIDUS:{this.state=$.SELF_CLOSING_START_TAG;break}case j.EQUALS_SIGN:{this.state=$.BEFORE_ATTRIBUTE_VALUE;break}case j.GREATER_THAN_SIGN:{this.state=$.DATA,this.emitCurrentTagToken();break}case j.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=$.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:break;case j.QUOTATION_MARK:{this.state=$.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case j.APOSTROPHE:{this.state=$.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case j.GREATER_THAN_SIGN:{this._err(fe.missingAttributeValue),this.state=$.DATA,this.emitCurrentTagToken();break}default:this.state=$.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case j.QUOTATION_MARK:{this.state=$.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case j.AMPERSAND:{this._startCharacterReference();break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case j.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case j.APOSTROPHE:{this.state=$.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case j.AMPERSAND:{this._startCharacterReference();break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case j.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:{this._leaveAttrValue(),this.state=$.BEFORE_ATTRIBUTE_NAME;break}case j.AMPERSAND:{this._startCharacterReference();break}case j.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=$.DATA,this.emitCurrentTagToken();break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case j.QUOTATION_MARK:case j.APOSTROPHE:case j.LESS_THAN_SIGN:case j.EQUALS_SIGN:case j.GRAVE_ACCENT:{this._err(fe.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case j.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:{this._leaveAttrValue(),this.state=$.BEFORE_ATTRIBUTE_NAME;break}case j.SOLIDUS:{this._leaveAttrValue(),this.state=$.SELF_CLOSING_START_TAG;break}case j.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=$.DATA,this.emitCurrentTagToken();break}case j.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:this._err(fe.missingWhitespaceBetweenAttributes),this.state=$.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case j.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=$.DATA,this.emitCurrentTagToken();break}case j.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:this._err(fe.unexpectedSolidusInTag),this.state=$.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case j.GREATER_THAN_SIGN:{this.state=$.DATA,this.emitCurrentComment(n);break}case j.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case j.NULL:{this._err(fe.unexpectedNullCharacter),n.data+=Pt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(sn.DASH_DASH,!0)?(this._createCommentToken(sn.DASH_DASH.length+1),this.state=$.COMMENT_START):this._consumeSequenceIfMatch(sn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(sn.DOCTYPE.length+1),this.state=$.DOCTYPE):this._consumeSequenceIfMatch(sn.CDATA_START,!0)?this.inForeignNode?this.state=$.CDATA_SECTION:(this._err(fe.cdataInHtmlContent),this._createCommentToken(sn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=$.BOGUS_COMMENT):this._ensureHibernation()||(this._err(fe.incorrectlyOpenedComment),this._createCommentToken(2),this.state=$.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case j.HYPHEN_MINUS:{this.state=$.COMMENT_START_DASH;break}case j.GREATER_THAN_SIGN:{this._err(fe.abruptClosingOfEmptyComment),this.state=$.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=$.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case j.HYPHEN_MINUS:{this.state=$.COMMENT_END;break}case j.GREATER_THAN_SIGN:{this._err(fe.abruptClosingOfEmptyComment),this.state=$.DATA,this.emitCurrentComment(n);break}case j.EOF:{this._err(fe.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=$.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case j.HYPHEN_MINUS:{this.state=$.COMMENT_END_DASH;break}case j.LESS_THAN_SIGN:{n.data+="<",this.state=$.COMMENT_LESS_THAN_SIGN;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),n.data+=Pt;break}case j.EOF:{this._err(fe.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case j.EXCLAMATION_MARK:{n.data+="!",this.state=$.COMMENT_LESS_THAN_SIGN_BANG;break}case j.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=$.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===j.HYPHEN_MINUS?this.state=$.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=$.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===j.HYPHEN_MINUS?this.state=$.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=$.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==j.GREATER_THAN_SIGN&&t!==j.EOF&&this._err(fe.nestedComment),this.state=$.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case j.HYPHEN_MINUS:{this.state=$.COMMENT_END;break}case j.EOF:{this._err(fe.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=$.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case j.GREATER_THAN_SIGN:{this.state=$.DATA,this.emitCurrentComment(n);break}case j.EXCLAMATION_MARK:{this.state=$.COMMENT_END_BANG;break}case j.HYPHEN_MINUS:{n.data+="-";break}case j.EOF:{this._err(fe.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=$.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case j.HYPHEN_MINUS:{n.data+="--!",this.state=$.COMMENT_END_DASH;break}case j.GREATER_THAN_SIGN:{this._err(fe.incorrectlyClosedComment),this.state=$.DATA,this.emitCurrentComment(n);break}case j.EOF:{this._err(fe.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=$.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:{this.state=$.BEFORE_DOCTYPE_NAME;break}case j.GREATER_THAN_SIGN:{this.state=$.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case j.EOF:{this._err(fe.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingWhitespaceBeforeDoctypeName),this.state=$.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(za(t))this._createDoctypeToken(String.fromCharCode(Wi(t))),this.state=$.DOCTYPE_NAME;else switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:break;case j.NULL:{this._err(fe.unexpectedNullCharacter),this._createDoctypeToken(Pt),this.state=$.DOCTYPE_NAME;break}case j.GREATER_THAN_SIGN:{this._err(fe.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=$.DATA;break}case j.EOF:{this._err(fe.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=$.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:{this.state=$.AFTER_DOCTYPE_NAME;break}case j.GREATER_THAN_SIGN:{this.state=$.DATA,this.emitCurrentDoctype(n);break}case j.NULL:{this._err(fe.unexpectedNullCharacter),n.name+=Pt;break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(za(t)?Wi(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:break;case j.GREATER_THAN_SIGN:{this.state=$.DATA,this.emitCurrentDoctype(n);break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(sn.PUBLIC,!1)?this.state=$.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(sn.SYSTEM,!1)?this.state=$.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(fe.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=$.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:{this.state=$.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case j.QUOTATION_MARK:{this._err(fe.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=$.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case j.APOSTROPHE:{this._err(fe.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=$.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case j.GREATER_THAN_SIGN:{this._err(fe.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=$.DATA,this.emitCurrentDoctype(n);break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=$.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:break;case j.QUOTATION_MARK:{n.publicId="",this.state=$.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case j.APOSTROPHE:{n.publicId="",this.state=$.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case j.GREATER_THAN_SIGN:{this._err(fe.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=$.DATA,this.emitCurrentDoctype(n);break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=$.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case j.QUOTATION_MARK:{this.state=$.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),n.publicId+=Pt;break}case j.GREATER_THAN_SIGN:{this._err(fe.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=$.DATA;break}case j.EOF:{this._err(fe.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 j.APOSTROPHE:{this.state=$.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),n.publicId+=Pt;break}case j.GREATER_THAN_SIGN:{this._err(fe.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=$.DATA;break}case j.EOF:{this._err(fe.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 j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:{this.state=$.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case j.GREATER_THAN_SIGN:{this.state=$.DATA,this.emitCurrentDoctype(n);break}case j.QUOTATION_MARK:{this._err(fe.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=$.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case j.APOSTROPHE:{this._err(fe.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=$.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=$.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:break;case j.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=$.DATA;break}case j.QUOTATION_MARK:{n.systemId="",this.state=$.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case j.APOSTROPHE:{n.systemId="",this.state=$.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=$.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:{this.state=$.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case j.QUOTATION_MARK:{this._err(fe.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=$.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case j.APOSTROPHE:{this._err(fe.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=$.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case j.GREATER_THAN_SIGN:{this._err(fe.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=$.DATA,this.emitCurrentDoctype(n);break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=$.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:break;case j.QUOTATION_MARK:{n.systemId="",this.state=$.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case j.APOSTROPHE:{n.systemId="",this.state=$.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case j.GREATER_THAN_SIGN:{this._err(fe.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=$.DATA,this.emitCurrentDoctype(n);break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=$.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case j.QUOTATION_MARK:{this.state=$.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),n.systemId+=Pt;break}case j.GREATER_THAN_SIGN:{this._err(fe.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=$.DATA;break}case j.EOF:{this._err(fe.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 j.APOSTROPHE:{this.state=$.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),n.systemId+=Pt;break}case j.GREATER_THAN_SIGN:{this._err(fe.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=$.DATA;break}case j.EOF:{this._err(fe.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 j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:break;case j.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=$.DATA;break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=$.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case j.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=$.DATA;break}case j.NULL:{this._err(fe.unexpectedNullCharacter);break}case j.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case j.RIGHT_SQUARE_BRACKET:{this.state=$.CDATA_SECTION_BRACKET;break}case j.EOF:{this._err(fe.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===j.RIGHT_SQUARE_BRACKET?this.state=$.CDATA_SECTION_END:(this._emitChars("]"),this.state=$.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case j.GREATER_THAN_SIGN:{this.state=$.DATA;break}case j.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=$.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(j.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ep(this.preprocessor.peek(1))?$.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ep(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===j.SEMICOLON&&this._err(fe.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const fg=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Tp=new Set([...fg,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Ms=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),s6=new Set([...Ms,g.OL,g.UL]),l6=new Set([...Ms,g.BUTTON]),vp=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Sp=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),u6=new Set([g.TR,g.TEMPLATE,g.HTML]),c6=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),d6=new Set([g.TABLE,g.TEMPLATE,g.HTML]),f6=new Set([g.TD,g.TH]);class p6{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=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Ee.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 o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===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])!==Ee.HTML);this.shortenToLength(Math.max(n,0))}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(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(rc,Ee.HTML)}popUntilTableCellPopped(){this.popUntilPopped(f6,Ee.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(d6,Ee.HTML)}clearBackToTableBodyContext(){this.clearBackTo(c6,Ee.HTML)}clearBackToTableRowContext(){this.clearBackTo(u6,Ee.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]===g.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]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case Ee.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case Ee.SVG:{if(Sp.has(o))return!1;break}case Ee.MATHML:{if(vp.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ms)}hasInListItemScope(t){return this.hasInDynamicScope(t,s6)}hasInButtonScope(t){return this.hasInDynamicScope(t,l6)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case Ee.HTML:{if(rc.has(n))return!0;if(Ms.has(n))return!1;break}case Ee.SVG:{if(Sp.has(n))return!1;break}case Ee.MATHML:{if(vp.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===Ee.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===Ee.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===Ee.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&fg.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Tp.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Tp.has(this.currentTagId);)this.pop()}}const fu=3;var rr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(rr||(rr={}));const kp={type:rr.Marker};class h6{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),i=this.treeAdapter.getNamespaceURI(t);for(let s=0;s<this.entries.length;s++){const l=this.entries[s];if(l.type===rr.Marker)break;const{element:u}=l;if(this.treeAdapter.getTagName(u)===a&&this.treeAdapter.getNamespaceURI(u)===i){const d=this.treeAdapter.getAttrList(u);d.length===o&&r.push({idx:s,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<fu)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<fu)return;const o=new Map(n.map(i=>[i.name,i.value]));let a=0;for(let i=0;i<r.length;i++){const s=r[i];s.attrs.every(l=>o.get(l.name)===l.value)&&(a+=1,a>=fu&&this.entries.splice(s.idx,1))}}insertMarker(){this.entries.unshift(kp)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:rr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:rr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(kp);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===rr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===rr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===rr.Element&&n.element===t)}}const jr={createDocument(){return{nodeName:"#document",mode:On.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 o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};jr.appendChild(e,a)}},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(jr.isTextNode(n)){n.value+=t;return}}jr.appendChild(e,jr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&jr.isTextNode(r)?r.value+=t:jr.insertBefore(e,jr.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}}},pg="html",m6="about:legacy-compat",g6="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",hg=["+//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//"],b6=[...hg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],y6=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),mg=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],x6=[...mg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Dp(e,t){return t.some(n=>e.startsWith(n))}function E6(e){return e.name===pg&&e.publicId===null&&(e.systemId===null||e.systemId===m6)}function C6(e){if(e.name!==pg)return On.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===g6)return On.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),y6.has(n))return On.QUIRKS;let r=t===null?b6:hg;if(Dp(n,r))return On.QUIRKS;if(r=t===null?mg:x6,Dp(n,r))return On.LIMITED_QUIRKS}return On.NO_QUIRKS}const wp={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},T6="definitionurl",v6="definitionURL",S6=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])),k6=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:Ee.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:Ee.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:Ee.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:Ee.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:Ee.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:Ee.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:Ee.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:Ee.XML}],["xml:space",{prefix:"xml",name:"space",namespace:Ee.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:Ee.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:Ee.XMLNS}]]),D6=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])),w6=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function A6(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===lo.COLOR||r===lo.SIZE||r===lo.FACE)||w6.has(t)}function gg(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===T6){e.attrs[t].name=v6;break}}function bg(e){for(let t=0;t<e.attrs.length;t++){const n=S6.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function ed(e){for(let t=0;t<e.attrs.length;t++){const n=k6.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 I6(e){const t=D6.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=da(e.tagName))}function P6(e,t){return t===Ee.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function R6(e,t,n){if(t===Ee.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===lo.ENCODING){const o=n[r].value.toLowerCase();return o===wp.TEXT_HTML||o===wp.APPLICATION_XML}}return t===Ee.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function M6(e,t,n,r){return(!r||r===Ee.HTML)&&R6(e,t,n)||(!r||r===Ee.MATHML)&&P6(e,t)}const O6="hidden",N6=8,L6=3;var W;(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"})(W||(W={}));const F6={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},yg=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Ap={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:jr,onParseError:null};class Ip{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=W.INITIAL,this.originalInsertionMode=W.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={...Ap,...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 i6(this.options,this),this.activeFormattingElements=new h6(this.treeAdapter),this.fragmentContextID=r?da(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new p6(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={...Ap,...n};t??(t=r.treeAdapter.createElement(re.TEMPLATE,Ee.HTML,[]));const o=r.treeAdapter.createElement("documentmock",Ee.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(W.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:F6,i={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(i)}onItemPush(t,n,r){var o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let a,i;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,i=this.fragmentContextID):{current:a,currentTagId:i}=this.openElements,this._setContextModes(a,i)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===Ee.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,Ee.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=W.TEXT}switchToPlaintextParsing(){this.insertionMode=W.TEXT,this.originalInsertionMode=W.IN_BODY,this.tokenizer.state=Bt.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)===re.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==Ee.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Bt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Bt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Bt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Bt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const i=this.treeAdapter.getChildNodes(this.document).find(s=>this.treeAdapter.isDocumentTypeNode(s));i&&this.treeAdapter.setNodeSourceCodeLocation(i,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??this.document,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,Ee.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,Ee.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(re.HTML,Ee.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.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 o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,i=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){const{endLine:l,endCol:u,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:l,endCol:u,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,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,o=this.treeAdapter.getTagName(t),a=n.type===Ze.END_TAG&&o===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,a)}}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===g.SVG&&this.treeAdapter.getTagName(n)===re.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===Ee.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,Ee.HTML)}_processToken(t){switch(t.type){case Ze.CHARACTER:{this.onCharacter(t);break}case Ze.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ze.COMMENT:{this.onComment(t);break}case Ze.DOCTYPE:{this.onDoctype(t);break}case Ze.START_TAG:{this._processStartTag(t);break}case Ze.END_TAG:{this.onEndTag(t);break}case Ze.EOF:{this.onEof(t);break}case Ze.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return M6(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===rr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=W.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=W.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=W.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=W.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=W.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=W.IN_TABLE;return}case g.BODY:{this.insertionMode=W.IN_BODY;return}case g.FRAMESET:{this.insertionMode=W.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?W.AFTER_HEAD:W.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=W.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=W.IN_HEAD;return}break}}this.insertionMode=W.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=W.IN_SELECT_IN_TABLE;return}}this.insertionMode=W.IN_SELECT}_isElementCausesFosterParenting(t){return yg.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&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 g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===Ee.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.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 n6[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){fw(this,t);return}switch(this.insertionMode){case W.INITIAL:{wa(this,t);break}case W.BEFORE_HTML:{Qa(this,t);break}case W.BEFORE_HEAD:{Xa(this,t);break}case W.IN_HEAD:{Za(this,t);break}case W.IN_HEAD_NO_SCRIPT:{Ja(this,t);break}case W.AFTER_HEAD:{ei(this,t);break}case W.IN_BODY:case W.IN_CAPTION:case W.IN_CELL:case W.IN_TEMPLATE:{Eg(this,t);break}case W.TEXT:case W.IN_SELECT:case W.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case W.IN_TABLE:case W.IN_TABLE_BODY:case W.IN_ROW:{pu(this,t);break}case W.IN_TABLE_TEXT:{Dg(this,t);break}case W.IN_COLUMN_GROUP:{Os(this,t);break}case W.AFTER_BODY:{Ns(this,t);break}case W.AFTER_AFTER_BODY:{is(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){dw(this,t);return}switch(this.insertionMode){case W.INITIAL:{wa(this,t);break}case W.BEFORE_HTML:{Qa(this,t);break}case W.BEFORE_HEAD:{Xa(this,t);break}case W.IN_HEAD:{Za(this,t);break}case W.IN_HEAD_NO_SCRIPT:{Ja(this,t);break}case W.AFTER_HEAD:{ei(this,t);break}case W.TEXT:{this._insertCharacters(t);break}case W.IN_TABLE:case W.IN_TABLE_BODY:case W.IN_ROW:{pu(this,t);break}case W.IN_COLUMN_GROUP:{Os(this,t);break}case W.AFTER_BODY:{Ns(this,t);break}case W.AFTER_AFTER_BODY:{is(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){oc(this,t);return}switch(this.insertionMode){case W.INITIAL:case W.BEFORE_HTML:case W.BEFORE_HEAD:case W.IN_HEAD:case W.IN_HEAD_NO_SCRIPT:case W.AFTER_HEAD:case W.IN_BODY:case W.IN_TABLE:case W.IN_CAPTION:case W.IN_COLUMN_GROUP:case W.IN_TABLE_BODY:case W.IN_ROW:case W.IN_CELL:case W.IN_SELECT:case W.IN_SELECT_IN_TABLE:case W.IN_TEMPLATE:case W.IN_FRAMESET:case W.AFTER_FRAMESET:{oc(this,t);break}case W.IN_TABLE_TEXT:{Aa(this,t);break}case W.AFTER_BODY:{z6(this,t);break}case W.AFTER_AFTER_BODY:case W.AFTER_AFTER_FRAMESET:{V6(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case W.INITIAL:{W6(this,t);break}case W.BEFORE_HEAD:case W.IN_HEAD:case W.IN_HEAD_NO_SCRIPT:case W.AFTER_HEAD:{this._err(t,fe.misplacedDoctype);break}case W.IN_TABLE_TEXT:{Aa(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,fe.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?pw(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case W.INITIAL:{wa(this,t);break}case W.BEFORE_HTML:{q6(this,t);break}case W.BEFORE_HEAD:{K6(this,t);break}case W.IN_HEAD:{Kn(this,t);break}case W.IN_HEAD_NO_SCRIPT:{X6(this,t);break}case W.AFTER_HEAD:{J6(this,t);break}case W.IN_BODY:{rn(this,t);break}case W.IN_TABLE:{Xo(this,t);break}case W.IN_TABLE_TEXT:{Aa(this,t);break}case W.IN_CAPTION:{GD(this,t);break}case W.IN_COLUMN_GROUP:{rd(this,t);break}case W.IN_TABLE_BODY:{xl(this,t);break}case W.IN_ROW:{El(this,t);break}case W.IN_CELL:{ZD(this,t);break}case W.IN_SELECT:{Ig(this,t);break}case W.IN_SELECT_IN_TABLE:{ew(this,t);break}case W.IN_TEMPLATE:{nw(this,t);break}case W.AFTER_BODY:{ow(this,t);break}case W.IN_FRAMESET:{aw(this,t);break}case W.AFTER_FRAMESET:{sw(this,t);break}case W.AFTER_AFTER_BODY:{uw(this,t);break}case W.AFTER_AFTER_FRAMESET:{cw(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?hw(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case W.INITIAL:{wa(this,t);break}case W.BEFORE_HTML:{Y6(this,t);break}case W.BEFORE_HEAD:{G6(this,t);break}case W.IN_HEAD:{Q6(this,t);break}case W.IN_HEAD_NO_SCRIPT:{Z6(this,t);break}case W.AFTER_HEAD:{eD(this,t);break}case W.IN_BODY:{yl(this,t);break}case W.TEXT:{jD(this,t);break}case W.IN_TABLE:{pi(this,t);break}case W.IN_TABLE_TEXT:{Aa(this,t);break}case W.IN_CAPTION:{QD(this,t);break}case W.IN_COLUMN_GROUP:{XD(this,t);break}case W.IN_TABLE_BODY:{ac(this,t);break}case W.IN_ROW:{Ag(this,t);break}case W.IN_CELL:{JD(this,t);break}case W.IN_SELECT:{Pg(this,t);break}case W.IN_SELECT_IN_TABLE:{tw(this,t);break}case W.IN_TEMPLATE:{rw(this,t);break}case W.AFTER_BODY:{Mg(this,t);break}case W.IN_FRAMESET:{iw(this,t);break}case W.AFTER_FRAMESET:{lw(this,t);break}case W.AFTER_AFTER_BODY:{is(this,t);break}}}onEof(t){switch(this.insertionMode){case W.INITIAL:{wa(this,t);break}case W.BEFORE_HTML:{Qa(this,t);break}case W.BEFORE_HEAD:{Xa(this,t);break}case W.IN_HEAD:{Za(this,t);break}case W.IN_HEAD_NO_SCRIPT:{Ja(this,t);break}case W.AFTER_HEAD:{ei(this,t);break}case W.IN_BODY:case W.IN_TABLE:case W.IN_CAPTION:case W.IN_COLUMN_GROUP:case W.IN_TABLE_BODY:case W.IN_ROW:case W.IN_CELL:case W.IN_SELECT:case W.IN_SELECT_IN_TABLE:{Sg(this,t);break}case W.TEXT:{$D(this,t);break}case W.IN_TABLE_TEXT:{Aa(this,t);break}case W.IN_TEMPLATE:{Rg(this,t);break}case W.AFTER_BODY:case W.IN_FRAMESET:case W.AFTER_FRAMESET:case W.AFTER_AFTER_BODY:case W.AFTER_AFTER_FRAMESET:{nd(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===j.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 W.IN_HEAD:case W.IN_HEAD_NO_SCRIPT:case W.AFTER_HEAD:case W.TEXT:case W.IN_COLUMN_GROUP:case W.IN_SELECT:case W.IN_SELECT_IN_TABLE:case W.IN_FRAMESET:case W.AFTER_FRAMESET:{this._insertCharacters(t);break}case W.IN_BODY:case W.IN_CAPTION:case W.IN_CELL:case W.IN_TEMPLATE:case W.AFTER_BODY:case W.AFTER_AFTER_BODY:case W.AFTER_AFTER_FRAMESET:{xg(this,t);break}case W.IN_TABLE:case W.IN_TABLE_BODY:case W.IN_ROW:{pu(this,t);break}case W.IN_TABLE_TEXT:{kg(this,t);break}}}}function _6(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):vg(e,t),n}function B6(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function j6(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,i=o;i!==n;a++,i=o){o=e.openElements.getCommonAncestor(i);const s=e.activeFormattingElements.getElementEntry(i),l=s&&a>=L6;!s||l?(l&&e.activeFormattingElements.removeEntry(s),e.openElements.remove(i)):(i=$6(e,s),r===t&&(e.activeFormattingElements.bookmark=s),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(i,r),r=i)}return r}function $6(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 H6(e,t,n){const r=e.treeAdapter.getTagName(t),o=da(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===g.TEMPLATE&&a===Ee.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function U6(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function td(e,t){for(let n=0;n<N6;n++){const r=_6(e,t);if(!r)break;const o=B6(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=j6(e,o,r.element),i=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),i&&H6(e,i,a),U6(e,o,r)}}function oc(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function z6(e,t){e._appendCommentNode(t,e.openElements.items[0])}function V6(e,t){e._appendCommentNode(t,e.document)}function nd(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],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],i=e.treeAdapter.getNodeSourceCodeLocation(a);i&&!i.endTag&&e._setEndLocation(a,t)}}}}function W6(e,t){e._setDocumentType(t);const n=t.forceQuirks?On.QUIRKS:C6(t);E6(t)||e._err(t,fe.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=W.BEFORE_HTML}function wa(e,t){e._err(t,fe.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,On.QUIRKS),e.insertionMode=W.BEFORE_HTML,e._processToken(t)}function q6(e,t){t.tagID===g.HTML?(e._insertElement(t,Ee.HTML),e.insertionMode=W.BEFORE_HEAD):Qa(e,t)}function Y6(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Qa(e,t)}function Qa(e,t){e._insertFakeRootElement(),e.insertionMode=W.BEFORE_HEAD,e._processToken(t)}function K6(e,t){switch(t.tagID){case g.HTML:{rn(e,t);break}case g.HEAD:{e._insertElement(t,Ee.HTML),e.headElement=e.openElements.current,e.insertionMode=W.IN_HEAD;break}default:Xa(e,t)}}function G6(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Xa(e,t):e._err(t,fe.endTagWithoutMatchingOpenElement)}function Xa(e,t){e._insertFakeElement(re.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=W.IN_HEAD,e._processToken(t)}function Kn(e,t){switch(t.tagID){case g.HTML:{rn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Bt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Bt.RAWTEXT):(e._insertElement(t,Ee.HTML),e.insertionMode=W.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Bt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Bt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=W.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(W.IN_TEMPLATE);break}case g.HEAD:{e._err(t,fe.misplacedStartTagForHeadElement);break}default:Za(e,t)}}function Q6(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=W.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Za(e,t);break}case g.TEMPLATE:{Co(e,t);break}default:e._err(t,fe.endTagWithoutMatchingOpenElement)}}function Co(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,fe.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,fe.endTagWithoutMatchingOpenElement)}function Za(e,t){e.openElements.pop(),e.insertionMode=W.AFTER_HEAD,e._processToken(t)}function X6(e,t){switch(t.tagID){case g.HTML:{rn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Kn(e,t);break}case g.NOSCRIPT:{e._err(t,fe.nestedNoscriptInHead);break}default:Ja(e,t)}}function Z6(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=W.IN_HEAD;break}case g.BR:{Ja(e,t);break}default:e._err(t,fe.endTagWithoutMatchingOpenElement)}}function Ja(e,t){const n=t.type===Ze.EOF?fe.openElementsLeftAfterEof:fe.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=W.IN_HEAD,e._processToken(t)}function J6(e,t){switch(t.tagID){case g.HTML:{rn(e,t);break}case g.BODY:{e._insertElement(t,Ee.HTML),e.framesetOk=!1,e.insertionMode=W.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,Ee.HTML),e.insertionMode=W.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,fe.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),Kn(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,fe.misplacedStartTagForHeadElement);break}default:ei(e,t)}}function eD(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{ei(e,t);break}case g.TEMPLATE:{Co(e,t);break}default:e._err(t,fe.endTagWithoutMatchingOpenElement)}}function ei(e,t){e._insertFakeElement(re.BODY,g.BODY),e.insertionMode=W.IN_BODY,bl(e,t)}function bl(e,t){switch(t.type){case Ze.CHARACTER:{Eg(e,t);break}case Ze.WHITESPACE_CHARACTER:{xg(e,t);break}case Ze.COMMENT:{oc(e,t);break}case Ze.START_TAG:{rn(e,t);break}case Ze.END_TAG:{yl(e,t);break}case Ze.EOF:{Sg(e,t);break}}}function xg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Eg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function tD(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function nD(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function rD(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Ee.HTML),e.insertionMode=W.IN_FRAMESET)}function oD(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML)}function aD(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&rc.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Ee.HTML)}function iD(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function sD(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),n||(e.formElement=e.openElements.current))}function lD(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===g.LI&&o===g.LI||(n===g.DD||n===g.DT)&&(o===g.DD||o===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==g.ADDRESS&&o!==g.DIV&&o!==g.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML)}function uD(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),e.tokenizer.state=Bt.PLAINTEXT}function cD(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.framesetOk=!1}function dD(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(re.A);n&&(td(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function fD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function pD(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(td(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function hD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function mD(e,t){e.treeAdapter.getDocumentMode(e.document)!==On.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),e.framesetOk=!1,e.insertionMode=W.IN_TABLE}function Cg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Ee.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Tg(e){const t=cg(e,lo.TYPE);return t!=null&&t.toLowerCase()===O6}function gD(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Ee.HTML),Tg(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function bD(e,t){e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0}function yD(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,Ee.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function xD(e,t){t.tagName=re.IMG,t.tagID=g.IMG,Cg(e,t)}function ED(e,t){e._insertElement(t,Ee.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Bt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=W.TEXT}function CD(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Bt.RAWTEXT)}function TD(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Bt.RAWTEXT)}function Pp(e,t){e._switchToTextParsing(t,Bt.RAWTEXT)}function vD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===W.IN_TABLE||e.insertionMode===W.IN_CAPTION||e.insertionMode===W.IN_TABLE_BODY||e.insertionMode===W.IN_ROW||e.insertionMode===W.IN_CELL?W.IN_SELECT_IN_TABLE:W.IN_SELECT}function SD(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML)}function kD(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Ee.HTML)}function DD(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,Ee.HTML)}function wD(e,t){e._reconstructActiveFormattingElements(),gg(t),ed(t),t.selfClosing?e._appendElement(t,Ee.MATHML):e._insertElement(t,Ee.MATHML),t.ackSelfClosing=!0}function AD(e,t){e._reconstructActiveFormattingElements(),bg(t),ed(t),t.selfClosing?e._appendElement(t,Ee.SVG):e._insertElement(t,Ee.SVG),t.ackSelfClosing=!0}function Rp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML)}function rn(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{fD(e,t);break}case g.A:{dD(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{aD(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{oD(e,t);break}case g.LI:case g.DD:case g.DT:{lD(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Cg(e,t);break}case g.HR:{yD(e,t);break}case g.RB:case g.RTC:{kD(e,t);break}case g.RT:case g.RP:{DD(e,t);break}case g.PRE:case g.LISTING:{iD(e,t);break}case g.XMP:{CD(e,t);break}case g.SVG:{AD(e,t);break}case g.HTML:{tD(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{Kn(e,t);break}case g.BODY:{nD(e,t);break}case g.FORM:{sD(e,t);break}case g.NOBR:{pD(e,t);break}case g.MATH:{wD(e,t);break}case g.TABLE:{mD(e,t);break}case g.INPUT:{gD(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{bD(e,t);break}case g.IMAGE:{xD(e,t);break}case g.BUTTON:{cD(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{hD(e,t);break}case g.IFRAME:{TD(e,t);break}case g.SELECT:{vD(e,t);break}case g.OPTION:case g.OPTGROUP:{SD(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Pp(e,t);break}case g.FRAMESET:{rD(e,t);break}case g.TEXTAREA:{ED(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Pp(e,t):Rp(e,t);break}case g.PLAINTEXT:{uD(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:Rp(e,t)}}function ID(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=W.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function PD(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=W.AFTER_BODY,Mg(e,t))}function RD(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function MD(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):n&&e.openElements.remove(n))}function OD(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(re.P,g.P),e._closePElement()}function ND(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function LD(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function FD(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function _D(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function BD(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(re.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function vg(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],i=e.openElements.tagIDs[o];if(r===i&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,i))break}}function yl(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{td(e,t);break}case g.P:{OD(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{RD(e,t);break}case g.LI:{ND(e);break}case g.DD:case g.DT:{LD(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{FD(e);break}case g.BR:{BD(e);break}case g.BODY:{ID(e,t);break}case g.HTML:{PD(e,t);break}case g.FORM:{MD(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{_D(e,t);break}case g.TEMPLATE:{Co(e,t);break}default:vg(e,t)}}function Sg(e,t){e.tmplInsertionModeStack.length>0?Rg(e,t):nd(e,t)}function jD(e,t){var n;t.tagID===g.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function $D(e,t){e._err(t,fe.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function pu(e,t){if(e.openElements.currentTagId!==void 0&&yg.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=W.IN_TABLE_TEXT,t.type){case Ze.CHARACTER:{Dg(e,t);break}case Ze.WHITESPACE_CHARACTER:{kg(e,t);break}}else Ai(e,t)}function HD(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Ee.HTML),e.insertionMode=W.IN_CAPTION}function UD(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Ee.HTML),e.insertionMode=W.IN_COLUMN_GROUP}function zD(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(re.COLGROUP,g.COLGROUP),e.insertionMode=W.IN_COLUMN_GROUP,rd(e,t)}function VD(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Ee.HTML),e.insertionMode=W.IN_TABLE_BODY}function WD(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(re.TBODY,g.TBODY),e.insertionMode=W.IN_TABLE_BODY,xl(e,t)}function qD(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function YD(e,t){Tg(t)?e._appendElement(t,Ee.HTML):Ai(e,t),t.ackSelfClosing=!0}function KD(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,Ee.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Xo(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{WD(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Kn(e,t);break}case g.COL:{zD(e,t);break}case g.FORM:{KD(e,t);break}case g.TABLE:{qD(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{VD(e,t);break}case g.INPUT:{YD(e,t);break}case g.CAPTION:{HD(e,t);break}case g.COLGROUP:{UD(e,t);break}default:Ai(e,t)}}function pi(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{Co(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Ai(e,t)}}function Ai(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,bl(e,t),e.fosterParentingEnabled=n}function kg(e,t){e.pendingCharacterTokens.push(t)}function Dg(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Aa(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ai(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const wg=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function GD(e,t){const n=t.tagID;wg.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=W.IN_TABLE,Xo(e,t)):rn(e,t)}function QD(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=W.IN_TABLE,n===g.TABLE&&pi(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:yl(e,t)}}function rd(e,t){switch(t.tagID){case g.HTML:{rn(e,t);break}case g.COL:{e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{Kn(e,t);break}default:Os(e,t)}}function XD(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=W.IN_TABLE);break}case g.TEMPLATE:{Co(e,t);break}case g.COL:break;default:Os(e,t)}}function Os(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=W.IN_TABLE,e._processToken(t))}function xl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,Ee.HTML),e.insertionMode=W.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(re.TR,g.TR),e.insertionMode=W.IN_ROW,El(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=W.IN_TABLE,Xo(e,t));break}default:Xo(e,t)}}function ac(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=W.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=W.IN_TABLE,pi(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:pi(e,t)}}function El(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,Ee.HTML),e.insertionMode=W.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=W.IN_TABLE_BODY,xl(e,t));break}default:Xo(e,t)}}function Ag(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=W.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=W.IN_TABLE_BODY,ac(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=W.IN_TABLE_BODY,ac(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:pi(e,t)}}function ZD(e,t){const n=t.tagID;wg.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),El(e,t)):rn(e,t)}function JD(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=W.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Ag(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:yl(e,t)}}function Ig(e,t){switch(t.tagID){case g.HTML:{rn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,Ee.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,Ee.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{Kn(e,t);break}}}function Pg(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{Co(e,t);break}}}function ew(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ig(e,t)}function tw(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Pg(e,t)}function nw(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{Kn(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=W.IN_TABLE,e.insertionMode=W.IN_TABLE,Xo(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=W.IN_COLUMN_GROUP,e.insertionMode=W.IN_COLUMN_GROUP,rd(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=W.IN_TABLE_BODY,e.insertionMode=W.IN_TABLE_BODY,xl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=W.IN_ROW,e.insertionMode=W.IN_ROW,El(e,t);break}default:e.tmplInsertionModeStack[0]=W.IN_BODY,e.insertionMode=W.IN_BODY,rn(e,t)}}function rw(e,t){t.tagID===g.TEMPLATE&&Co(e,t)}function Rg(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):nd(e,t)}function ow(e,t){t.tagID===g.HTML?rn(e,t):Ns(e,t)}function Mg(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=W.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.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 Ns(e,t)}function Ns(e,t){e.insertionMode=W.IN_BODY,bl(e,t)}function aw(e,t){switch(t.tagID){case g.HTML:{rn(e,t);break}case g.FRAMESET:{e._insertElement(t,Ee.HTML);break}case g.FRAME:{e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{Kn(e,t);break}}}function iw(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=W.AFTER_FRAMESET))}function sw(e,t){switch(t.tagID){case g.HTML:{rn(e,t);break}case g.NOFRAMES:{Kn(e,t);break}}}function lw(e,t){t.tagID===g.HTML&&(e.insertionMode=W.AFTER_AFTER_FRAMESET)}function uw(e,t){t.tagID===g.HTML?rn(e,t):is(e,t)}function is(e,t){e.insertionMode=W.IN_BODY,bl(e,t)}function cw(e,t){switch(t.tagID){case g.HTML:{rn(e,t);break}case g.NOFRAMES:{Kn(e,t);break}}}function dw(e,t){t.chars=Pt,e._insertCharacters(t)}function fw(e,t){e._insertCharacters(t),e.framesetOk=!1}function Og(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Ee.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function pw(e,t){if(A6(t))Og(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===Ee.MATHML?gg(t):r===Ee.SVG&&(I6(t),bg(t)),ed(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function hw(e,t){if(t.tagID===g.P||t.tagID===g.BR){Og(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)===Ee.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}re.AREA,re.BASE,re.BASEFONT,re.BGSOUND,re.BR,re.COL,re.EMBED,re.FRAME,re.HR,re.IMG,re.INPUT,re.KEYGEN,re.LINK,re.META,re.PARAM,re.SOURCE,re.TRACK,re.WBR;const mw=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,gw=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Mp={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ng(e,t){const n=Dw(e),r=gl("type",{handlers:{root:bw,element:yw,text:xw,comment:Fg,doctype:Ew,raw:Tw},unknown:vw}),o={parser:n?new Ip(Mp):Ip.getFragmentParser(void 0,Mp),handle(s){r(s,o)},stitches:!1,options:t||{}};r(e,o),fa(o,cr());const a=n?o.parser.document:o.parser.getFragment(),i=yk(a,{file:o.options.file});return o.stitches&&pn(i,"comment",function(s,l,u){const d=s;if(d.value.stitch&&u&&l!==void 0){const f=u.children;return f[l]=d.value.stitch,l}}),i.type==="root"&&i.children.length===1&&i.children[0].type===e.type?i.children[0]:i}function Lg(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function bw(e,t){Lg(e.children,t)}function yw(e,t){Sw(e,t),Lg(e.children,t),kw(e,t)}function xw(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ze.CHARACTER,chars:e.value,location:Ii(e)};fa(t,cr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ew(e,t){const n={type:Ze.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ii(e)};fa(t,cr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Cw(e,t){t.stitches=!0;const n=ww(e);if("children"in e&&"children"in n){const r=Ng({type:"root",children:e.children},t.options);n.children=r.children}Fg({type:"comment",value:{stitch:n}},t)}function Fg(e,t){const n=e.value,r={type:Ze.COMMENT,data:n,location:Ii(e)};fa(t,cr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Tw(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,_g(t,cr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(mw,"&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 vw(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Cw(n,t);else{let r="";throw gw.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 fa(e,t){_g(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=Bt.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 _g(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 Sw(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Bt.PLAINTEXT)return;fa(t,cr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:oo.html;o===oo.html&&n==="svg"&&(o=oo.svg);const a=Ok({...e,children:[]},{space:o===oo.svg?"svg":"html"}),i={type:Ze.START_TAG,tagName:n,tagID:da(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ii(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function kw(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&ig.includes(n)||t.parser.tokenizer.state===Bt.PLAINTEXT)return;fa(t,cl(e));const r={type:Ze.END_TAG,tagName:n,tagID:da(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ii(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Bt.RCDATA||t.parser.tokenizer.state===Bt.RAWTEXT||t.parser.tokenizer.state===Bt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Bt.DATA)}function Dw(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ii(e){const t=cr(e)||{line:void 0,column:void 0,offset:void 0},n=cl(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 ww(e){return"children"in e?po({...e,children:[]}):po(e)}function Aw(e){return function(t,n){return Ng(t,{...e,file:n})}}const Iw=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/i,Pw=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)(\/.*)?\]/i,Rw=({legacyTitle:e=!1,tagName:t="div"}={})=>n=>{pn(n,"blockquote",(r,o,a)=>{let i="",s="",l=!0,u=r.children.map(d=>{if(l&&d.type==="paragraph"){const f=d.children[0],h=f.type==="text"?f.value:"",p=e?Pw:Iw,m=h.match(p);if(m&&(l=!1,i=m[1].toLocaleLowerCase(),s=e&&m[2]||i.toLocaleUpperCase(),h.includes(`
51
- `)&&(d.children[0]={type:"text",value:h.replace(p,"").replace(/^\n+/,"")}),!h.includes(`
52
- `))){const b=[];d.children.forEach((y,x)=>{x!=0&&(x==1&&y.type==="break"||b.push(y))}),d.children=[...b]}}return d});i&&(r.data={hName:t,hProperties:{class:`markdown-alert markdown-alert-${i}`,dir:"auto"}},u.unshift({type:"paragraph",children:[Mw(i),{type:"text",value:s.replace(/^\//,"")}],data:{hProperties:{class:"markdown-alert-title",dir:"auto"}}})),r.children=[...u]})};function Mw(e){let t=Ow[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 Ow={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 Nw(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 o=!1;try{o=!!document.execCommand("copy")}catch{o=!1}document.body.removeChild(n),r&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(r)),t&&t(o)}function Bg(e){if(!e)return null;var t=e;return t.dataset.code&&t.classList.contains("copied")?t:t.parentElement?Bg(t.parentElement):null}function Lw(e){var t=n=>{var r=Bg(n.target);r&&(r.classList.add("active"),Nw(r.dataset.code,function(){setTimeout(()=>{r.classList.remove("active")},2e3)}))};H.useEffect(()=>{var n,r;return(n=e.current)==null||n.removeEventListener("click",t,!1),(r=e.current)==null||r.addEventListener("click",t,!1),()=>{var o;(o=e.current)==null||o.removeEventListener("click",t,!1)}},[e])}var Fw=["prefixCls","className","source","style","disableCopy","skipHtml","onScroll","onMouseOver","pluginsFilter","rehypeRewrite","wrapperElement","warpperElement","urlTransform"],_w=e=>e;const Bw=H.forwardRef((e,t)=>{var{prefixCls:n="wmde-markdown wmde-markdown-color",className:r,source:o,style:a,disableCopy:i=!1,skipHtml:s=!0,onScroll:l,onMouseOver:u,pluginsFilter:d,wrapperElement:f={},warpperElement:h={},urlTransform:p}=e,m=Ue(e,Fw),b=H.useRef(null);H.useImperativeHandle(t,()=>K({},e,{mdp:b}),[b,e]);var y=(n||"")+" "+(r||"");Lw(b);var x=[...m.rehypePlugins||[]],E={allowElement:(k,C,L)=>m.allowElement?m.allowElement(k,C,L):/^[A-Za-z0-9]+$/.test(k.tagName)};s||x.push(Aw);var v=[Rw,...m.remarkPlugins||[],sk],S=K({},h,f);return c.jsx("div",K({ref:b,onScroll:l,onMouseOver:u},S,{className:y,style:a,children:c.jsx(Xv,K({},E,m,{skipHtml:!s,urlTransform:p||_w,rehypePlugins:d?d("rehype",x):x,remarkPlugins:d?d("remark",v):v,children:o||""}))}))});var ss={},ic={};function jw(e,t){for(var n=t,r=0;r<e.length;r++){var o=r===e.length-1,a=e.charAt(r),i=n[a]||(n[a]={chars:{}});o&&(i.self=e),n=i.chars}}function Op(e){if(e.length===0)return ss;for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];jw(o,t)}return t}function $w(e){if(e.length===0)return ic;for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];t[o]=!0}return t}var qi={},Np={type:"String",optional:!0};function Hw(e){var t={type:"NoArgument",optional:!1};function n(i){if(t.type&&t.type!==i&&t.type!=="NoArgument")throw new Error('Conflicting pseudo-class argument type: "'.concat(t.type,'" vs "').concat(i,'".'));t.type=i}for(var r=0,o=e;r<o.length;r++){var a=o[r];a==="NoArgument"&&(t.optional=!0),a==="Formula"&&n("Formula"),a==="FormulaOfSelector"&&(n("Formula"),t.ofSelector=!0),a==="String"&&n("String"),a==="Selector"&&n("Selector")}return t}function Uw(e){for(var t={},n=0,r=Object.keys(e);n<r.length;n++){var o=r[n],a=e[o];if(a)for(var i=0,s=a;i<s.length;i++){var l=s[i];(t[l]||(t[l]=[])).push(o)}}return t}function Lp(e){for(var t=Uw(e),n={},r=0,o=Object.keys(t);r<o.length;r++){var a=o[r],i=t[a];i&&(n[a]=Hw(i))}return n}var Zo=function(){return Zo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Zo.apply(this,arguments)},zw={},sc={wildcard:!0};function Vw(e){return e?typeof e=="boolean"?sc:e:zw}function Ww(e,t){return function(n,r){return t(e(n),e(r))}}function qw(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 Fp(e,t){return function(n,r){return r===!0?e:t(n===!0?e:n,r)}}function Oo(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=Zo({},t),o=0,a=Object.entries(n);o<a.length;o++){var i=a[o],s=i[0],l=i[1];if(s!=="latest"){var u=e[s];r[s]=u(t[s],l)}}return r}}function gr(e,t){return t!==void 0?t:e}function Yi(e,t){return t?e?e.concat(t):t:e}function _p(e,t){if(!t)return e;if(!e)return t;for(var n=Zo({},e),r=0,o=Object.entries(t);r<o.length;r++){var a=o[r],i=a[0],s=a[1];if(!s){delete n[i];continue}var l=e[i];if(!l){n[i]=s;continue}n[i]=l.concat(s)}return n}var uo=qw(Oo({baseSyntax:gr,modules:Yi,tag:Fp(sc,Oo({wildcard:gr})),ids:gr,classNames:gr,namespace:Fp(sc,Oo({wildcard:gr})),combinators:Yi,attributes:Oo({operators:Yi,caseSensitivityModifiers:Yi,unknownCaseSensitivityModifiers:gr}),pseudoClasses:Oo({unknown:gr,definitions:_p}),pseudoElements:Oo({unknown:gr,notation:gr,definitions:Ww(function(e){return Array.isArray(e)?{NoArgument:e}:e},_p)})})),jg={tag:{},ids:!0,classNames:!0,combinators:[],pseudoElements:{unknown:"reject",notation:"singleColon",definitions:["first-letter","first-line"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["link","visited","active"]}}},$g=uo(jg,{tag:{wildcard:!0},combinators:[">","+"],attributes:{unknownCaseSensitivityModifiers:"reject",operators:["=","~=","|="]},pseudoElements:{definitions:["before","after"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["hover","focus","first-child"],String:["lang"]}}}),lc=uo($g,{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"]}}}),Hg=uo(lc,{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"]}}}),Ls={"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:{String:["part"]}}}},Ug=Zo(Zo({},Hg),{modules:Object.entries(Ls).filter(function(e){var t=e[1].latest;return t}).map(function(e){var t=e[0];return t})}),Yw=uo(Ug,{pseudoElements:{unknown:"accept"},pseudoClasses:{unknown:"accept"},attributes:{unknownCaseSensitivityModifiers:"accept"}}),uc={css1:jg,css2:$g,css3:lc,"selectors-3":lc,"selectors-4":Hg,latest:Ug,progressive:Yw};function Kw(){for(var e={pseudoClasses:{},pseudoElements:{}},t=["css1","css2","css3","selectors-3","selectors-4"],n=0,r=t;n<r.length;n++){var o=r[n],a=uc[o];if(a.pseudoClasses&&typeof a.pseudoClasses=="object"){var i=a.pseudoClasses.definitions;if(i)for(var s=0,l=Object.entries(i);s<l.length;s++)for(var u=l[s],d=u[1],f=0,h=d;f<h.length;f++){var p=h[f];e.pseudoClasses[p]||(e.pseudoClasses[p]=[]),e.pseudoClasses[p].includes(o)||e.pseudoClasses[p].push(o)}}if(a.pseudoElements&&typeof a.pseudoElements=="object"){var i=a.pseudoElements.definitions;if(i)if(Array.isArray(i))for(var m=0,b=i;m<b.length;m++){var y=b[m];e.pseudoElements[y]||(e.pseudoElements[y]=[]),e.pseudoElements[y].includes(o)||e.pseudoElements[y].push(o)}else for(var x=0,E=Object.values(i);x<E.length;x++)for(var d=E[x],v=0,S=d;v<S.length;v++){var k=S[v];e.pseudoElements[k]||(e.pseudoElements[k]=[]),e.pseudoElements[k].includes(o)||e.pseudoElements[k].push(o)}}}for(var C=0,L=Object.entries(Ls);C<L.length;C++){var F=L[C],B=F[0],R=F[1];if(R.pseudoClasses&&typeof R.pseudoClasses=="object"){var i=R.pseudoClasses.definitions;if(i)for(var _=0,T=Object.values(i);_<T.length;_++)for(var d=T[_],O=0,A=d;O<A.length;O++){var w=A[O];e.pseudoClasses[w]||(e.pseudoClasses[w]=[]),e.pseudoClasses[w].includes(B)||e.pseudoClasses[w].push(B)}}if(R.pseudoElements&&typeof R.pseudoElements=="object"){var i=R.pseudoElements.definitions;if(i)if(Array.isArray(i))for(var M=0,V=i;M<V.length;M++){var z=V[M];e.pseudoElements[z]||(e.pseudoElements[z]=[]),e.pseudoElements[z].includes(B)||e.pseudoElements[z].push(B)}else for(var U=0,D=Object.values(i);U<D.length;U++)for(var d=D[U],Y=0,te=d;Y<te.length;Y++){var N=te[Y];e.pseudoElements[N]||(e.pseudoElements[N]=[]),e.pseudoElements[N].includes(B)||e.pseudoElements[N].push(B)}}}return e}var Bp=Kw();function Ia(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="-"||e==="_"||e==="\\"||e>=" "}function jp(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="-"||e==="_"||e>=" "}function Pa(e){return e>="a"&&e<="f"||e>="A"&&e<="F"||e>="0"&&e<="9"}var Gw={" ":!0," ":!0,"\n":!0,"\r":!0,"\f":!0},Qw={'"':!0,"'":!0},hu={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0},Xw=6,mu="css-selector-parser parse error: ";function Zw(e){e===void 0&&(e={});var t=e.syntax,n=t===void 0?"latest":t,r=e.substitutes,o=e.strict,a=o===void 0?!0:o,i=e.modules,s=typeof n=="object"?n:uc[n];if(s.baseSyntax&&(s=uo(uc[s.baseSyntax],s)),s.modules&&s.modules.length>0)for(var l=0,u=s.modules;l<u.length;l++){var d=u[l],f=Ls[d];f&&(s=uo(f,s))}if(i&&i.length>0)for(var h=0,p=i;h<p.length;h++){var m=p[h],f=Ls[m];f&&(s=uo(f,s))}var b=s.tag?[!0,!!Vw(s.tag).wildcard]:[!1,!1],y=b[0],x=b[1],E=!!s.ids,v=!!s.classNames,S=!!s.namespace,k=s.namespace&&(s.namespace===!0||s.namespace.wildcard===!0);if(S&&!y)throw new Error("".concat(mu,"Namespaces cannot be enabled while tags are disabled."));var C=!!r,L=s.combinators?Op(s.combinators):ss,F=s.attributes?[!0,s.attributes.operators?Op(s.attributes.operators):ss,s.attributes.caseSensitivityModifiers?$w(s.attributes.caseSensitivityModifiers):ic,s.attributes.unknownCaseSensitivityModifiers==="accept"]:[!1,ss,ic,!1],B=F[0],R=F[1],_=F[2],T=F[3],O=T||Object.keys(_).length>0,A=s.pseudoClasses?[!0,s.pseudoClasses.definitions?Lp(s.pseudoClasses.definitions):qi,s.pseudoClasses.unknown==="accept"]:[!1,qi,!1],w=A[0],M=A[1],V=A[2],z=s.pseudoElements?[!0,s.pseudoElements.notation==="singleColon"||s.pseudoElements.notation==="both",!s.pseudoElements.notation||s.pseudoElements.notation==="doubleColon"||s.pseudoElements.notation==="both",s.pseudoElements.definitions?Lp(Array.isArray(s.pseudoElements.definitions)?{NoArgument:s.pseudoElements.definitions}:s.pseudoElements.definitions):qi,s.pseudoElements.unknown==="accept"]:[!1,!1,!1,qi,!1],U=z[0],D=z[1],Y=z[2],te=z[3],N=z[4],ae="",Q=ae.length,q=0,X="",G=function(se){return X===se},ee=function(){return G("*")||Ia(X)},oe=function(se){q=se,X=ae.charAt(q)},ne=function(){q++,X=ae.charAt(q)},pe=function(){var se=X;return q++,X=ae.charAt(q),se};function Z(se){var xe=Math.min(Q-1,q),Re=new Error("".concat(mu).concat(se," Pos: ").concat(xe,"."));throw Re.position=xe,Re.name="ParserError",Re}function J(se,xe){if(!se)return Z(xe)}var ye=function(){J(q<Q,"Unexpected end of input.")},de=function(){return q>=Q},be=function(se){J(q<Q,'Expected "'.concat(se,'" but end of input reached.')),J(X===se,'Expected "'.concat(se,'" but "').concat(X,'" found.')),q++,X=ae.charAt(q)};function ie(se){var xe=Ie(se,q);if(xe)return q+=xe.length,X=ae.charAt(q),xe}function Ie(se,xe){var Re=ae.charAt(xe),Be=se[Re];if(Be){var We=Ie(Be.chars,xe+1);if(We)return We;if(Be.self)return Be.self}}function ve(){for(var se=pe(),xe=1;Pa(X)&&xe<Xw;)se+=pe(),xe++;return rt(),String.fromCharCode(parseInt(se,16))}function Ve(se){var xe="";for(be(se);q<Q;){if(G(se))return ne(),xe;G("\\")?(ne(),G(se)?(xe+=se,ne()):X===`
53
- `||X==="\f"?ne():X==="\r"?(ne(),G(`
54
- `)&&ne()):Pa(X)?xe+=ve():(xe+=X,ne())):(xe+=X,ne())}return xe}function we(){if(!Ia(X))return null;for(var se="";G("-");)se+=X,ne();for(se==="-"&&!jp(X)&&!G("\\")&&Z("Identifiers cannot consist of a single hyphen."),a&&se.length>=2&&Z("Identifiers cannot start with two hyphens with strict mode on."),hu[X]&&Z("Identifiers cannot start with hyphens followed by digits.");q<Q;)if(jp(X))se+=pe();else if(G("\\"))ne(),ye(),Pa(X)?se+=ve():se+=pe();else break;return se}function At(){for(var se="";q<Q&&!G(")");)if(G("\\")){if(ne(),de()&&!a)return(se+"\\").trim();ye(),Pa(X)?se+=ve():se+=pe()}else se+=pe();return se.trim()}function rt(){if(X===" "||X===" "||X==="\f"||X===`
55
- `){ne();return}X==="\r"&&ne(),X===`
56
- `&&ne()}function Ye(){for(;Gw[X];)ne()}function ue(se){se===void 0&&(se=!1),Ye();for(var xe=[mt(se)];G(",");)ne(),Ye(),xe.push(mt(se));return{type:"Selector",rules:xe}}function Ce(){be("["),Ye();var se;if(G("|")){J(S,"Namespaces are not enabled."),ne();var xe=we();J(xe,"Expected attribute name."),se={type:"Attribute",name:xe,namespace:{type:"NoNamespace"}}}else if(G("*")){J(S,"Namespaces are not enabled."),J(k,"Wildcard namespace is not enabled."),ne(),be("|");var Re=we();J(Re,"Expected attribute name."),se={type:"Attribute",name:Re,namespace:{type:"WildcardNamespace"}}}else{var Be=we();if(J(Be,"Expected attribute name."),se={type:"Attribute",name:Be},G("|")){var We=q;if(ne(),Ia(X)){J(S,"Namespaces are not enabled.");var vt=we();J(vt,"Expected attribute name."),se={type:"Attribute",name:vt,namespace:{type:"NamespaceName",name:Be}}}else oe(We)}}if(J(se.name,"Expected attribute name."),Ye(),de()&&!a)return se;if(G("]"))ne();else{if(se.operator=ie(R),J(se.operator,"Expected a valid attribute selector operator."),Ye(),ye(),Qw[X])se.value={type:"String",value:Ve(X)};else if(C&&G("$")){ne();var Mt=we();J(Mt,"Expected substitute name."),se.value={type:"Substitution",name:Mt}}else{var bt=we();J(bt,"Expected attribute value."),se.value={type:"String",value:bt}}if(Ye(),de()&&!a)return se;if(!G("]")){var Ut=we();if(J(Ut,"Expected end of attribute selector."),se.caseSensitivityModifier=Ut,J(O,"Attribute case sensitivity modifiers are not enabled."),J(T||_[se.caseSensitivityModifier],"Unknown attribute case sensitivity modifier."),Ye(),de()&&!a)return se}be("]")}return se}function Oe(){for(var se="";hu[X];)se+=pe();return J(se!=="","Formula parse error."),parseInt(se)}var He=function(){return G("-")||G("+")||hu[X]};function je(){if(G("e")||G("o")){var se=we();if(se==="even")return Ye(),[2,0];if(se==="odd")return Ye(),[2,1]}var xe=null,Re=1;if(G("-")&&(ne(),Re=-1),He()&&(G("+")&&ne(),xe=Oe(),!G("\\")&&!G("n")))return[0,xe*Re];xe===null&&(xe=1),xe*=Re;var Be;if(G("\\")?(ne(),Pa(X)?Be=ve():Be=pe()):Be=pe(),J(Be==="n",'Formula parse error: expected "n".'),Ye(),G("+")||G("-")){var We=G("+")?1:-1;return ne(),Ye(),[xe,We*Oe()]}else return[xe,0]}function Ne(se,xe,Re){var Be;if(G("(")){if(ne(),Ye(),C&&G("$")){ne();var We=we();J(We,"Expected substitute name."),Be={type:"Substitution",name:We}}else if(Re.type==="String")Be={type:"String",value:At()},J(Be.value,"Expected ".concat(xe," argument value."));else if(Re.type==="Selector")Be=ue(!0);else if(Re.type==="Formula"){var vt=je(),Mt=vt[0],bt=vt[1];if(Be={type:"Formula",a:Mt,b:bt},Re.ofSelector&&(Ye(),G("o")||G("\\"))){var Ut=we();J(Ut==="of","Formula of selector parse error."),Ye(),Be={type:"FormulaOfSelector",a:Mt,b:bt,selector:mt()}}}else return Z("Invalid ".concat(xe," signature."));if(Ye(),de()&&!a)return Be;be(")")}else J(Re.optional,"Argument is required for ".concat(xe,' "').concat(se,'".'));return Be}function ot(){if(G("*"))return J(x,"Wildcard tag name is not enabled."),ne(),{type:"WildcardTag"};if(Ia(X)){J(y,"Tag names are not enabled.");var se=we();return J(se,"Expected tag name."),{type:"TagName",name:se}}else return Z("Expected tag name.")}function Et(){if(G("*")){var se=q;if(ne(),!G("|")||(ne(),!ee()))return oe(se),ot();J(S,"Namespaces are not enabled."),J(k,"Wildcard namespace is not enabled.");var xe=ot();return xe.namespace={type:"WildcardNamespace"},xe}else if(G("|")){J(S,"Namespaces are not enabled."),ne();var xe=ot();return xe.namespace={type:"NoNamespace"},xe}else if(Ia(X)){var Re=we();if(J(Re,"Expected tag name."),!G("|"))return J(y,"Tag names are not enabled."),{type:"TagName",name:Re};var se=q;if(ne(),!ee())return oe(se),{type:"TagName",name:Re};J(S,"Namespaces are not enabled.");var xe=ot();return xe.namespace={type:"NamespaceName",name:Re},xe}else return Z("Expected tag name.")}function mt(se){var xe,Re;se===void 0&&(se=!1);var Be={type:"Rule",items:[]};if(se){var We=ie(L);We&&(Be.combinator=We,Ye())}for(;q<Q;)if(ee())J(Be.items.length===0,"Unexpected tag/namespace start."),Be.items.push(Et());else if(G("|")){var vt=q;if(ne(),ee())J(Be.items.length===0,"Unexpected tag/namespace start."),oe(vt),Be.items.push(Et());else{oe(vt);break}}else if(G(".")){J(v,"Class names are not enabled."),ne();var Mt=we();J(Mt,"Expected class name."),Be.items.push({type:"ClassName",name:Mt})}else if(G("#")){J(E,"IDs are not enabled."),ne();var bt=we();J(bt,"Expected ID name."),Be.items.push({type:"Id",name:bt})}else if(G("["))J(B,"Attributes are not enabled."),Be.items.push(Ce());else if(G(":")){var Ut=!1,Dn=!1;ne(),G(":")&&(J(U,"Pseudo elements are not enabled."),J(Y,"Pseudo elements double colon notation is not enabled."),Ut=!0,ne());var St=we();if(J(Ut||St,"Expected pseudo-class name."),J(!Ut||St,"Expected pseudo-element name."),J(St,"Expected pseudo-class name."),!(!Ut||N||Object.prototype.hasOwnProperty.call(te,St))){var Jt=Bp.pseudoElements[St],pr='Unknown pseudo-element "'.concat(St,'"');Jt&&Jt.length>0&&(pr+=". It is defined in: ".concat(Jt.join(", "))),Z(pr+".")}if(Dn=U&&(Ut||!Ut&&D&&Object.prototype.hasOwnProperty.call(te,St)),Dn){var wn=(xe=te[St])!==null&&xe!==void 0?xe:N&&Np,Kr={type:"PseudoElement",name:St},Hn=Ne(St,"pseudo-element",wn);Hn&&(J(Hn.type!=="Formula"&&Hn.type!=="FormulaOfSelector","Pseudo-elements cannot have formula argument."),Kr.argument=Hn),Be.items.push(Kr)}else{J(w,"Pseudo-classes are not enabled.");var wn=(Re=M[St])!==null&&Re!==void 0?Re:V&&Np;if(!wn){var Jt=Bp.pseudoClasses[St],pr='Unknown pseudo-class: "'.concat(St,'"');Jt&&Jt.length>0&&(pr+=". It is defined in: ".concat(Jt.join(", "))),Z(pr+".")}var Hn=Ne(St,"pseudo-class",wn),hr={type:"PseudoClass",name:St};Hn&&(hr.argument=Hn),Be.items.push(hr)}}else break;if(Be.items.length===0)return de()?Z("Expected rule but end of input reached."):Z('Expected rule but "'.concat(X,'" found.'));if(Ye(),!de()&&!G(",")&&!G(")")){var We=ie(L);Ye(),Be.nestedRule=mt(),Be.nestedRule.combinator=We}return Be}return function(se){if(typeof se!="string")throw new Error("".concat(mu,"Expected string input."));return ae=se,Q=ae.length,q=0,X=ae.charAt(0),ue()}}const Jw=Zw({syntax:"selectors-4"});function eA(e){if(typeof e!="string")throw new TypeError("Expected `string` as selector, not `"+e+"`");return Jw(e)}const zg="֑-߿יִ-﷽ﹰ-ﻼ",Vg="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",tA=new RegExp("^[^"+Vg+"]*["+zg+"]"),nA=new RegExp("^[^"+zg+"]*["+Vg+"]");function rA(e){const t=String(e||"");return tA.test(t)?"rtl":nA.test(t)?"ltr":"neutral"}function Wg(e){return"children"in e?qg(e):"value"in e?e.value:""}function oA(e){return e.type==="text"?e.value:"children"in e?qg(e):""}function qg(e){let t=-1;const n=[];for(;++t<e.children.length;)n[t]=oA(e.children[t]);return n.join("")}function aA(e,t){const n=e.schema,r=e.language,o=e.direction,a=e.editableOrEditingHost;let i;if(t.type==="element"){const u=t.properties.xmlLang||t.properties.lang,d=t.properties.type||"text",f=$p(t);u!=null&&(e.language=String(u)),n&&n.space==="html"?(t.properties.contentEditable==="true"&&(e.editableOrEditingHost=!0),t.tagName==="svg"&&(e.schema=Vr),f==="rtl"?i=f:f==="ltr"||f!=="auto"&&t.tagName==="html"||f!=="auto"&&t.tagName==="input"&&d==="tel"?i="ltr":(f==="auto"||t.tagName==="bdi")&&(t.tagName==="textarea"?i=gu(Wg(t)):t.tagName==="input"&&(d==="email"||d==="search"||d==="tel"||d==="text")?i=t.properties.value?gu(String(t.properties.value)):"ltr":pn(t,l)),i&&(e.direction=i)):e.editableOrEditingHost&&(e.editableOrEditingHost=!1)}return s;function s(){e.schema=n,e.language=r,e.direction=o,e.editableOrEditingHost=a}function l(u){if(u.type==="text")return i=gu(u.value),i?Ps:void 0;if(u!==t&&u.type==="element"&&(u.tagName==="bdi"||u.tagName==="script"||u.tagName==="style"||u.tagName==="textare"||$p(u)))return Ga}}function gu(e){const t=rA(e);return t==="neutral"?void 0:t}function $p(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 iA(e,t,n){const r=Si(n,e.name),o=t.properties[r.property];let a=sA(o,r);if(!e.value)return a!==void 0;e.value.type;let i=e.value.value;if(e.caseSensitivityModifier==="i"&&(i=i.toLowerCase(),a&&(a=a.toLowerCase())),a!==void 0)switch(e.operator){case"=":return i===a;case"$=":return i===a.slice(-i.length);case"*=":return a.includes(i);case"^=":return i===a.slice(0,i.length);case"|=":return i===a||i===a.slice(0,i.length)&&a.charAt(i.length)==="-";case"~=":return i===a||Vu(a).includes(i)}return!1}function sA(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?ll:ul)(e)}else return String(e)}const lA=[];function uA(e,t){return(t.properties.className||lA).includes(e.name)}function cA(e,t){return t.properties.id===e.name}function dA(e,t){return e.name===t.tagName}function fA(e,t){return function(n,r){let o=Hp(n,"tag");const a=Hp(r??"*","range"),i=[];let s=-1;for(;++s<a.length;){const l=a[s].toLowerCase();if(!t&&l==="*")continue;let u=-1;const d=[];for(;++u<o.length;)if(e(o[u].toLowerCase(),l)){if(!t)return o[u];i.push(o[u])}else d.push(o[u]);o=d}return t?i:void 0}}const pA=fA(function(e,t){const n=e.split("-"),r=t.split("-");let o=0,a=0;if(r[a]!=="*"&&n[o]!==r[a])return!1;for(o++,a++;a<r.length;){if(r[a]==="*"){a++;continue}if(!n[o])return!1;if(n[o]===r[a]){o++,a++;continue}if(n[o].length===1)return!1;o++}return!0},!0);function Hp(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 hA={}.hasOwnProperty;function ho(e,t){const n=e.type==="element"&&hA.call(e.properties,t)&&e.properties[t];return n!=null&&n!==!1}const mA=new Set([9,10,12,13,32]),Up=48,gA=57;function bA(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,n=0,r=a(),o=i();if(t<e.length&&e.charAt(t)==="n"&&(t++,n=r*(o??1),s(),t<e.length?(r=a(),s(),o=i()):r=o=0),o===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[n,r*o];function a(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function i(){const l=t;let u=0;for(;t<e.length&&e.charCodeAt(t)>=Up&&e.charCodeAt(t)<=gA;)u=u*10+(e.charCodeAt(t)-Up),t++;return t===l?null:u}function s(){for(;t<e.length&&mA.has(e.charCodeAt(t));)t++}}var bu,zp;function yA(){return zp||(zp=1,bu={trueFunc:function(){return!0},falseFunc:function(){return!1}}),bu}var xA=yA();const Vp=Wn(xA);function EA(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return Vp.falseFunc;if(t===-1)return a=>a<=n;if(t===0)return a=>a===n;if(t===1)return n<0?Vp.trueFunc:a=>a>=n;const r=Math.abs(t),o=(n%r+r)%r;return t>1?a=>a>=n&&a%r===o:a=>a<=n&&a%r===o}function Wp(e){return EA(bA(e))}const CA=Wp.default||Wp,TA=gl("name",{handlers:{"any-link":vA,blank:SA,checked:kA,dir:DA,disabled:Yg,empty:wA,enabled:AA,"first-child":IA,"first-of-type":PA,has:RA,is:Kg,lang:OA,"last-child":NA,"last-of-type":LA,not:FA,"nth-child":_A,"nth-last-child":BA,"nth-last-of-type":jA,"nth-of-type":$A,"only-child":HA,"only-of-type":UA,optional:zA,"read-only":VA,"read-write":Gg,required:Qg,root:WA,scope:qA},invalid:MA,unknown:YA});function vA(e,t){return(t.tagName==="a"||t.tagName==="area"||t.tagName==="link")&&ho(t,"href")}function fr(e,t){if(e.shallow)throw new Error("Cannot use `:"+t.name+"` without parent")}function SA(e,t){return!Xg(t,n);function n(r){return r.type==="element"||r.type==="text"&&!Lc(r)}}function kA(e,t){return t.tagName==="input"||t.tagName==="menuitem"?!!((t.properties.type==="checkbox"||t.properties.type==="radio")&&ho(t,"checked")):t.tagName==="option"?ho(t,"selected"):!1}function DA(e,t,n,r,o){return e.argument,e.argument.type,o.direction===e.argument.value}function Yg(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")&&ho(t,"disabled")}function wA(e,t){return!Xg(t,n);function n(r){return r.type==="element"||r.type==="text"}}function AA(e,t){return!Yg(e,t)}function IA(e,t,n,r,o){return fr(o,e),o.elementIndex===0}function PA(e,t,n,r,o){return fr(o,e),o.typeIndex===0}function Cl(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=CA(n.a+"n+"+n.b),e._cachedFn=t}return t}function RA(e,t,n,r,o){e.argument,e.argument.type;const a={...o,found:!1,one:!0,results:[],rootQuery:e.argument,scopeElements:[t],shallow:!1};return od(a,{type:"root",children:t.children}),a.results.length>0}function MA(){}function Kg(e,t,n,r,o){e.argument,e.argument.type;const a={...o,found:!1,one:!0,results:[],rootQuery:e.argument,scopeElements:[t],shallow:!1};return od(a,t),a.results[0]===t}function OA(e,t,n,r,o){return e.argument,e.argument.type,o.language!==""&&o.language!==void 0&&pA(o.language,Hu(e.argument.value)).length>0}function NA(e,t,n,r,o){return fr(o,e),!!(o.elementCount&&o.elementIndex===o.elementCount-1)}function LA(e,t,n,r,o){return fr(o,e),typeof o.typeIndex=="number"&&typeof o.typeCount=="number"&&o.typeIndex===o.typeCount-1}function FA(e,t,n,r,o){return!Kg(e,t,n,r,o)}function _A(e,t,n,r,o){const a=Cl(e);return fr(o,e),typeof o.elementIndex=="number"&&a(o.elementIndex)}function BA(e,t,n,r,o){const a=Cl(e);return fr(o,e),!!(typeof o.elementCount=="number"&&typeof o.elementIndex=="number"&&a(o.elementCount-o.elementIndex-1))}function jA(e,t,n,r,o){const a=Cl(e);return fr(o,e),typeof o.typeCount=="number"&&typeof o.typeIndex=="number"&&a(o.typeCount-1-o.typeIndex)}function $A(e,t,n,r,o){const a=Cl(e);return fr(o,e),typeof o.typeIndex=="number"&&a(o.typeIndex)}function HA(e,t,n,r,o){return fr(o,e),o.elementCount===1}function UA(e,t,n,r,o){return fr(o,e),o.typeCount===1}function zA(e,t){return!Qg(e,t)}function VA(e,t,n,r,o){return!Gg(e,t,n,r,o)}function Gg(e,t,n,r,o){return t.tagName==="input"||t.tagName==="textarea"?!ho(t,"readOnly")&&!ho(t,"disabled"):!!o.editableOrEditingHost}function Qg(e,t){return(t.tagName==="input"||t.tagName==="textarea"||t.tagName==="select")&&ho(t,"required")}function WA(e,t,n,r,o){return!!((!r||r.type==="root")&&o.schema&&(o.schema.space==="html"||o.schema.space==="svg")&&(t.tagName==="html"||t.tagName==="svg"))}function qA(e,t,n,r,o){return o.scopeElements.includes(t)}function Xg(e,t){const n=e.children;let r=-1;for(;++r<n.length;)if(t(n[r]))return!0;return!1}function YA(e){const t=e;throw new Error("Unknown pseudo-selector `"+t.name+"`")}function KA(e,t,n,r,o){for(const a of e.items)if(a.type==="Attribute"){if(!iA(a,t,o.schema))return!1}else if(a.type==="Id"){if(!cA(a,t))return!1}else if(a.type==="ClassName"){if(!uA(a,t))return!1}else if(a.type==="PseudoClass"){if(!TA(a,t,n,r,o))return!1}else{if(a.type==="PseudoElement")throw new Error("Invalid selector: `::"+a.name+"`");if(a.type==="TagName"&&!dA(a,t))return!1}return!0}const GA=[];function od(e,t){t&&Zg(e,[],t,void 0,void 0,t)}function yu(e,t,n){const r=e[t];r?r.push(n):e[t]=[n]}function QA(e,t,n,r){const o=ls(t.descendant,t.directChild);let a,i=-1;const s={count:0,types:new Map},l={count:0,types:new Map};for(;++i<n.children.length;)qp(s,n.children[i]);for(i=-1;++i<n.children.length;){const u=n.children[i],d=u.type==="element"?u.tagName.toUpperCase():void 0;if(e.elementIndex=l.count,e.typeIndex=d&&l.types.get(d)||0,e.elementCount=s.count,e.typeCount=d?s.types.get(d):0,"children"in u){const f=ls(o,a),h=Zg(e,f,n.children[i],i,n,r);a=ls(h.generalSibling,h.adjacentSibling)}if(e.one&&e.found)break;qp(l,n.children[i])}}function XA(e,t,n,r,o){const a={adjacentSibling:void 0,descendant:void 0,directChild:void 0,generalSibling:void 0};let i=-1;for(;++i<t.length;){const s=t[i];if(e.one&&e.found)break;if(e.shallow&&s.nestedRule)throw new Error("Expected selector without nesting");if(KA(s,n,r,o,e)){const l=s.nestedRule;if(l){const u=l.combinator==="+"?"adjacentSibling":l.combinator==="~"?"generalSibling":l.combinator===">"?"directChild":"descendant";yu(a,u,l)}else e.found=!0,e.results.includes(n)||e.results.push(n)}s.combinator===void 0?yu(a,"descendant",s):s.combinator==="~"&&yu(a,"generalSibling",s)}return a}function ls(e,t){return e&&t&&e.length>0&&t.length>0?[...e,...t]:e&&e.length>0?e:t&&t.length>0?t:GA}function qp(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 Zg(e,t,n,r,o,a){let i={adjacentSibling:void 0,descendant:void 0,directChild:void 0,generalSibling:void 0};const s=aA(e,n);if(n.type==="element"){let l=e.rootQuery.rules;o&&o!==a&&(l=e.rootQuery.rules.filter(u=>u.combinator===void 0||u.combinator===">"&&o===a)),i=XA(e,ls(t,l),n,r,o)}return"children"in n&&!e.shallow&&!(e.one&&e.found)&&QA(e,i,n,a),s(),i}function ZA(e,t,n){const r=JA(e,t);return od(r,t||void 0),r.results}function JA(e,t,n){return{direction:"ltr",editableOrEditingHost:!1,elementCount:void 0,elementIndex:void 0,found:!1,language:void 0,one:!1,results:[],rootQuery:eA(e),schema:sa,scopeElements:t?t.type==="root"?t.children:[t]:[],shallow:!1,typeIndex:void 0,typeCount:void 0}}const Jg=(e=[],t="")=>(e.forEach(n=>{n.type==="text"?t+=n.value:n.type==="element"&&n.children&&Array.isArray(n.children)&&(t+=Jg(n.children))}),t),e5=e=>{const{selector:t,rewrite:n}=e||{};return r=>{if(!(!n||typeof n!="function")){if(t&&typeof t=="string"){const o=ZA(t,r);o&&o.length>0&&pn(r,o,(a,i,s)=>{n(a,i,s)});return}pn(r,(o,a,i)=>{n(o,a,i)})}}},t5=(e="")=>(e.match(/([^?=&]+)(=([^&]*))/g)||[]).reduce((t,n)=>(t[n.slice(0,n.indexOf("="))]=n.slice(n.indexOf("=")+1),t),{}),n5=(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]}},e1=(e=[],t,n,r)=>{let o=t;for(;o<e.length;)if(o++,n){const a=e[o];if(a&&a.value&&a.value.replace(/(\n|\s)/g,"")!==""||e[o]&&e[o].type==="element")return a.tagName===n?a:void 0}else{const a=e[o];if(!a||a.type==="element"||a.type==="text"&&a.value.replace(/(\n|\s)/g,"")!=="")return;if(a.type&&/^(comment|raw)$/ig.test(a.type))return a.value&&!/^rehype:/.test(a.value.replace(/^(\s+)?<!--(.*?)-->/,"$2")||"")?void 0:r?e1(e,o,"pre",r)?void 0:(a.value=(a.value||"").replace(/^(\n|\s)+/,""),a):(a.value=(a.value||"").replace(/^(\n|\s)+/,""),a)}},Yp=({value:e=""})=>{const t=t5(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},Kp=(e,t,n)=>n==="string"?{...e,"data-config":JSON.stringify({...t,rehyp:!0})}:n==="attr"?{...e,...t}:{...e,"data-config":{...t,rehyp:!0}},r5=(e={})=>{const{properties:t="data",codeBlockParames:n=!0}=e;return r=>{pn(r,"element",(o,a,i)=>{if(n&&o.tagName==="pre"&&o&&Array.isArray(o.children)&&i&&Array.isArray(i.children)&&i.children.length>1){const s=o.children[0];if(s&&s.tagName==="code"&&typeof a=="number"){const l=n5(i.children,a);if(l){const u=Yp(l);Object.keys(u).length>0&&(o.properties={...o.properties,"data-type":"rehyp"},s.properties=Kp(s.properties,u,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(o.tagName)&&i&&Array.isArray(i.children)&&typeof a=="number"){const s=e1(i.children,a,"",n);if(s){const l=Yp(s);Object.keys(l).length>0&&(o.properties=Kp(o.properties,l,t))}}})}};var o5=function(t){return n=>{pn(n,r=>{r.type==="element"&&r.tagName==="code"&&r.data&&r.data.meta&&(r.properties=K({},r.properties,{"data-meta":String(r.data.meta)}))})}},a5=function(t){return n=>{pn(n,r=>{if(r.type==="element"&&r.tagName==="code"&&r.properties&&r.properties.dataMeta){r.data||(r.data={});var o=r.properties.dataMeta;typeof o=="string"&&(r.data.meta=o),delete r.properties.dataMeta}})}};const i5=/[\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,s5=Object.hasOwnProperty;class l5{constructor(){this.occurrences,this.reset()}slug(t,n){const r=this;let o=u5(t,n===!0);const a=o;for(;s5.call(r.occurrences,o);)r.occurrences[a]++,o=a+"-"+r.occurrences[a];return r.occurrences[o]=0,o}reset(){this.occurrences=Object.create(null)}}function u5(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(i5,"").replace(/ /g,"-"))}function t1(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 c5={},Gp=new l5;function d5(e){const n=(e||c5).prefix||"";return function(r){Gp.reset(),pn(r,"element",function(o){t1(o)&&!o.properties.id&&(o.properties.id=n+Gp.slug(Wg(o)))})}}const n1=(function(e){if(e==null)return h5;if(typeof e=="string")return p5(e);if(typeof e=="object")return f5(e);if(typeof e=="function")return ad(e);throw new Error("Expected function, string, or array as `test`")});function f5(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=n1(e[n]);return ad(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function p5(e){return ad(t);function t(n){return n.tagName===e}}function ad(e){return t;function t(n,r,o){return!!(m5(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function h5(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function m5(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const Qp={type:"element",tagName:"span",properties:{className:["icon","icon-link"]},children:[]},g5={};function b5(e){const t=e||g5;let n=t.properties;const r=t.headingProperties,o=t.behavior||"prepend",a=t.content,i=t.group,s=n1(t.test);let l;return o==="after"||o==="before"?l=d:o==="wrap"?l=f:(l=u,n||(n={ariaHidden:"true",tabIndex:-1})),function(h){pn(h,"element",function(p,m,b){if(t1(p)&&p.properties.id&&s(p,m,b))return Object.assign(p.properties,Ki(r,p)),l(p,m,b)})};function u(h){const p=Xp(a||Qp,h);return h.children[o==="prepend"?"unshift":"push"](xu(h,Ki(n,h),p)),[Ga]}function d(h,p,m){if(typeof p!="number"||!m)return;const b=Xp(a||Qp,h),y=xu(h,Ki(n,h),b);let x=o==="before"?[y,h]:[h,y];if(i){const E=r1(i,h);E&&!Array.isArray(E)&&E.type==="element"&&(E.children=x,x=[E])}return m.children.splice(p,1,...x),[Ga,p+x.length]}function f(h){let p=h.children,m=[];return typeof a=="function"?(p=[],m=a(h)):a&&(m=id(a)),h.children=[xu(h,Ki(n,h),Array.isArray(m)?[...p,...m]:[...p,m])],[Ga]}}function id(e){return po(e)}function xu(e,t,n){return{type:"element",tagName:"a",properties:{...t,href:"#"+e.properties.id},children:n}}function Xp(e,t){const n=r1(e,t);return Array.isArray(n)?n:[n]}function r1(e,t){return typeof e=="function"?e(t):id(e)}function Ki(e,t){return typeof e=="function"?e(t):e?id(e):{}}const y5=(e={})=>{const{openDelimiter:t="rehype:ignore:start",closeDelimiter:n="rehype:ignore:end"}=e;return r=>{pn(r,(o,a,i)=>{if(o.type==="element"||o.type==="root"){let s=!1;o.children=o.children.filter(l=>{if(l.type==="raw"||l.type==="comment"){let u=(l.value||"").trim();if(u=u.replace(/^<!--(.*?)-->/,"$1"),u===t)return s=!0,!1;if(u===n)return s=!1,!1}return!s})}})}};var x5={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 E5(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 C5=(e,t)=>(n,r,o)=>{if(n.type==="element"&&o&&o.type==="root"&&/h(1|2|3|4|5|6)/.test(n.tagName)){var a=n.children&&n.children[0];a&&a.properties&&a.properties.ariaHidden==="true"&&(a.properties=K({class:"anchor"},a.properties),a.children=[x5])}if(n.type==="element"&&n.tagName==="pre"&&!e){var i=Jg(n.children);n.children.push(E5(i))}t&&t(n,r===null?void 0:r,o===null?void 0:o)},T5=[d5,b5,y5];const o1=H.forwardRef((e,t)=>{var n,r=[o5,a5,...T5,[e5,{rewrite:C5((n=e.disableCopy)!=null?n:!1,e.rehypeRewrite)}],[r5,{properties:"attr"}],...e.rehypePlugins||[]];return c.jsx(Bw,K({},e,{rehypePlugins:r,ref:t}))});function v5(e,t){return K({},e,t)}var pa=H.createContext({markdown:""});function a1(e,t){return e===void 0&&(e=[]),t===void 0&&(t={}),e.forEach(n=>{n.children&&Array.isArray(n.children)?t=K({},t,a1(n.children||[])):n.keyCommand&&n.shortcuts&&n.execute&&(t[n.shortcuts.toLocaleLowerCase()]=n)}),t}function i1(e,t,n,r,o){t===void 0&&(t=[]);var a=a1(t||[]),i=[];if(e.altKey&&i.push("alt"),e.shiftKey&&i.push("shift"),e.metaKey&&i.push("cmd"),e.ctrlKey&&i.push("ctrl"),i.length>0&&!/(control|alt|meta|shift)/.test(e.key.toLocaleLowerCase())&&i.push(e.key.toLocaleLowerCase()),/escape/.test(e.key.toLocaleLowerCase())&&i.push("escape"),!(i.length<1)){var s=!!a[i.join("+")],l=s?a[i.join("+")]:void 0;if(Object.keys(a).forEach(u=>{var d=u.split("+").every(f=>/ctrlcmd/.test(f)?i.includes("ctrl")||i.includes("cmd"):i.includes(f));d&&(l=a[u])}),l&&n){e.stopPropagation(),e.preventDefault(),n.executeCommand(l,r,o,i);return}}}var Eu;function Zp(e){if(e.nodeName!=="TEXTAREA")return!1;if(typeof Eu>"u"){var t=document.createElement("textarea");t.value="1",Eu=!!t.firstChild}return Eu}function Wo(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 o=e.selectionStart,a=e.selectionEnd;if(typeof e.setRangeText=="function")e.setRangeText(t);else{var i=document.createRange(),s=document.createTextNode(t);if(Zp(e)){var l=e.firstChild;if(!l)e.appendChild(s);else{for(var u=0,d=null,f=null;l&&(d===null||f===null);){var h=l.nodeValue.length;o>=u&&o<=u+h&&i.setStart(d=l,o-u),a>=u&&a<=u+h&&i.setEnd(f=l,a-u),u+=h,l=l.nextSibling}o!==a&&i.deleteContents()}}if(Zp(e)&&i.commonAncestorContainer.nodeName==="#text")i.insertNode(s);else{var p=e.value;e.value=p.slice(0,o)+t+p.slice(a)}}e.setSelectionRange(o+t.length,o+t.length);var m=document.createEvent("UIEvent");m.initEvent("input",!0,!1),e.dispatchEvent(m)}}function an(e){var{text:t,selection:n,prefix:r,suffix:o=r}=e,a=n;if(t&&t.length&&n.start===n.end&&(a=S5(t,n.start)),a.start>=r.length&&a.end<=t.length-o.length){var i=t.slice(a.start-r.length,a.end+o.length);if(i.startsWith(r)&&i.endsWith(o))return{start:a.start-r.length,end:a.end+o.length}}return a}function ti(e){var{text:t,selection:n}=e,r=t.slice(0,n.start).lastIndexOf(`
57
- `)+1,o=t.slice(n.end).indexOf(`
58
- `)+n.end;return o===n.end-1&&(o=t.length),{start:r,end:o}}function s1(e,t){if(e===void 0&&(e=""),t===0)return 0;for(var n=2,r=!0,o=t-1;o>=0&&n>=0;o--)switch(e.charCodeAt(o)){case 32:continue;case 10:n--,r=!1;break;default:return n}return r?0:n}function l1(e,t){if(e===void 0&&(e=""),t===e.length-1)return 0;for(var n=2,r=!0,o=t;o<e.length&&n>=0;o++)switch(e.charCodeAt(o)){case 32:continue;case 10:{n--,r=!1;break}default:return n}return r?0:n}function S5(e,t){if(!e)throw Error("Argument 'text' should be truthy");for(var n=s=>s===" "||s.charCodeAt(0)===10,r=0,o=e.length,a=t;a-1>-1;a--)if(n(e[a-1])){r=a;break}for(var i=t;i<e.length;i++)if(n(e[i])){o=i;break}return{start:r,end:o}}function Zt(e){var{api:t,selectedText:n,selection:r,prefix:o,suffix:a=o}=e;n.length>=o.length+a.length&&n.startsWith(o)&&n.endsWith(a)?(t.replaceSelection(n.slice(o.length,a.length?-a.length:void 0)),t.setSelectionRange({start:r.start-o.length,end:r.end-o.length})):(t.replaceSelection(""+o+n+a),t.setSelectionRange({start:r.start+o.length,end:r.end+o.length}))}function sd(e,t){var n=e.split(/\n/),r=0,o=n.map((a,i)=>{if(typeof t=="string")return a.startsWith(t)?(r-=t.length,a.slice(t.length)):(r+=t.length,t+a);if(typeof t=="function"){if(a.startsWith(t(a,i)))return r-=t(a,i).length,a.slice(t(a,i).length);var s=t(a,i);return r+=s.length,t(a,i)+a}throw Error("insertion is expected to be either a string or a function")}).join(`
59
- `);return{modifiedText:o,insertionLength:r}}var k5={name:"bold",keyCommand:"bold",shortcuts:"ctrlcmd+b",prefix:"**",buttonProps:{"aria-label":"Add bold text (ctrl + b)",title:"Add bold text (ctrl + b)"},icon:c.jsx("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 384 512",children:c.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=an({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},u1={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:c.jsx("svg",{width:"13",height:"13",role:"img",viewBox:"0 0 156 156",children:c.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=an({text:e.text,selection:e.selection,prefix:"```\n",suffix:"\n```"}),r=t.setSelectionRange(n),o="\n```\n",a="\n```\n";r.selectedText.length>=o.length+a.length-2&&r.selectedText.startsWith(o)&&r.selectedText.endsWith(a)?(o="```\n",a="\n```"):((r.selection.start>=1&&e.text.slice(r.selection.start-1,r.selection.start)===`
60
- `||r.selection.start===0)&&(o="```\n"),(r.selection.end<=e.text.length-1&&e.text.slice(r.selection.end,r.selection.end+1)===`
61
- `||r.selection.end===e.text.length)&&(a="\n```"));var i=an({text:e.text,selection:e.selection,prefix:o,suffix:a}),s=t.setSelectionRange(i);Zt({api:t,selectedText:s.selectedText,selection:e.selection,prefix:o,suffix:a})}},D5={name:"code",keyCommand:"code",shortcuts:"ctrlcmd+j",prefix:"`",buttonProps:{"aria-label":"Insert code (ctrl + j)",title:"Insert code (ctrl + j)"},icon:c.jsx("svg",{width:"14",height:"14",role:"img",viewBox:"0 0 640 512",children:c.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(`
62
- `)===-1){var n=an({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}else u1.execute(e,t)}},w5={name:"comment",keyCommand:"comment",shortcuts:"ctrlcmd+/",prefix:"<!-- ",suffix:" -->",buttonProps:{"aria-label":"Insert comment (ctrl + /)",title:"Insert comment (ctrl + /)"},icon:c.jsx("svg",{height:"1em",width:"1em",viewBox:"0 0 25 25",children:c.jsxs("g",{fill:"none",fillRule:"evenodd",children:[c.jsx("polygon",{points:".769 .727 24.981 .727 24.981 24.727 .769 24.727"}),c.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"}),c.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=an({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix})}},us={keyCommand:"divider"},A5={name:"fullscreen",keyCommand:"fullscreen",shortcuts:"ctrlcmd+0",value:"fullscreen",buttonProps:{"aria-label":"Toggle fullscreen (ctrl + 0)",title:"Toggle fullscreen (ctrl+ 0)"},icon:c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:c.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,o)=>{t.textArea.focus(),o&&n&&r&&n({fullscreen:!r.fullscreen})}};function I5(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var P5=(e,t)=>{var n=K({children:e,icon:c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:c.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 o=K({},(I5(r),r));return o.parent=n,K({},o)})),n},R5={name:"hr",keyCommand:"hr",shortcuts:"ctrlcmd+h",prefix:`
63
-
64
- ---
65
- `,suffix:"",buttonProps:{"aria-label":"Insert HR (ctrl + h)",title:"Insert HR (ctrl + h)"},icon:c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 175 175",children:c.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=an({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)?Zt({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}),Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}))}},M5={name:"image",keyCommand:"image",shortcuts:"ctrlcmd+k",prefix:"![image](",suffix:")",buttonProps:{"aria-label":"Add image (ctrl + k)",title:"Add image (ctrl + k)"},icon:c.jsx("svg",{width:"13",height:"13",viewBox:"0 0 20 20",children:c.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=an({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")?Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(n=an({text:e.text,selection:e.selection,prefix:"![",suffix:"]()"}),r=t.setSelectionRange(n),r.selectedText.length===0?Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"![image",suffix:"](url)"}):Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"![",suffix:"]()"}))}},O5={name:"italic",keyCommand:"italic",shortcuts:"ctrlcmd+i",prefix:"*",buttonProps:{"aria-label":"Add italic text (ctrl + i)",title:"Add italic text (ctrl + i)"},icon:c.jsx("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 320 512",children:c.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=an({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},N5={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:c.jsx("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 520 520",children:c.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=an({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=an({text:e.text,selection:e.selection,prefix:"[](",suffix:")"}),r=t.setSelectionRange(n),Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"[](",suffix:")"})):r.selectedText.length===0?Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"[title",suffix:"](url)"}):Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix})}},ld=(e,t,n)=>{var r=an({text:e.text,selection:e.selection,prefix:e.command.prefix}),o=t.setSelectionRange(r),a=s1(o.text,o.selection.start),i=Array(a+1).join(`
66
- `),s=l1(o.text,o.selection.end),l=Array(s+1).join(`
67
- `),{modifiedText:u,insertionLength:d}=sd(o.selectedText,n);if(d<0){var f=o.selection.start,h=o.selection.end;o.selection.start>0&&e.text.slice(o.selection.start-1,o.selection.start)===`
68
- `&&(f-=1),o.selection.end<e.text.length-1&&e.text.slice(o.selection.end,o.selection.end+1)===`
69
- `&&(h+=1),t.setSelectionRange({start:f,end:h}),t.replaceSelection(""+u),t.setSelectionRange({start:f,end:f+u.length})}else{t.replaceSelection(""+i+u+l);var p=o.selection.start+a,m=p+u.length;t.setSelectionRange({start:p,end:m})}},L5={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:c.jsx("svg",{"data-name":"unordered-list",width:"12",height:"12",viewBox:"0 0 512 512",children:c.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)=>{ld(e,t,"- ")}},F5={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:c.jsx("svg",{"data-name":"ordered-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:c.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)=>{ld(e,t,(n,r)=>r+1+". ")}},_5={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:c.jsx("svg",{"data-name":"checked-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:c.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)=>{ld(e,t,(n,r)=>"- [ ] ")}},B5={name:"preview",keyCommand:"preview",value:"preview",shortcuts:"ctrlcmd+9",buttonProps:{"aria-label":"Preview code (ctrl + 9)",title:"Preview code (ctrl + 9)"},icon:c.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[c.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"}),c.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,o)=>{t.textArea.focus(),o&&n&&r&&n({preview:"preview"})}},j5={name:"edit",keyCommand:"preview",value:"edit",shortcuts:"ctrlcmd+7",buttonProps:{"aria-label":"Edit code (ctrl + 7)",title:"Edit code (ctrl + 7)"},icon:c.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[c.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"}),c.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,o)=>{t.textArea.focus(),o&&n&&r&&n({preview:"edit"})}},$5={name:"live",keyCommand:"preview",value:"live",shortcuts:"ctrlcmd+8",buttonProps:{"aria-label":"Live code (ctrl + 8)",title:"Live code (ctrl + 8)"},icon:c.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[c.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"}),c.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,o)=>{t.textArea.focus(),o&&n&&r&&n({preview:"live"})}},H5={name:"quote",keyCommand:"quote",shortcuts:"ctrlcmd+q",prefix:"> ",buttonProps:{"aria-label":"Insert a quote (ctrl + q)",title:"Insert a quote (ctrl + q)"},icon:c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:c.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=an({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n),o=s1(r.text,r.selection.start),a=Array(o+1).join(`
70
- `),i=l1(r.text,r.selection.end),s=Array(i+1).join(`
71
- `),l=sd(r.selectedText,e.command.prefix);t.replaceSelection(""+a+l.modifiedText+s);var u=r.selection.start+o,d=u+l.modifiedText.length;t.setSelectionRange({start:u,end:d})}},U5={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:c.jsx("svg",{"data-name":"strikethrough",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:c.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=an({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},c1={name:"heading1",keyCommand:"heading1",shortcuts:"ctrlcmd+1",prefix:"# ",suffix:"",buttonProps:{"aria-label":"Insert Heading 1 (ctrl + 1)",title:"Insert Heading 1 (ctrl + 1)"},icon:c.jsx("div",{style:{fontSize:18,textAlign:"left"},children:"Heading 1"}),execute:(e,t)=>{ha({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},z5=c1;function ha(e){var{state:t,api:n,prefix:r,suffix:o=r}=e,a=ti({text:t.text,selection:t.selection}),i=n.setSelectionRange(a);Zt({api:n,selectedText:i.selectedText,selection:t.selection,prefix:r,suffix:o})}K({},c1,{icon:c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:c.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 V5={name:"heading2",keyCommand:"heading2",shortcuts:"ctrlcmd+2",prefix:"## ",suffix:"",buttonProps:{"aria-label":"Insert Heading 2 (ctrl + 2)",title:"Insert Heading 2 (ctrl + 2)"},icon:c.jsx("div",{style:{fontSize:16,textAlign:"left"},children:"Heading 2"}),execute:(e,t)=>{ha({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},W5=V5,q5={name:"heading3",keyCommand:"heading3",shortcuts:"ctrlcmd+3",prefix:"### ",suffix:"",buttonProps:{"aria-label":"Insert Heading 3 (ctrl + 3)",title:"Insert Heading 3 (ctrl + 3)"},icon:c.jsx("div",{style:{fontSize:15,textAlign:"left"},children:"Heading 3"}),execute:(e,t)=>{ha({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},Y5=q5,K5={name:"heading4",keyCommand:"heading4",shortcuts:"ctrlcmd+4",prefix:"#### ",suffix:"",buttonProps:{"aria-label":"Insert Heading 4 (ctrl + 4)",title:"Insert Heading 4 (ctrl + 4)"},icon:c.jsx("div",{style:{fontSize:14,textAlign:"left"},children:"Heading 4"}),execute:(e,t)=>{ha({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},G5=K5,Q5={name:"heading5",keyCommand:"heading5",shortcuts:"ctrlcmd+5",prefix:"##### ",suffix:"",buttonProps:{"aria-label":"Insert Heading 5 (ctrl + 5)",title:"Insert Heading 5 (ctrl + 5)"},icon:c.jsx("div",{style:{fontSize:12,textAlign:"left"},children:"Heading 5"}),execute:(e,t)=>{ha({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},X5=Q5,Z5={name:"heading6",keyCommand:"heading6",shortcuts:"ctrlcmd+6",prefix:"###### ",suffix:"",buttonProps:{"aria-label":"Insert Heading 6 (ctrl + 6)",title:"Insert Heading 6 (ctrl + 6)"},icon:c.jsx("div",{style:{fontSize:12,textAlign:"left"},children:"Heading 6"}),execute:(e,t)=>{ha({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},J5=Z5,e4={name:"table",keyCommand:"table",prefix:`
72
- | Header | Header |
73
- |--------|--------|
74
- | Cell | Cell |
75
- | Cell | Cell |
76
- | Cell | Cell |
77
-
78
- `,suffix:"",buttonProps:{"aria-label":"Add table",title:"Add table"},icon:c.jsx("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 512 512",children:c.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=an({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)?Zt({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}),Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}))}},t4={name:"help",keyCommand:"help",buttonProps:{"aria-label":"Open help",title:"Open help"},icon:c.jsx("svg",{viewBox:"0 0 16 16",width:"12px",height:"12px",children:c.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")}},n4=()=>[k5,O5,U5,R5,P5([z5,W5,Y5,G5,X5,J5],{name:"title",groupName:"title",buttonProps:{"aria-label":"Insert title",title:"Insert title"}}),us,N5,H5,D5,u1,w5,M5,e4,us,L5,F5,_5,us,t4],r4=()=>[j5,$5,B5,us,A5];function Fs(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 ud{constructor(t){this.textArea=void 0,this.textArea=t}replaceSelection(t){return Wo(this.textArea,t),Fs(this.textArea)}setSelectionRange(t){return this.textArea.focus(),this.textArea.selectionStart=t.start,this.textArea.selectionEnd=t.end,Fs(this.textArea)}}class cd{constructor(t){this.textArea=void 0,this.textApi=void 0,this.textArea=t,this.textApi=new ud(t)}getState(){return this.textArea?Fs(this.textArea):!1}executeCommand(t,n,r,o){t.execute&&t.execute(K({command:t},Fs(this.textArea)),this.textApi,n,r,o)}}function cs(e){e.stopPropagation(),e.preventDefault()}function Jp(e,t){cs(e);var n=e.target,r=new ud(n),o={start:n.selectionStart,end:n.selectionEnd};if(o=ti({text:n.value,selection:o}),!(t<0&&o.start<=0||t>0&&o.end>=n.value.length)){var a=n.value.slice(o.start,o.end);if(t<0){var i=ti({text:n.value,selection:{start:o.start-1,end:o.start-1}}),s=n.value.slice(i.start,i.end);r.setSelectionRange({start:i.start,end:o.end}),Wo(n,a+`
79
- `+s),r.setSelectionRange({start:i.start,end:i.start+a.length})}else{var l=ti({text:n.value,selection:{start:o.end+1,end:o.end+1}}),u=n.value.slice(l.start,l.end);r.setSelectionRange({start:o.start,end:l.end}),Wo(n,u+`
80
- `+a),r.setSelectionRange({start:l.end-a.length,end:l.end})}}}function o4(e,t,n){t===void 0&&(t=2),n===void 0&&(n=!1);var r=e.target,o=r.value.substr(0,r.selectionStart),a=o.split(`
81
- `),i=a[a.length-1],s=new ud(r);if(!n&&e.code&&e.code.toLowerCase()==="tab"){cs(e);var l=new Array(t+1).join(" ");if(r.selectionStart!==r.selectionEnd){var u=r.value.substring(0,r.selectionStart).split(`
82
- `),d=r.value.substring(0,r.selectionEnd).split(`
83
- `),f=[];d.forEach((L,F)=>{L!==u[F]&&f.push(L)});var h=f.join(`
84
- `),p=r.value.substring(r.selectionStart,r.selectionEnd),m=r.value.substring(0,r.selectionStart).length;s.setSelectionRange({start:r.value.indexOf(h),end:r.selectionEnd});var b=sd(h,e.shiftKey?"":l),y=b.modifiedText;e.shiftKey&&(y=y.split(`
85
- `).map(L=>L.replace(new RegExp("^"+l),"")).join(`
86
- `)),s.replaceSelection(y);var x=e.shiftKey?-t:t,E=e.shiftKey?-f.length*t:f.length*t;s.setSelectionRange({start:m+x,end:m+p.length+E})}else return Wo(r,l)}else if(e.keyCode===13&&e.code.toLowerCase()==="enter"&&(/^(-|\*)\s/.test(i)||/^\d+.\s/.test(i))&&!e.shiftKey){cs(e);var v=`
87
- - `;return i.startsWith("*")&&(v=`
88
- * `),(i.startsWith("- [ ]")||i.startsWith("- [X]")||i.startsWith("- [x]"))&&(v=`
89
- - [ ] `),/^\d+.\s/.test(i)&&(v=`
90
- `+(parseInt(i)+1)+". "),Wo(r,v)}else if(e.code&&e.code.toLowerCase()==="keyd"&&e.ctrlKey){cs(e);var S={start:r.selectionStart,end:r.selectionEnd},k=S;S=ti({text:r.value,selection:S});var C=r.value.slice(S.start,S.end);s.setSelectionRange({start:S.end,end:S.end}),Wo(r,`
91
- `+C),s.setSelectionRange({start:k.start,end:k.end})}else e.code&&e.code.toLowerCase()==="arrowup"&&e.altKey?Jp(e,-1):e.code&&e.code.toLowerCase()==="arrowdown"&&e.altKey&&Jp(e,1)}var a4=["prefixCls","onChange"],i4=["markdown","commands","fullscreen","preview","highlightEnable","extraCommands","tabSize","defaultTabEnable","autoFocusEnd","textareaWarp","dispatch"];function s4(e){var{prefixCls:t,onChange:n}=e,r=Ue(e,a4),o=H.useContext(pa),{markdown:a,commands:i,fullscreen:s,preview:l,highlightEnable:u,extraCommands:d,tabSize:f,defaultTabEnable:h,autoFocusEnd:p,textareaWarp:m,dispatch:b}=o;Ue(o,i4);var y=H.useRef(null),x=H.useRef(),E=H.useRef({fullscreen:s,preview:l});H.useEffect(()=>{E.current={fullscreen:s,preview:l,highlightEnable:u}},[s,l,u]),H.useEffect(()=>{if(y.current&&b){var S=new cd(y.current);x.current=S,b({textarea:y.current,commandOrchestrator:S})}},[]),H.useEffect(()=>{if(p&&y.current&&m){y.current.focus();var S=y.current.value.length;y.current.setSelectionRange(S,S),setTimeout(()=>{m&&(m.scrollTop=m.scrollHeight),y.current&&(y.current.scrollTop=y.current.scrollHeight)},0)}},[m]);var v=S=>{o4(S,f,h),i1(S,[...i||[],...d||[]],x.current,b,E.current)};return H.useEffect(()=>(y.current&&y.current.addEventListener("keydown",v),()=>{y.current&&y.current.removeEventListener("keydown",v)}),[]),c.jsx("textarea",K({autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1},r,{ref:y,className:t+"-text-input "+(r.className?r.className:""),value:a,onChange:S=>{b&&b({markdown:S.target.value}),n&&n(S)}}))}var l4=["prefixCls","className","onScroll","renderTextarea"];function u4(e){var t=e||{},{prefixCls:n,className:r,onScroll:o,renderTextarea:a}=t,i=Ue(t,l4),{markdown:s,scrollTop:l,commands:u,extraCommands:d,dispatch:f}=H.useContext(pa),h=H.useRef(null),p=H.useRef(),m=H.createRef();H.useEffect(()=>{var y={};m.current&&(y.textareaWarp=m.current||void 0,m.current.scrollTop=l||0),f&&f(K({},y))},[]),H.useEffect(()=>{if(h.current&&f){var y=new cd(h.current);p.current=y,f({textarea:h.current,commandOrchestrator:y})}},[]);var b={WebkitTextFillColor:"initial",overflow:"auto"};return c.jsx("div",{ref:m,className:n+"-area "+(r||""),onScroll:o,children:c.jsx("div",{className:n+"-text",children:a?H.cloneElement(a(K({},i,{value:s,autoComplete:"off",autoCorrect:"off",spellCheck:"false",autoCapitalize:"off",className:n+"-text-input",style:{WebkitTextFillColor:"inherit",overflow:"auto"}}),{dispatch:f,onChange:i.onChange,shortcuts:i1,useContext:{commands:u,extraCommands:d,commandOrchestrator:p.current}}),{ref:h}):c.jsx(H.Fragment,{children:c.jsx(s4,K({prefixCls:n},i,{style:b}))})})})}function c4(e){var{prefixCls:t,groupName:n,commands:r,children:o}=e||{},{barPopup:a={}}=H.useContext(pa);return H.useMemo(()=>c.jsx("div",{className:t+"-toolbar-child "+(n&&a[n]?"active":""),onClick:i=>i.stopPropagation(),children:Array.isArray(r)?c.jsx(d1,K({commands:r},e,{isChild:!0})):o}),[r,a,n,t])}function eh(e){var{prefixCls:t,overflow:n}=e,{fullscreen:r,preview:o,barPopup:a={},components:i,commandOrchestrator:s,dispatch:l}=H.useContext(pa),u=H.useRef("");function d(f,h){if(l){var p={barPopup:K({},a)};f.keyCommand==="preview"&&(p.preview=f.value),f.keyCommand==="fullscreen"&&(p.fullscreen=!r),e.commands&&f.keyCommand==="group"?e.commands.forEach(m=>{h===m.groupName?p.barPopup[h]=!0:m.keyCommand&&(p.barPopup[m.groupName]=!1)}):(h||f.parent)&&Object.keys(p.barPopup||{}).forEach(m=>{p.barPopup[m]=!1}),Object.keys(p).length&&l(K({},p)),s&&s.executeCommand(f)}}return H.useEffect(()=>{document&&n&&(r?document.body.style.overflow="hidden":(u.current||(u.current=window.getComputedStyle(document.body,null).overflow),document.body.style.overflow=u.current))},[r,u,n]),c.jsx("ul",{children:(e.commands||[]).map((f,h)=>{if(f.keyCommand==="divider")return c.jsx("li",K({},f.liProps,{className:t+"-toolbar-divider"}),h);if(!f.keyCommand)return c.jsx(H.Fragment,{},h);var p=r&&f.keyCommand==="fullscreen"||f.keyCommand==="preview"&&o===f.value,m=f.children&&typeof f.children=="function"?f.children({getState:()=>s.getState(),textApi:s?s.textApi:void 0,close:()=>d({},f.groupName),execute:()=>d({execute:f.execute}),dispatch:l}):void 0,b=a&&o&&o==="preview"&&!/(preview|fullscreen)/.test(f.keyCommand),y=i?.toolbar||f.render,x=y&&typeof y=="function"?y(f,!!b,d,h):null;return c.jsxs("li",K({},f.liProps,{className:p?"active":"",children:[x&&H.isValidElement(x)&&x,!x&&!f.buttonProps&&f.icon,!x&&f.buttonProps&&H.createElement("button",K({type:"button",key:h,disabled:b,"data-name":f.name},f.buttonProps,{onClick:E=>{E.stopPropagation(),d(f,f.groupName)}}),f.icon),f.children&&c.jsx(c4,{overflow:n,groupName:f.groupName,prefixCls:t,children:m,commands:Array.isArray(f.children)?f.children:void 0})]}),h)})})}function d1(e){e===void 0&&(e={});var{prefixCls:t,isChild:n,className:r}=e,{commands:o,extraCommands:a}=H.useContext(pa);return c.jsxs("div",{className:t+"-toolbar "+r,children:[c.jsx(eh,K({},e,{commands:e.commands||o||[]})),!n&&c.jsx(eh,K({},e,{commands:a||[]}))]})}function th(e){var{hideToolbar:t,toolbarBottom:n,placement:r,overflow:o,prefixCls:a}=e;if(t||r==="bottom"&&!n||r==="top"&&n)return null;var i=n?"bottom":"";return c.jsx(d1,{prefixCls:a,overflow:o,className:i})}var d4=e=>{var{prefixCls:t,onChange:n}=e||{},r=H.useRef(null),o=H.useRef(),a=H.useRef(e.height);H.useEffect(()=>{a.current!==e.height&&(a.current=e.height)},[e.height]);function i(d){if(o.current){var f,h=d.clientY||((f=d.changedTouches[0])==null?void 0:f.clientY),p=o.current.height+h-o.current.dragY;p>=e.minHeight&&p<=e.maxHeight&&n&&n(o.current.height+(h-o.current.dragY))}}function s(){var d,f;o.current=void 0,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",s),(d=r.current)==null||d.removeEventListener("touchmove",i),(f=r.current)==null||f.removeEventListener("touchend",s)}function l(d){var f,h,p;d.preventDefault();var m=d.clientY||((f=d.changedTouches[0])==null?void 0:f.clientY);o.current={height:a.current,dragY:m},document.addEventListener("mousemove",i),document.addEventListener("mouseup",s),(h=r.current)==null||h.addEventListener("touchmove",i,{passive:!1}),(p=r.current)==null||p.addEventListener("touchend",s,{passive:!1})}H.useEffect(()=>{if(document){var d,f;(d=r.current)==null||d.addEventListener("touchstart",l,{passive:!1}),(f=r.current)==null||f.addEventListener("mousedown",l)}return()=>{if(document){var h;(h=r.current)==null||h.removeEventListener("touchstart",l),document.removeEventListener("mousemove",i)}}},[]);var u=H.useMemo(()=>c.jsx("svg",{viewBox:"0 0 512 512",height:"100%",children:c.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 c.jsx("div",{className:t+"-bar",ref:r,children:u})},f4=["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 p4(e){return e===void 0&&(e={}),Object.keys(e).forEach(t=>{e[t]=!1}),e}var h4=H.forwardRef((e,t)=>{var n=e||{},{prefixCls:r="w-md-editor",className:o,value:a,commands:i=n4(),commandsFilter:s,direction:l,extraCommands:u=r4(),height:d=200,enableScroll:f=!0,visibleDragbar:h=typeof e.visiableDragbar=="boolean"?e.visiableDragbar:!0,highlightEnable:p=!0,preview:m="live",fullscreen:b=!1,overflow:y=!0,previewOptions:x={},textareaProps:E,maxHeight:v=1200,minHeight:S=100,autoFocus:k,autoFocusEnd:C=!1,tabSize:L=2,defaultTabEnable:F=!1,onChange:B,onStatistics:R,onHeightChange:_,hideToolbar:T,toolbarBottom:O=!1,components:A,renderTextarea:w}=n,M=Ue(n,f4),V=i.map(be=>s?s(be,!1):be).filter(Boolean),z=u.map(be=>s?s(be,!0):be).filter(Boolean),[U,D]=H.useReducer(v5,{markdown:a,preview:m,components:A,height:d,minHeight:S,highlightEnable:p,tabSize:L,defaultTabEnable:F,scrollTop:0,scrollTopPreview:0,commands:V,extraCommands:z,fullscreen:b,barPopup:{}}),Y=H.useRef(null),te=H.useRef(null),N=H.useRef(f);H.useImperativeHandle(t,()=>K({},U,{container:Y.current,dispatch:D})),H.useMemo(()=>N.current=f,[f]),H.useEffect(()=>{var be={};Y.current&&(be.container=Y.current||void 0),be.markdown=a||"",be.barPopup={},D&&D(K({},U,be))},[]);var ae=[o,"wmde-markdown-var",l?r+"-"+l:null,r,U.preview?r+"-show-"+U.preview:null,U.fullscreen?r+"-fullscreen":null].filter(Boolean).join(" ").trim();H.useMemo(()=>a!==U.markdown&&D({markdown:a||""}),[a,U.markdown]),H.useMemo(()=>m!==U.preview&&D({preview:m}),[m]),H.useMemo(()=>L!==U.tabSize&&D({tabSize:L}),[L]),H.useMemo(()=>p!==U.highlightEnable&&D({highlightEnable:p}),[p]),H.useMemo(()=>k!==U.autoFocus&&D({autoFocus:k}),[k]),H.useMemo(()=>C!==U.autoFocusEnd&&D({autoFocusEnd:C}),[C]),H.useMemo(()=>b!==U.fullscreen&&D({fullscreen:b}),[b]),H.useMemo(()=>d!==U.height&&D({height:d}),[d]),H.useMemo(()=>d!==U.height&&_&&_(U.height,d,U),[d,_,U]),H.useMemo(()=>i!==U.commands&&D({commands:V}),[e.commands]),H.useMemo(()=>u!==U.extraCommands&&D({extraCommands:z}),[e.extraCommands]);var Q=H.useRef(),q=H.useRef("preview"),X=H.useRef(!1);H.useMemo(()=>{Q.current=U.textareaWarp,U.textareaWarp&&(U.textareaWarp.addEventListener("mouseover",()=>{q.current="text"}),U.textareaWarp.addEventListener("mouseleave",()=>{q.current="preview"}))},[U.textareaWarp]);var G=(be,ie)=>{if(N.current){var Ie=Q.current,ve=te.current?te.current:void 0;if(X.current||(q.current=ie,X.current=!0),Ie&&ve){var Ve=(Ie.scrollHeight-Ie.offsetHeight)/(ve.scrollHeight-ve.offsetHeight);be.target===Ie&&q.current==="text"&&(ve.scrollTop=Ie.scrollTop/Ve),be.target===ve&&q.current==="preview"&&(Ie.scrollTop=ve.scrollTop*Ve);var we=0;q.current==="text"?we=Ie.scrollTop||0:q.current==="preview"&&(we=ve.scrollTop||0),D({scrollTop:we})}}},ee=r+"-preview "+(x.className||""),oe=be=>G(be,"preview"),ne=H.useMemo(()=>c.jsx("div",{ref:te,className:ee,children:c.jsx(o1,K({},x,{onScroll:oe,source:U.markdown||""}))}),[ee,x,U.markdown]),pe=A?.preview&&A?.preview(U.markdown||"",U,D);pe&&H.isValidElement(pe)&&(ne=c.jsx("div",{className:ee,ref:te,onScroll:oe,children:pe}));var Z=K({},M.style,{height:U.height||"100%"}),J=()=>D({barPopup:K({},p4(U.barPopup))}),ye=be=>D({height:be}),de=be=>{if(B&&B(be.target.value,be,U),E&&E.onChange&&E.onChange(be),U.textarea&&U.textarea instanceof HTMLTextAreaElement&&R){var ie=new cd(U.textarea),Ie=ie.getState()||{};R(K({},Ie,{lineCount:be.target.value.split(`
92
- `).length,length:be.target.value.length}))}};return c.jsx(pa.Provider,{value:K({},U,{dispatch:D}),children:c.jsxs("div",K({ref:Y,className:ae},M,{onClick:J,style:Z,children:[c.jsx(th,{hideToolbar:T,toolbarBottom:O,prefixCls:r,overflow:y,placement:"top"}),c.jsxs("div",{className:r+"-content",children:[/(edit|live)/.test(U.preview||"")&&c.jsx(u4,K({className:r+"-input",prefixCls:r,autoFocus:k},E,{onChange:de,renderTextarea:A?.textarea||w,onScroll:be=>G(be,"text")})),/(live|preview)/.test(U.preview||"")&&ne]}),h&&!U.fullscreen&&c.jsx(d4,{prefixCls:r,height:U.height,maxHeight:v,minHeight:S,onChange:ye}),c.jsx(th,{hideToolbar:T,toolbarBottom:O,prefixCls:r,overflow:y,placement:"bottom"})]}))})}),f1=h4;f1.Markdown=o1;const Cu={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"}]}}},m4={...Cu,patterns:[...Cu.patterns,{include:"#docvar"}],repository:{...Cu.repository,docvar:{patterns:[{match:"\\<\\<[^(\\>\\>)]*\\>\\>",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"markup.italic.markdown"}]}}},g4={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"}]}}},b4="github-light";let Tu;function y4(){return Tu||(Tu=(async()=>{const[{createHighlighterCore:e},{createOnigurumaEngine:t},{default:n},{default:r},{default:o},{default:a}]=await Promise.all([Promise.resolve().then(()=>require("./core-GkjltsUf.cjs.js")),Promise.resolve().then(()=>require("./engine-oniguruma-BkproSVE.cjs.js")),Promise.resolve().then(()=>require("./sql-BqWZrLHB.cjs.js")),Promise.resolve().then(()=>require("./json-y-J1j5EW.cjs.js")),Promise.resolve().then(()=>require("./typescript-BqvpT6pB.cjs.js")),Promise.resolve().then(()=>require("./github-light-BFTOhCbz.cjs.js"))]);return e({engine:t(Promise.resolve().then(()=>require("./wasm-Dw4u1m6u.cjs.js"))),themes:[a],langs:[n,r,o,{name:"malloy",scopeName:"source.malloy",embeddedLangs:["sql"],...m4},{name:"malloysql",scopeName:"source.malloy-sql",embeddedLangs:["sql"],...g4}]})})()),Tu}async function _s(e,t){return(await y4()).codeToHtml(e,{lang:t,theme:b4})}function Xt(e){const{server:t}=it.useServer(),n={...e,queryKey:[...e.queryKey,t],queryFn:async()=>{try{return await e.queryFn()}catch(r){if(r&&typeof r=="object"&&"response"in r){const o=r;if(o.response?.data){const a=new Error(o.response.data.message||o.message);throw a.status=o.response.status,a.data=o.response.data,a}}throw r}},retry:!1,throwOnError:!1};return wr.useQuery(n,it.globalQueryClient)}function ir(e){const t={...e,mutationFn:async n=>{try{return await e.mutationFn(n)}catch(r){if(r&&typeof r=="object"&&"response"in r){const o=r;if(o.response?.data){const a=new Error(o.response.data.message||o.message);throw a.status=o.response.status,a.data=o.response.data,a}}throw r}},retry:!1,throwOnError:!1};return wr.useMutation(t,it.globalQueryClient)}const Nt=e=>{const t=new URL(e),n={};if(t.protocol!=="publisher:")throw new Error(`Failed to parse resource URI: ${e}`);const r=(t.hostname+t.pathname).split("/");for(let o=0;o<r.length;o+=2){const a=r[o];a==="environments"?n.environmentName=decodeURI(r[o+1])||void 0:a==="packages"?n.packageName=decodeURI(r[o+1])||void 0:a==="connections"?n.connectionName=decodeURI(r[o+1])||void 0:a==="models"&&(n.modelPath=decodeURI(r.slice(o+1).join("/"))||void 0)}if(n.versionId=t.searchParams.get("versionId")||void 0,!n.environmentName)throw new Error(`Failed to parse resource URI: ${e}`);return n},Pi=e=>{if(!e.environmentName)throw new Error(`Failed to encode resource URI, missing environment name: ${e}`);let t=`publisher://environments/${e.environmentName}`;return e.packageName&&(t+=`/packages/${e.packageName}`),e.connectionName&&(t+=`/connections/${e.connectionName}`),e.modelPath&&(t+=`/models/${e.modelPath}`),e.packageName&&e.versionId&&(t+=`?versionId=${e.versionId}`),t};function dd({sourceAndPaths:e,selectedSourceIndex:t,existingQuery:n,onQueryChange:r,onSourceChange:o,resourceUri:a}){return H.useEffect(()=>{o&&o(t)},[t,o]),c.jsx(Oc,{children:c.jsxs(Rt.Stack,{spacing:2,component:"section",children:[c.jsx(p1,{sourceAndPath:e[t],existingQuery:n,onChange:i=>{r&&r(i)},resourceUri:a}),c.jsx(Rt.Box,{height:"5px"})]})})}function ds(){return{query:void 0,malloyQuery:void 0,malloyResult:void 0}}function x4({sourceAndPath:e,onChange:t,existingQuery:n,explorerComponents:r,QueryBuilder:o,resourceUri:a}){const[i,s]=H.useState(n||ds()),[l,u]=H.useState(void 0);H.useEffect(()=>{n&&s(n)},[n]);const[d,f]=H.useState([]),{MalloyExplorerProvider:h,QueryPanel:p,ResizableCollapsiblePanel:m,ResultPanel:b,SourcePanel:y}=r;H.useEffect(()=>{t&&t(i)},[t,i]);const{environmentName:x,packageName:E,versionId:v}=Nt(a),{apiClients:S}=it.useServer(),k=ir({mutationFn:()=>{const B=typeof i?.malloyQuery=="string"?i.malloyQuery:new o.ASTQuery({source:e.sourceInfo,query:i?.malloyQuery}).toMalloy();return u({executionState:"running",query:i?.malloyQuery,queryResolutionStartMillis:Date.now(),onCancel:()=>{k.reset(),u(void 0)},response:{result:{}}}),s({...i,query:B}),S.models.executeQueryModel(x,E,e.modelPath,{query:B,sourceName:void 0,queryName:void 0,versionId:v})},onSuccess:B=>{if(B){const R=JSON.parse(B.data.result);s({...i,malloyResult:R}),u(_=>_?{..._,executionState:"finished",response:{result:R}}:void 0)}},onError:B=>{u(void 0),console.error("Query execution error:",B)}}),[C,L]=H.useState(e.sourceInfo.name);H.useEffect(()=>{C!==e.sourceInfo.name&&(L(e.sourceInfo.name),s(ds()),u(void 0))},[e,C]);const F=H.useCallback(B=>{s({...i,malloyQuery:B,malloyResult:void 0})},[i]);return C!==e.sourceInfo.name?c.jsx("div",{children:"Loading..."}):c.jsx(Um,{sx:{border:"1px solid #e0e0e0",borderRadius:"8px",overflow:"hidden"},children:c.jsx(h,{source:e.sourceInfo,query:i?.malloyQuery,topValues:[],onFocusedNestViewPathChange:f,focusedNestViewPath:d,onQueryChange:F,children:c.jsxs("div",{style:{display:"flex",height:"100%",overflowY:"auto"},children:[c.jsx(m,{isInitiallyExpanded:!0,initialWidth:180,minWidth:180,icon:"database",title:e.sourceInfo.name,children:c.jsx(y,{onRefresh:()=>s(ds())})}),c.jsx(m,{isInitiallyExpanded:!0,initialWidth:280,minWidth:280,icon:"filterSliders",title:"Query",children:c.jsx(p,{runQuery:()=>{console.log(`running query with: ${i?.malloyQuery}`);try{k.mutate()}catch(B){console.error("Error running query:",B)}}})}),c.jsx(b,{source:e.sourceInfo,draftQuery:i?.malloyQuery,setDraftQuery:B=>s({...i,malloyQuery:B}),submittedQuery:l,options:{showRawQuery:!0}})]})})},e.sourceInfo.name)}function p1(e){const[t,n]=H.useState(null),[r,o]=H.useState(null),[a,i]=H.useState(!0);return H.useEffect(()=>{let s=!0;return Promise.all([import("@malloydata/malloy-explorer"),import("@malloydata/malloy-query-builder")]).then(([l,u])=>{s&&(n(l),o(u),i(!1))}).catch(l=>{console.error("Failed to load Malloy components:",l),s&&i(!1)}),()=>{s=!1}},[]),a||!t||!r?c.jsx(z2,{children:c.jsx(Um,{children:c.jsx(Rt.Box,{sx:{alignItems:"center",justifyContent:"center",height:"200px",color:"text.secondary"},children:"Loading explorer..."})})}):c.jsx(x4,{...e,explorerComponents:t,QueryBuilder:r,resourceUri:e.resourceUri})}function hn({text:e,size:t=20,color:n="primary",thickness:r=3.6,centered:o=!0,spacing:a=2,textVariant:i="body2"}){const s=c.jsxs(P.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:a},children:[c.jsx(P.CircularProgress,{size:t,color:n,thickness:r}),e&&c.jsx(P.Typography,{variant:i,color:"text.secondary",children:e})]});return o?c.jsx(P.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",width:"100%"},children:s}):s}const E4=H.lazy(()=>Promise.resolve().then(()=>x9));function ma({result:e,maxHeight:t,maxResultSize:n=0}){const r=H.useRef(null),[o,a]=H.useState(t),[i,s]=H.useState(!1);if(!e)return null;if(n>0&&e.length>n&&!i)return c.jsxs(P.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,p:4,backgroundColor:"#fafafa",border:"1px solid",borderColor:"#e0e0e0",borderRadius:1},children:[c.jsx(fn.Warning,{sx:{fontSize:48,color:"#757575"}}),c.jsx(P.Typography,{variant:"h6",color:"text.secondary",align:"center",children:"Processing large results may cause browser performance issues. Proceed?"}),c.jsx(P.Button,{variant:"contained",color:"primary",onClick:()=>s(!0),children:"Proceed"})]});const u=c.jsx(hn,{text:"Loading...",centered:!0,size:32}),d=Math.min(t,o);return c.jsx(P.Box,{ref:r,sx:{position:"relative",height:"auto",border:"0px",borderRadius:0,overflow:"hidden"},children:e&&c.jsx(H.Suspense,{fallback:u,children:c.jsx(E4,{result:e,height:d,onSizeChange:a})})})}function C4({cell:e,sourceAndPaths:t,resourceUri:n,onQueryChange:r,onSourceChange:o}){const a={query:e.value,malloyResult:e.result?JSON.parse(e.result):void 0,malloyQuery:e.queryInfo?JSON.parse(e.queryInfo):void 0},i=t.findIndex(s=>s.sourceInfo.name===e.sourceName);return c.jsx(dd,{resourceUri:n,sourceAndPaths:t,selectedSourceIndex:i>=0?i:0,existingQuery:a,onQueryChange:r,onSourceChange:o})}function T4({cell:e,editingMalloy:t,editingMarkdown:n,sourceAndPaths:r,resourceUri:o,onCellChange:a,onClose:i,onEdit:s,onDelete:l,addButtonCallback:u}){const[d,f]=H.useState(e.value),[h,p]=H.useState(!1),[m,b]=H.useState(!1),[y,x]=H.useState(),[E]=H.useState(),[v,S]=H.useState(ds()),[k,C]=H.useState(!1),[L,F]=H.useState(e.sourceName?r.findIndex(Y=>Y.sourceInfo.name===e.sourceName):0);H.useEffect(()=>{e.isMarkdown||_s(e.value,"malloy").then(Y=>{x(Y)})},[e]),H.useEffect(()=>{document.documentElement.setAttribute("data-color-mode","light")});const[B,R]=H.useState(!1),_=()=>{l(),R(!1)},T=r.length===0,O=H.useCallback(()=>{const Y=r[L],te=Y?.modelPath||e.modelPath||"",N=Y?.sourceInfo.name||e.sourceName||"";a({...e,value:e.isMarkdown?d:v.query,result:v.malloyResult?JSON.stringify(v.malloyResult):void 0,queryInfo:v.malloyQuery?JSON.stringify(v.malloyQuery):void 0,sourceName:N,modelPath:te})},[e,d,v,a,L,r]),A=c.jsx(P.Tooltip,{title:"Delete Cell",children:c.jsx(P.IconButton,{size:"small",onClick:()=>R(!0),children:c.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.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"})})})}),w=c.jsxs(P.Dialog,{open:B,onClose:()=>R(!1),children:[c.jsx(P.DialogTitle,{children:"Confirm Delete"}),c.jsx(P.DialogContent,{children:c.jsx(P.Typography,{children:"Are you sure you want to delete this cell?"})}),c.jsxs(P.DialogActions,{children:[c.jsx(P.Button,{onClick:()=>R(!1),children:"Cancel"}),c.jsx(P.Button,{onClick:_,color:"error",children:"Delete"})]})]}),M=()=>{O(),i()},V=e.isMarkdown?c.jsxs(c.Fragment,{children:[n?c.jsx(P.Tooltip,{title:"Save",children:c.jsx(P.IconButton,{size:"small",onClick:M,children:c.jsx($i,{})})}):c.jsx(P.Tooltip,{title:"Edit",children:c.jsx(P.IconButton,{size:"small",onClick:s,children:c.jsx(Sf,{})})}),!n&&A]}):c.jsxs(c.Fragment,{children:[!t&&c.jsx(P.Tooltip,{title:h?"Hide Code":"View Code",children:c.jsx(P.IconButton,{size:"small",onClick:()=>{p(!h)},children:c.jsx(zm,{})})}),!t&&e.result&&c.jsx(P.Tooltip,{title:m?"Hide Embedding":"View Embedding",children:c.jsx(P.IconButton,{size:"small",onClick:()=>{b(!m)},children:c.jsx(Nc,{})})}),t&&c.jsx(P.Tooltip,{title:"Save",children:c.jsx(P.IconButton,{size:"small",onClick:M,children:c.jsx($i,{})})}),!t&&c.jsx(P.Tooltip,{title:"Edit",children:c.jsx(P.IconButton,{size:"small",onClick:s,children:c.jsx(Sf,{})})}),!t&&A]}),z=t||n,U=n?c.jsx(P.Tooltip,{title:"Save",children:c.jsx(P.IconButton,{size:"small",onClick:M,children:c.jsx($i,{})})}):t?c.jsx(P.Tooltip,{title:"Save",children:c.jsx(P.IconButton,{size:"small",onClick:M,children:c.jsx($i,{})})}):null,D=k&&c.jsx(P.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:!z&&c.jsxs(c.Fragment,{children:[u(!0),u(!1),V]})||U});return c.jsxs(ws,{sx:{position:"relative",marginTop:"5px",marginBottom:"5px",borderWidth:"1.5px",backgroundColor:"#fff",minHeight:"50px"},onMouseEnter:()=>C(!0),onMouseLeave:()=>{C(!1)},children:[D,e.isMarkdown?c.jsx(c.Fragment,{children:n?c.jsx(f1,{value:d,preview:"edit",autoFocus:!0,onChange:Y=>{f(Y),a({...e,value:Y})},onBlur:()=>{O(),k||M()}}):c.jsx(P.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:e.value?c.jsx(P.Box,{onClick:s,sx:{cursor:"pointer"},children:c.jsx(Ts,{children:e.value})}):c.jsxs(P.Box,{onClick:s,sx:{cursor:"pointer"},children:[c.jsx(P.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"Markdown is empty"}),c.jsx(P.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Click to edit."})]})})}):c.jsxs(c.Fragment,{children:[c.jsx(P.Collapse,{in:m,timeout:"auto",unmountOnExit:!0,children:c.jsx(P.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:c.jsx(P.Typography,{component:"div",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:E}})})}),c.jsx(P.Collapse,{in:h,timeout:"auto",unmountOnExit:!0,children:c.jsx(P.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:c.jsx(P.Typography,{component:"div",className:"content",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:y}})})}),t&&(T?c.jsxs(c.Fragment,{children:[c.jsx(P.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"No Model Imports"}),c.jsx(P.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Please add a model import above."})]}):c.jsx(C4,{sourceAndPaths:r,resourceUri:o,onQueryChange:Y=>{S(Y)},onSourceChange:Y=>{F(Y)},cell:e})),!t&&e.result&&c.jsx(ws,{variant:"outlined",sx:{borderRadius:0},children:c.jsx(ma,{result:e.result,maxHeight:800})}),!t&&!e.result&&c.jsxs(P.Box,{onClick:s,sx:{cursor:"pointer"},children:[c.jsx(P.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"Explore is empty"}),c.jsx(P.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Click to edit."})]})]}),B&&w]})}const h1=H.createContext(void 0);function v4({children:e,workbookStorage:t}){const n=H.useMemo(()=>({workbookStorage:t}),[t]);return c.jsx(h1.Provider,{value:n,children:e})}function fd(){const e=H.useContext(h1);if(!e)throw new Error("useWorkbookStorage must be used within a WorkbookStorageProvider");return e}const Sr=xt(c.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"})),S4=xt(c.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"}));function mn({error:e,context:t}){const n=e.data?.message||"Unknown Error";return c.jsxs(c.Fragment,{children:[t&&c.jsx(P.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:t}),c.jsx("pre",{style:{whiteSpace:"pre-wrap",color:"red",padding:"10px",margin:"auto"},children:n})]})}function k4({initialSelectedModels:e,onModelChange:t,resourceUri:n}){const{environmentName:r,packageName:o,versionId:a}=Nt(n),{apiClients:i}=it.useServer(),{data:s,isLoading:l,isSuccess:u,isError:d,error:f}=Xt({queryKey:["models",r,o,a],queryFn:()=>i.models.listModels(r,o,a)}),[h,p]=H.useState(e||[]),[m,b]=H.useState(null);H.useEffect(()=>{p(e||[])},[e]);const y=v=>{const S=h.filter(k=>k!==v);p(S),t(S)},x=v=>{const S=[...h,v];p(S),t(S),b(null)};let E=[];return u&&s?.data&&(E=s.data.filter(v=>!h.includes(v.path)).map(v=>v.path)),d?c.jsx(mn,{error:f,context:`${r} > ${o} > Model Picker`}):c.jsxs(c.Fragment,{children:[c.jsxs(P.FormControl,{fullWidth:!0,children:[l&&c.jsx(P.Typography,{children:"Loading..."}),c.jsxs(P.Stack,{direction:"row",spacing:1,children:[h.map(v=>c.jsx(P.Chip,{label:v,onDelete:()=>y(v),deleteIcon:c.jsx(Sr,{}),sx:{marginBottom:"5px"}},v)),c.jsx(P.Button,{size:"small",startIcon:c.jsx(S4,{}),onClick:v=>b(v.currentTarget),disabled:l||d||E.length===0,children:"Add Model"})]})]}),c.jsxs(P.Menu,{anchorEl:m,open:!!m,onClose:()=>b(null),children:[c.jsx(P.Typography,{variant:"subtitle2",sx:{ml:1},children:"Models"}),c.jsx(P.Divider,{}),E.length===0?c.jsx(P.MenuItem,{disabled:!0,children:"No models available"}):E.map(v=>c.jsx(P.MenuItem,{onClick:()=>x(v),children:c.jsx(P.Typography,{variant:"body2",children:v})},v))]})]})}function m1(){const e=dy.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")}}function D4({workbookPath:e,resourceUri:t}){const n=m1(),{server:r,getAccessToken:o}=it.useServer(),{apiClients:a}=it.useServer(),{workbookStorage:i}=fd(),{environmentName:s,packageName:l}=Nt(t),[u,d]=H.useState(void 0),[f,h]=H.useState(void 0);if(!i)throw new Error("Workbook storage be provided via WorkbookStorageProvider");const[p,m]=H.useState(),[b,y]=H.useState(),[x,E]=H.useState(),[v,S]=H.useState([]),[k,C]=H.useState(null),[L,F]=H.useState(null),B=!!k,R=()=>{C(null),F(null)},_=(Y,te)=>{p&&(m(p.insertCell(te,{isMarkdown:Y,value:""})),Y?E(te):y(te),R(),console.log("handleAddCell",Y,te))},[T,O]=H.useState(!1),A=()=>{O(!0)},w=async()=>{e&&i&&await i.deleteWorkbook(e).then(()=>{h(void 0),d(void 0)}).catch(Y=>{h(`Error deleting workbook: ${Y.message}`),d(void 0)}),O(!1),n(`/${s}/${l}`)},M=()=>{O(!1)},V=H.useCallback(async()=>{if(!p){console.log("No workbook data ref");return}try{m(await p.saveWorkbook()),h(void 0),d("Workbook saved")}catch(Y){h(`Error saving workbook: ${Y.message}`),d(void 0)}},[p]);if(H.useEffect(()=>{if(!p)return;(async()=>{const te=new Map(v.map(({modelPath:Q,sourceInfos:q})=>[Q,q])),N=[],ae=[];for(const Q of p.getModels())te.has(Q)?N.push({modelPath:Q,sourceInfos:te.get(Q)}):(console.log("Fetching model from Publisher",Q),ae.push(a.models.getModel(s,l,Q,void 0).then(q=>({modelPath:Q,sourceInfos:q.data.sourceInfos.map(X=>JSON.parse(X))}))));if(ae.length>0){const Q=await Promise.all(ae);S([...N,...Q])}else S(N)})()},[o,p,l,s,r]),H.useEffect(()=>{e&&Uo.loadWorkbook(i,e).then(Y=>{m(Y)})},[e,i]),!p)return c.jsx("div",{children:"Loading..."});const z=Y=>{const te=[];for(const N of Y)for(const ae of N.sourceInfos)te.push({modelPath:N.modelPath,sourceInfo:ae});return te},U=(Y,te)=>c.jsx(P.Button,{size:"small",startIcon:c.jsx(Mc,{}),onClick:()=>_(Y,te),variant:"contained",sx:{backgroundColor:"#fff",color:N=>N.palette.mode==="dark"?N.palette.grey[100]:N.palette.grey[700],boxShadow:"none","&:hover":{backgroundColor:N=>N.palette.mode==="dark"?N.palette.grey[500]:N.palette.grey[300],boxShadow:"none"}},children:Y?"Markdown":"Explore"}),D=c.jsxs(P.Box,{sx:{display:"flex",gap:1,justifyContent:"center",flex:2},children:[U(!1,p.getCells().length),U(!0,p.getCells().length)]});return c.jsxs(ws,{variant:"outlined",children:[c.jsxs(Hm,{children:[c.jsx(P.Box,{sx:{mb:2},children:c.jsx(P.Box,{sx:{minHeight:"24px"},children:f?c.jsx(P.Typography,{color:"error",variant:"body2",children:f}):u?c.jsx(P.Typography,{color:"success",variant:"body2",children:u}):c.jsx("span",{children:" "})})}),c.jsxs(Po,{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[c.jsxs(Po,{direction:"row",spacing:1,alignItems:"center",children:[c.jsx(P.Typography,{variant:"overline",sx:{fontSize:"13px",fontWeight:"bold",verticalAlign:"middle"},children:"Workbook"}),c.jsx(P.Typography,{variant:"subtitle2",sx:{fontSize:"13px",fontWeight:"normal",verticalAlign:"middle",ml:1},children:`${e.workspace} > ${e.path}`})]}),c.jsxs(Po,{sx:{display:"flex",flexDirection:"row",gap:1},children:[c.jsx(P.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:c.jsx(w4,{workbookData:p})}),c.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:[c.jsx(P.Button,{color:"error",onClick:A,size:"small",children:"Delete"}),c.jsxs(P.Dialog,{open:T,onClose:M,children:[c.jsx(P.DialogTitle,{children:"Delete Workbook"}),c.jsx(P.DialogContent,{children:c.jsxs(P.DialogContentText,{children:['Are you sure you want to delete the workbook "',e.path,'"? This action cannot be undone.']})}),c.jsxs(P.DialogActions,{children:[c.jsx(P.Button,{onClick:M,color:"primary",size:"small",children:"Cancel"}),c.jsx(P.Button,{onClick:w,color:"error",autoFocus:!0,size:"small",children:"Delete"})]})]})]})]})]}),c.jsx(P.Divider,{}),c.jsxs(Po,{sx:{display:"flex",flexDirection:"row",width:"100%",mt:2},children:[c.jsx(P.Box,{sx:{flex:1},children:c.jsx(k4,{initialSelectedModels:p.getModels(),onModelChange:Y=>{m(p.setModels(Y)),V()},resourceUri:t})}),c.jsx(P.Box,{sx:{flex:1}})]})]}),c.jsx(Oc,{children:c.jsxs(Po,{children:[p.getCells().length===0&&c.jsxs(c.Fragment,{children:[c.jsx(P.Typography,{sx:{textAlign:"center",p:2,variant:"subtitle2",fontWeight:"medium"},children:"Workbook is empty"}),c.jsx(P.Typography,{variant:"body2",sx:{textAlign:"center",mb:2,variant:"body2"},children:"Click the + buttons to add a markdown or code cell."})]}),p.getCells().map((Y,te)=>c.jsx(H.Fragment,{children:c.jsx(T4,{cell:Y,resourceUri:t,addButtonCallback:N=>U(N,te),sourceAndPaths:z(v),editingMarkdown:x===te,editingMalloy:b===te,onDelete:()=>{m(p.deleteCell(te)),V()},onCellChange:N=>{m(p.setCell(te,N))},onEdit:()=>{Y.isMarkdown?E(te):y(te)},onClose:()=>{Y.isMarkdown?E(void 0):y(void 0),V()}},`${te}-${Y.isMarkdown}-${e.workspace}-${e.path}`)},`${te}-${p.getCells().length}`)),D,c.jsxs(P.Menu,{anchorEl:k,open:B,onClose:R,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[c.jsx(P.MenuItem,{onClick:()=>_(!0,L??0),children:"Add Markdown"}),c.jsx(P.MenuItem,{onClick:()=>_(!1,L??0),children:"Add Malloy"})]}),c.jsx(Po,{sx:{flexDirection:"row",justifyContent:"flex-end",p:1}})]})})]})}function w4({workbookData:e}){const[t,n]=H.useState(!1),r=async()=>{if(!e)return;const o=e.toMalloyWorkbook();try{await navigator.clipboard.writeText(o),n(!0),setTimeout(()=>n(!1),1500)}catch{n(!1),alert("Failed to copy to clipboard")}};return c.jsx(P.Button,{color:"primary",onClick:r,size:"small",children:t?"Copied!":"Export"})}function g1({onWorkbookClick:e}){const{workbookStorage:t}=fd(),[n,r]=H.useState([]),[o,a]=H.useState(void 0);return H.useEffect(()=>{t&&t.listWorkspaces(!1).then(i=>{const s=[];Promise.all(i.map(async l=>{await t.listWorkbooks(l).then(u=>{s.push(...u)}).catch(u=>{a(`Error listing workbooks: ${u.message}`)})})).then(()=>{r(s),a(void 0)})})},[t]),c.jsxs(c.Fragment,{children:[o&&c.jsx(P.Box,{sx:{mb:2},children:c.jsx(P.Typography,{color:"error",variant:"body2",children:o})}),c.jsx(P.Divider,{}),c.jsx(P.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:c.jsxs(P.List,{dense:!0,children:[n.length===0&&c.jsx(P.ListItem,{children:c.jsx(P.ListItemText,{primary:"No workbooks found.",sx:{textAlign:"center"}})}),n.map(i=>c.jsx(P.ListItem,{onClick:s=>e(i,s),sx:{cursor:"pointer","&:hover":{backgroundColor:"action.hover"}},children:c.jsx(P.ListItemText,{primary:i.path})},i.path))]})})]})}const nh="Local";class A4{async listWorkspaces(t){return Promise.resolve([{name:nh,description:"Stored locally- only accessible to this browser",writeable:!0}])}async listWorkbooks(t){const n=[];for(let r=0;r<localStorage.length;r++){const o=localStorage.key(r);n.push({path:o,workspace:nh})}return n}async getWorkbook(t){const n=localStorage.getItem(t.path);if(n===null)throw new Error(`Notebook not found at path: ${t}`);return n}async deleteWorkbook(t){if(localStorage.getItem(t.path)===null)throw new Error(`Notebook not found at path: ${t}`);localStorage.removeItem(t.path)}async saveWorkbook(t,n){localStorage.setItem(t.path,n)}async moveWorkbook(t,n){const r=localStorage.getItem(t.path);if(r===null)throw new Error(`Notebook not found at path: ${t.path}`);localStorage.setItem(n.path,r),localStorage.removeItem(t.path)}}function I4({onWorkbookSelect:e}){const{workbookStorage:t}=fd(),[n,r]=H.useState(""),[o,a]=H.useState(""),[i,s]=H.useState([]),[l,u]=H.useState(null),[d,f]=H.useState(!1),[h,p]=H.useState(!1),m=!!l,b=C=>{u(C.currentTarget)},y=()=>{u(null)},x=()=>{p(!1)},E=()=>{f(!1),r(""),a("")};H.useEffect(()=>{t&&(console.log("fetching workspaces"),t.listWorkspaces(!0).then(C=>{s(C),C.length===1&&a(C[0].name)}).catch(C=>{console.error("Error fetching workspaces:",C),s([])}))},[t]);const v=(C,L)=>{p(!1),e(C,L)},S=C=>{f(!1),e({path:n,workspace:o},C),r(""),a("")},k=i.length===0;return c.jsxs(c.Fragment,{children:[c.jsx(P.Button,{"aria-controls":m?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":m?"true":void 0,onClick:b,variant:"contained",sx:{height:"40px",px:2,backgroundColor:"#fbbb04","&:hover":{backgroundColor:"#eab308"}},children:"Analyze Package"}),c.jsxs(P.Menu,{id:"basic-menu",anchorEl:l,open:m,onClose:y,MenuListProps:{"aria-labelledby":"basic-button",sx:{py:.5}},children:[c.jsxs(P.MenuItem,{onClick:()=>{f(!0),y()},sx:{py:1,px:2},disabled:k,children:[c.jsx(P.ListItemIcon,{children:c.jsx(fn.Add,{fontSize:"small"})}),c.jsxs(P.ListItemText,{children:[c.jsx(P.Typography,{variant:"body2",fontWeight:500,children:"New Workbook"}),k?c.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:"No workspaces available"}):c.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:"Create a new analysis workbook"})]})]}),c.jsxs(P.MenuItem,{onClick:()=>{p(!0),y()},sx:{py:1,px:2},children:[c.jsx(P.ListItemIcon,{children:c.jsx(fn.Launch,{fontSize:"small"})}),c.jsxs(P.ListItemText,{children:[c.jsx(P.Typography,{variant:"body2",fontWeight:500,children:"Open Workbook"}),c.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:"Open an existing workbook"})]})]})]}),c.jsxs(P.Dialog,{open:d,onClose:E,maxWidth:"sm",fullWidth:!0,children:[c.jsxs(P.DialogTitle,{sx:{pb:1,pt:2,px:2},children:[c.jsx(P.Typography,{fontWeight:600,sx:{fontSize:"1.5rem",mb:.5},children:"Create New Workbook"}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Start a new analysis workbook to explore your data"})]}),c.jsx(P.DialogContent,{sx:{px:2,pb:2},children:c.jsxs(P.Stack,{spacing:2,sx:{mt:1},children:[i.length>1?c.jsxs(P.FormControl,{fullWidth:!0,size:"small",children:[c.jsx(P.InputLabel,{children:"Workspace"}),c.jsx(P.Select,{value:o,label:"Workspace",onChange:C=>a(C.target.value),children:i.map(C=>c.jsx(P.MenuItem,{value:C.name,children:c.jsxs(P.Box,{children:[c.jsx(P.Typography,{variant:"body2",fontWeight:500,children:C.name}),c.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:C.description})]})},C.name))})]}):i.length===1?c.jsxs(P.Box,{sx:{p:2,border:1,borderColor:"divider",borderRadius:1,backgroundColor:"grey.50"},children:[c.jsxs(P.Typography,{variant:"body2",fontWeight:500,gutterBottom:!0,children:["Workspace: ",i[0].name]}),c.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:i[0].description})]}):null,c.jsx(P.FormControl,{fullWidth:!0,children:c.jsx(P.TextField,{label:"Workbook Name",value:n,onChange:C=>r(C.target.value),placeholder:"Enter workbook name...",fullWidth:!0,autoFocus:!0,size:"small"})}),c.jsxs(P.Stack,{direction:"row",spacing:1,justifyContent:"flex-end",children:[c.jsx(P.Button,{onClick:E,variant:"outlined",size:"small",children:"Cancel"}),c.jsx(P.Button,{onClick:C=>S(C),variant:"contained",disabled:!n.trim()||i.length>1&&!o,size:"small",children:"Create Workbook"})]})]})})]}),c.jsxs(P.Dialog,{open:h,onClose:x,maxWidth:"md",fullWidth:!0,children:[c.jsxs(P.DialogTitle,{sx:{pb:1,pt:2,px:2},children:[c.jsx(P.Typography,{fontWeight:600,sx:{mb:.5,fontSize:"1.5rem"},children:"Open Workbook"}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Select an existing workbook to continue your analysis"})]}),c.jsx(P.DialogContent,{sx:{px:2,pb:2},children:c.jsx(g1,{onWorkbookClick:v})})]})]})}function P4({resourceUri:e}){const{environmentName:t}=Nt(e),{apiClients:n}=it.useServer(),[r,o]=H.useState(!1),a=90,{data:i,isSuccess:s,isError:l,error:u}=Xt({queryKey:["about",t],queryFn:()=>n.environments.getEnvironment(t,!1)}),d=i?.data?.readme||"",f=d.split(/\s+/),h=f.length>a,p=f.slice(0,a).join(" ");return c.jsxs(c.Fragment,{children:[!s&&!l&&c.jsx(hn,{text:"Fetching About..."}),s&&d&&c.jsx(V2,{children:c.jsxs(W2,{children:[c.jsx(q2,{children:"Readme"}),c.jsxs(P.Box,{sx:{mt:1,fontSize:"0.875rem",lineHeight:1.6},children:[c.jsx(Ts,{options:{overrides:{h1:{component:"p",props:{style:{fontSize:"inherit",fontWeight:"italic"}}},h2:{component:"p",props:{style:{fontSize:"inherit",fontWeight:"italic"}}},h3:{component:"p",props:{style:{fontSize:"inherit",fontWeight:"italic"}}}}},children:r||!h?d:p}),h&&c.jsxs(P.Box,{sx:{mt:1},children:[" ",c.jsx(P.Button,{variant:"text",size:"small",onClick:()=>o(!r),children:r?"Read less":"Read more"})]})]})]})}),l&&c.jsx(mn,{error:u,context:`${t} > About`})]})}function R4({resourceUri:e}){const[t,n]=H.useState(!1),{apiClients:r}=it.useServer(),o=wr.useQueryClient(),[a,i]=H.useState(""),{environmentName:s}=Nt(e),l=ir({async mutationFn(d){return r.packages.createPackage(s,{name:d.name,description:d.description,location:d.location})},onSuccess(){n(!1),i("Package created successfully"),o.invalidateQueries({queryKey:["packages",s]})},onError(d){i(d instanceof Error?d.message:"An unknown error occurred")}}),u=d=>{d.preventDefault();const f=new FormData(d.currentTarget),h=f.get("name")?.toString(),p=f.get("description")?.toString(),m=f.get("location")?.toString();l.mutate({name:h,description:p,location:m})};return c.jsxs(c.Fragment,{children:[c.jsx(P.Button,{onClick:()=>n(!0),variant:"contained",color:"primary",startIcon:c.jsx(fn.Add,{}),children:"Add Package"}),c.jsxs(P.Dialog,{open:t,onClose:()=>n(!1),maxWidth:"sm",fullWidth:!0,PaperProps:{sx:{borderRadius:2}},children:[c.jsx(P.DialogTitle,{sx:{fontSize:"1.25rem",fontWeight:600,letterSpacing:"-0.025em",pt:3,pb:1,px:3},children:"Create New Package"}),c.jsxs(P.DialogContent,{sx:{px:3,pb:0},children:[c.jsxs(P.Box,{sx:{mb:3},children:[c.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{mb:1.5},children:"Create a new Malloy package to start exploring your data."}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{mb:1.5},children:"The location can be a GitHub/S3/GCP URL containing a package (zipped or unzipped), or an absolute path to a directory the publisher server has access to."}),c.jsxs(P.Typography,{variant:"body2",color:"text.secondary",children:["Make sure to conform to the"," ",c.jsx(P.Box,{component:"a",href:"https://github.com/malloydata/publisher/blob/main/README.md#architecture-overview",target:"_blank",rel:"noopener noreferrer",sx:{color:"text.primary",textDecoration:"underline"},children:"Malloy Package Format"}),"."]})]}),c.jsx("form",{onSubmit:u,id:"package-form",children:c.jsxs(P.Stack,{spacing:2.5,children:[c.jsx(P.TextField,{autoFocus:!0,required:!0,id:"name",name:"name",label:"Package Name",type:"text",fullWidth:!0,variant:"outlined",size:"small",InputLabelProps:{shrink:!0}}),c.jsx(P.TextField,{id:"description",name:"description",label:"Description",multiline:!0,rows:3,fullWidth:!0,variant:"outlined",size:"small",InputLabelProps:{shrink:!0}}),c.jsx(P.TextField,{id:"location",name:"location",label:"Location",type:"text",placeholder:"e.g. s3://my-bucket/my-package.zip",fullWidth:!0,variant:"outlined",size:"small",InputLabelProps:{shrink:!0}})]})})]}),c.jsxs(P.DialogActions,{sx:{px:3,pt:2,pb:3,gap:1},children:[c.jsx(P.Button,{variant:"outlined",disabled:l.isPending,onClick:()=>n(!1),children:"Cancel"}),c.jsx(P.Button,{type:"submit",form:"package-form",variant:"contained",loading:l.isPending,children:"Save Changes"})]})]}),c.jsx(P.Snackbar,{open:a!=="",autoHideDuration:6e3,onClose:()=>i(""),message:a})]})}const M4=xt(c.jsx("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"})),b1=xt(c.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}));function y1(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:ui(t.components[n].defaultProps,r)}function O4({props:e,name:t,defaultTheme:n,themeId:r}){let o=qx(n);return o=o[r]||o,y1({theme:o,name:t,props:e})}function Dt({props:e,name:t}){return O4({props:e,name:t,defaultTheme:sl,themeId:aa})}const N4=Le("MuiBox",["root"]),L4=_m(),kt=Rt.createBox({themeId:aa,defaultTheme:L4,defaultClassName:N4.root,generateClassName:vm.generate}),x1=ce.oneOfType([ce.func,ce.object]);function rh(e){try{return e.matches(":focus-visible")}catch{}return!1}const oh={};function E1(e,t){const n=I.useRef(oh);return n.current===oh&&(n.current=e(t)),n}class Bs{static create(){return new Bs}static use(){const t=E1(Bs.create).current,[n,r]=I.useState(!1);return t.shouldMount=n,t.setShouldMount=r,I.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=_4(),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 F4(){return Bs.use()}function _4(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function cc(e,t){return cc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},cc(e,t)}function pd(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,cc(e,t)}function B4(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function j4(e,t){e.classList?e.classList.add(t):B4(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function ah(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function $4(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=ah(e.className,t):e.setAttribute("class",ah(e.className&&e.className.baseVal||"",t))}const ih={disabled:!1},js=H.createContext(null);var C1=function(t){return t.scrollTop},Va="unmounted",to="exited",no="entering",_o="entered",dc="exiting",Gn=(function(e){pd(t,e);function t(r,o){var a;a=e.call(this,r,o)||this;var i=o,s=i&&!i.isMounting?r.enter:r.appear,l;return a.appearStatus=null,r.in?s?(l=to,a.appearStatus=no):l=_o:r.unmountOnExit||r.mountOnEnter?l=Va:l=to,a.state={status:l},a.nextCallback=null,a}t.getDerivedStateFromProps=function(o,a){var i=o.in;return i&&a.status===Va?{status:to}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var a=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==no&&i!==_o&&(a=no):(i===no||i===_o)&&(a=dc)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,a,i,s;return a=i=s=o,o!=null&&typeof o!="number"&&(a=o.exit,i=o.enter,s=o.appear!==void 0?o.appear:i),{exit:a,enter:i,appear:s}},n.updateStatus=function(o,a){if(o===void 0&&(o=!1),a!==null)if(this.cancelNextCallback(),a===no){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:$a.findDOMNode(this);i&&C1(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===to&&this.setState({status:Va})},n.performEnter=function(o){var a=this,i=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[$a.findDOMNode(this),s],u=l[0],d=l[1],f=this.getTimeouts(),h=s?f.appear:f.enter;if(!o&&!i||ih.disabled){this.safeSetState({status:_o},function(){a.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:no},function(){a.props.onEntering(u,d),a.onTransitionEnd(h,function(){a.safeSetState({status:_o},function(){a.props.onEntered(u,d)})})})},n.performExit=function(){var o=this,a=this.props.exit,i=this.getTimeouts(),s=this.props.nodeRef?void 0:$a.findDOMNode(this);if(!a||ih.disabled){this.safeSetState({status:to},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:dc},function(){o.props.onExiting(s),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:to},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,a){a=this.setNextCallback(a),this.setState(o,a)},n.setNextCallback=function(o){var a=this,i=!0;return this.nextCallback=function(s){i&&(i=!1,a.nextCallback=null,o(s))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(o,a){this.setNextCallback(a);var i=this.props.nodeRef?this.props.nodeRef.current:$a.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!i||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],u=l[0],d=l[1];this.props.addEndListener(u,d)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===Va)return null;var a=this.props,i=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var s=Ue(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return H.createElement(js.Provider,{value:null},typeof i=="function"?i(o,s):H.cloneElement(H.Children.only(i),s))},t})(H.Component);Gn.contextType=js;Gn.propTypes={};function No(){}Gn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:No,onEntering:No,onEntered:No,onExit:No,onExiting:No,onExited:No};Gn.UNMOUNTED=Va;Gn.EXITED=to;Gn.ENTERING=no;Gn.ENTERED=_o;Gn.EXITING=dc;var H4=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return j4(t,r)})},vu=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return $4(t,r)})},hd=(function(e){pd(t,e);function t(){for(var r,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=e.call.apply(e,[this].concat(a))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(s,l){var u=r.resolveArguments(s,l),d=u[0],f=u[1];r.removeClasses(d,"exit"),r.addClass(d,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(s,l)},r.onEntering=function(s,l){var u=r.resolveArguments(s,l),d=u[0],f=u[1],h=f?"appear":"enter";r.addClass(d,h,"active"),r.props.onEntering&&r.props.onEntering(s,l)},r.onEntered=function(s,l){var u=r.resolveArguments(s,l),d=u[0],f=u[1],h=f?"appear":"enter";r.removeClasses(d,h),r.addClass(d,h,"done"),r.props.onEntered&&r.props.onEntered(s,l)},r.onExit=function(s){var l=r.resolveArguments(s),u=l[0];r.removeClasses(u,"appear"),r.removeClasses(u,"enter"),r.addClass(u,"exit","base"),r.props.onExit&&r.props.onExit(s)},r.onExiting=function(s){var l=r.resolveArguments(s),u=l[0];r.addClass(u,"exit","active"),r.props.onExiting&&r.props.onExiting(s)},r.onExited=function(s){var l=r.resolveArguments(s),u=l[0];r.removeClasses(u,"exit"),r.addClass(u,"exit","done"),r.props.onExited&&r.props.onExited(s)},r.resolveArguments=function(s,l){return r.props.nodeRef?[r.props.nodeRef.current,s]:[s,l]},r.getClassNames=function(s){var l=r.props.classNames,u=typeof l=="string",d=u&&l?l+"-":"",f=u?""+d+s:l[s],h=u?f+"-active":l[s+"Active"],p=u?f+"-done":l[s+"Done"];return{baseClassName:f,activeClassName:h,doneClassName:p}},r}var n=t.prototype;return n.addClass=function(o,a,i){var s=this.getClassNames(a)[i+"ClassName"],l=this.getClassNames("enter"),u=l.doneClassName;a==="appear"&&i==="done"&&u&&(s+=" "+u),i==="active"&&o&&C1(o),s&&(this.appliedClasses[a][i]=s,H4(o,s))},n.removeClasses=function(o,a){var i=this.appliedClasses[a],s=i.base,l=i.active,u=i.done;this.appliedClasses[a]={},s&&vu(o,s),l&&vu(o,l),u&&vu(o,u)},n.render=function(){var o=this.props;o.classNames;var a=Ue(o,["classNames"]);return H.createElement(Gn,K({},a,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(H.Component);hd.defaultProps={classNames:""};hd.propTypes={};function U4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function md(e,t){var n=function(a){return t&&H.isValidElement(a)?t(a):a},r=Object.create(null);return e&&H.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function z4(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}var r=Object.create(null),o=[];for(var a in e)a in t?o.length&&(r[a]=o,o=[]):o.push(a);var i,s={};for(var l in t){if(r[l])for(i=0;i<r[l].length;i++){var u=r[l][i];s[r[l][i]]=n(u)}s[l]=n(l)}for(i=0;i<o.length;i++)s[o[i]]=n(o[i]);return s}function ao(e,t,n){return n[t]!=null?n[t]:e.props[t]}function V4(e,t){return md(e.children,function(n){return H.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:ao(n,"appear",e),enter:ao(n,"enter",e),exit:ao(n,"exit",e)})})}function W4(e,t,n){var r=md(e.children),o=z4(t,r);return Object.keys(o).forEach(function(a){var i=o[a];if(H.isValidElement(i)){var s=a in t,l=a in r,u=t[a],d=H.isValidElement(u)&&!u.props.in;l&&(!s||d)?o[a]=H.cloneElement(i,{onExited:n.bind(null,i),in:!0,exit:ao(i,"exit",e),enter:ao(i,"enter",e)}):!l&&s&&!d?o[a]=H.cloneElement(i,{in:!1}):l&&s&&H.isValidElement(u)&&(o[a]=H.cloneElement(i,{onExited:n.bind(null,i),in:u.props.in,exit:ao(i,"exit",e),enter:ao(i,"enter",e)}))}}),o}var q4=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Y4={component:"div",childFactory:function(t){return t}},Ri=(function(e){pd(t,e);function t(r,o){var a;a=e.call(this,r,o)||this;var i=a.handleExited.bind(U4(a));return a.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},a}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(o,a){var i=a.children,s=a.handleExited,l=a.firstRender;return{children:l?V4(o,s):W4(o,i,s),firstRender:!1}},n.handleExited=function(o,a){var i=md(this.props.children);o.key in i||(o.props.onExited&&o.props.onExited(a),this.mounted&&this.setState(function(s){var l=K({},s.children);return delete l[o.key],{children:l}}))},n.render=function(){var o=this.props,a=o.component,i=o.childFactory,s=Ue(o,["component","childFactory"]),l=this.state.contextValue,u=q4(this.state.children).map(i);return delete s.appear,delete s.enter,delete s.exit,a===null?H.createElement(js.Provider,{value:l},u):H.createElement(js.Provider,{value:l},H.createElement(a,s,u))},t})(H.Component);Ri.propTypes={};Ri.defaultProps=Y4;const K4=[];function G4(e){I.useEffect(e,K4)}class gd{static create(){return new gd}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 bd(){const e=E1(gd.create).current;return G4(e.disposeEffect),e}function Q4(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:a,rippleSize:i,in:s,onExited:l,timeout:u}=e,[d,f]=I.useState(!1),h=Ae(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:i,height:i,top:-(i/2)+a,left:-(i/2)+o},m=Ae(n.child,d&&n.childLeaving,r&&n.childPulsate);return!s&&!d&&f(!0),I.useEffect(()=>{if(!s&&l!=null){const b=setTimeout(l,u);return()=>{clearTimeout(b)}}},[l,s,u]),c.jsx("span",{className:h,style:p,children:c.jsx("span",{className:m})})}const Pn=Le("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),fc=550,X4=80,Z4=Rt.keyframes`
93
- 0% {
94
- transform: scale(0);
95
- opacity: 0.1;
96
- }
97
-
98
- 100% {
99
- transform: scale(1);
100
- opacity: 0.3;
101
- }
102
- `,J4=Rt.keyframes`
103
- 0% {
104
- opacity: 1;
105
- }
106
-
107
- 100% {
108
- opacity: 0;
109
- }
110
- `,eI=Rt.keyframes`
111
- 0% {
112
- transform: scale(1);
113
- }
114
-
115
- 50% {
116
- transform: scale(0.92);
117
- }
118
-
119
- 100% {
120
- transform: scale(1);
121
- }
122
- `,tI=le("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),nI=le(Q4,{name:"MuiTouchRipple",slot:"Ripple"})`
123
- opacity: 0;
124
- position: absolute;
125
-
126
- &.${Pn.rippleVisible} {
127
- opacity: 0.3;
128
- transform: scale(1);
129
- animation-name: ${Z4};
130
- animation-duration: ${fc}ms;
131
- animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
132
- }
133
-
134
- &.${Pn.ripplePulsate} {
135
- animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
136
- }
137
-
138
- & .${Pn.child} {
139
- opacity: 1;
140
- display: block;
141
- width: 100%;
142
- height: 100%;
143
- border-radius: 50%;
144
- background-color: currentColor;
145
- }
146
-
147
- & .${Pn.childLeaving} {
148
- opacity: 0;
149
- animation-name: ${J4};
150
- animation-duration: ${fc}ms;
151
- animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
152
- }
153
-
154
- & .${Pn.childPulsate} {
155
- position: absolute;
156
- /* @noflip */
157
- left: 0px;
158
- top: 0;
159
- animation-name: ${eI};
160
- animation-duration: 2500ms;
161
- animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
162
- animation-iteration-count: infinite;
163
- animation-delay: 200ms;
164
- }
165
- `,rI=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:a={},className:i,...s}=r,[l,u]=I.useState([]),d=I.useRef(0),f=I.useRef(null);I.useEffect(()=>{f.current&&(f.current(),f.current=null)},[l]);const h=I.useRef(!1),p=bd(),m=I.useRef(null),b=I.useRef(null),y=I.useCallback(S=>{const{pulsate:k,rippleX:C,rippleY:L,rippleSize:F,cb:B}=S;u(R=>[...R,c.jsx(nI,{classes:{ripple:Ae(a.ripple,Pn.ripple),rippleVisible:Ae(a.rippleVisible,Pn.rippleVisible),ripplePulsate:Ae(a.ripplePulsate,Pn.ripplePulsate),child:Ae(a.child,Pn.child),childLeaving:Ae(a.childLeaving,Pn.childLeaving),childPulsate:Ae(a.childPulsate,Pn.childPulsate)},timeout:fc,pulsate:k,rippleX:C,rippleY:L,rippleSize:F},d.current)]),d.current+=1,f.current=B},[a]),x=I.useCallback((S={},k={},C=()=>{})=>{const{pulsate:L=!1,center:F=o||k.pulsate,fakeElement:B=!1}=k;if(S?.type==="mousedown"&&h.current){h.current=!1;return}S?.type==="touchstart"&&(h.current=!0);const R=B?null:b.current,_=R?R.getBoundingClientRect():{width:0,height:0,left:0,top:0};let T,O,A;if(F||S===void 0||S.clientX===0&&S.clientY===0||!S.clientX&&!S.touches)T=Math.round(_.width/2),O=Math.round(_.height/2);else{const{clientX:w,clientY:M}=S.touches&&S.touches.length>0?S.touches[0]:S;T=Math.round(w-_.left),O=Math.round(M-_.top)}if(F)A=Math.sqrt((2*_.width**2+_.height**2)/3),A%2===0&&(A+=1);else{const w=Math.max(Math.abs((R?R.clientWidth:0)-T),T)*2+2,M=Math.max(Math.abs((R?R.clientHeight:0)-O),O)*2+2;A=Math.sqrt(w**2+M**2)}S?.touches?m.current===null&&(m.current=()=>{y({pulsate:L,rippleX:T,rippleY:O,rippleSize:A,cb:C})},p.start(X4,()=>{m.current&&(m.current(),m.current=null)})):y({pulsate:L,rippleX:T,rippleY:O,rippleSize:A,cb:C})},[o,y,p]),E=I.useCallback(()=>{x({},{pulsate:!0})},[x]),v=I.useCallback((S,k)=>{if(p.clear(),S?.type==="touchend"&&m.current){m.current(),m.current=null,p.start(0,()=>{v(S,k)});return}m.current=null,u(C=>C.length>0?C.slice(1):C),f.current=k},[p]);return I.useImperativeHandle(n,()=>({pulsate:E,start:x,stop:v}),[E,x,v]),c.jsx(tI,{className:Ae(Pn.root,a.root,i),ref:b,...s,children:c.jsx(Ri,{component:null,exit:!0,children:l})})});function oI(e){return _e("MuiButtonBase",e)}const aI=Le("MuiButtonBase",["root","disabled","focusVisible"]),iI=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=Fe({root:["root",t&&"disabled",n&&"focusVisible"]},oI,o);return n&&r&&(i.root+=` ${r}`),i},sI=le("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"},[`&.${aI.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Jo=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:a=!1,children:i,className:s,component:l="button",disabled:u=!1,disableRipple:d=!1,disableTouchRipple:f=!1,focusRipple:h=!1,focusVisibleClassName:p,LinkComponent:m="a",onBlur:b,onClick:y,onContextMenu:x,onDragLeave:E,onFocus:v,onFocusVisible:S,onKeyDown:k,onKeyUp:C,onMouseDown:L,onMouseLeave:F,onMouseUp:B,onTouchEnd:R,onTouchMove:_,onTouchStart:T,tabIndex:O=0,TouchRippleProps:A,touchRippleRef:w,type:M,...V}=r,z=I.useRef(null),U=F4(),D=ct(U.ref,w),[Y,te]=I.useState(!1);u&&Y&&te(!1),I.useImperativeHandle(o,()=>({focusVisible:()=>{te(!0),z.current.focus()}}),[]);const N=U.shouldMount&&!d&&!u;I.useEffect(()=>{Y&&h&&!d&&U.pulsate()},[d,h,Y,U]);const ae=br(U,"start",L,f),Q=br(U,"stop",x,f),q=br(U,"stop",E,f),X=br(U,"stop",B,f),G=br(U,"stop",we=>{Y&&we.preventDefault(),F&&F(we)},f),ee=br(U,"start",T,f),oe=br(U,"stop",R,f),ne=br(U,"stop",_,f),pe=br(U,"stop",we=>{rh(we.target)||te(!1),b&&b(we)},!1),Z=Pe(we=>{z.current||(z.current=we.currentTarget),rh(we.target)&&(te(!0),S&&S(we)),v&&v(we)}),J=()=>{const we=z.current;return l&&l!=="button"&&!(we.tagName==="A"&&we.href)},ye=Pe(we=>{h&&!we.repeat&&Y&&we.key===" "&&U.stop(we,()=>{U.start(we)}),we.target===we.currentTarget&&J()&&we.key===" "&&we.preventDefault(),k&&k(we),we.target===we.currentTarget&&J()&&we.key==="Enter"&&!u&&(we.preventDefault(),y&&y(we))}),de=Pe(we=>{h&&we.key===" "&&Y&&!we.defaultPrevented&&U.stop(we,()=>{U.pulsate(we)}),C&&C(we),y&&we.target===we.currentTarget&&J()&&we.key===" "&&!we.defaultPrevented&&y(we)});let be=l;be==="button"&&(V.href||V.to)&&(be=m);const ie={};be==="button"?(ie.type=M===void 0?"button":M,ie.disabled=u):(!V.href&&!V.to&&(ie.role="button"),u&&(ie["aria-disabled"]=u));const Ie=ct(n,z),ve={...r,centerRipple:a,component:l,disabled:u,disableRipple:d,disableTouchRipple:f,focusRipple:h,tabIndex:O,focusVisible:Y},Ve=iI(ve);return c.jsxs(sI,{as:be,className:Ae(Ve.root,s),ownerState:ve,onBlur:pe,onClick:y,onContextMenu:Q,onFocus:Z,onKeyDown:ye,onKeyUp:de,onMouseDown:ae,onMouseLeave:G,onMouseUp:X,onDragLeave:q,onTouchEnd:oe,onTouchMove:ne,onTouchStart:ee,ref:Ie,tabIndex:u?-1:O,type:M,...ie,...V,children:[i,N?c.jsx(rI,{ref:D,center:a,...A}):null]})});function br(e,t,n,r=!1){return Pe(o=>(n&&n(o),r||e[t](o),!0))}function lI(e){return typeof e.main=="string"}function uI(e,t=[]){if(!lI(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Tn(e=[]){return([,t])=>t&&uI(t,e)}function cI(e){return _e("MuiCircularProgress",e)}Le("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const _r=44,pc=Rt.keyframes`
166
- 0% {
167
- transform: rotate(0deg);
168
- }
169
-
170
- 100% {
171
- transform: rotate(360deg);
172
- }
173
- `,hc=Rt.keyframes`
174
- 0% {
175
- stroke-dasharray: 1px, 200px;
176
- stroke-dashoffset: 0;
177
- }
178
-
179
- 50% {
180
- stroke-dasharray: 100px, 200px;
181
- stroke-dashoffset: -15px;
182
- }
183
-
184
- 100% {
185
- stroke-dasharray: 1px, 200px;
186
- stroke-dashoffset: -126px;
187
- }
188
- `,dI=typeof pc!="string"?Rt.css`
189
- animation: ${pc} 1.4s linear infinite;
190
- `:null,fI=typeof hc!="string"?Rt.css`
191
- animation: ${hc} 1.4s ease-in-out infinite;
192
- `:null,pI=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,a={root:["root",n,`color${De(r)}`],svg:["svg"],circle:["circle",`circle${De(n)}`,o&&"circleDisableShrink"]};return Fe(a,cI,t)},hI=le("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${De(n.color)}`]]}})(et(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:dI||{animation:`${pc} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Tn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),mI=le("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),gI=le("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${De(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(et(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:fI||{animation:`${hc} 1.4s ease-in-out infinite`}}]}))),yd=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiCircularProgress"}),{className:o,color:a="primary",disableShrink:i=!1,size:s=40,style:l,thickness:u=3.6,value:d=0,variant:f="indeterminate",...h}=r,p={...r,color:a,disableShrink:i,size:s,thickness:u,value:d,variant:f},m=pI(p),b={},y={},x={};if(f==="determinate"){const E=2*Math.PI*((_r-u)/2);b.strokeDasharray=E.toFixed(3),x["aria-valuenow"]=Math.round(d),b.strokeDashoffset=`${((100-d)/100*E).toFixed(3)}px`,y.transform="rotate(-90deg)"}return c.jsx(hI,{className:Ae(m.root,o),style:{width:s,height:s,...y,...l},ownerState:p,ref:n,role:"progressbar",...x,...h,children:c.jsx(mI,{className:m.svg,ownerState:p,viewBox:`${_r/2} ${_r/2} ${_r} ${_r}`,children:c.jsx(gI,{className:m.circle,style:b,ownerState:p,cx:_r,cy:_r,r:(_r-u)/2,fill:"none",strokeWidth:u})})})});function bI(e){return _e("MuiButton",e)}const Xr=Le("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),yI=I.createContext({}),xI=I.createContext(void 0),EI=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:a,loading:i,loadingPosition:s,classes:l}=e,u={root:["root",i&&"loading",a,`${a}${De(t)}`,`size${De(o)}`,`${a}Size${De(o)}`,`color${De(t)}`,n&&"disableElevation",r&&"fullWidth",i&&`loadingPosition${De(s)}`],startIcon:["icon","startIcon",`iconSize${De(o)}`],endIcon:["icon","endIcon",`iconSize${De(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},d=Fe(u,bI,l);return{...l,...d}},T1=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],CI=le(Jo,{shouldForwardProp:e=>kn(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${De(n.color)}`],t[`size${De(n.size)}`],t[`${n.variant}Size${De(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(et(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${Xr.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${Xr.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${Xr.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${Xr.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(Tn()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(e.vars||e).palette[r].main,"--variant-outlinedColor":(e.vars||e).palette[r].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[r].main,.5),"--variant-containedColor":(e.vars||e).palette[r].contrastText,"--variant-containedBg":(e.vars||e).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[r].dark,"--variant-textBg":e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[r].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Xr.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Xr.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${Xr.loading}`]:{color:"transparent"}}}]}})),TI=le("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${De(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...T1]})),vI=le("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${De(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...T1]})),SI=le("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),sh=le("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Ot=I.forwardRef(function(t,n){const r=I.useContext(yI),o=I.useContext(xI),a=ui(r,t),i=Qe({props:a,name:"MuiButton"}),{children:s,color:l="primary",component:u="button",className:d,disabled:f=!1,disableElevation:h=!1,disableFocusRipple:p=!1,endIcon:m,focusVisibleClassName:b,fullWidth:y=!1,id:x,loading:E=null,loadingIndicator:v,loadingPosition:S="center",size:k="medium",startIcon:C,type:L,variant:F="text",...B}=i,R=Yn(x),_=v??c.jsx(yd,{"aria-labelledby":R,color:"inherit",size:16}),T={...i,color:l,component:u,disabled:f,disableElevation:h,disableFocusRipple:p,fullWidth:y,loading:E,loadingIndicator:_,loadingPosition:S,size:k,type:L,variant:F},O=EI(T),A=(C||E&&S==="start")&&c.jsx(TI,{className:O.startIcon,ownerState:T,children:C||c.jsx(sh,{className:O.loadingIconPlaceholder,ownerState:T})}),w=(m||E&&S==="end")&&c.jsx(vI,{className:O.endIcon,ownerState:T,children:m||c.jsx(sh,{className:O.loadingIconPlaceholder,ownerState:T})}),M=o||"",V=typeof E=="boolean"?c.jsx("span",{className:O.loadingWrapper,style:{display:"contents"},children:E&&c.jsx(SI,{className:O.loadingIndicator,ownerState:T,children:_})}):null;return c.jsxs(CI,{ownerState:T,className:Ae(r.className,O.root,d,M),component:u,disabled:f||E,focusRipple:!p,focusVisibleClassName:Ae(O.focusVisible,b),ref:n,type:L,id:E?R:x,...B,classes:O,children:[A,S!=="end"&&V,s,S==="end"&&V,w]})});function v1(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function kI(e){const t=Vt(e);return t.body===e?vr(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function ni(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function lh(e){return parseInt(vr(e).getComputedStyle(e).paddingRight,10)||0}function DI(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function uh(e,t,n,r,o){const a=[t,n,...r];[].forEach.call(e.children,i=>{const s=!a.includes(i),l=!DI(i);s&&l&&ni(i,o)})}function Su(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function wI(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(kI(r)){const i=v1(vr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${lh(r)+i}px`;const s=Vt(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${lh(l)+i}px`})}let a;if(r.parentNode instanceof DocumentFragment)a=Vt(r).body;else{const i=r.parentElement,s=vr(r);a=i?.nodeName==="HTML"&&s.getComputedStyle(i).overflowY==="scroll"?i:r}n.push({value:a.style.overflow,property:"overflow",el:a},{value:a.style.overflowX,property:"overflow-x",el:a},{value:a.style.overflowY,property:"overflow-y",el:a}),a.style.overflow="hidden"}return()=>{n.forEach(({value:a,el:i,property:s})=>{a?i.style.setProperty(s,a):i.style.removeProperty(s)})}}function AI(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class II{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&ni(t.modalRef,!1);const o=AI(n);uh(n,t.mount,t.modalRef,o,!0);const a=Su(this.containers,i=>i.container===n);return a!==-1?(this.containers[a].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=Su(this.containers,a=>a.modals.includes(t)),o=this.containers[r];o.restore||(o.restore=wI(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=Su(this.containers,i=>i.modals.includes(t)),a=this.containers[o];if(a.modals.splice(a.modals.indexOf(t),1),this.modals.splice(r,1),a.modals.length===0)a.restore&&a.restore(),t.modalRef&&ni(t.modalRef,n),uh(a.container,t.mount,t.modalRef,a.hiddenSiblings,!1),this.containers.splice(o,1);else{const i=a.modals[a.modals.length-1];i.modalRef&&ni(i.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function ga(e){return parseInt(I.version,10)>=19?e?.props?.ref||null:e?.ref||null}const PI=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function RI(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function MI(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function OI(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||MI(e))}function NI(e){const t=[],n=[];return Array.from(e.querySelectorAll(PI)).forEach((r,o)=>{const a=RI(r);a===-1||!OI(r)||(a===0?t.push(r):n.push({documentOrder:o,tabIndex:a,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function LI(){return!0}function S1(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:a=NI,isEnabled:i=LI,open:s}=e,l=I.useRef(!1),u=I.useRef(null),d=I.useRef(null),f=I.useRef(null),h=I.useRef(null),p=I.useRef(!1),m=I.useRef(null),b=ct(ga(t),m),y=I.useRef(null);I.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),I.useEffect(()=>{if(!s||!m.current)return;const v=Vt(m.current);return m.current.contains(v.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),p.current&&m.current.focus()),()=>{o||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[s]),I.useEffect(()=>{if(!s||!m.current)return;const v=Vt(m.current),S=L=>{y.current=L,!(r||!i()||L.key!=="Tab")&&v.activeElement===m.current&&L.shiftKey&&(l.current=!0,d.current&&d.current.focus())},k=()=>{const L=m.current;if(L===null)return;if(!v.hasFocus()||!i()||l.current){l.current=!1;return}if(L.contains(v.activeElement)||r&&v.activeElement!==u.current&&v.activeElement!==d.current)return;if(v.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!p.current)return;let F=[];if((v.activeElement===u.current||v.activeElement===d.current)&&(F=a(m.current)),F.length>0){const B=!!(y.current?.shiftKey&&y.current?.key==="Tab"),R=F[0],_=F[F.length-1];typeof R!="string"&&typeof _!="string"&&(B?_.focus():R.focus())}else L.focus()};v.addEventListener("focusin",k),v.addEventListener("keydown",S,!0);const C=setInterval(()=>{v.activeElement&&v.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(C),v.removeEventListener("focusin",k),v.removeEventListener("keydown",S,!0)}},[n,r,o,i,s,a]);const x=v=>{f.current===null&&(f.current=v.relatedTarget),p.current=!0,h.current=v.target;const S=t.props.onFocus;S&&S(v)},E=v=>{f.current===null&&(f.current=v.relatedTarget),p.current=!0};return c.jsxs(I.Fragment,{children:[c.jsx("div",{tabIndex:s?0:-1,onFocus:E,ref:u,"data-testid":"sentinelStart"}),I.cloneElement(t,{ref:b,onFocus:x}),c.jsx("div",{tabIndex:s?0:-1,onFocus:E,ref:d,"data-testid":"sentinelEnd"})]})}function FI(e){return typeof e=="function"?e():e}const k1=I.forwardRef(function(t,n){const{children:r,container:o,disablePortal:a=!1}=t,[i,s]=I.useState(null),l=ct(I.isValidElement(r)?ga(r):null,n);if(Wt(()=>{a||s(FI(o)||document.body)},[o,a]),Wt(()=>{if(i&&!a)return ju(n,i),()=>{ju(n,null)}},[n,i,a]),a){if(I.isValidElement(r)){const u={ref:l};return I.cloneElement(r,u)}return r}return i&&fy.createPortal(r,i)});function ea(e){return typeof e=="string"}function D1(e,t,n){return e===void 0||ea(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Tl(e,t,n){return typeof e=="function"?e(t,n):e}function $s(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 ch(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 w1(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:a}=e;if(!t){const p=Ae(n?.className,a,o?.className,r?.className),m={...n?.style,...o?.style,...r?.style},b={...n,...o,...r};return p.length>0&&(b.className=p),Object.keys(m).length>0&&(b.style=m),{props:b,internalRef:void 0}}const i=$s({...o,...r}),s=ch(r),l=ch(o),u=t(i),d=Ae(u?.className,n?.className,a,o?.className,r?.className),f={...u?.style,...n?.style,...o?.style,...r?.style},h={...u,...n,...l,...s};return d.length>0&&(h.className=d),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:u.ref}}function st(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:a,internalForwardedProps:i,shouldForwardComponentProp:s=!1,...l}=t,{component:u,slots:d={[e]:void 0},slotProps:f={[e]:void 0},...h}=a,p=d[e]||r,m=Tl(f[e],o),{props:{component:b,...y},internalRef:x}=w1({className:n,...l,externalForwardedProps:e==="root"?h:void 0,externalSlotProps:m}),E=ct(x,m?.ref,t.ref),v=e==="root"?b||u:b,S=D1(p,{...e==="root"&&!u&&!d[e]&&i,...e!=="root"&&!d[e]&&i,...y,...v&&!s&&{as:v},...v&&s&&{component:v},ref:E},o);return[p,S]}const A1=e=>e.scrollTop;function Hs(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:o.transitionDelay}}const _I={entering:{opacity:1},entered:{opacity:1}},mo=I.forwardRef(function(t,n){const r=yo(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:i=!0,children:s,easing:l,in:u,onEnter:d,onEntered:f,onEntering:h,onExit:p,onExited:m,onExiting:b,style:y,timeout:x=o,TransitionComponent:E=Gn,...v}=t,S=I.useRef(null),k=ct(S,ga(s),n),C=A=>w=>{if(A){const M=S.current;w===void 0?A(M):A(M,w)}},L=C(h),F=C((A,w)=>{A1(A);const M=Hs({style:y,timeout:x,easing:l},{mode:"enter"});A.style.webkitTransition=r.transitions.create("opacity",M),A.style.transition=r.transitions.create("opacity",M),d&&d(A,w)}),B=C(f),R=C(b),_=C(A=>{const w=Hs({style:y,timeout:x,easing:l},{mode:"exit"});A.style.webkitTransition=r.transitions.create("opacity",w),A.style.transition=r.transitions.create("opacity",w),p&&p(A)}),T=C(m),O=A=>{a&&a(S.current,A)};return c.jsx(E,{appear:i,in:u,nodeRef:S,onEnter:F,onEntered:B,onEntering:L,onExit:_,onExited:T,onExiting:R,addEndListener:O,timeout:x,...v,children:(A,{ownerState:w,...M})=>I.cloneElement(s,{style:{opacity:0,visibility:A==="exited"&&!u?"hidden":void 0,..._I[A],...y,...s.props.style},ref:k,...M})})});function BI(e){return _e("MuiBackdrop",e)}Le("MuiBackdrop",["root","invisible"]);const jI=e=>{const{classes:t,invisible:n}=e;return Fe({root:["root",n&&"invisible"]},BI,t)},$I=le("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),I1=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiBackdrop"}),{children:o,className:a,component:i="div",invisible:s=!1,open:l,components:u={},componentsProps:d={},slotProps:f={},slots:h={},TransitionComponent:p,transitionDuration:m,...b}=r,y={...r,component:i,invisible:s},x=jI(y),E={transition:p,root:u.Root,...h},v={...d,...f},S={component:i,slots:E,slotProps:v},[k,C]=st("root",{elementType:$I,externalForwardedProps:S,className:Ae(x.root,a),ownerState:y}),[L,F]=st("transition",{elementType:mo,externalForwardedProps:S,ownerState:y});return c.jsx(L,{in:l,timeout:m,...b,...F,children:c.jsx(k,{"aria-hidden":!0,...C,classes:x,ref:n,children:o})})});function HI(e){return typeof e=="function"?e():e}function UI(e){return e?e.props.hasOwnProperty("in"):!1}const dh=()=>{},Gi=new II;function zI(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:a,onTransitionExited:i,children:s,onClose:l,open:u,rootRef:d}=e,f=I.useRef({}),h=I.useRef(null),p=I.useRef(null),m=ct(p,d),[b,y]=I.useState(!u),x=UI(s);let E=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(E=!1);const v=()=>Vt(h.current),S=()=>(f.current.modalRef=p.current,f.current.mount=h.current,f.current),k=()=>{Gi.mount(S(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},C=Pe(()=>{const w=HI(t)||v().body;Gi.add(S(),w),p.current&&k()}),L=()=>Gi.isTopModal(S()),F=Pe(w=>{h.current=w,w&&(u&&L()?k():p.current&&ni(p.current,E))}),B=I.useCallback(()=>{Gi.remove(S(),E)},[E]);I.useEffect(()=>()=>{B()},[B]),I.useEffect(()=>{u?C():(!x||!o)&&B()},[u,B,x,o,C]);const R=w=>M=>{w.onKeyDown?.(M),!(M.key!=="Escape"||M.which===229||!L())&&(n||(M.stopPropagation(),l&&l(M,"escapeKeyDown")))},_=w=>M=>{w.onClick?.(M),M.target===M.currentTarget&&l&&l(M,"backdropClick")};return{getRootProps:(w={})=>{const M=$s(e);delete M.onTransitionEnter,delete M.onTransitionExited;const V={...M,...w};return{role:"presentation",...V,onKeyDown:R(V),ref:m}},getBackdropProps:(w={})=>{const M=w;return{"aria-hidden":!0,...M,onClick:_(M),open:u}},getTransitionProps:()=>{const w=()=>{y(!1),a&&a()},M=()=>{y(!0),i&&i(),o&&B()};return{onEnter:Jd(w,s?.props.onEnter??dh),onExited:Jd(M,s?.props.onExited??dh)}},rootRef:m,portalRef:F,isTopModal:L,exited:b,hasTransition:x}}function VI(e){return _e("MuiModal",e)}Le("MuiModal",["root","hidden","backdrop"]);const WI=e=>{const{open:t,exited:n,classes:r}=e;return Fe({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},VI,r)},qI=le("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(et(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),YI=le(I1,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),P1=I.forwardRef(function(t,n){const r=Qe({name:"MuiModal",props:t}),{BackdropComponent:o=YI,BackdropProps:a,classes:i,className:s,closeAfterTransition:l=!1,children:u,container:d,component:f,components:h={},componentsProps:p={},disableAutoFocus:m=!1,disableEnforceFocus:b=!1,disableEscapeKeyDown:y=!1,disablePortal:x=!1,disableRestoreFocus:E=!1,disableScrollLock:v=!1,hideBackdrop:S=!1,keepMounted:k=!1,onClose:C,onTransitionEnter:L,onTransitionExited:F,open:B,slotProps:R={},slots:_={},theme:T,...O}=r,A={...r,closeAfterTransition:l,disableAutoFocus:m,disableEnforceFocus:b,disableEscapeKeyDown:y,disablePortal:x,disableRestoreFocus:E,disableScrollLock:v,hideBackdrop:S,keepMounted:k},{getRootProps:w,getBackdropProps:M,getTransitionProps:V,portalRef:z,isTopModal:U,exited:D,hasTransition:Y}=zI({...A,rootRef:n}),te={...A,exited:D},N=WI(te),ae={};if(u.props.tabIndex===void 0&&(ae.tabIndex="-1"),Y){const{onEnter:oe,onExited:ne}=V();ae.onEnter=oe,ae.onExited=ne}const Q={slots:{root:h.Root,backdrop:h.Backdrop,..._},slotProps:{...p,...R}},[q,X]=st("root",{ref:n,elementType:qI,externalForwardedProps:{...Q,...O,component:f},getSlotProps:w,ownerState:te,className:Ae(s,N?.root,!te.open&&te.exited&&N?.hidden)}),[G,ee]=st("backdrop",{ref:a?.ref,elementType:o,externalForwardedProps:Q,shouldForwardComponentProp:!0,additionalProps:a,getSlotProps:oe=>M({...oe,onClick:ne=>{oe?.onClick&&oe.onClick(ne)}}),className:Ae(a?.className,N?.backdrop),ownerState:te});return!k&&!B&&(!Y||D)?null:c.jsx(k1,{ref:z,container:d,disablePortal:x,children:c.jsxs(q,{...X,children:[!S&&o?c.jsx(G,{...ee}):null,c.jsx(S1,{disableEnforceFocus:b,disableAutoFocus:m,disableRestoreFocus:E,isEnabled:U,open:B,children:I.cloneElement(u,ae)})]})})});function KI(e){return _e("MuiPaper",e)}Le("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const GI=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,a={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Fe(a,KI,o)},QI=le("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(et(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),To=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiPaper"}),o=yo(),{className:a,component:i="div",elevation:s=1,square:l=!1,variant:u="elevation",...d}=r,f={...r,component:i,elevation:s,square:l,variant:u},h=GI(f);return c.jsx(QI,{as:i,ownerState:f,className:Ae(h.root,a),ref:n,...d,style:{...u==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[s],...o.vars&&{"--Paper-overlay":o.vars.overlays?.[s]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Ss("#fff",Bu(s))}, ${Ss("#fff",Bu(s))})`}},...d.style}})});function XI(e){return _e("MuiDialog",e)}const ri=Le("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),R1=I.createContext({}),ZI=le(I1,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),JI=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:a}=e,i={root:["root"],container:["container",`scroll${De(n)}`],paper:["paper",`paperScroll${De(n)}`,`paperWidth${De(String(r))}`,o&&"paperFullWidth",a&&"paperFullScreen"]};return Fe(i,XI,t)},eP=le(P1,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),tP=le("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${De(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),nP=le(To,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${De(n.scroll)}`],t[`paperWidth${De(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(et(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${ri.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${ri.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${ri.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),Ir=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiDialog"}),o=yo(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":i,"aria-labelledby":s,"aria-modal":l=!0,BackdropComponent:u,BackdropProps:d,children:f,className:h,disableEscapeKeyDown:p=!1,fullScreen:m=!1,fullWidth:b=!1,maxWidth:y="sm",onClick:x,onClose:E,open:v,PaperComponent:S=To,PaperProps:k={},scroll:C="paper",slots:L={},slotProps:F={},TransitionComponent:B=mo,transitionDuration:R=a,TransitionProps:_,...T}=r,O={...r,disableEscapeKeyDown:p,fullScreen:m,fullWidth:b,maxWidth:y,scroll:C},A=JI(O),w=I.useRef(),M=Z=>{w.current=Z.target===Z.currentTarget},V=Z=>{x&&x(Z),w.current&&(w.current=null,E&&E(Z,"backdropClick"))},z=Yn(s),U=I.useMemo(()=>({titleId:z}),[z]),D={transition:B,...L},Y={transition:_,paper:k,backdrop:d,...F},te={slots:D,slotProps:Y},[N,ae]=st("root",{elementType:eP,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:O,className:Ae(A.root,h),ref:n}),[Q,q]=st("backdrop",{elementType:ZI,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:O}),[X,G]=st("paper",{elementType:nP,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:O,className:Ae(A.paper,k.className)}),[ee,oe]=st("container",{elementType:tP,externalForwardedProps:te,ownerState:O,className:A.container}),[ne,pe]=st("transition",{elementType:mo,externalForwardedProps:te,ownerState:O,additionalProps:{appear:!0,in:v,timeout:R,role:"presentation"}});return c.jsx(N,{closeAfterTransition:!0,slots:{backdrop:Q},slotProps:{backdrop:{transitionDuration:R,as:u,...q}},disableEscapeKeyDown:p,onClose:E,open:v,onClick:V,...ae,...T,children:c.jsx(ne,{...pe,children:c.jsx(ee,{onMouseDown:M,...oe,children:c.jsx(X,{as:S,elevation:24,role:"dialog","aria-describedby":i,"aria-labelledby":z,"aria-modal":l,...G,children:c.jsx(R1.Provider,{value:U,children:f})})})})})});function rP(e){return _e("MuiDialogActions",e)}Le("MuiDialogActions",["root","spacing"]);const oP=e=>{const{classes:t,disableSpacing:n}=e;return Fe({root:["root",!n&&"spacing"]},rP,t)},aP=le("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),Pr=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:a=!1,...i}=r,s={...r,disableSpacing:a},l=oP(s);return c.jsx(aP,{className:Ae(l.root,o),ownerState:s,ref:n,...i})});function iP(e){return _e("MuiDialogContent",e)}Le("MuiDialogContent",["root","dividers"]);function sP(e){return _e("MuiDialogTitle",e)}const lP=Le("MuiDialogTitle",["root"]),uP=e=>{const{classes:t,dividers:n}=e;return Fe({root:["root",n&&"dividers"]},iP,t)},cP=le("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(et(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${lP.root} + &`]:{paddingTop:0}}}]}))),Rr=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiDialogContent"}),{className:o,dividers:a=!1,...i}=r,s={...r,dividers:a},l=uP(s);return c.jsx(cP,{className:Ae(l.root,o),ownerState:s,ref:n,...i})});function dP(e){return _e("MuiTypography",e)}const fh=Le("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),fP={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},pP=N2(),hP=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:a,classes:i}=e,s={root:["root",a,e.align!=="inherit"&&`align${De(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Fe(s,dP,i)},mP=le("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${De(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(et(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([t,n])=>t!=="inherit"&&n&&typeof n=="object").map(([t,n])=>({props:{variant:t},style:n})),...Object.entries(e.palette).filter(Tn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,t])=>typeof t=="string").map(([t])=>({props:{color:`text${De(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:t})=>t.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:t})=>t.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:t})=>t.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:t})=>t.paragraph,style:{marginBottom:16}}]}))),ph={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},ut=I.forwardRef(function(t,n){const{color:r,...o}=Qe({props:t,name:"MuiTypography"}),a=!fP[r],i=pP({...o,...a&&{color:r}}),{align:s="inherit",className:l,component:u,gutterBottom:d=!1,noWrap:f=!1,paragraph:h=!1,variant:p="body1",variantMapping:m=ph,...b}=i,y={...i,align:s,color:r,className:l,component:u,gutterBottom:d,noWrap:f,paragraph:h,variant:p,variantMapping:m},x=u||(h?"p":m[p]||ph[p])||"span",E=hP(y);return c.jsx(mP,{as:x,ref:n,className:Ae(E.root,l),...b,ownerState:y,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...b.style}})});function gP(e){return _e("MuiDialogContentText",e)}Le("MuiDialogContentText",["root"]);const bP=e=>{const{classes:t}=e,r=Fe({root:["root"]},gP,t);return{...t,...r}},yP=le(ut,{shouldForwardProp:e=>kn(e)||e==="classes",name:"MuiDialogContentText",slot:"Root"})({}),Mi=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiDialogContentText"}),{children:o,className:a,...i}=r,s=bP(i);return c.jsx(yP,{component:"p",variant:"body1",color:"textSecondary",ref:n,ownerState:i,className:Ae(s.root,a),...r,classes:s})}),xP=e=>{const{classes:t}=e;return Fe({root:["root"]},sP,t)},EP=le(ut,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),qr=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiDialogTitle"}),{className:o,id:a,...i}=r,s=r,l=xP(s),{titleId:u=a}=I.useContext(R1);return c.jsx(EP,{component:"h2",className:Ae(l.root,o),ownerState:s,ref:n,variant:"h6",id:a??u,...i})});function CP(e){return _e("MuiIconButton",e)}const hh=Le("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),TP=e=>{const{classes:t,disabled:n,color:r,edge:o,size:a,loading:i}=e,s={root:["root",i&&"loading",n&&"disabled",r!=="default"&&`color${De(r)}`,o&&`edge${De(o)}`,`size${De(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Fe(s,CP,t)},vP=le(Jo,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${De(n.color)}`],n.edge&&t[`edge${De(n.edge)}`],t[`size${De(n.size)}`]]}})(et(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),et(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Tn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Tn()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${hh.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${hh.loading}`]:{color:"transparent"}}))),SP=le("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Qn=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiIconButton"}),{edge:o=!1,children:a,className:i,color:s="default",disabled:l=!1,disableFocusRipple:u=!1,size:d="medium",id:f,loading:h=null,loadingIndicator:p,...m}=r,b=Yn(f),y=p??c.jsx(yd,{"aria-labelledby":b,color:"inherit",size:16}),x={...r,edge:o,color:s,disabled:l,disableFocusRipple:u,loading:h,loadingIndicator:y,size:d},E=TP(x);return c.jsxs(vP,{id:h?b:f,className:Ae(E.root,i),centerRipple:!0,focusRipple:!u,disabled:l||h,ref:n,...m,ownerState:x,children:[typeof h=="boolean"&&c.jsx("span",{className:E.loadingWrapper,style:{display:"contents"},children:c.jsx(SP,{className:E.loadingIndicator,ownerState:x,children:h&&y})}),a]})});function Qi(e){return parseInt(e,10)||0}const kP={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function DP(e){for(const t in e)return!1;return!0}function mh(e){return DP(e)||e.outerHeightStyle===0&&!e.overflowing}const wP=I.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:a=1,style:i,value:s,...l}=t,{current:u}=I.useRef(s!=null),d=I.useRef(null),f=ct(n,d),h=I.useRef(null),p=I.useRef(null),m=I.useCallback(()=>{const v=d.current,S=p.current;if(!v||!S)return;const C=vr(v).getComputedStyle(v);if(C.width==="0px")return{outerHeightStyle:0,overflowing:!1};S.style.width=C.width,S.value=v.value||t.placeholder||"x",S.value.slice(-1)===`
193
- `&&(S.value+=" ");const L=C.boxSizing,F=Qi(C.paddingBottom)+Qi(C.paddingTop),B=Qi(C.borderBottomWidth)+Qi(C.borderTopWidth),R=S.scrollHeight;S.value="x";const _=S.scrollHeight;let T=R;a&&(T=Math.max(Number(a)*_,T)),o&&(T=Math.min(Number(o)*_,T)),T=Math.max(T,_);const O=T+(L==="border-box"?F+B:0),A=Math.abs(T-R)<=1;return{outerHeightStyle:O,overflowing:A}},[o,a,t.placeholder]),b=Pe(()=>{const v=d.current,S=m();if(!v||!S||mh(S))return!1;const k=S.outerHeightStyle;return h.current!=null&&h.current!==k}),y=I.useCallback(()=>{const v=d.current,S=m();if(!v||!S||mh(S))return;const k=S.outerHeightStyle;h.current!==k&&(h.current=k,v.style.height=`${k}px`),v.style.overflow=S.overflowing?"hidden":""},[m]),x=I.useRef(-1);Wt(()=>{const v=$m(y),S=d?.current;if(!S)return;const k=vr(S);k.addEventListener("resize",v);let C;return typeof ResizeObserver<"u"&&(C=new ResizeObserver(()=>{b()&&(C.unobserve(S),cancelAnimationFrame(x.current),y(),x.current=requestAnimationFrame(()=>{C.observe(S)}))}),C.observe(S)),()=>{v.clear(),cancelAnimationFrame(x.current),k.removeEventListener("resize",v),C&&C.disconnect()}},[m,y,b]),Wt(()=>{y()});const E=v=>{u||y();const S=v.target,k=S.value.length,C=S.value.endsWith(`
194
- `),L=S.selectionStart===k;C&&L&&S.setSelectionRange(k,k),r&&r(v)};return c.jsxs(I.Fragment,{children:[c.jsx("textarea",{value:s,onChange:E,ref:f,rows:a,style:i,...l}),c.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:{...kP.shadow,...i,paddingTop:0,paddingBottom:0}})]})});function ba({props:e,states:t,muiFormControl:n}){return t.reduce((r,o)=>(r[o]=e[o],n&&typeof e[o]>"u"&&(r[o]=n[o]),r),{})}const vl=I.createContext(void 0);function Xn(){return I.useContext(vl)}function gh(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Us(e,t=!1){return e&&(gh(e.value)&&e.value!==""||t&&gh(e.defaultValue)&&e.defaultValue!=="")}function AP(e){return e.startAdornment}function IP(e){return _e("MuiInputBase",e)}const xn=Le("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var bh;const Sl=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${De(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},kl=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},PP=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:a,focused:i,formControl:s,fullWidth:l,hiddenLabel:u,multiline:d,readOnly:f,size:h,startAdornment:p,type:m}=e,b={root:["root",`color${De(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",i&&"focused",s&&"formControl",h&&h!=="medium"&&`size${De(h)}`,d&&"multiline",p&&"adornedStart",a&&"adornedEnd",u&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",m==="search"&&"inputTypeSearch",d&&"inputMultiline",h==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",p&&"inputAdornedStart",a&&"inputAdornedEnd",f&&"readOnly"]};return Fe(b,IP,t)},Dl=le("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Sl})(et(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${xn.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),wl=le("input",{name:"MuiInputBase",slot:"Input",overridesResolver:kl})(et(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${xn.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${xn.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:a})=>!a.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:a})=>a.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),yh=O2({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),xd=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:a,autoFocus:i,className:s,color:l,components:u={},componentsProps:d={},defaultValue:f,disabled:h,disableInjectingGlobalStyles:p,endAdornment:m,error:b,fullWidth:y=!1,id:x,inputComponent:E="input",inputProps:v={},inputRef:S,margin:k,maxRows:C,minRows:L,multiline:F=!1,name:B,onBlur:R,onChange:_,onClick:T,onFocus:O,onKeyDown:A,onKeyUp:w,placeholder:M,readOnly:V,renderSuffix:z,rows:U,size:D,slotProps:Y={},slots:te={},startAdornment:N,type:ae="text",value:Q,...q}=r,X=v.value!=null?v.value:Q,{current:G}=I.useRef(X!=null),ee=I.useRef(),oe=I.useCallback(Ne=>{},[]),ne=ct(ee,S,v.ref,oe),[pe,Z]=I.useState(!1),J=Xn(),ye=ba({props:r,muiFormControl:J,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ye.focused=J?J.focused:pe,I.useEffect(()=>{!J&&h&&pe&&(Z(!1),R&&R())},[J,h,pe,R]);const de=J&&J.onFilled,be=J&&J.onEmpty,ie=I.useCallback(Ne=>{Us(Ne)?de&&de():be&&be()},[de,be]);Wt(()=>{G&&ie({value:X})},[X,ie,G]);const Ie=Ne=>{O&&O(Ne),v.onFocus&&v.onFocus(Ne),J&&J.onFocus?J.onFocus(Ne):Z(!0)},ve=Ne=>{R&&R(Ne),v.onBlur&&v.onBlur(Ne),J&&J.onBlur?J.onBlur(Ne):Z(!1)},Ve=(Ne,...ot)=>{if(!G){const Et=Ne.target||ee.current;if(Et==null)throw new Error(Cr(1));ie({value:Et.value})}v.onChange&&v.onChange(Ne,...ot),_&&_(Ne,...ot)};I.useEffect(()=>{ie(ee.current)},[]);const we=Ne=>{ee.current&&Ne.currentTarget===Ne.target&&ee.current.focus(),T&&T(Ne)};let At=E,rt=v;F&&At==="input"&&(U?rt={type:void 0,minRows:U,maxRows:U,...rt}:rt={type:void 0,maxRows:C,minRows:L,...rt},At=wP);const Ye=Ne=>{ie(Ne.animationName==="mui-auto-fill-cancel"?ee.current:{value:"x"})};I.useEffect(()=>{J&&J.setAdornedStart(!!N)},[J,N]);const ue={...r,color:ye.color||"primary",disabled:ye.disabled,endAdornment:m,error:ye.error,focused:ye.focused,formControl:J,fullWidth:y,hiddenLabel:ye.hiddenLabel,multiline:F,size:ye.size,startAdornment:N,type:ae},Ce=PP(ue),Oe=te.root||u.Root||Dl,He=Y.root||d.root||{},je=te.input||u.Input||wl;return rt={...rt,...Y.input??d.input},c.jsxs(I.Fragment,{children:[!p&&typeof yh=="function"&&(bh||(bh=c.jsx(yh,{}))),c.jsxs(Oe,{...He,ref:n,onClick:we,...q,...!ea(Oe)&&{ownerState:{...ue,...He.ownerState}},className:Ae(Ce.root,He.className,s,V&&"MuiInputBase-readOnly"),children:[N,c.jsx(vl.Provider,{value:null,children:c.jsx(je,{"aria-invalid":ye.error,"aria-describedby":o,autoComplete:a,autoFocus:i,defaultValue:f,disabled:ye.disabled,id:x,onAnimationStart:Ye,name:B,placeholder:M,readOnly:V,required:ye.required,rows:U,value:X,onKeyDown:A,onKeyUp:w,type:ae,...rt,...!ea(je)&&{as:At,ownerState:{...ue,...rt.ownerState}},ref:ne,className:Ae(Ce.input,rt.className,V&&"MuiInputBase-readOnly"),onBlur:ve,onChange:Ve,onFocus:Ie})}),m,z?z({...ye,startAdornment:N}):null]})]})});function RP(e){return _e("MuiInput",e)}const $r={...xn,...Le("MuiInput",["root","underline","input"])},MP=e=>{const{classes:t,disableUnderline:n}=e,o=Fe({root:["root",!n&&"underline"],input:["input"]},RP,t);return{...t,...o}},OP=le(Dl,{shouldForwardProp:e=>kn(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Sl(e,t),!n.disableUnderline&&t.underline]}})(et(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${$r.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${$r.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${$r.disabled}, .${$r.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${$r.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Tn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),NP=le(wl,{name:"MuiInput",slot:"Input",overridesResolver:kl})({}),Ed=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiInput"}),{disableUnderline:o=!1,components:a={},componentsProps:i,fullWidth:s=!1,inputComponent:l="input",multiline:u=!1,slotProps:d,slots:f={},type:h="text",...p}=r,m=MP(r),y={root:{ownerState:{disableUnderline:o}}},x=d??i?tn(d??i,y):y,E=f.root??a.Root??OP,v=f.input??a.Input??NP;return c.jsx(xd,{slots:{root:E,input:v},slotProps:x,fullWidth:s,inputComponent:l,multiline:u,ref:n,type:h,...p,classes:m})});Ed.muiName="Input";function LP(e){return _e("MuiFilledInput",e)}const En={...xn,...Le("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},FP=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:a,hiddenLabel:i,multiline:s}=e,l={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",a==="small"&&`size${De(a)}`,i&&"hiddenLabel",s&&"multiline"],input:["input"]},u=Fe(l,LP,t);return{...t,...u}},_P=le(Dl,{shouldForwardProp:e=>kn(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Sl(e,t),!n.disableUnderline&&t.underline]}})(et(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${En.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${En.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:i})=>!i.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${En.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${En.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${En.disabled}, .${En.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${En.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Tn()).map(([i])=>({props:{disableUnderline:!1,color:i},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[i]?.main}`}}})),{props:({ownerState:i})=>i.startAdornment,style:{paddingLeft:12}},{props:({ownerState:i})=>i.endAdornment,style:{paddingRight:12}},{props:({ownerState:i})=>i.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:i,size:s})=>i.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:i})=>i.multiline&&i.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:i})=>i.multiline&&i.hiddenLabel&&i.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),BP=le(wl,{name:"MuiFilledInput",slot:"Input",overridesResolver:kl})(et(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),Cd=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:a={},componentsProps:i,fullWidth:s=!1,hiddenLabel:l,inputComponent:u="input",multiline:d=!1,slotProps:f,slots:h={},type:p="text",...m}=r,b={...r,disableUnderline:o,fullWidth:s,inputComponent:u,multiline:d,type:p},y=FP(r),x={root:{ownerState:b},input:{ownerState:b}},E=f??i?tn(x,f??i):x,v=h.root??a.Root??_P,S=h.input??a.Input??BP;return c.jsx(xd,{slots:{root:v,input:S},slotProps:E,fullWidth:s,inputComponent:u,multiline:d,ref:n,type:p,...m,classes:y})});Cd.muiName="Input";var xh;const jP=le("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:kn})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),$P=le("legend",{name:"MuiNotchedOutlined",shouldForwardProp:kn})(et(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function HP(e){const{children:t,classes:n,className:r,label:o,notched:a,...i}=e,s=o!=null&&o!=="",l={...e,notched:a,withLabel:s};return c.jsx(jP,{"aria-hidden":!0,className:r,ownerState:l,...i,children:c.jsx($P,{ownerState:l,children:s?c.jsx("span",{children:o}):xh||(xh=c.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}function UP(e){return _e("MuiOutlinedInput",e)}const In={...xn,...Le("MuiOutlinedInput",["root","notchedOutline","input"])},zP=e=>{const{classes:t}=e,r=Fe({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},UP,t);return{...t,...r}},VP=le(Dl,{shouldForwardProp:e=>kn(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Sl})(et(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${In.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${In.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${In.focused} .${In.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Tn()).map(([n])=>({props:{color:n},style:{[`&.${In.focused} .${In.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${In.error} .${In.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${In.disabled} .${In.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),WP=le(HP,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(et(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),qP=le(wl,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:kl})(et(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),Td=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiOutlinedInput"}),{components:o={},fullWidth:a=!1,inputComponent:i="input",label:s,multiline:l=!1,notched:u,slots:d={},slotProps:f={},type:h="text",...p}=r,m=zP(r),b=Xn(),y=ba({props:r,muiFormControl:b,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),x={...r,color:y.color||"primary",disabled:y.disabled,error:y.error,focused:y.focused,formControl:b,fullWidth:a,hiddenLabel:y.hiddenLabel,multiline:l,size:y.size,type:h},E=d.root??o.Root??VP,v=d.input??o.Input??qP,[S,k]=st("notchedOutline",{elementType:WP,className:m.notchedOutline,shouldForwardComponentProp:!0,ownerState:x,externalForwardedProps:{slots:d,slotProps:f},additionalProps:{label:s!=null&&s!==""&&y.required?c.jsxs(I.Fragment,{children:[s," ","*"]}):s}});return c.jsx(xd,{slots:{root:E,input:v},slotProps:f,renderSuffix:C=>c.jsx(S,{...k,notched:typeof u<"u"?u:!!(C.startAdornment||C.filled||C.focused)}),fullWidth:a,inputComponent:i,multiline:l,ref:n,type:h,...p,classes:{...m,notchedOutline:null}})});Td.muiName="Input";function YP(e){return _e("MuiFormLabel",e)}const oi=Le("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),KP=e=>{const{classes:t,color:n,focused:r,disabled:o,error:a,filled:i,required:s}=e,l={root:["root",`color${De(n)}`,o&&"disabled",a&&"error",i&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",a&&"error"]};return Fe(l,YP,t)},GP=le("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color==="secondary"&&t.colorSecondary,n.filled&&t.filled]}})(et(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(Tn()).map(([t])=>({props:{color:t},style:{[`&.${oi.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${oi.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${oi.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),QP=le("span",{name:"MuiFormLabel",slot:"Asterisk"})(et(({theme:e})=>({[`&.${oi.error}`]:{color:(e.vars||e).palette.error.main}}))),XP=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiFormLabel"}),{children:o,className:a,color:i,component:s="label",disabled:l,error:u,filled:d,focused:f,required:h,...p}=r,m=Xn(),b=ba({props:r,muiFormControl:m,states:["color","required","focused","disabled","error","filled"]}),y={...r,color:b.color||"primary",component:s,disabled:b.disabled,error:b.error,filled:b.filled,focused:b.focused,required:b.required},x=KP(y);return c.jsxs(GP,{as:s,ownerState:y,className:Ae(x.root,a),ref:n,...p,children:[o,b.required&&c.jsxs(QP,{ownerState:y,"aria-hidden":!0,className:x.asterisk,children:[" ","*"]})]})});function ZP(e){return _e("MuiInputLabel",e)}Le("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const JP=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:a,variant:i,required:s}=e,l={root:["root",n&&"formControl",!a&&"animated",o&&"shrink",r&&r!=="medium"&&`size${De(r)}`,i],asterisk:[s&&"asterisk"]},u=Fe(l,ZP,t);return{...t,...u}},e8=le(XP,{shouldForwardProp:e=>kn(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${oi.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(et(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),zs=I.forwardRef(function(t,n){const r=Qe({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,margin:a,shrink:i,variant:s,className:l,...u}=r,d=Xn();let f=i;typeof f>"u"&&d&&(f=d.filled||d.focused||d.adornedStart);const h=ba({props:r,muiFormControl:d,states:["size","variant","required","focused"]}),p={...r,disableAnimation:o,formControl:d,shrink:f,size:h.size,variant:h.variant,required:h.required,focused:h.focused},m=JP(p);return c.jsx(e8,{"data-shrink":f,ref:n,className:Ae(m.root,l),...u,ownerState:p,classes:m})});function t8(e){return _e("MuiFormControl",e)}Le("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const n8=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${De(n)}`,r&&"fullWidth"]};return Fe(o,t8,t)},r8=le("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${De(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Vs=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiFormControl"}),{children:o,className:a,color:i="primary",component:s="div",disabled:l=!1,error:u=!1,focused:d,fullWidth:f=!1,hiddenLabel:h=!1,margin:p="none",required:m=!1,size:b="medium",variant:y="outlined",...x}=r,E={...r,color:i,component:s,disabled:l,error:u,fullWidth:f,hiddenLabel:h,margin:p,required:m,size:b,variant:y},v=n8(E),[S,k]=I.useState(()=>{let w=!1;return o&&I.Children.forEach(o,M=>{if(!ns(M,["Input","Select"]))return;const V=ns(M,["Select"])?M.props.input:M;V&&AP(V.props)&&(w=!0)}),w}),[C,L]=I.useState(()=>{let w=!1;return o&&I.Children.forEach(o,M=>{ns(M,["Input","Select"])&&(Us(M.props,!0)||Us(M.props.inputProps,!0))&&(w=!0)}),w}),[F,B]=I.useState(!1);l&&F&&B(!1);const R=d!==void 0&&!l?d:F;let _;I.useRef(!1);const T=I.useCallback(()=>{L(!0)},[]),O=I.useCallback(()=>{L(!1)},[]),A=I.useMemo(()=>({adornedStart:S,setAdornedStart:k,color:i,disabled:l,error:u,filled:C,focused:R,fullWidth:f,hiddenLabel:h,size:b,onBlur:()=>{B(!1)},onFocus:()=>{B(!0)},onEmpty:O,onFilled:T,registerEffect:_,required:m,variant:y}),[S,i,l,u,C,R,f,h,_,O,T,m,b,y]);return c.jsx(vl.Provider,{value:A,children:c.jsx(r8,{as:s,ownerState:E,className:Ae(v.root,a),ref:n,...x,children:o})})});function o8(e){return _e("MuiFormHelperText",e)}const Eh=Le("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Ch;const a8=e=>{const{classes:t,contained:n,size:r,disabled:o,error:a,filled:i,focused:s,required:l}=e,u={root:["root",o&&"disabled",a&&"error",r&&`size${De(r)}`,n&&"contained",s&&"focused",i&&"filled",l&&"required"]};return Fe(u,o8,t)},i8=le("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${De(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(et(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${Eh.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Eh.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),M1=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiFormHelperText"}),{children:o,className:a,component:i="p",disabled:s,error:l,filled:u,focused:d,margin:f,required:h,variant:p,...m}=r,b=Xn(),y=ba({props:r,muiFormControl:b,states:["variant","size","disabled","error","filled","focused","required"]}),x={...r,component:i,contained:y.variant==="filled"||y.variant==="outlined",variant:y.variant,size:y.size,disabled:y.disabled,error:y.error,filled:y.filled,focused:y.focused,required:y.required};delete x.ownerState;const E=a8(x);return c.jsx(i8,{as:i,className:Ae(E.root,a),ref:n,...m,ownerState:x,children:o===" "?Ch||(Ch=c.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):o})});function dt(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...a}=e,i=o?{}:Tl(n,r),{props:s,internalRef:l}=w1({...a,externalSlotProps:i}),u=ct(l,i?.ref,e.additionalProps?.ref);return D1(t,{...s,ref:u},r)}const Er=I.createContext({});function s8(e){return _e("MuiList",e)}Le("MuiList",["root","padding","dense","subheader"]);const l8=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Fe({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},s8,t)},u8=le("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),O1=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiList"}),{children:o,className:a,component:i="ul",dense:s=!1,disablePadding:l=!1,subheader:u,...d}=r,f=I.useMemo(()=>({dense:s}),[s]),h={...r,component:i,dense:s,disablePadding:l},p=l8(h);return c.jsx(Er.Provider,{value:f,children:c.jsxs(u8,{as:i,className:Ae(p.root,a),ref:n,ownerState:h,...d,children:[u,o]})})});function ku(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Th(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function N1(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function Ra(e,t,n,r,o,a){let i=!1,s=o(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(i)return!1;i=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!N1(s,a)||l)s=o(e,s,n);else return s.focus(),!0}return!1}const c8=I.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:a=!1,children:i,className:s,disabledItemsFocusable:l=!1,disableListWrap:u=!1,onKeyDown:d,variant:f="selectedMenu",...h}=t,p=I.useRef(null),m=I.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Wt(()=>{o&&p.current.focus()},[o]),I.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(v,{direction:S})=>{const k=!p.current.style.width;if(v.clientHeight<p.current.clientHeight&&k){const C=`${v1(vr(v))}px`;p.current.style[S==="rtl"?"paddingLeft":"paddingRight"]=C,p.current.style.width=`calc(100% + ${C})`}return p.current}}),[]);const b=v=>{const S=p.current,k=v.key;if(v.ctrlKey||v.metaKey||v.altKey){d&&d(v);return}const L=Vt(S).activeElement;if(k==="ArrowDown")v.preventDefault(),Ra(S,L,u,l,ku);else if(k==="ArrowUp")v.preventDefault(),Ra(S,L,u,l,Th);else if(k==="Home")v.preventDefault(),Ra(S,null,u,l,ku);else if(k==="End")v.preventDefault(),Ra(S,null,u,l,Th);else if(k.length===1){const F=m.current,B=k.toLowerCase(),R=performance.now();F.keys.length>0&&(R-F.lastTime>500?(F.keys=[],F.repeating=!0,F.previousKeyMatched=!0):F.repeating&&B!==F.keys[0]&&(F.repeating=!1)),F.lastTime=R,F.keys.push(B);const _=L&&!F.repeating&&N1(L,F);F.previousKeyMatched&&(_||Ra(S,L,!1,l,ku,F))?v.preventDefault():F.previousKeyMatched=!1}d&&d(v)},y=ct(p,n);let x=-1;I.Children.forEach(i,(v,S)=>{if(!I.isValidElement(v)){x===S&&(x+=1,x>=i.length&&(x=-1));return}v.props.disabled||(f==="selectedMenu"&&v.props.selected||x===-1)&&(x=S),x===S&&(v.props.disabled||v.props.muiSkipListHighlight||v.type.muiSkipListHighlight)&&(x+=1,x>=i.length&&(x=-1))});const E=I.Children.map(i,(v,S)=>{if(S===x){const k={};return a&&(k.autoFocus=!0),v.props.tabIndex===void 0&&f==="selectedMenu"&&(k.tabIndex=0),I.cloneElement(v,k)}return v});return c.jsx(O1,{role:"menu",ref:y,className:s,onKeyDown:b,tabIndex:o?0:-1,...h,children:E})});function mc(e){return`scale(${e}, ${e**2})`}const d8={entering:{opacity:1,transform:mc(1)},entered:{opacity:1,transform:"none"}},Du=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),hi=I.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:a,easing:i,in:s,onEnter:l,onEntered:u,onEntering:d,onExit:f,onExited:h,onExiting:p,style:m,timeout:b="auto",TransitionComponent:y=Gn,...x}=t,E=bd(),v=I.useRef(),S=yo(),k=I.useRef(null),C=ct(k,ga(a),n),L=w=>M=>{if(w){const V=k.current;M===void 0?w(V):w(V,M)}},F=L(d),B=L((w,M)=>{A1(w);const{duration:V,delay:z,easing:U}=Hs({style:m,timeout:b,easing:i},{mode:"enter"});let D;b==="auto"?(D=S.transitions.getAutoHeightDuration(w.clientHeight),v.current=D):D=V,w.style.transition=[S.transitions.create("opacity",{duration:D,delay:z}),S.transitions.create("transform",{duration:Du?D:D*.666,delay:z,easing:U})].join(","),l&&l(w,M)}),R=L(u),_=L(p),T=L(w=>{const{duration:M,delay:V,easing:z}=Hs({style:m,timeout:b,easing:i},{mode:"exit"});let U;b==="auto"?(U=S.transitions.getAutoHeightDuration(w.clientHeight),v.current=U):U=M,w.style.transition=[S.transitions.create("opacity",{duration:U,delay:V}),S.transitions.create("transform",{duration:Du?U:U*.666,delay:Du?V:V||U*.333,easing:z})].join(","),w.style.opacity=0,w.style.transform=mc(.75),f&&f(w)}),O=L(h),A=w=>{b==="auto"&&E.start(v.current||0,w),r&&r(k.current,w)};return c.jsx(y,{appear:o,in:s,nodeRef:k,onEnter:B,onEntered:R,onEntering:F,onExit:T,onExited:O,onExiting:_,addEndListener:A,timeout:b==="auto"?null:b,...x,children:(w,{ownerState:M,...V})=>I.cloneElement(a,{style:{opacity:0,transform:mc(.75),visibility:w==="exited"&&!s?"hidden":void 0,...d8[w],...m,...a.props.style},ref:C,...V})})});hi&&(hi.muiSupportAuto=!0);function f8(e){return _e("MuiPopover",e)}Le("MuiPopover",["root","paper"]);function vh(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function Sh(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function kh(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Xi(e){return typeof e=="function"?e():e}const p8=e=>{const{classes:t}=e;return Fe({root:["root"],paper:["paper"]},f8,t)},h8=le(P1,{name:"MuiPopover",slot:"Root"})({}),L1=le(To,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),m8=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiPopover"}),{action:o,anchorEl:a,anchorOrigin:i={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:u,className:d,container:f,elevation:h=8,marginThreshold:p=16,open:m,PaperProps:b={},slots:y={},slotProps:x={},transformOrigin:E={vertical:"top",horizontal:"left"},TransitionComponent:v,transitionDuration:S="auto",TransitionProps:k={},disableScrollLock:C=!1,...L}=r,F=I.useRef(),B={...r,anchorOrigin:i,anchorReference:l,elevation:h,marginThreshold:p,transformOrigin:E,TransitionComponent:v,transitionDuration:S,TransitionProps:k},R=p8(B),_=I.useCallback(()=>{if(l==="anchorPosition")return s;const oe=Xi(a),pe=(oe&&oe.nodeType===1?oe:Vt(F.current).body).getBoundingClientRect();return{top:pe.top+vh(pe,i.vertical),left:pe.left+Sh(pe,i.horizontal)}},[a,i.horizontal,i.vertical,s,l]),T=I.useCallback(oe=>({vertical:vh(oe,E.vertical),horizontal:Sh(oe,E.horizontal)}),[E.horizontal,E.vertical]),O=I.useCallback(oe=>{const ne={width:oe.offsetWidth,height:oe.offsetHeight},pe=T(ne);if(l==="none")return{top:null,left:null,transformOrigin:kh(pe)};const Z=_();let J=Z.top-pe.vertical,ye=Z.left-pe.horizontal;const de=J+ne.height,be=ye+ne.width,ie=vr(Xi(a)),Ie=ie.innerHeight-p,ve=ie.innerWidth-p;if(p!==null&&J<p){const Ve=J-p;J-=Ve,pe.vertical+=Ve}else if(p!==null&&de>Ie){const Ve=de-Ie;J-=Ve,pe.vertical+=Ve}if(p!==null&&ye<p){const Ve=ye-p;ye-=Ve,pe.horizontal+=Ve}else if(be>ve){const Ve=be-ve;ye-=Ve,pe.horizontal+=Ve}return{top:`${Math.round(J)}px`,left:`${Math.round(ye)}px`,transformOrigin:kh(pe)}},[a,l,_,T,p]),[A,w]=I.useState(m),M=I.useCallback(()=>{const oe=F.current;if(!oe)return;const ne=O(oe);ne.top!==null&&oe.style.setProperty("top",ne.top),ne.left!==null&&(oe.style.left=ne.left),oe.style.transformOrigin=ne.transformOrigin,w(!0)},[O]);I.useEffect(()=>(C&&window.addEventListener("scroll",M),()=>window.removeEventListener("scroll",M)),[a,C,M]);const V=()=>{M()},z=()=>{w(!1)};I.useEffect(()=>{m&&M()}),I.useImperativeHandle(o,()=>m?{updatePosition:()=>{M()}}:null,[m,M]),I.useEffect(()=>{if(!m)return;const oe=$m(()=>{M()}),ne=vr(Xi(a));return ne.addEventListener("resize",oe),()=>{oe.clear(),ne.removeEventListener("resize",oe)}},[a,m,M]);let U=S;const D={slots:{transition:v,...y},slotProps:{transition:k,paper:b,...x}},[Y,te]=st("transition",{elementType:hi,externalForwardedProps:D,ownerState:B,getSlotProps:oe=>({...oe,onEntering:(ne,pe)=>{oe.onEntering?.(ne,pe),V()},onExited:ne=>{oe.onExited?.(ne),z()}}),additionalProps:{appear:!0,in:m}});S==="auto"&&!Y.muiSupportAuto&&(U=void 0);const N=f||(a?Vt(Xi(a)).body:void 0),[ae,{slots:Q,slotProps:q,...X}]=st("root",{ref:n,elementType:h8,externalForwardedProps:{...D,...L},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:y.backdrop},slotProps:{backdrop:j2(typeof x.backdrop=="function"?x.backdrop(B):x.backdrop,{invisible:!0})},container:N,open:m},ownerState:B,className:Ae(R.root,d)}),[G,ee]=st("paper",{ref:F,className:R.paper,elementType:L1,externalForwardedProps:D,shouldForwardComponentProp:!0,additionalProps:{elevation:h,style:A?void 0:{opacity:0}},ownerState:B});return c.jsx(ae,{...X,...!ea(ae)&&{slots:Q,slotProps:q,disableScrollLock:C},children:c.jsx(Y,{...te,timeout:U,children:c.jsx(G,{...ee,children:u})})})});function g8(e){return _e("MuiMenu",e)}Le("MuiMenu",["root","paper","list"]);const b8={vertical:"top",horizontal:"right"},y8={vertical:"top",horizontal:"left"},x8=e=>{const{classes:t}=e;return Fe({root:["root"],paper:["paper"],list:["list"]},g8,t)},E8=le(m8,{shouldForwardProp:e=>kn(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),C8=le(L1,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),T8=le(c8,{name:"MuiMenu",slot:"List"})({outline:0}),v8=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:a,className:i,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:u,open:d,PaperProps:f={},PopoverClasses:h,transitionDuration:p="auto",TransitionProps:{onEntering:m,...b}={},variant:y="selectedMenu",slots:x={},slotProps:E={},...v}=r,S=qn(),k={...r,autoFocus:o,disableAutoFocusItem:s,MenuListProps:l,onEntering:m,PaperProps:f,transitionDuration:p,TransitionProps:b,variant:y},C=x8(k),L=o&&!s&&d,F=I.useRef(null),B=(U,D)=>{F.current&&F.current.adjustStyleForScrollbar(U,{direction:S?"rtl":"ltr"}),m&&m(U,D)},R=U=>{U.key==="Tab"&&(U.preventDefault(),u&&u(U,"tabKeyDown"))};let _=-1;I.Children.map(a,(U,D)=>{I.isValidElement(U)&&(U.props.disabled||(y==="selectedMenu"&&U.props.selected||_===-1)&&(_=D))});const T={slots:x,slotProps:{list:l,transition:b,paper:f,...E}},O=dt({elementType:x.root,externalSlotProps:E.root,ownerState:k,className:[C.root,i]}),[A,w]=st("paper",{className:C.paper,elementType:C8,externalForwardedProps:T,shouldForwardComponentProp:!0,ownerState:k}),[M,V]=st("list",{className:Ae(C.list,l.className),elementType:T8,shouldForwardComponentProp:!0,externalForwardedProps:T,getSlotProps:U=>({...U,onKeyDown:D=>{R(D),U.onKeyDown?.(D)}}),ownerState:k}),z=typeof T.slotProps.transition=="function"?T.slotProps.transition(k):T.slotProps.transition;return c.jsx(E8,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:S?"right":"left"},transformOrigin:S?b8:y8,slots:{root:x.root,paper:A,backdrop:x.backdrop,...x.transition&&{transition:x.transition}},slotProps:{root:O,paper:w,backdrop:typeof E.backdrop=="function"?E.backdrop(k):E.backdrop,transition:{...z,onEntering:(...U)=>{B(...U),z?.onEntering?.(...U)}}},open:d,ref:n,transitionDuration:p,ownerState:k,...v,classes:h,children:c.jsx(M,{actions:F,autoFocus:o&&(_===-1||s),autoFocusItem:L,variant:y,...V,children:a})})});function S8(e){return _e("MuiNativeSelect",e)}const vd=Le("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),k8=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:a,error:i}=e,s={select:["select",n,r&&"disabled",o&&"multiple",i&&"error"],icon:["icon",`icon${De(n)}`,a&&"iconOpen",r&&"disabled"]};return Fe(s,S8,t)},F1=le("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${vd.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),D8=le(F1,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:kn,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${vd.multiple}`]:t.multiple}]}})({}),_1=le("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${vd.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),w8=le(_1,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${De(n.variant)}`],n.open&&t.iconOpen]}})({}),A8=I.forwardRef(function(t,n){const{className:r,disabled:o,error:a,IconComponent:i,inputRef:s,variant:l="standard",...u}=t,d={...t,disabled:o,variant:l,error:a},f=k8(d);return c.jsxs(I.Fragment,{children:[c.jsx(D8,{ownerState:d,className:Ae(f.select,r),disabled:o,ref:s||n,...u}),t.multiple?null:c.jsx(w8,{as:i,ownerState:d,className:f.icon})]})});function B1(e){return _e("MuiSelect",e)}const Ma=Le("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Dh;const I8=le(F1,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Ma.select}`]:t.select},{[`&.${Ma.select}`]:t[n.variant]},{[`&.${Ma.error}`]:t.error},{[`&.${Ma.multiple}`]:t.multiple}]}})({[`&.${Ma.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),P8=le(_1,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${De(n.variant)}`],n.open&&t.iconOpen]}})({}),R8=le("input",{shouldForwardProp:e=>jm(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function wh(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function M8(e){return e==null||typeof e=="string"&&!e.trim()}const O8=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:a,error:i}=e,s={select:["select",n,r&&"disabled",o&&"multiple",i&&"error"],icon:["icon",`icon${De(n)}`,a&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Fe(s,B1,t)},N8=I.forwardRef(function(t,n){const{"aria-describedby":r,"aria-label":o,autoFocus:a,autoWidth:i,children:s,className:l,defaultOpen:u,defaultValue:d,disabled:f,displayEmpty:h,error:p=!1,IconComponent:m,inputRef:b,labelId:y,MenuProps:x={},multiple:E,name:v,onBlur:S,onChange:k,onClose:C,onFocus:L,onOpen:F,open:B,readOnly:R,renderValue:_,required:T,SelectDisplayProps:O={},tabIndex:A,type:w,value:M,variant:V="standard",...z}=t,[U,D]=Nn({controlled:M,default:d,name:"Select"}),[Y,te]=Nn({controlled:B,default:u,name:"Select"}),N=I.useRef(null),ae=I.useRef(null),[Q,q]=I.useState(null),{current:X}=I.useRef(B!=null),[G,ee]=I.useState(),oe=ct(n,b),ne=I.useCallback(se=>{ae.current=se,se&&q(se)},[]),pe=Q?.parentNode;I.useImperativeHandle(oe,()=>({focus:()=>{ae.current.focus()},node:N.current,value:U}),[U]),I.useEffect(()=>{u&&Y&&Q&&!X&&(ee(i?null:pe.clientWidth),ae.current.focus())},[Q,i]),I.useEffect(()=>{a&&ae.current.focus()},[a]),I.useEffect(()=>{if(!y)return;const se=Vt(ae.current).getElementById(y);if(se){const xe=()=>{getSelection().isCollapsed&&ae.current.focus()};return se.addEventListener("click",xe),()=>{se.removeEventListener("click",xe)}}},[y]);const Z=(se,xe)=>{se?F&&F(xe):C&&C(xe),X||(ee(i?null:pe.clientWidth),te(se))},J=se=>{se.button===0&&(se.preventDefault(),ae.current.focus(),Z(!0,se))},ye=se=>{Z(!1,se)},de=I.Children.toArray(s),be=se=>{const xe=de.find(Re=>Re.props.value===se.target.value);xe!==void 0&&(D(xe.props.value),k&&k(se,xe))},ie=se=>xe=>{let Re;if(xe.currentTarget.hasAttribute("tabindex")){if(E){Re=Array.isArray(U)?U.slice():[];const Be=U.indexOf(se.props.value);Be===-1?Re.push(se.props.value):Re.splice(Be,1)}else Re=se.props.value;if(se.props.onClick&&se.props.onClick(xe),U!==Re&&(D(Re),k)){const Be=xe.nativeEvent||xe,We=new Be.constructor(Be.type,Be);Object.defineProperty(We,"target",{writable:!0,value:{value:Re,name:v}}),k(We,se)}E||Z(!1,xe)}},Ie=se=>{R||[" ","ArrowUp","ArrowDown","Enter"].includes(se.key)&&(se.preventDefault(),Z(!0,se))},ve=Q!==null&&Y,Ve=se=>{!ve&&S&&(Object.defineProperty(se,"target",{writable:!0,value:{value:U,name:v}}),S(se))};delete z["aria-invalid"];let we,At;const rt=[];let Ye=!1;(Us({value:U})||h)&&(_?we=_(U):Ye=!0);const ue=de.map(se=>{if(!I.isValidElement(se))return null;let xe;if(E){if(!Array.isArray(U))throw new Error(Cr(2));xe=U.some(Re=>wh(Re,se.props.value)),xe&&Ye&&rt.push(se.props.children)}else xe=wh(U,se.props.value),xe&&Ye&&(At=se.props.children);return I.cloneElement(se,{"aria-selected":xe?"true":"false",onClick:ie(se),onKeyUp:Re=>{Re.key===" "&&Re.preventDefault(),se.props.onKeyUp&&se.props.onKeyUp(Re)},role:"option",selected:xe,value:void 0,"data-value":se.props.value})});Ye&&(E?rt.length===0?we=null:we=rt.reduce((se,xe,Re)=>(se.push(xe),Re<rt.length-1&&se.push(", "),se),[]):we=At);let Ce=G;!i&&X&&Q&&(Ce=pe.clientWidth);let Oe;typeof A<"u"?Oe=A:Oe=f?null:0;const He=O.id||(v?`mui-component-select-${v}`:void 0),je={...t,variant:V,value:U,open:ve,error:p},Ne=O8(je),ot={...x.PaperProps,...typeof x.slotProps?.paper=="function"?x.slotProps.paper(je):x.slotProps?.paper},Et={...x.MenuListProps,...typeof x.slotProps?.list=="function"?x.slotProps.list(je):x.slotProps?.list},mt=Yn();return c.jsxs(I.Fragment,{children:[c.jsx(I8,{as:"div",ref:ne,tabIndex:Oe,role:"combobox","aria-controls":ve?mt:void 0,"aria-disabled":f?"true":void 0,"aria-expanded":ve?"true":"false","aria-haspopup":"listbox","aria-label":o,"aria-labelledby":[y,He].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":T?"true":void 0,"aria-invalid":p?"true":void 0,onKeyDown:Ie,onMouseDown:f||R?null:J,onBlur:Ve,onFocus:L,...O,ownerState:je,className:Ae(O.className,Ne.select,l),id:He,children:M8(we)?Dh||(Dh=c.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):we}),c.jsx(R8,{"aria-invalid":p,value:Array.isArray(U)?U.join(","):U,name:v,ref:N,"aria-hidden":!0,onChange:be,tabIndex:-1,disabled:f,className:Ne.nativeInput,autoFocus:a,required:T,...z,ownerState:je}),c.jsx(P8,{as:m,className:Ne.icon,ownerState:je}),c.jsx(v8,{id:`menu-${v||""}`,anchorEl:pe,open:ve,onClose:ye,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...x,slotProps:{...x.slotProps,list:{"aria-labelledby":y,role:"listbox","aria-multiselectable":E?"true":void 0,disableListWrap:!0,id:mt,...Et},paper:{...ot,style:{minWidth:Ce,...ot!=null?ot.style:null}}},children:ue})]})}),j1=xt(c.jsx("path",{d:"M7 10l5 5 5-5z"})),L8=e=>{const{classes:t}=e,r=Fe({root:["root"]},B1,t);return{...t,...r}},Sd={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>kn(e)&&e!=="variant"},F8=le(Ed,Sd)(""),_8=le(Td,Sd)(""),B8=le(Cd,Sd)(""),Ws=I.forwardRef(function(t,n){const r=Qe({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:a,classes:i={},className:s,defaultOpen:l=!1,displayEmpty:u=!1,IconComponent:d=j1,id:f,input:h,inputProps:p,label:m,labelId:b,MenuProps:y,multiple:x=!1,native:E=!1,onClose:v,onOpen:S,open:k,renderValue:C,SelectDisplayProps:L,variant:F="outlined",...B}=r,R=E?A8:N8,_=Xn(),T=ba({props:r,muiFormControl:_,states:["variant","error"]}),O=T.variant||F,A={...r,variant:O,classes:i},w=L8(A),{root:M,...V}=w,z=h||{standard:c.jsx(F8,{ownerState:A}),outlined:c.jsx(_8,{label:m,ownerState:A}),filled:c.jsx(B8,{ownerState:A})}[O],U=ct(n,ga(z));return c.jsx(I.Fragment,{children:I.cloneElement(z,{inputComponent:R,inputProps:{children:a,error:T.error,IconComponent:d,variant:O,type:void 0,multiple:x,...E?{id:f}:{autoWidth:o,defaultOpen:l,displayEmpty:u,labelId:b,MenuProps:y,onClose:v,onOpen:S,open:k,renderValue:C,SelectDisplayProps:{id:f,...L}},...p,classes:p?tn(V,p.classes):V,...h?h.props.inputProps:{}},...(x&&E||u)&&O==="outlined"?{notched:!0}:{},ref:U,className:Ae(z.props.className,s,w.root),...!h&&{variant:O},...B})})});Ws.muiName="Select";function j8(e){return _e("MuiTextField",e)}Le("MuiTextField",["root"]);const $8={standard:Ed,filled:Cd,outlined:Td},H8=e=>{const{classes:t}=e;return Fe({root:["root"]},j8,t)},U8=le(Vs,{name:"MuiTextField",slot:"Root"})({}),Je=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:a=!1,children:i,className:s,color:l="primary",defaultValue:u,disabled:d=!1,error:f=!1,FormHelperTextProps:h,fullWidth:p=!1,helperText:m,id:b,InputLabelProps:y,inputProps:x,InputProps:E,inputRef:v,label:S,maxRows:k,minRows:C,multiline:L=!1,name:F,onBlur:B,onChange:R,onFocus:_,placeholder:T,required:O=!1,rows:A,select:w=!1,SelectProps:M,slots:V={},slotProps:z={},type:U,value:D,variant:Y="outlined",...te}=r,N={...r,autoFocus:a,color:l,disabled:d,error:f,fullWidth:p,multiline:L,required:O,select:w,variant:Y},ae=H8(N),Q=Yn(b),q=m&&Q?`${Q}-helper-text`:void 0,X=S&&Q?`${Q}-label`:void 0,G=$8[Y],ee={slots:V,slotProps:{input:E,inputLabel:y,htmlInput:x,formHelperText:h,select:M,...z}},oe={},ne=ee.slotProps.inputLabel;Y==="outlined"&&(ne&&typeof ne.shrink<"u"&&(oe.notched=ne.shrink),oe.label=S),w&&((!M||!M.native)&&(oe.id=void 0),oe["aria-describedby"]=void 0);const[pe,Z]=st("root",{elementType:U8,shouldForwardComponentProp:!0,externalForwardedProps:{...ee,...te},ownerState:N,className:Ae(ae.root,s),ref:n,additionalProps:{disabled:d,error:f,fullWidth:p,required:O,color:l,variant:Y}}),[J,ye]=st("input",{elementType:G,externalForwardedProps:ee,additionalProps:oe,ownerState:N}),[de,be]=st("inputLabel",{elementType:zs,externalForwardedProps:ee,ownerState:N}),[ie,Ie]=st("htmlInput",{elementType:"input",externalForwardedProps:ee,ownerState:N}),[ve,Ve]=st("formHelperText",{elementType:M1,externalForwardedProps:ee,ownerState:N}),[we,At]=st("select",{elementType:Ws,externalForwardedProps:ee,ownerState:N}),rt=c.jsx(J,{"aria-describedby":q,autoComplete:o,autoFocus:a,defaultValue:u,fullWidth:p,multiline:L,name:F,rows:A,maxRows:k,minRows:C,type:U,value:D,id:Q,inputRef:v,onBlur:B,onChange:R,onFocus:_,placeholder:T,inputProps:Ie,slots:{input:V.htmlInput?ie:void 0},...ye});return c.jsxs(pe,{...Z,children:[S!=null&&S!==""&&c.jsx(de,{htmlFor:Q,id:X,...be,children:S}),w?c.jsx(we,{"aria-describedby":q,id:Q,labelId:X,value:D,input:rt,...At,children:i}):rt,m&&c.jsx(ve,{id:q,...Ve,children:m})]})}),Ah=Le("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);function z8(e){return _e("MuiListItemIcon",e)}const Ih=Le("MuiListItemIcon",["root","alignItemsFlexStart"]),V8=e=>{const{alignItems:t,classes:n}=e;return Fe({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},z8,n)},W8=le("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(et(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),$1=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiListItemIcon"}),{className:o,...a}=r,i=I.useContext(Er),s={...r,alignItems:i.alignItems},l=V8(s);return c.jsx(W8,{className:Ae(l.root,o),ownerState:s,ref:n,...a})});function q8(e){return _e("MuiListItemText",e)}const jo=Le("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Y8=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:a}=e;return Fe({root:["root",n&&"inset",a&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},q8,t)},K8=le("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${jo.primary}`]:t.primary},{[`& .${jo.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${fh.root}:where(& .${jo.primary})`]:{display:"block"},[`.${fh.root}:where(& .${jo.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),H1=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiListItemText"}),{children:o,className:a,disableTypography:i=!1,inset:s=!1,primary:l,primaryTypographyProps:u,secondary:d,secondaryTypographyProps:f,slots:h={},slotProps:p={},...m}=r,{dense:b}=I.useContext(Er);let y=l??o,x=d;const E={...r,disableTypography:i,inset:s,primary:!!y,secondary:!!x,dense:b},v=Y8(E),S={slots:h,slotProps:{primary:u,secondary:f,...p}},[k,C]=st("root",{className:Ae(v.root,a),elementType:K8,externalForwardedProps:{...S,...m},ownerState:E,ref:n}),[L,F]=st("primary",{className:v.primary,elementType:ut,externalForwardedProps:S,ownerState:E}),[B,R]=st("secondary",{className:v.secondary,elementType:ut,externalForwardedProps:S,ownerState:E});return y!=null&&y.type!==ut&&!i&&(y=c.jsx(L,{variant:b?"body2":"body1",component:F?.variant?void 0:"span",...F,children:y})),x!=null&&x.type!==ut&&!i&&(x=c.jsx(B,{variant:"body2",color:"textSecondary",...R,children:x})),c.jsxs(k,{...C,children:[y,x]})});function G8(e){return _e("MuiMenuItem",e)}const Oa=Le("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Q8=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},X8=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:a,classes:i}=e,l=Fe({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",a&&"selected"]},G8,i);return{...i,...l}},Z8=le(Jo,{shouldForwardProp:e=>kn(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Q8})(et(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Oa.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Oa.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${Oa.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${Oa.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Oa.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Ah.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Ah.inset}`]:{marginLeft:52},[`& .${jo.root}`]:{marginTop:0,marginBottom:0},[`& .${jo.inset}`]:{paddingLeft:36},[`& .${Ih.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${Ih.root} svg`]:{fontSize:"1.25rem"}}}]}))),Gt=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:a="li",dense:i=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:u,role:d="menuitem",tabIndex:f,className:h,...p}=r,m=I.useContext(Er),b=I.useMemo(()=>({dense:i||m.dense||!1,disableGutters:l}),[m.dense,i,l]),y=I.useRef(null);Wt(()=>{o&&y.current&&y.current.focus()},[o]);const x={...r,dense:b.dense,divider:s,disableGutters:l},E=X8(r),v=ct(y,n);let S;return r.disabled||(S=f!==void 0?f:-1),c.jsx(Er.Provider,{value:b,children:c.jsx(Z8,{ref:v,role:d,tabIndex:S,component:a,focusVisibleClassName:Ae(E.focusVisible,u),className:Ae(E.root,h),...p,ownerState:x,classes:E})})}),xr={postgres:[{label:"Host",name:"host",type:"text",required:!1},{label:"Port",name:"port",type:"number",required:!1},{label:"Database Name",name:"databaseName",type:"text",required:!1},{label:"User Name",name:"userName",type:"text",required:!1},{label:"Password",name:"password",type:"password",required:!1},{label:"Connection String",name:"connectionString",type:"text",required:!1}],bigquery:[{label:"Project ID",name:"defaultProjectId",type:"text",required:!1},{label:"Billing Project ID",name:"billingProjectId",type:"text",required:!1},{label:"Location",name:"location",type:"text",required:!1},{label:"Service Account Key JSON",name:"serviceAccountKeyJson",type:"text",required:!0},{label:"Maximum Bytes Billed",name:"maximumBytesBilled",type:"text",required:!1},{label:"Query Timeout Milliseconds",name:"queryTimeoutMilliseconds",type:"text",required:!1}],snowflake:[{label:"Account",name:"account",type:"text",required:!0},{label:"Username",name:"username",type:"text",required:!0},{label:"Password",name:"password",type:"password",required:!1},{label:"Role",name:"role",type:"text",required:!1},{label:"Warehouse",name:"warehouse",type:"text",required:!0},{label:"Database",name:"database",type:"text",required:!1},{label:"Schema",name:"schema",type:"text",required:!1},{label:"Response Timeout Milliseconds",name:"responseTimeoutMilliseconds",type:"text",required:!1},{label:"Private Key",name:"privateKey",type:"password",required:!1},{label:"Private Key Passphrase",name:"privateKeyPass",type:"password",required:!1}],trino:[{label:"Server",name:"server",type:"text",required:!0},{label:"Port",name:"port",type:"number",required:!1},{label:"Catalog",name:"catalog",type:"text",required:!1},{label:"Schema",name:"schema",type:"text",required:!1},{label:"User",name:"user",type:"text",required:!0},{label:"Password",name:"password",type:"password",required:!1},{label:"Peaka Key",name:"peakaKey",type:"password",required:!1}],databricks:[{label:"Host",name:"host",type:"text",required:!0},{label:"HTTP Path",name:"path",type:"text",required:!0},{label:"Access Token",name:"token",type:"password",required:!1},{label:"OAuth Client ID",name:"oauthClientId",type:"text",required:!1},{label:"OAuth Client Secret",name:"oauthClientSecret",type:"password",required:!1},{label:"Default Catalog",name:"defaultCatalog",type:"text",required:!1},{label:"Default Schema",name:"defaultSchema",type:"text",required:!1}],mysql:[{label:"Host",name:"host",type:"text",required:!0},{label:"Port",name:"port",type:"number",required:!0},{label:"User",name:"user",type:"text",required:!0},{label:"Password",name:"password",type:"password",required:!0},{label:"Database",name:"database",type:"text",required:!0}],duckdb:[],motherduck:[{label:"Access Token",name:"accessToken",type:"text",required:!0},{label:"Database",name:"database",type:"text",required:!1}],ducklake:[]},fs={postgres:"postgresConnection",bigquery:"bigqueryConnection",snowflake:"snowflakeConnection",trino:"trinoConnection",databricks:"databricksConnection",mysql:"mysqlConnection",duckdb:"duckdbConnection",motherduck:"motherduckConnection",ducklake:"ducklakeConnection"},gc={postgres:"postgresConnection",bigquery:"bigqueryConnection",snowflake:"snowflakeConnection",gcs:"gcsConnection",s3:"s3Connection",azure:"azureConnection"},mi=[{label:"Access Key ID",name:"accessKeyId",type:"text",required:!0},{label:"Secret Access Key",name:"secretAccessKey",type:"password",required:!0},{label:"Region",name:"region",type:"text",required:!1},{label:"Endpoint",name:"endpoint",type:"text",required:!1},{label:"Session Token",name:"sessionToken",type:"password",required:!1}],gi=[{label:"Key ID",name:"keyId",type:"text",required:!0},{label:"Secret",name:"secret",type:"password",required:!0}],J8=[{label:"Auth Type",name:"authType",type:"text",required:!0,selectOptions:[{label:"SAS Token",value:"sas_token"},{label:"Service Principal (SPN)",value:"service_principal"}]},{label:"SAS URL (e.g. https://account.blob.core.windows.net/container/file.parquet?sp=r&st=...)",name:"sasUrl",type:"text",required:!1,visibleWhen:{field:"authType",value:"sas_token"}},{label:"Tenant ID",name:"tenantId",type:"text",required:!1,visibleWhen:{field:"authType",value:"service_principal"}},{label:"Client ID",name:"clientId",type:"text",required:!1,visibleWhen:{field:"authType",value:"service_principal"}},{label:"Client Secret",name:"clientSecret",type:"password",required:!1,visibleWhen:{field:"authType",value:"service_principal"}},{label:"Account Name",name:"accountName",type:"text",required:!1,visibleWhen:{field:"authType",value:"service_principal"}},{label:"File URL (e.g. abfss://container/path/file.parquet)",name:"fileUrl",type:"text",required:!1,visibleWhen:{field:"authType",value:"service_principal"}}];function qs(e){return e==="postgres"||e==="bigquery"||e==="snowflake"?xr[e]||[]:e==="s3"?mi:e==="gcs"?gi:e==="azure"?J8:[]}function eR({onSubmit:e,isSubmitting:t}){const[n,r]=H.useState(!1),[o,a]=H.useState("postgres"),[i,s]=H.useState([]),[l,u]=H.useState("postgres"),[d,f]=H.useState("s3"),h=()=>{r(!0)},p=()=>{r(!1),s([]),a("postgres"),u("postgres"),f("s3")},m=async E=>{E.preventDefault();const v=new FormData(E.currentTarget),S=v.get("name")?.toString(),k=v.get("type")?.toString(),C=xr[k];if(!S)throw new Error("Name is required");if(!k)throw new Error("Type is required");let L;if(k==="ducklake"){const F={};if(l==="postgres"){const _=xr.postgres,T={};if(_.forEach(O=>{const A=v.get(`ducklake_pg_${O.name}`)?.toString();A&&(T[O.name]=A)}),Object.keys(T).length===0)throw new Error("DuckLake requires catalog connection");F.postgresConnection=T}const B=v.get("ducklake_bucketUrl")?.toString();if(!B)throw new Error("DuckLake requires a bucket URL");const R={bucketUrl:B};if(d==="s3"){const _={};if(mi.forEach(T=>{const O=v.get(`ducklake_s3_${T.name}`)?.toString();O&&(_[T.name]=O)}),!_.accessKeyId)throw new Error("S3 Access Key ID is required");if(!_.secretAccessKey)throw new Error("S3 Secret Access Key is required");Object.keys(_).length>0&&(R.s3Connection=_)}else if(d==="gcs"){const _={};if(gi.forEach(T=>{const O=v.get(`ducklake_gcs_${T.name}`)?.toString();O&&(_[T.name]=O)}),!_.keyId)throw new Error("GCS Key ID is required");if(!_.secret)throw new Error("GCS Secret is required");Object.keys(_).length>0&&(R.gcsConnection=_)}L={name:S,type:k,ducklakeConnection:{catalog:F,storage:R}}}else if(k==="duckdb"){if(i.length===0)throw new Error("DuckDB connection must have at least one attached database");const F=i.map((B,R)=>{const _=B.dbType,T=v.get(`attachedDb_${R}_name`)?.toString();if(!T)throw new Error(`Attached database at index ${R} must have a name`);const O={name:T,type:_},A=qs(_);if(A&&A.length>0){const w={};A.forEach(V=>{const z=v.get(`attachedDb_${R}_${V.name}`)?.toString();z&&(w[V.name]=z)});const M=gc[_];M&&(O[M]=w)}return O});L={name:S,type:k,duckdbConnection:{attachedDatabases:F}}}else{const F={};if(C.forEach(B=>{const R=v.get(B.name)?.toString();R&&(F[B.name]=R)}),k==="postgres"){if(!!!F.connectionString?.trim()){const R=["host","port","databaseName","userName","password"];for(const _ of R)if(!F[_])throw new Error(`${C.find(T=>T.name===_)?.label||_} is required`)}}else if(k==="bigquery"){if(!F.serviceAccountKeyJson)throw new Error("Service Account Key JSON is required")}else if(k==="snowflake"){if(!F.account)throw new Error("Account is required");if(!F.username)throw new Error("Username is required");if(!F.warehouse)throw new Error("Warehouse is required");if(!F.password&&!F.privateKey)throw new Error("Either password or private key is required")}else if(k==="trino"){if(!F.server)throw new Error("Server is required");if(!F.user)throw new Error("User is required");if(F.server.trim().startsWith("https://")&&!F.password&&!F.peakaKey)throw new Error("Password is required for HTTPS connections (or use Peaka Key)")}else if(k==="mysql"){const B=["host","port","database","user","password"];for(const R of B)if(!F[R])throw new Error(`${C.find(_=>_.name===R)?.label||R} is required`)}else if(k==="motherduck"){if(!F.accessToken)throw new Error("Access Token is required")}else if(k==="databricks"){if(!F.host)throw new Error("Host is required");if(!F.path)throw new Error("HTTP Path is required");const B=F.oauthClientId&&F.oauthClientSecret;if(!F.token&&!B)throw new Error("Either Access Token or OAuth Client ID + Secret is required")}L={name:S,type:k,[fs[k]]:F}}await e(L),p()},b=()=>{s([...i,{name:"",dbType:"postgres"}])},y=E=>{s(i.filter((v,S)=>S!==E))},x=(E,v)=>{const S=[...i];S[E]={...S[E],dbType:v},s(S)};return c.jsxs(H.Fragment,{children:[c.jsx(Ot,{variant:"outlined",onClick:h,children:"Add Connection"}),c.jsxs(Ir,{open:n,onClose:p,children:[c.jsx(qr,{children:"Create New Connection"}),c.jsxs(Rr,{children:[c.jsx(Mi,{children:"Add a new connection to query your data database using Malloy."}),c.jsxs("form",{onSubmit:m,id:"connection-form",children:[c.jsx(Je,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Connection Name",type:"text",fullWidth:!0,variant:"standard"}),c.jsx(Je,{margin:"dense",id:"type",name:"type",label:"Connection Type",fullWidth:!0,variant:"standard",value:o,select:!0,onChange:E=>a(E.target.value),children:Object.values(it.ConnectionTypeEnum).map(E=>c.jsx(Gt,{value:E,children:E},E))}),o==="ducklake"?c.jsxs(kt,{sx:{mt:2},children:[c.jsxs(kt,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[c.jsx(ut,{variant:"subtitle2",sx:{mb:2},fontWeight:500,children:"Catalog"}),c.jsx(Je,{margin:"dense",id:"ducklake_catalogType",label:"Catalog Type",fullWidth:!0,variant:"standard",value:l,select:!0,onChange:E=>u(E.target.value),children:c.jsx(Gt,{value:"postgres",children:"PostgreSQL"})}),l==="postgres"&&c.jsx(c.Fragment,{children:xr.postgres.map(E=>c.jsx(Je,{margin:"dense",id:`ducklake_pg_${E.name}`,name:`ducklake_pg_${E.name}`,label:E.label,type:E.type,fullWidth:!0,variant:"standard"},`pg_${E.name}`))})]}),c.jsxs(kt,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[c.jsx(ut,{variant:"subtitle2",sx:{mb:2},fontWeight:500,children:"Storage"}),c.jsxs(Je,{margin:"dense",id:"ducklake_storageType",label:"Storage Type",fullWidth:!0,variant:"standard",value:d,select:!0,onChange:E=>f(E.target.value),children:[c.jsx(Gt,{value:"s3",children:"S3"}),c.jsx(Gt,{value:"gcs",children:"GCS"})]}),c.jsx(Je,{margin:"dense",required:!0,id:"ducklake_bucketUrl",name:"ducklake_bucketUrl",label:d==="s3"?"Bucket URL (e.g. s3://my-bucket/path)":"Bucket URL (e.g. gs://my-bucket/path)",type:"text",fullWidth:!0,variant:"standard"}),d==="s3"&&c.jsxs(c.Fragment,{children:[c.jsx(ut,{variant:"caption",sx:{mt:2,mb:1,display:"block"},color:"text.secondary",children:"S3 Credentials"}),mi.map(E=>c.jsx(Je,{margin:"dense",id:`ducklake_s3_${E.name}`,name:`ducklake_s3_${E.name}`,label:E.label,type:E.type,fullWidth:!0,variant:"standard",required:E.required,placeholder:E.name==="region"?"us-east-1":void 0},`s3_${E.name}`))]}),d==="gcs"&&c.jsxs(c.Fragment,{children:[c.jsx(ut,{variant:"caption",sx:{mt:2,mb:1,display:"block"},color:"text.secondary",children:"GCS Credentials"}),gi.map(E=>c.jsx(Je,{margin:"dense",id:`ducklake_gcs_${E.name}`,name:`ducklake_gcs_${E.name}`,label:E.label,type:E.type,fullWidth:!0,variant:"standard",required:E.required},`gcs_${E.name}`))]})]})]}):o==="duckdb"?c.jsxs(kt,{sx:{mt:2},children:[c.jsxs(kt,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[c.jsx(ut,{variant:"subtitle1",fontWeight:500,children:"Attached Databases"}),c.jsx(Ot,{startIcon:c.jsx(Mc,{}),onClick:b,size:"small",variant:"outlined",children:"Add Database"})]}),i.length===0&&c.jsx(ut,{variant:"body2",color:"text.secondary",sx:{mb:2},children:'DuckDB connections require at least one attached database. Click "Add Database" to get started.'}),i.map((E,v)=>{const S=qs(E.dbType);return c.jsxs(kt,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[c.jsxs(kt,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[c.jsxs(ut,{variant:"subtitle2",children:["Database ",v+1]}),c.jsx(Qn,{onClick:()=>y(v),size:"small",color:"error",children:c.jsx(b1,{fontSize:"small"})})]}),c.jsx(Je,{margin:"dense",required:!0,id:`attachedDb_${v}_name`,name:`attachedDb_${v}_name`,label:"Database Name",type:"text",fullWidth:!0,variant:"standard",defaultValue:E.name}),c.jsx(Je,{margin:"dense",id:`attachedDb_${v}_type`,name:`attachedDb_${v}_type`,label:"Database Type",fullWidth:!0,variant:"standard",value:E.dbType,select:!0,onChange:k=>x(v,k.target.value),children:Object.values(it.AttachedDatabaseTypeEnum).map(k=>c.jsx(Gt,{value:k,children:k},k))}),S.filter(k=>k.visibleWhen?(E[k.visibleWhen.field]||S.find(L=>L.name===k.visibleWhen?.field)?.selectOptions?.[0]?.value)===k.visibleWhen.value:!0).map(k=>c.jsx(Je,{margin:"dense",id:`attachedDb_${v}_${k.name}`,name:`attachedDb_${v}_${k.name}`,label:k.label,type:k.selectOptions?void 0:k.type,fullWidth:!0,variant:"standard",required:k.required,select:!!k.selectOptions,defaultValue:k.selectOptions?.[0]?.value,onChange:k.selectOptions?C=>{const L=[...i];L[v]={...L[v],[k.name]:C.target.value},s(L)}:void 0,children:k.selectOptions?.map(C=>c.jsx(Gt,{value:C.value,children:C.label},C.value))},k.name))]},v)})]}):xr[o].map(E=>c.jsx(Je,{margin:"dense",id:E.name,name:E.name,label:E.label,type:E.type,fullWidth:!0,variant:"standard",required:E.required},E.name))]})]}),c.jsxs(Pr,{children:[c.jsx(Ot,{disabled:t,onClick:p,children:"Cancel"}),c.jsx(Ot,{type:"submit",form:"connection-form",loading:t,children:"Create Connection"})]})]})]})}function tR({connection:e,onCloseDialog:t,isMutating:n,onDelete:r}){const[o,a]=H.useState(!1),[i,s]=H.useState(""),l=()=>{a(!0)},u=()=>{a(!1),t()};return c.jsxs(H.Fragment,{children:[c.jsxs(Gt,{"aria-label":`Delete connection ${e?.name??""}`.trim(),onClick:d=>{d.stopPropagation(),l()},sx:{color:"error.main"},children:[c.jsx($1,{sx:{color:"inherit"},children:c.jsx(fn.Delete,{fontSize:"small"})}),c.jsx(H1,{children:"Delete"})]}),c.jsxs(Ir,{onClose:u,"aria-labelledby":"customized-dialog-title",open:o,children:[c.jsx(qr,{sx:{m:0,p:2},id:"customized-dialog-title",children:"Delete Connection"}),c.jsx(Qn,{"aria-label":"close",onClick:u,sx:d=>({position:"absolute",right:8,top:8,color:d.palette.grey[500]}),children:c.jsx(Sr,{})}),c.jsx(Rr,{dividers:!0,children:c.jsxs(ut,{gutterBottom:!0,children:['Are you sure you want to delete "',e.name,'"? This action cannot be undone.']})}),c.jsx(Pr,{children:c.jsx(Ot,{loading:n,variant:"contained",autoFocus:!0,onClick:()=>r(),color:"error",children:"Delete"})}),c.jsx(P.Snackbar,{open:i!=="",autoHideDuration:6e3,onClose:()=>s(""),message:i})]})]})}function Ph(e){const t=e.duckdbConnection?.attachedDatabases;return!t||t.length===0?[]:t.map(n=>({name:n.name||"",dbType:n.type||"postgres"}))}function Rh(e){const t=e.ducklakeConnection;return t&&t.storage?.gcsConnection?"gcs":"s3"}function nR({connection:e,onSubmit:t,isSubmitting:n,onCloseDialog:r}){const[o,a]=H.useState(!1),[i,s]=H.useState(e.type),[l,u]=H.useState(()=>Ph(e)),[d,f]=H.useState("postgres"),[h,p]=H.useState(()=>Rh(e)),m=()=>{u(Ph(e)),s(e.type),f("postgres"),p(Rh(e)),a(!0)},b=()=>{a(!1),r?.()},y=async C=>{C.preventDefault();const L=new FormData(C.currentTarget),F=L.get("name")?.toString(),B=L.get("type")?.toString(),R=xr[B];if(!F)throw new Error("Name is required");if(!B)throw new Error("Type is required");let _;if(B==="ducklake"){const T={};if(d==="postgres"){const w=xr.postgres,M={};if(w.forEach(V=>{const z=L.get(`ducklake_pg_${V.name}`)?.toString();z&&(M[V.name]=z)}),Object.keys(M).length===0)throw new Error("DuckLake requires catalog connection");T.postgresConnection=M}const O=L.get("ducklake_bucketUrl")?.toString();if(!O)throw new Error("DuckLake requires a bucket URL");const A={bucketUrl:O};if(h==="s3"){const w={};mi.forEach(V=>{const z=L.get(`ducklake_s3_${V.name}`)?.toString();z&&(w[V.name]=z)});const M=e.ducklakeConnection?.storage?.s3Connection;if(M&&(!w.accessKeyId&&M.accessKeyId&&(w.accessKeyId=M.accessKeyId),!w.secretAccessKey&&M.secretAccessKey&&(w.secretAccessKey=M.secretAccessKey)),!w.accessKeyId)throw new Error("S3 Access Key ID is required");if(!w.secretAccessKey)throw new Error("S3 Secret Access Key is required");Object.keys(w).length>0&&(A.s3Connection=w)}else if(h==="gcs"){const w={};gi.forEach(V=>{const z=L.get(`ducklake_gcs_${V.name}`)?.toString();z&&(w[V.name]=z)});const M=e.ducklakeConnection?.storage?.gcsConnection;if(M&&(!w.keyId&&M.keyId&&(w.keyId=M.keyId),!w.secret&&M.secret&&(w.secret=M.secret)),!w.keyId)throw new Error("GCS Key ID is required");if(!w.secret)throw new Error("GCS Secret is required");Object.keys(w).length>0&&(A.gcsConnection=w)}_={name:F,type:B,ducklakeConnection:{catalog:T,storage:A}}}else if(B==="duckdb"){if(l.length===0)throw new Error("DuckDB connection must have at least one attached database");const T=l.map((O,A)=>{const w=O.dbType,M=L.get(`attachedDb_${A}_name`)?.toString();if(!M)throw new Error(`Attached database at index ${A} must have a name`);const V={name:M,type:w},z=qs(w);if(z&&z.length>0){const U={};z.forEach(Y=>{const te=L.get(`attachedDb_${A}_${Y.name}`)?.toString();te&&(U[Y.name]=te)});const D=gc[w];D&&(V[D]=U)}return V});_={name:F,type:B,duckdbConnection:{attachedDatabases:T}}}else{const T=e[fs[B]]||{},O={};if(R.forEach(A=>{const w=L.get(A.name)?.toString(),M=T[A.name],V=A.type==="password"||A.name==="password"||A.name==="secretAccessKey"||A.name==="secret"||A.name==="accessToken"||A.name==="privateKey";w?O[A.name]=w:V&&M?O[A.name]=M:w!==void 0?O[A.name]=w:M&&(O[A.name]=M)}),B==="postgres"){if(!!!O.connectionString?.trim()){const w=["host","port","databaseName","userName","password"];for(const M of w)if(!O[M])throw new Error(`${R.find(V=>V.name===M)?.label||M} is required`)}}else if(B==="bigquery"){if(!O.serviceAccountKeyJson)throw new Error("Service Account Key JSON is required")}else if(B==="snowflake"){if(!O.account)throw new Error("Account is required");if(!O.username)throw new Error("Username is required");if(!O.warehouse)throw new Error("Warehouse is required");if(!O.password&&!O.privateKey)throw new Error("Either password or private key is required")}else if(B==="trino"){if(!O.server)throw new Error("Server is required");if(!O.user)throw new Error("User is required");if(O.server.trim().startsWith("https://")&&!O.password&&!O.peakaKey)throw new Error("Password is required for HTTPS connections (or use Peaka Key)")}else if(B==="mysql"){const A=["host","port","database","user","password"];for(const w of A)if(!O[w])throw new Error(`${R.find(M=>M.name===w)?.label||w} is required`)}else if(B==="motherduck"){if(!O.accessToken)throw new Error("Access Token is required")}else if(B==="databricks"){if(!O.host)throw new Error("Host is required");if(!O.path)throw new Error("HTTP Path is required");const A=O.oauthClientId&&O.oauthClientSecret;if(!O.token&&!A)throw new Error("Either Access Token or OAuth Client ID + Secret is required")}_={name:F,type:B,[fs[B]]:O}}await t(_),b()},x=()=>{u([...l,{name:"",dbType:"postgres"}])},E=C=>{u(l.filter((L,F)=>F!==C))},v=(C,L)=>{const F=[...l];F[C]={...F[C],dbType:L},u(F)},S=(C,L)=>{const F=e.duckdbConnection?.attachedDatabases;if(!F||!F[C])return"";const B=F[C],R=gc[B.type||""];return R&&B[R]?B[R][L]??"":""},k=C=>{const L=e.ducklakeConnection;if(!L)return"";if(C.startsWith("pg_")){const F=C.replace("pg_","");return L.catalog?.postgresConnection?.[F]??""}if(C==="bucketUrl")return L.storage?.bucketUrl??"";if(C.startsWith("s3_")){const F=C.replace("s3_","");return L.storage?.s3Connection?.[F]??""}if(C.startsWith("gcs_")){const F=C.replace("gcs_","");return L.storage?.gcsConnection?.[F]??""}return""};return c.jsxs(H.Fragment,{children:[c.jsxs(Gt,{"aria-label":`Edit connection ${e?.name??""}`.trim(),onClick:C=>{C.preventDefault(),C.stopPropagation(),m()},children:[c.jsx($1,{children:c.jsx(fn.Edit,{fontSize:"small"})}),c.jsx(H1,{children:"Edit"})]}),c.jsxs(Ir,{open:o,onClose:b,children:[c.jsx(qr,{onClick:C=>{C.stopPropagation()},children:"Edit Connection"}),c.jsxs(Rr,{onClick:C=>{C.stopPropagation()},children:[c.jsx(Mi,{children:"Edit a connection to query your data database using Malloy."}),c.jsxs("form",{onSubmit:y,id:"connection-form",children:[c.jsx(Je,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Connection Name",type:"text",fullWidth:!0,variant:"standard",defaultValue:e.name}),c.jsx(Je,{margin:"dense",id:"type",name:"type",label:"Connection Type",fullWidth:!0,variant:"standard",value:i,select:!0,onChange:C=>s(C.target.value),children:Object.values(it.ConnectionTypeEnum).map(C=>c.jsx(Gt,{value:C,children:C},C))}),i==="ducklake"?c.jsxs(kt,{sx:{mt:2},children:[c.jsxs(kt,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[c.jsx(ut,{variant:"subtitle2",sx:{mb:2},fontWeight:500,children:"Catalog"}),c.jsx(Je,{margin:"dense",id:"ducklake_catalogType",label:"Catalog Type",fullWidth:!0,variant:"standard",value:d,select:!0,onChange:C=>f(C.target.value),children:c.jsx(Gt,{value:"postgres",children:"PostgreSQL"})}),d==="postgres"&&c.jsx(c.Fragment,{children:xr.postgres.map(C=>c.jsx(Je,{margin:"dense",id:`ducklake_pg_${C.name}`,name:`ducklake_pg_${C.name}`,label:C.label,type:C.type,fullWidth:!0,variant:"standard",defaultValue:k(`pg_${C.name}`)},`pg_${C.name}`))})]}),c.jsxs(kt,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[c.jsx(ut,{variant:"subtitle2",sx:{mb:2},fontWeight:500,children:"Storage"}),c.jsxs(Je,{margin:"dense",id:"ducklake_storageType",label:"Storage Type",fullWidth:!0,variant:"standard",value:h,select:!0,onChange:C=>p(C.target.value),children:[c.jsx(Gt,{value:"s3",children:"S3"}),c.jsx(Gt,{value:"gcs",children:"GCS"})]}),c.jsx(Je,{margin:"dense",required:!0,id:"ducklake_bucketUrl",name:"ducklake_bucketUrl",label:h==="s3"?"Bucket URL (e.g. s3://my-bucket/path)":"Bucket URL (e.g. gs://my-bucket/path)",type:"text",fullWidth:!0,variant:"standard",defaultValue:k("bucketUrl")}),h==="s3"&&c.jsxs(c.Fragment,{children:[c.jsx(ut,{variant:"caption",sx:{mt:2,mb:1,display:"block"},color:"text.secondary",children:"S3 Credentials"}),mi.map(C=>c.jsx(Je,{margin:"dense",id:`ducklake_s3_${C.name}`,name:`ducklake_s3_${C.name}`,label:C.label,type:C.type,fullWidth:!0,variant:"standard",required:C.required&&C.name!=="secretAccessKey",defaultValue:k(`s3_${C.name}`),placeholder:C.name==="region"?"us-east-1":C.name==="secretAccessKey"?"Leave empty to keep existing":void 0},`s3_${C.name}`))]}),h==="gcs"&&c.jsxs(c.Fragment,{children:[c.jsx(ut,{variant:"caption",sx:{mt:2,mb:1,display:"block"},color:"text.secondary",children:"GCS Credentials"}),gi.map(C=>c.jsx(Je,{margin:"dense",id:`ducklake_gcs_${C.name}`,name:`ducklake_gcs_${C.name}`,label:C.label,type:C.type,fullWidth:!0,variant:"standard",required:C.required&&C.name!=="secret",defaultValue:k(`gcs_${C.name}`),placeholder:C.name==="secret"?"Leave empty to keep existing":void 0},`gcs_${C.name}`))]})]})]}):i==="duckdb"?c.jsxs(kt,{sx:{mt:2},children:[c.jsxs(kt,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[c.jsx(ut,{variant:"subtitle1",fontWeight:500,children:"Attached Databases"}),c.jsx(Ot,{startIcon:c.jsx(Mc,{}),onClick:x,size:"small",variant:"outlined",children:"Add Database"})]}),l.length===0&&c.jsx(ut,{variant:"body2",color:"text.secondary",sx:{mb:2},children:'DuckDB connections require at least one attached database. Click "Add Database" to get started.'}),l.map((C,L)=>{const F=qs(C.dbType);return c.jsxs(kt,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[c.jsxs(kt,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[c.jsxs(ut,{variant:"subtitle2",children:["Database ",L+1]}),c.jsx(Qn,{"aria-label":`Remove attached database ${L+1}`,onClick:()=>E(L),size:"small",color:"error",children:c.jsx(b1,{fontSize:"small"})})]}),c.jsx(Je,{margin:"dense",required:!0,id:`attachedDb_${L}_name`,name:`attachedDb_${L}_name`,label:"Database Name",type:"text",fullWidth:!0,variant:"standard",defaultValue:C.name}),c.jsx(Je,{margin:"dense",id:`attachedDb_${L}_type`,name:`attachedDb_${L}_type`,label:"Database Type",fullWidth:!0,variant:"standard",value:C.dbType,select:!0,onChange:B=>v(L,B.target.value),children:Object.values(it.AttachedDatabaseTypeEnum).map(B=>c.jsx(Gt,{value:B,children:B},B))}),F.filter(B=>B.visibleWhen?(C[B.visibleWhen.field]||S(L,B.visibleWhen.field)||F.find(_=>_.name===B.visibleWhen?.field)?.selectOptions?.[0]?.value)===B.visibleWhen.value:!0).map(B=>c.jsx(Je,{margin:"dense",id:`attachedDb_${L}_${B.name}`,name:`attachedDb_${L}_${B.name}`,label:B.label,type:B.selectOptions?void 0:B.type,fullWidth:!0,variant:"standard",required:B.required,select:!!B.selectOptions,defaultValue:S(L,B.name)||B.selectOptions?.[0]?.value,onChange:B.selectOptions?R=>{const _=[...l];_[L]={..._[L],[B.name]:R.target.value},u(_)}:void 0,children:B.selectOptions?.map(R=>c.jsx(Gt,{value:R.value,children:R.label},R.value))},B.name))]},L)})]}):xr[i].map(C=>{const L=e?.[fs[i]??""]?.[C.name??""]??"",F=C.type==="password"||C.name==="password"||C.name==="secretAccessKey"||C.name==="secret"||C.name==="accessToken"||C.name==="privateKey";return c.jsx(Je,{margin:"dense",id:C.name,name:C.name,label:C.label,type:C.type,fullWidth:!0,variant:"standard",required:C.required&&!F&&!L,defaultValue:L,placeholder:F&&L?"Leave empty to keep existing":void 0},C.name)})]})]}),c.jsxs(Pr,{onClick:C=>{C.stopPropagation()},children:[c.jsx(Ot,{disabled:n,onClick:b,children:"Cancel"}),c.jsx(Ot,{type:"submit",form:"connection-form",loading:n,children:"Edit Connection"})]})]})]})}function Mh(e,t){return!e||e.type!=="duckdb"?!1:(e.duckdbConnection?.attachedDatabases||[]).some(r=>r.type==="azure"&&r.name===t)}function rR(e){return e.startsWith("gs://")||e.startsWith("s3://")||e.startsWith("https://")||e.startsWith("abfss://")||e.startsWith("az://")}function U1({connectionName:e,resourceUri:t,schema:n,connection:r}){const{apiClients:o}=it.useServer(),{environmentName:a}=Nt(t),[i,s]=H.useState(null),[l,u]=H.useState(n||null),[d,f]=H.useState(!1),{data:h,isError:p,isLoading:m,error:b}=Xt({queryKey:["schemas",a,e],queryFn:()=>o.connections.listSchemas(a,e)}),y=h?.data||[];return c.jsxs(P.Grid,{container:!0,spacing:1,children:[!n&&c.jsx(P.Grid,{size:{xs:12,md:4},children:c.jsxs(P.Paper,{sx:{p:1,m:0},children:[c.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:0},children:[c.jsx(P.Typography,{variant:"overline",fontWeight:"bold",children:"Table Paths"}),c.jsx(P.FormControlLabel,{control:c.jsx(P.Switch,{checked:d,onChange:x=>f(x.target.checked)}),label:"Hidden Schemas"})]}),c.jsx(P.Divider,{sx:{mt:"2px"}}),c.jsxs(P.Box,{sx:{mt:"2px",maxHeight:"600px",overflowY:"auto"},children:[m&&c.jsx(hn,{text:"Loading schemas..."}),p&&c.jsx(mn,{error:b,context:`${a} > ${e} > Schemas`}),!m&&!p&&y.length===0&&c.jsx(P.Typography,{variant:"body2",children:"No Schemas"}),!m&&!p&&y.length>0&&c.jsx(P.List,{dense:!0,disablePadding:!0,children:y.map(x=>{const E=x.name;if(x.isHidden&&!d)return null;const S=l===E;return c.jsx(P.ListItemButton,{selected:S,onClick:()=>{u(E),s(null)},children:c.jsx(P.ListItemText,{primary:E})},E)})})]})]})}),c.jsx(P.Grid,{size:{xs:12,md:n?6:4},children:l&&c.jsx(P.Paper,{sx:{p:1,m:0},children:c.jsx(iR,{connectionName:e,schemaName:l,onTableSelect:x=>{s(x)},resourceUri:t,connection:r})})}),c.jsx(P.Grid,{size:{xs:12,md:n?6:4},children:l&&i&&c.jsx(oR,{environmentName:a,connectionName:e,schemaName:l,tableResource:i})})]})}function oR({environmentName:e,connectionName:t,schemaName:n,tableResource:r}){const{apiClients:o}=it.useServer(),{data:a,isLoading:i,isError:s,error:l}=Xt({queryKey:["connectionTableDetail",e,t,n,r],queryFn:()=>o.connections.getTable(e,t,n,r),enabled:!!n&&!!r}),u={resource:a?.data?.resource??r,columns:a?.data?.columns??[]};return c.jsxs(P.Paper,{sx:{p:1,m:0},children:[s&&c.jsx(mn,{error:l,context:`${e} > ${t} > ${n} > ${r}`}),!s&&c.jsx(aR,{table:u,loading:i})]})}function aR({table:e,loading:t}){return t?c.jsx(hn,{text:"Loading columns..."}):c.jsxs(c.Fragment,{children:[c.jsxs(P.Typography,{variant:"overline",fontWeight:"bold",sx:{display:"block",wordBreak:"break-all"},children:[e.resource.includes("://")||/\.(parquet|csv|json|tsv|ndjson)$/i.test(e.resource)?"File":"Table",": ",e.resource]}),c.jsx(P.Divider,{}),c.jsx(P.Box,{sx:{mt:"10px",maxHeight:"600px",overflowY:"auto"},children:c.jsx(P.TableContainer,{children:c.jsxs(P.Table,{size:"small",sx:{"& .MuiTableCell-root":{padding:"10px"}},children:[c.jsx(P.TableHead,{children:c.jsxs(P.TableRow,{children:[c.jsx(P.TableCell,{children:"NAME"}),c.jsx(P.TableCell,{children:"TYPE"})]})}),c.jsx(P.TableBody,{children:e.columns?.sort((n,r)=>n.name.localeCompare(r.name))?.map(n=>c.jsxs(P.TableRow,{children:[c.jsx(P.TableCell,{children:n.name}),c.jsx(P.TableCell,{children:n.type})]},n.name))})]})})})]})}function iR({connectionName:e,schemaName:t,onTableSelect:n,resourceUri:r,connection:o}){const{environmentName:a}=Nt(r),{apiClients:i}=it.useServer(),[s,l]=H.useState(""),{data:u,isSuccess:d,isError:f,error:h,isLoading:p}=Xt({queryKey:["tablesInSchema",a,e,t],queryFn:()=>i.connections.listTables(a,e,t)}),m=Mh(o,t),b=x=>m?x:x.split(".").pop()||x,y=d&&u?.data?u.data.filter(x=>b(x.resource).toLowerCase().includes(s.toLowerCase())).sort((x,E)=>b(x.resource).localeCompare(b(E.resource))):[];return c.jsxs(c.Fragment,{children:[c.jsx(P.Typography,{variant:"overline",fontWeight:"bold",children:rR(t)||Mh(o,t)?`Files in ${t}`:`Tables in ${t}`}),c.jsx(P.Divider,{}),c.jsx(P.Box,{sx:{mt:1,mb:1},children:c.jsx(P.TextField,{size:"small",fullWidth:!0,placeholder:"Search tables...",value:s,onChange:x=>l(x.target.value),variant:"outlined"})}),c.jsx(P.Divider,{}),c.jsxs(P.Box,{sx:{mt:"2px",maxHeight:"600px",overflowY:"auto"},children:[p&&c.jsx(hn,{text:"Fetching Tables..."}),f&&c.jsx(mn,{error:h,context:`${a} > ${e} > ${t}`}),d&&y.length===0&&c.jsx(P.Typography,{variant:"body2",children:"No Tables"}),d&&u?.data&&u.data.length>0&&c.jsx(P.List,{dense:!0,disablePadding:!0,children:y.map(x=>{let E=b(x.resource);return!m&&x.resource.includes("://")&&(E=x.resource.split("/").pop()||x.resource),c.jsx(P.ListItemButton,{onClick:()=>n(x.resource),children:c.jsx(P.ListItemText,{primary:E,secondary:x.columns.length>0?`${x.columns.length} columns`:void 0})},x.resource)})})]})]})}const sR={bigquery:"BigQuery",snowflake:"Snowflake",postgres:"PostgreSQL",mysql:"MySQL",trino:"Trino",databricks:"Databricks",duckdb:"DuckDB",ducklake:"DuckLake",s3:"S3",gcs:"GCS",azure:"Azure"};function lR(e){return e?sR[e]??e:""}function uR({resourceUri:e}){const{apiClients:t,mutable:n}=it.useServer(),r=wr.useQueryClient(),{environmentName:o}=Nt(e),[a,i]=H.useState(""),[s,l]=H.useState(null),u=Pi({environmentName:o,connectionName:s}),{data:d,isSuccess:f,isError:h,error:p}=Xt({queryKey:["connections",o],queryFn:()=>t.connections.listConnections(o)}),m=()=>{l(null)},b=ir({mutationFn:S=>t.environments.updateEnvironment(o,{name:o,connections:[...d.data,S]}),onSuccess(){i("Connection added successfully"),r.invalidateQueries({queryKey:["connections",o]})},onError(S){i(S.message)}}),y=ir({mutationFn:S=>t.environments.updateEnvironment(o,{name:o,connections:d.data.map(k=>k.name===S.name?S:k)}),onSuccess(S,k){i(`Connection ${k.name} updated successfully`),r.invalidateQueries({queryKey:["connections",o]})},onError(S){i(S.message)}}),x=ir({mutationFn:S=>t.environments.updateEnvironment(o,{name:o,connections:d.data.filter(k=>k.name!==S.name)}),onSuccess(S,k){i(`Connection ${k.name} deleted successfully`),r.invalidateQueries({queryKey:["connections",o]})},onError(S){i(S.message)}}),E=f?[...d.data].sort((S,k)=>(S.name??"").localeCompare(k.name??"")):[],v=b.isPending||y.isPending||x.isPending;return c.jsxs(P.Box,{children:[c.jsxs(P.Box,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",mb:3},children:[c.jsxs(P.Box,{children:[c.jsx(P.Typography,{variant:"h6",sx:{fontWeight:600,letterSpacing:"-0.025em"},children:"Connections"}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Database connections available to packages in this environment"})]}),n&&f&&c.jsx(eR,{onSubmit:S=>b.mutateAsync(S),isSubmitting:b.isPending})]}),!f&&!h&&c.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Fetching Connections..."}),h&&c.jsx(mn,{error:p,context:`${o} > Connections`}),f&&E.length===0&&c.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"No connections yet."}),f&&E.length>0&&c.jsx(P.Grid,{container:!0,spacing:2,children:E.map(S=>c.jsx(P.Grid,{size:{xs:12,sm:6,md:4},children:c.jsx(cR,{connection:S,mutable:n,isMutating:v,onOpenExplorer:()=>l(S.name??null),onEdit:k=>y.mutateAsync(k),onDelete:k=>{S.resource?i("Cannot delete this connection"):x.mutateAsync(k)}})},S.name))}),c.jsx(P.Snackbar,{open:a!=="",autoHideDuration:6e3,onClose:()=>i(""),message:a}),c.jsxs(P.Dialog,{open:s!==null,onClose:m,maxWidth:"lg",fullWidth:!0,children:[c.jsxs(P.DialogTitle,{children:["Connection Explorer: ",s,c.jsx(P.IconButton,{"aria-label":"close",onClick:m,sx:{position:"absolute",right:8,top:8},children:c.jsx(P.Box,{sx:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:"X"})})]}),c.jsx(P.DialogContent,{children:s&&c.jsx(U1,{resourceUri:u,connectionName:s,connection:d?.data?.find(S=>S.name===s)})})]})]})}function cR({connection:e,mutable:t,isMutating:n,onOpenExplorer:r,onEdit:o,onDelete:a}){const[i,s]=H.useState(null),l=!!i,u=f=>{f.stopPropagation(),s(f.currentTarget)},d=()=>{s(null)};return c.jsx(P.Card,{variant:"outlined",onClick:r,sx:{height:"100%",cursor:"pointer",borderRadius:3,borderColor:"divider",boxShadow:"none",transition:"all 0.2s ease-in-out","&:hover":{boxShadow:2,borderColor:"primary.main"}},children:c.jsx(P.CardContent,{sx:{p:2.5,"&:last-child":{pb:2.5}},children:c.jsxs(P.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[c.jsx(P.Box,{sx:{width:36,height:36,borderRadius:1.5,bgcolor:"warning.light",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:"warning.main"},children:c.jsx(M4,{sx:{fontSize:20}})}),c.jsxs(P.Box,{sx:{flex:1,minWidth:0},children:[c.jsx(P.Typography,{variant:"subtitle1",component:"h6",noWrap:!0,sx:{fontWeight:600,mb:.5},children:e.name}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",noWrap:!0,children:lR(e.type)})]}),t&&c.jsxs(c.Fragment,{children:[c.jsx(P.IconButton,{size:"small",onClick:u,"aria-label":`Connection actions for ${e.name??""}`.trim(),sx:{flexShrink:0,mt:-.5,mr:-.5},children:c.jsx(fn.MoreVert,{fontSize:"small"})}),c.jsxs(P.Menu,{anchorEl:i,open:l,onClose:d,onClick:f=>f.stopPropagation(),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[c.jsx(nR,{connection:e,onSubmit:o,isSubmitting:n,onCloseDialog:d}),c.jsx(tR,{connection:e,onCloseDialog:d,isMutating:n,onDelete:()=>a(e)})]})]})]})})})}const dR=xt([c.jsx("path",{d:"M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2m-1 18H5V9h14zm1-13H4V4h16z"},"0"),c.jsx("path",{d:"M9 12h6v2H9z"},"1")]);function fR({resourceUri:e,onCloseDialog:t}){const[n,r]=H.useState(!1),{apiClients:o}=it.useServer(),a=wr.useQueryClient(),[i,s]=H.useState(""),l=()=>{r(!0)},u=()=>{r(!1),t()},{environmentName:d,packageName:f}=Nt(e),h=ir({mutationFn:()=>o.packages.deletePackage(d,f),onSuccess(){u(),a.invalidateQueries({queryKey:["packages"]}),s("Package deleted successfully")},onError(p){s(p instanceof Error?p.message:"An unknown error occurred")}});return c.jsxs(H.Fragment,{children:[c.jsxs(P.MenuItem,{onClick:l,children:[c.jsx(P.ListItemIcon,{children:c.jsx(fn.Delete,{fontSize:"small"})}),c.jsx(P.ListItemText,{children:"Delete"})]}),c.jsxs(Ir,{onClose:u,"aria-labelledby":"customized-dialog-title",open:n,children:[c.jsx(qr,{sx:{m:0,p:2},id:"customized-dialog-title",children:"Delete Package"}),c.jsx(Qn,{"aria-label":"close",onClick:u,sx:p=>({position:"absolute",right:8,top:8,color:p.palette.grey[500]}),children:c.jsx(Sr,{})}),c.jsx(Rr,{dividers:!0,children:c.jsxs(ut,{gutterBottom:!0,children:['Are you sure you want to delete "',f,'"? This action cannot be undone.']})}),c.jsxs(Pr,{children:[c.jsx(Ot,{variant:"outlined",onClick:u,style:{borderColor:so.teal,color:so.teal},children:"Cancel"}),c.jsx(Ot,{variant:"contained",autoFocus:!0,onClick:()=>h.mutate(),color:"error",loading:h.isPending,children:"Delete"})]}),c.jsx(P.Snackbar,{open:i!=="",autoHideDuration:6e3,onClose:()=>s(""),message:i})]})]})}function pR({package:e,resourceUri:t,onCloseDialog:n}){const[r,o]=H.useState(!1),{apiClients:a}=it.useServer(),i=wr.useQueryClient(),[s,l]=H.useState(""),u=()=>{o(!0)},d=()=>{o(!1),n()},{packageName:f,environmentName:h}=Nt(t),p=ir({async mutationFn(b){return a.packages.updatePackage(h,f,{name:f,description:b.description})},onSuccess(){d(),l("Package updated successfully"),i.invalidateQueries({queryKey:["packages",h]})},onError(b){l(b instanceof Error?b.message:"An unknown error occurred")}}),m=b=>{b.preventDefault();const x=new FormData(b.currentTarget).get("description")?.toString();p.mutate({description:x})};return c.jsxs(H.Fragment,{children:[c.jsxs(P.MenuItem,{onClick:u,children:[c.jsx(P.ListItemIcon,{children:c.jsx(fn.Edit,{fontSize:"small"})}),c.jsx(P.ListItemText,{children:"Edit"})]}),c.jsxs(Ir,{open:r,onClose:d,children:[c.jsx(qr,{children:"Edit Package"}),c.jsxs(Rr,{children:[c.jsxs(Mi,{children:['Update the details for "',e.name,'".']}),c.jsxs("form",{onSubmit:m,id:"package-form",children:[c.jsx(Je,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Package Name",disabled:!0,type:"text",fullWidth:!0,variant:"standard",defaultValue:e.name}),c.jsx(Je,{id:"description",name:"description",label:"Description",multiline:!0,fullWidth:!0,rows:4,defaultValue:e.description,variant:"standard"})]})]}),c.jsxs(Pr,{children:[c.jsx(Ot,{disabled:p.isPending,onClick:d,children:"Cancel"}),c.jsx(Ot,{type:"submit",form:"package-form",loading:p.isPending,children:"Save Changes"})]})]}),c.jsx(P.Snackbar,{open:s!=="",autoHideDuration:6e3,onClose:()=>l(""),message:s})]})}function z1({onSelectPackage:e,resourceUri:t}){const{apiClients:n}=it.useServer(),{environmentName:r}=Nt(t),{data:o,isSuccess:a,isError:i,error:s}=Xt({queryKey:["packages",r],queryFn:()=>n.packages.listPackages(r)});if(i)return c.jsx(mn,{error:s,context:`${r} > Packages`});if(!a)return c.jsx(hn,{text:"Fetching Packages..."});const l=[...o.data].sort((u,d)=>u.name.localeCompare(d.name));return c.jsx(P.Grid,{container:!0,spacing:2,children:l.map(u=>{const d=Pi({environmentName:r,packageName:u.name});return c.jsx(P.Grid,{size:{xs:12,sm:6,md:4},children:c.jsx(hR,{pkg:u,packageResourceUri:d,onSelectPackage:e})},u.name)})})}function hR({pkg:e,packageResourceUri:t,onSelectPackage:n}){const{mutable:r}=it.useServer(),[o,a]=H.useState(null),i=!!o,s=f=>{n(e.name,f)},l=f=>{f.stopPropagation(),a(f.currentTarget)},u=()=>{a(null)},d=e.description??"";return c.jsx(P.Card,{variant:"outlined",onClick:s,sx:{height:"100%",cursor:"pointer",borderRadius:3,borderColor:"divider",boxShadow:"none",transition:"all 0.2s ease-in-out","&:hover":{boxShadow:2,borderColor:"primary.main"}},children:c.jsx(P.CardContent,{sx:{p:2.5,"&:last-child":{pb:2.5}},children:c.jsxs(P.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[c.jsx(P.Box,{sx:{width:36,height:36,borderRadius:1.5,bgcolor:"grey.100",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:"text.primary"},children:c.jsx(dR,{sx:{fontSize:20}})}),c.jsxs(P.Box,{sx:{flex:1,minWidth:0},children:[c.jsx(P.Typography,{variant:"subtitle1",component:"h6",noWrap:!0,sx:{fontWeight:600,mb:.5},children:e.name}),c.jsx(P.Tooltip,{title:d,followCursor:!0,enterDelay:1e3,children:c.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",lineHeight:1.5},children:d})})]}),r&&c.jsxs(c.Fragment,{children:[c.jsx(P.IconButton,{size:"small",onClick:l,"aria-label":`Package actions for ${e.name}`,sx:{flexShrink:0,mt:-.5,mr:-.5},children:c.jsx(fn.MoreVert,{fontSize:"small"})}),c.jsxs(P.Menu,{anchorEl:o,open:i,onClose:u,onClick:f=>f.stopPropagation(),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[c.jsx(pR,{package:e,resourceUri:t,onCloseDialog:u}),c.jsx(fR,{resourceUri:t,onCloseDialog:u})]})]})]})})})}function mR({onSelectPackage:e,resourceUri:t}){const{mutable:n}=it.useServer(),{environmentName:r}=Nt(t);return H.useEffect(()=>{window.scrollTo({top:0,behavior:"auto"})},[]),c.jsxs(P.Container,{maxWidth:!1,sx:{maxWidth:1024,mx:"auto",px:4,py:3},children:[c.jsxs(P.Box,{sx:{mb:5},children:[c.jsx(P.Typography,{variant:"h4",component:"h1",sx:{fontWeight:600,letterSpacing:"-0.025em",mb:.5},children:r}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Manage packages and database connections in this environment. Open a package to explore its models and notebooks."})]}),c.jsxs(P.Box,{sx:{mb:5},children:[c.jsxs(P.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",sx:{mb:3},children:[c.jsxs(P.Box,{children:[c.jsx(P.Typography,{variant:"h6",sx:{fontWeight:600,letterSpacing:"-0.025em"},children:"Packages"}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Published packages available for use in this environment"})]}),n&&c.jsx(R4,{resourceUri:t})]}),c.jsx(z1,{onSelectPackage:e,resourceUri:t})]}),c.jsx(P.Box,{sx:{mb:5},children:c.jsx(uR,{resourceUri:t})}),c.jsx(P4,{resourceUri:t})]})}const gR=e=>{const t=I.useRef({});return I.useEffect(()=>{t.current=e}),t.current};function Oh({array1:e,array2:t,parser:n=r=>r}){return e&&t&&e.length===t.length&&e.every((r,o)=>n(r)===n(t[o]))}function Nh(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function bR(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:a,trim:i=!1}=e;return(s,{inputValue:l,getOptionLabel:u})=>{let d=i?l.trim():l;n&&(d=d.toLowerCase()),t&&(d=Nh(d));const f=d?s.filter(h=>{let p=(a||u)(h);return n&&(p=p.toLowerCase()),t&&(p=Nh(p)),o==="start"?p.startsWith(d):p.includes(d)}):s;return typeof r=="number"?f.slice(0,r):f}}const yR=bR(),Lh=5,xR=e=>e.current!==null&&e.current.parentElement?.contains(document.activeElement),ER=[];function Fh(e,t,n,r){if(t||e==null||r)return"";const o=n(e);return typeof o=="string"?o:""}function CR(e){const{unstable_isActiveElementInListbox:t=xR,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:a=!1,blurOnSelect:i=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:l=!1,componentName:u="useAutocomplete",defaultValue:d=e.multiple?ER:null,disableClearable:f=!1,disableCloseOnSelect:h=!1,disabled:p,disabledItemsFocusable:m=!1,disableListWrap:b=!1,filterOptions:y=yR,filterSelectedOptions:x=!1,freeSolo:E=!1,getOptionDisabled:v,getOptionKey:S,getOptionLabel:k=ge=>ge.label??ge,groupBy:C,handleHomeEndKeys:L=!e.freeSolo,id:F,includeInputInList:B=!1,inputValue:R,isOptionEqualToValue:_=(ge,me)=>ge===me,multiple:T=!1,onChange:O,onClose:A,onHighlightChange:w,onInputChange:M,onOpen:V,open:z,openOnFocus:U=!1,options:D,readOnly:Y=!1,renderValue:te,selectOnFocus:N=!e.freeSolo,value:ae}=e,Q=Yn(F);let q=k;q=ge=>{const me=k(ge);return typeof me!="string"?String(me):me};const X=I.useRef(!1),G=I.useRef(!0),ee=I.useRef(null),oe=I.useRef(null),[ne,pe]=I.useState(null),[Z,J]=I.useState(-1),ye=o?0:-1,de=I.useRef(ye),be=I.useRef(Fh(d??ae,T,q)).current,[ie,Ie]=Nn({controlled:ae,default:d,name:u}),[ve,Ve]=Nn({controlled:R,default:be,name:u,state:"inputValue"}),[we,At]=I.useState(!1),rt=I.useCallback((ge,me,Me)=>{if(!(T?ie.length<me.length:me!==null)&&!s)return;const qe=Fh(me,T,q,te);ve!==qe&&(Ve(qe),M&&M(ge,qe,Me))},[q,ve,T,M,Ve,s,ie,te]),[Ye,ue]=Nn({controlled:z,default:!1,name:u,state:"open"}),[Ce,Oe]=I.useState(!0),He=!T&&ie!=null&&ve===q(ie),je=Ye&&!Y,Ne=je?y(D.filter(ge=>!(x&&(T?ie:[ie]).some(me=>me!==null&&_(ge,me)))),{inputValue:He&&Ce?"":ve,getOptionLabel:q}):[],ot=gR({filteredOptions:Ne,value:ie,inputValue:ve});I.useEffect(()=>{const ge=ie!==ot.value;we&&!ge||E&&!ge||rt(null,ie,"reset")},[ie,rt,we,ot.value,E]);const Et=Ye&&Ne.length>0&&!Y,mt=Pe(ge=>{if(ge===-1)ee.current.focus();else{const me=te?"data-item-index":"data-tag-index";ne.querySelector(`[${me}="${ge}"]`).focus()}});I.useEffect(()=>{T&&Z>ie.length-1&&(J(-1),mt(-1))},[ie,T,Z,mt]);function se(ge,me){if(!oe.current||ge<0||ge>=Ne.length)return-1;let Me=ge;for(;;){const ze=oe.current.querySelector(`[data-option-index="${Me}"]`),qe=m?!1:!ze||ze.disabled||ze.getAttribute("aria-disabled")==="true";if(ze&&ze.hasAttribute("tabindex")&&!qe)return Me;if(me==="next"?Me=(Me+1)%Ne.length:Me=(Me-1+Ne.length)%Ne.length,Me===ge)return-1}}const xe=Pe(({event:ge,index:me,reason:Me})=>{if(de.current=me,me===-1?ee.current.removeAttribute("aria-activedescendant"):ee.current.setAttribute("aria-activedescendant",`${Q}-option-${me}`),w&&["mouse","keyboard","touch"].includes(Me)&&w(ge,me===-1?null:Ne[me],Me),!oe.current)return;const ze=oe.current.querySelector(`[role="option"].${n}-focused`);ze&&(ze.classList.remove(`${n}-focused`),ze.classList.remove(`${n}-focusVisible`));let qe=oe.current;if(oe.current.getAttribute("role")!=="listbox"&&(qe=oe.current.parentElement.querySelector('[role="listbox"]')),!qe)return;if(me===-1){qe.scrollTop=0;return}const Yt=oe.current.querySelector(`[data-option-index="${me}"]`);if(Yt&&(Yt.classList.add(`${n}-focused`),Me==="keyboard"&&Yt.classList.add(`${n}-focusVisible`),qe.scrollHeight>qe.clientHeight&&Me!=="mouse"&&Me!=="touch")){const _t=Yt,Un=qe.clientHeight+qe.scrollTop,Bi=_t.offsetTop+_t.offsetHeight;Bi>Un?qe.scrollTop=Bi-qe.clientHeight:_t.offsetTop-_t.offsetHeight*(C?1.3:0)<qe.scrollTop&&(qe.scrollTop=_t.offsetTop-_t.offsetHeight*(C?1.3:0))}}),Re=Pe(({event:ge,diff:me,direction:Me="next",reason:ze})=>{if(!je)return;const Yt=se((()=>{const _t=Ne.length-1;if(me==="reset")return ye;if(me==="start")return 0;if(me==="end")return _t;const Un=de.current+me;return Un<0?Un===-1&&B?-1:b&&de.current!==-1||Math.abs(me)>1?0:_t:Un>_t?Un===_t+1&&B?-1:b||Math.abs(me)>1?_t:0:Un})(),Me);if(xe({index:Yt,reason:ze,event:ge}),r&&me!=="reset")if(Yt===-1)ee.current.value=ve;else{const _t=q(Ne[Yt]);ee.current.value=_t,_t.toLowerCase().indexOf(ve.toLowerCase())===0&&ve.length>0&&ee.current.setSelectionRange(ve.length,_t.length)}}),Be=!Oh({array1:ot.filteredOptions,array2:Ne,parser:q}),We=()=>{const ge=(me,Me)=>{const ze=me?q(me):"",qe=Me?q(Me):"";return ze===qe};if(de.current!==-1&&!Oh({array1:ot.filteredOptions,array2:Ne,parser:q})&&ot.inputValue===ve&&(T?ie.length===ot.value.length&&ot.value.every((me,Me)=>q(ie[Me])===q(me)):ge(ot.value,ie))){const me=ot.filteredOptions[de.current];if(me)return Ne.findIndex(Me=>q(Me)===q(me))}return-1},vt=I.useCallback(()=>{if(!je)return;const ge=We();if(ge!==-1){de.current=ge;return}const me=T?ie[0]:ie;if(Ne.length===0||me==null){Re({diff:"reset"});return}if(oe.current){if(me!=null){const Me=Ne[de.current];if(T&&Me&&ie.findIndex(qe=>_(Me,qe))!==-1)return;const ze=Ne.findIndex(qe=>_(qe,me));ze===-1?Re({diff:"reset"}):xe({index:ze});return}if(de.current>=Ne.length-1){xe({index:Ne.length-1});return}xe({index:de.current})}},[Ne.length,T?!1:ie,x,Re,xe,je,ve,T]),Mt=Pe(ge=>{ju(oe,ge),ge&&vt()});I.useEffect(()=>{Be&&vt()},[vt,Be]);const bt=ge=>{Ye||(ue(!0),Oe(!0),V&&V(ge))},Ut=(ge,me)=>{Ye&&(ue(!1),A&&A(ge,me))},Dn=(ge,me,Me,ze)=>{if(T){if(ie.length===me.length&&ie.every((qe,Yt)=>qe===me[Yt]))return}else if(ie===me)return;O&&O(ge,me,Me,ze),Ie(me)},St=I.useRef(!1),Jt=(ge,me,Me="selectOption",ze="options")=>{let qe=Me,Yt=me;if(T){Yt=Array.isArray(ie)?ie.slice():[];const _t=Yt.findIndex(Un=>_(me,Un));_t===-1?Yt.push(me):ze!=="freeSolo"&&(Yt.splice(_t,1),qe="removeOption")}rt(ge,Yt,qe),Dn(ge,Yt,qe,{option:me}),!h&&(!ge||!ge.ctrlKey&&!ge.metaKey)&&Ut(ge,qe),(i===!0||i==="touch"&&St.current||i==="mouse"&&!St.current)&&ee.current.blur()};function pr(ge,me){if(ge===-1)return-1;let Me=ge;for(;;){if(me==="next"&&Me===ie.length||me==="previous"&&Me===-1)return-1;const ze=te?"data-item-index":"data-tag-index",qe=ne.querySelector(`[${ze}="${Me}"]`);if(!qe||!qe.hasAttribute("tabindex")||qe.disabled||qe.getAttribute("aria-disabled")==="true")Me+=me==="next"?1:-1;else return Me}}const wn=(ge,me)=>{if(!T)return;ve===""&&Ut(ge,"toggleInput");let Me=Z;Z===-1?ve===""&&me==="previous"&&(Me=ie.length-1):(Me+=me==="next"?1:-1,Me<0&&(Me=0),Me===ie.length&&(Me=-1)),Me=pr(Me,me),J(Me),mt(Me)},Kr=ge=>{X.current=!0,Ve(""),M&&M(ge,"","clear"),Dn(ge,T?[]:null,"clear")},Hn=ge=>me=>{if(ge.onKeyDown&&ge.onKeyDown(me),!me.defaultMuiPrevented&&(Z!==-1&&!["ArrowLeft","ArrowRight"].includes(me.key)&&(J(-1),mt(-1)),me.which!==229))switch(me.key){case"Home":je&&L&&(me.preventDefault(),Re({diff:"start",direction:"next",reason:"keyboard",event:me}));break;case"End":je&&L&&(me.preventDefault(),Re({diff:"end",direction:"previous",reason:"keyboard",event:me}));break;case"PageUp":me.preventDefault(),Re({diff:-Lh,direction:"previous",reason:"keyboard",event:me}),bt(me);break;case"PageDown":me.preventDefault(),Re({diff:Lh,direction:"next",reason:"keyboard",event:me}),bt(me);break;case"ArrowDown":me.preventDefault(),Re({diff:1,direction:"next",reason:"keyboard",event:me}),bt(me);break;case"ArrowUp":me.preventDefault(),Re({diff:-1,direction:"previous",reason:"keyboard",event:me}),bt(me);break;case"ArrowLeft":!T&&te?mt(0):wn(me,"previous");break;case"ArrowRight":!T&&te?mt(-1):wn(me,"next");break;case"Enter":if(de.current!==-1&&je){const Me=Ne[de.current],ze=v?v(Me):!1;if(me.preventDefault(),ze)return;Jt(me,Me,"selectOption"),r&&ee.current.setSelectionRange(ee.current.value.length,ee.current.value.length)}else E&&ve!==""&&He===!1&&(T&&me.preventDefault(),Jt(me,ve,"createOption","freeSolo"));break;case"Escape":je?(me.preventDefault(),me.stopPropagation(),Ut(me,"escape")):l&&(ve!==""||T&&ie.length>0||te)&&(me.preventDefault(),me.stopPropagation(),Kr(me));break;case"Backspace":if(T&&!Y&&ve===""&&ie.length>0){const Me=Z===-1?ie.length-1:Z,ze=ie.slice();ze.splice(Me,1),Dn(me,ze,"removeOption",{option:ie[Me]})}!T&&te&&!Y&&(Ie(null),mt(-1));break;case"Delete":if(T&&!Y&&ve===""&&ie.length>0&&Z!==-1){const Me=Z,ze=ie.slice();ze.splice(Me,1),Dn(me,ze,"removeOption",{option:ie[Me]})}!T&&te&&!Y&&(Ie(null),mt(-1));break}},hr=ge=>{At(!0),U&&!X.current&&bt(ge)},So=ge=>{if(t(oe)){ee.current.focus();return}At(!1),G.current=!0,X.current=!1,a&&de.current!==-1&&je?Jt(ge,Ne[de.current],"blur"):a&&E&&ve!==""?Jt(ge,ve,"blur","freeSolo"):s&&rt(ge,ie,"blur"),Ut(ge,"blur")},ya=ge=>{const me=ge.target.value;ve!==me&&(Ve(me),Oe(!1),M&&M(ge,me,"input")),me===""?!f&&!T&&Dn(ge,null,"clear"):bt(ge)},Nl=ge=>{const me=Number(ge.currentTarget.getAttribute("data-option-index"));de.current!==me&&xe({event:ge,index:me,reason:"mouse"})},Ll=ge=>{xe({event:ge,index:Number(ge.currentTarget.getAttribute("data-option-index")),reason:"touch"}),St.current=!0},Fl=ge=>{const me=Number(ge.currentTarget.getAttribute("data-option-index"));Jt(ge,Ne[me],"selectOption"),St.current=!1},_l=ge=>me=>{const Me=ie.slice();Me.splice(ge,1),Dn(me,Me,"removeOption",{option:ie[ge]})},xa=ge=>{Dn(ge,null,"removeOption",{option:ie})},zt=ge=>{Ye?Ut(ge,"toggleInput"):bt(ge)},qt=ge=>{ge.currentTarget.contains(ge.target)&&ge.target.getAttribute("id")!==Q&&ge.preventDefault()},Or=ge=>{ge.currentTarget.contains(ge.target)&&(ee.current.focus(),N&&G.current&&ee.current.selectionEnd-ee.current.selectionStart===0&&ee.current.select(),G.current=!1)},Bl=ge=>{!p&&(ve===""||!Ye)&&zt(ge)};let Ea=E&&ve.length>0;Ea=Ea||(T?ie.length>0:ie!==null);let _i=Ne;return C&&(_i=Ne.reduce((ge,me,Me)=>{const ze=C(me);return ge.length>0&&ge[ge.length-1].group===ze?ge[ge.length-1].options.push(me):ge.push({key:Me,index:Me,group:ze,options:[me]}),ge},[])),p&&we&&So(),{getRootProps:(ge={})=>({...ge,onKeyDown:Hn(ge),onMouseDown:qt,onClick:Or}),getInputLabelProps:()=>({id:`${Q}-label`,htmlFor:Q}),getInputProps:()=>({id:Q,value:ve,onBlur:So,onFocus:hr,onChange:ya,onMouseDown:Bl,"aria-activedescendant":je?"":null,"aria-autocomplete":r?"both":"list","aria-controls":Et?`${Q}-listbox`:void 0,"aria-expanded":Et,autoComplete:"off",ref:ee,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:p}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Kr}),getItemProps:({index:ge=0}={})=>({...T&&{key:ge},...te?{"data-item-index":ge}:{"data-tag-index":ge},tabIndex:-1,...!Y&&{onDelete:T?_l(ge):xa}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:zt}),getTagProps:({index:ge})=>({key:ge,"data-tag-index":ge,tabIndex:-1,...!Y&&{onDelete:_l(ge)}}),getListboxProps:()=>({role:"listbox",id:`${Q}-listbox`,"aria-labelledby":`${Q}-label`,ref:Mt,onMouseDown:ge=>{ge.preventDefault()}}),getOptionProps:({index:ge,option:me})=>{const Me=(T?ie:[ie]).some(qe=>qe!=null&&_(me,qe)),ze=v?v(me):!1;return{key:S?.(me)??q(me),tabIndex:-1,role:"option",id:`${Q}-option-${ge}`,onMouseMove:Nl,onClick:Fl,onTouchStart:Ll,"data-option-index":ge,"aria-disabled":ze,"aria-selected":Me}},id:Q,inputValue:ve,value:ie,dirty:Ea,expanded:je&&ne,popupOpen:je,focused:we||Z!==-1,anchorEl:ne,setAnchorEl:pe,focusedItem:Z,focusedTag:Z,groupedOptions:_i}}var cn="top",Fn="bottom",_n="right",dn="left",kd="auto",Oi=[cn,Fn,_n,dn],ta="start",bi="end",TR="clippingParents",V1="viewport",Na="popper",vR="reference",_h=Oi.reduce(function(e,t){return e.concat([t+"-"+ta,t+"-"+bi])},[]),W1=[].concat(Oi,[kd]).reduce(function(e,t){return e.concat([t,t+"-"+ta,t+"-"+bi])},[]),SR="beforeRead",kR="read",DR="afterRead",wR="beforeMain",AR="main",IR="afterMain",PR="beforeWrite",RR="write",MR="afterWrite",OR=[SR,kR,DR,wR,AR,IR,PR,RR,MR];function lr(e){return e?(e.nodeName||"").toLowerCase():null}function Sn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function go(e){var t=Sn(e).Element;return e instanceof t||e instanceof Element}function Ln(e){var t=Sn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Dd(e){if(typeof ShadowRoot>"u")return!1;var t=Sn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function NR(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},a=t.elements[n];!Ln(a)||!lr(a)||(Object.assign(a.style,r),Object.keys(o).forEach(function(i){var s=o[i];s===!1?a.removeAttribute(i):a.setAttribute(i,s===!0?"":s)}))})}function LR(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],a=t.attributes[r]||{},i=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=i.reduce(function(l,u){return l[u]="",l},{});!Ln(o)||!lr(o)||(Object.assign(o.style,s),Object.keys(a).forEach(function(l){o.removeAttribute(l)}))})}}const FR={name:"applyStyles",enabled:!0,phase:"write",fn:NR,effect:LR,requires:["computeStyles"]};function sr(e){return e.split("-")[0]}var co=Math.max,Ys=Math.min,na=Math.round;function bc(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function q1(){return!/^((?!chrome|android).)*safari/i.test(bc())}function ra(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,a=1;t&&Ln(e)&&(o=e.offsetWidth>0&&na(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&na(r.height)/e.offsetHeight||1);var i=go(e)?Sn(e):window,s=i.visualViewport,l=!q1()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/o,d=(r.top+(l&&s?s.offsetTop:0))/a,f=r.width/o,h=r.height/a;return{width:f,height:h,top:d,right:u+f,bottom:d+h,left:u,x:u,y:d}}function wd(e){var t=ra(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Y1(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Dd(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function kr(e){return Sn(e).getComputedStyle(e)}function _R(e){return["table","td","th"].indexOf(lr(e))>=0}function Yr(e){return((go(e)?e.ownerDocument:e.document)||window.document).documentElement}function Al(e){return lr(e)==="html"?e:e.assignedSlot||e.parentNode||(Dd(e)?e.host:null)||Yr(e)}function Bh(e){return!Ln(e)||kr(e).position==="fixed"?null:e.offsetParent}function BR(e){var t=/firefox/i.test(bc()),n=/Trident/i.test(bc());if(n&&Ln(e)){var r=kr(e);if(r.position==="fixed")return null}var o=Al(e);for(Dd(o)&&(o=o.host);Ln(o)&&["html","body"].indexOf(lr(o))<0;){var a=kr(o);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return o;o=o.parentNode}return null}function Ni(e){for(var t=Sn(e),n=Bh(e);n&&_R(n)&&kr(n).position==="static";)n=Bh(n);return n&&(lr(n)==="html"||lr(n)==="body"&&kr(n).position==="static")?t:n||BR(e)||t}function Ad(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ai(e,t,n){return co(e,Ys(t,n))}function jR(e,t,n){var r=ai(e,t,n);return r>n?n:r}function K1(){return{top:0,right:0,bottom:0,left:0}}function G1(e){return Object.assign({},K1(),e)}function Q1(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var $R=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,G1(typeof t!="number"?t:Q1(t,Oi))};function HR(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,i=n.modifiersData.popperOffsets,s=sr(n.placement),l=Ad(s),u=[dn,_n].indexOf(s)>=0,d=u?"height":"width";if(!(!a||!i)){var f=$R(o.padding,n),h=wd(a),p=l==="y"?cn:dn,m=l==="y"?Fn:_n,b=n.rects.reference[d]+n.rects.reference[l]-i[l]-n.rects.popper[d],y=i[l]-n.rects.reference[l],x=Ni(a),E=x?l==="y"?x.clientHeight||0:x.clientWidth||0:0,v=b/2-y/2,S=f[p],k=E-h[d]-f[m],C=E/2-h[d]/2+v,L=ai(S,C,k),F=l;n.modifiersData[r]=(t={},t[F]=L,t.centerOffset=L-C,t)}}function UR(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Y1(t.elements.popper,o)&&(t.elements.arrow=o))}const zR={name:"arrow",enabled:!0,phase:"main",fn:HR,effect:UR,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function oa(e){return e.split("-")[1]}var VR={top:"auto",right:"auto",bottom:"auto",left:"auto"};function WR(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:na(n*o)/o||0,y:na(r*o)/o||0}}function jh(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.variation,i=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,f=e.isFixed,h=i.x,p=h===void 0?0:h,m=i.y,b=m===void 0?0:m,y=typeof d=="function"?d({x:p,y:b}):{x:p,y:b};p=y.x,b=y.y;var x=i.hasOwnProperty("x"),E=i.hasOwnProperty("y"),v=dn,S=cn,k=window;if(u){var C=Ni(n),L="clientHeight",F="clientWidth";if(C===Sn(n)&&(C=Yr(n),kr(C).position!=="static"&&s==="absolute"&&(L="scrollHeight",F="scrollWidth")),C=C,o===cn||(o===dn||o===_n)&&a===bi){S=Fn;var B=f&&C===k&&k.visualViewport?k.visualViewport.height:C[L];b-=B-r.height,b*=l?1:-1}if(o===dn||(o===cn||o===Fn)&&a===bi){v=_n;var R=f&&C===k&&k.visualViewport?k.visualViewport.width:C[F];p-=R-r.width,p*=l?1:-1}}var _=Object.assign({position:s},u&&VR),T=d===!0?WR({x:p,y:b},Sn(n)):{x:p,y:b};if(p=T.x,b=T.y,l){var O;return Object.assign({},_,(O={},O[S]=E?"0":"",O[v]=x?"0":"",O.transform=(k.devicePixelRatio||1)<=1?"translate("+p+"px, "+b+"px)":"translate3d("+p+"px, "+b+"px, 0)",O))}return Object.assign({},_,(t={},t[S]=E?b+"px":"",t[v]=x?p+"px":"",t.transform="",t))}function qR(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,a=n.adaptive,i=a===void 0?!0:a,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:sr(t.placement),variation:oa(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,jh(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,jh(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const YR={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:qR,data:{}};var Zi={passive:!0};function KR(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,a=o===void 0?!0:o,i=r.resize,s=i===void 0?!0:i,l=Sn(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&u.forEach(function(d){d.addEventListener("scroll",n.update,Zi)}),s&&l.addEventListener("resize",n.update,Zi),function(){a&&u.forEach(function(d){d.removeEventListener("scroll",n.update,Zi)}),s&&l.removeEventListener("resize",n.update,Zi)}}const GR={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:KR,data:{}};var QR={left:"right",right:"left",bottom:"top",top:"bottom"};function ps(e){return e.replace(/left|right|bottom|top/g,function(t){return QR[t]})}var XR={start:"end",end:"start"};function $h(e){return e.replace(/start|end/g,function(t){return XR[t]})}function Id(e){var t=Sn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Pd(e){return ra(Yr(e)).left+Id(e).scrollLeft}function ZR(e,t){var n=Sn(e),r=Yr(e),o=n.visualViewport,a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;var u=q1();(u||!u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s+Pd(e),y:l}}function JR(e){var t,n=Yr(e),r=Id(e),o=(t=e.ownerDocument)==null?void 0:t.body,a=co(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=co(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Pd(e),l=-r.scrollTop;return kr(o||n).direction==="rtl"&&(s+=co(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:s,y:l}}function Rd(e){var t=kr(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function X1(e){return["html","body","#document"].indexOf(lr(e))>=0?e.ownerDocument.body:Ln(e)&&Rd(e)?e:X1(Al(e))}function ii(e,t){var n;t===void 0&&(t=[]);var r=X1(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),a=Sn(r),i=o?[a].concat(a.visualViewport||[],Rd(r)?r:[]):r,s=t.concat(i);return o?s:s.concat(ii(Al(i)))}function yc(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function eM(e,t){var n=ra(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Hh(e,t,n){return t===V1?yc(ZR(e,n)):go(t)?eM(t,n):yc(JR(Yr(e)))}function tM(e){var t=ii(Al(e)),n=["absolute","fixed"].indexOf(kr(e).position)>=0,r=n&&Ln(e)?Ni(e):e;return go(r)?t.filter(function(o){return go(o)&&Y1(o,r)&&lr(o)!=="body"}):[]}function nM(e,t,n,r){var o=t==="clippingParents"?tM(e):[].concat(t),a=[].concat(o,[n]),i=a[0],s=a.reduce(function(l,u){var d=Hh(e,u,r);return l.top=co(d.top,l.top),l.right=Ys(d.right,l.right),l.bottom=Ys(d.bottom,l.bottom),l.left=co(d.left,l.left),l},Hh(e,i,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Z1(e){var t=e.reference,n=e.element,r=e.placement,o=r?sr(r):null,a=r?oa(r):null,i=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case cn:l={x:i,y:t.y-n.height};break;case Fn:l={x:i,y:t.y+t.height};break;case _n:l={x:t.x+t.width,y:s};break;case dn:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=o?Ad(o):null;if(u!=null){var d=u==="y"?"height":"width";switch(a){case ta:l[u]=l[u]-(t[d]/2-n[d]/2);break;case bi:l[u]=l[u]+(t[d]/2-n[d]/2);break}}return l}function yi(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,a=n.strategy,i=a===void 0?e.strategy:a,s=n.boundary,l=s===void 0?TR:s,u=n.rootBoundary,d=u===void 0?V1:u,f=n.elementContext,h=f===void 0?Na:f,p=n.altBoundary,m=p===void 0?!1:p,b=n.padding,y=b===void 0?0:b,x=G1(typeof y!="number"?y:Q1(y,Oi)),E=h===Na?vR:Na,v=e.rects.popper,S=e.elements[m?E:h],k=nM(go(S)?S:S.contextElement||Yr(e.elements.popper),l,d,i),C=ra(e.elements.reference),L=Z1({reference:C,element:v,placement:o}),F=yc(Object.assign({},v,L)),B=h===Na?F:C,R={top:k.top-B.top+x.top,bottom:B.bottom-k.bottom+x.bottom,left:k.left-B.left+x.left,right:B.right-k.right+x.right},_=e.modifiersData.offset;if(h===Na&&_){var T=_[o];Object.keys(R).forEach(function(O){var A=[_n,Fn].indexOf(O)>=0?1:-1,w=[cn,Fn].indexOf(O)>=0?"y":"x";R[O]+=T[w]*A})}return R}function rM(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,i=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?W1:l,d=oa(r),f=d?s?_h:_h.filter(function(m){return oa(m)===d}):Oi,h=f.filter(function(m){return u.indexOf(m)>=0});h.length===0&&(h=f);var p=h.reduce(function(m,b){return m[b]=yi(e,{placement:b,boundary:o,rootBoundary:a,padding:i})[sr(b)],m},{});return Object.keys(p).sort(function(m,b){return p[m]-p[b]})}function oM(e){if(sr(e)===kd)return[];var t=ps(e);return[$h(e),t,$h(t)]}function aM(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,a=o===void 0?!0:o,i=n.altAxis,s=i===void 0?!0:i,l=n.fallbackPlacements,u=n.padding,d=n.boundary,f=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,b=n.allowedAutoPlacements,y=t.options.placement,x=sr(y),E=x===y,v=l||(E||!m?[ps(y)]:oM(y)),S=[y].concat(v).reduce(function(ae,Q){return ae.concat(sr(Q)===kd?rM(t,{placement:Q,boundary:d,rootBoundary:f,padding:u,flipVariations:m,allowedAutoPlacements:b}):Q)},[]),k=t.rects.reference,C=t.rects.popper,L=new Map,F=!0,B=S[0],R=0;R<S.length;R++){var _=S[R],T=sr(_),O=oa(_)===ta,A=[cn,Fn].indexOf(T)>=0,w=A?"width":"height",M=yi(t,{placement:_,boundary:d,rootBoundary:f,altBoundary:h,padding:u}),V=A?O?_n:dn:O?Fn:cn;k[w]>C[w]&&(V=ps(V));var z=ps(V),U=[];if(a&&U.push(M[T]<=0),s&&U.push(M[V]<=0,M[z]<=0),U.every(function(ae){return ae})){B=_,F=!1;break}L.set(_,U)}if(F)for(var D=m?3:1,Y=function(Q){var q=S.find(function(X){var G=L.get(X);if(G)return G.slice(0,Q).every(function(ee){return ee})});if(q)return B=q,"break"},te=D;te>0;te--){var N=Y(te);if(N==="break")break}t.placement!==B&&(t.modifiersData[r]._skip=!0,t.placement=B,t.reset=!0)}}const iM={name:"flip",enabled:!0,phase:"main",fn:aM,requiresIfExists:["offset"],data:{_skip:!1}};function Uh(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function zh(e){return[cn,_n,Fn,dn].some(function(t){return e[t]>=0})}function sM(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=yi(t,{elementContext:"reference"}),s=yi(t,{altBoundary:!0}),l=Uh(i,r),u=Uh(s,o,a),d=zh(l),f=zh(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const lM={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:sM};function uM(e,t,n){var r=sr(e),o=[dn,cn].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=a[0],s=a[1];return i=i||0,s=(s||0)*o,[dn,_n].indexOf(r)>=0?{x:s,y:i}:{x:i,y:s}}function cM(e){var t=e.state,n=e.options,r=e.name,o=n.offset,a=o===void 0?[0,0]:o,i=W1.reduce(function(d,f){return d[f]=uM(f,t.rects,a),d},{}),s=i[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=i}const dM={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:cM};function fM(e){var t=e.state,n=e.name;t.modifiersData[n]=Z1({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const pM={name:"popperOffsets",enabled:!0,phase:"read",fn:fM,data:{}};function hM(e){return e==="x"?"y":"x"}function mM(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=o===void 0?!0:o,i=n.altAxis,s=i===void 0?!1:i,l=n.boundary,u=n.rootBoundary,d=n.altBoundary,f=n.padding,h=n.tether,p=h===void 0?!0:h,m=n.tetherOffset,b=m===void 0?0:m,y=yi(t,{boundary:l,rootBoundary:u,padding:f,altBoundary:d}),x=sr(t.placement),E=oa(t.placement),v=!E,S=Ad(x),k=hM(S),C=t.modifiersData.popperOffsets,L=t.rects.reference,F=t.rects.popper,B=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,R=typeof B=="number"?{mainAxis:B,altAxis:B}:Object.assign({mainAxis:0,altAxis:0},B),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(C){if(a){var O,A=S==="y"?cn:dn,w=S==="y"?Fn:_n,M=S==="y"?"height":"width",V=C[S],z=V+y[A],U=V-y[w],D=p?-F[M]/2:0,Y=E===ta?L[M]:F[M],te=E===ta?-F[M]:-L[M],N=t.elements.arrow,ae=p&&N?wd(N):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:K1(),q=Q[A],X=Q[w],G=ai(0,L[M],ae[M]),ee=v?L[M]/2-D-G-q-R.mainAxis:Y-G-q-R.mainAxis,oe=v?-L[M]/2+D+G+X+R.mainAxis:te+G+X+R.mainAxis,ne=t.elements.arrow&&Ni(t.elements.arrow),pe=ne?S==="y"?ne.clientTop||0:ne.clientLeft||0:0,Z=(O=_?.[S])!=null?O:0,J=V+ee-Z-pe,ye=V+oe-Z,de=ai(p?Ys(z,J):z,V,p?co(U,ye):U);C[S]=de,T[S]=de-V}if(s){var be,ie=S==="x"?cn:dn,Ie=S==="x"?Fn:_n,ve=C[k],Ve=k==="y"?"height":"width",we=ve+y[ie],At=ve-y[Ie],rt=[cn,dn].indexOf(x)!==-1,Ye=(be=_?.[k])!=null?be:0,ue=rt?we:ve-L[Ve]-F[Ve]-Ye+R.altAxis,Ce=rt?ve+L[Ve]+F[Ve]-Ye-R.altAxis:At,Oe=p&&rt?jR(ue,ve,Ce):ai(p?ue:we,ve,p?Ce:At);C[k]=Oe,T[k]=Oe-ve}t.modifiersData[r]=T}}const gM={name:"preventOverflow",enabled:!0,phase:"main",fn:mM,requiresIfExists:["offset"]};function bM(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function yM(e){return e===Sn(e)||!Ln(e)?Id(e):bM(e)}function xM(e){var t=e.getBoundingClientRect(),n=na(t.width)/e.offsetWidth||1,r=na(t.height)/e.offsetHeight||1;return n!==1||r!==1}function EM(e,t,n){n===void 0&&(n=!1);var r=Ln(t),o=Ln(t)&&xM(t),a=Yr(t),i=ra(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((lr(t)!=="body"||Rd(a))&&(s=yM(t)),Ln(t)?(l=ra(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=Pd(a))),{x:i.left+s.scrollLeft-l.x,y:i.top+s.scrollTop-l.y,width:i.width,height:i.height}}function CM(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function o(a){n.add(a.name);var i=[].concat(a.requires||[],a.requiresIfExists||[]);i.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||o(a)}),r}function TM(e){var t=CM(e);return OR.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function vM(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function SM(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Vh={placement:"bottom",modifiers:[],strategy:"absolute"};function Wh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function kM(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,a=o===void 0?Vh:o;return function(s,l,u){u===void 0&&(u=a);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},Vh,a),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},f=[],h=!1,p={state:d,setOptions:function(x){var E=typeof x=="function"?x(d.options):x;b(),d.options=Object.assign({},a,d.options,E),d.scrollParents={reference:go(s)?ii(s):s.contextElement?ii(s.contextElement):[],popper:ii(l)};var v=TM(SM([].concat(r,d.options.modifiers)));return d.orderedModifiers=v.filter(function(S){return S.enabled}),m(),p.update()},forceUpdate:function(){if(!h){var x=d.elements,E=x.reference,v=x.popper;if(Wh(E,v)){d.rects={reference:EM(E,Ni(v),d.options.strategy==="fixed"),popper:wd(v)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(R){return d.modifiersData[R.name]=Object.assign({},R.data)});for(var S=0;S<d.orderedModifiers.length;S++){if(d.reset===!0){d.reset=!1,S=-1;continue}var k=d.orderedModifiers[S],C=k.fn,L=k.options,F=L===void 0?{}:L,B=k.name;typeof C=="function"&&(d=C({state:d,options:F,name:B,instance:p})||d)}}}},update:vM(function(){return new Promise(function(y){p.forceUpdate(),y(d)})}),destroy:function(){b(),h=!0}};if(!Wh(s,l))return p;p.setOptions(u).then(function(y){!h&&u.onFirstUpdate&&u.onFirstUpdate(y)});function m(){d.orderedModifiers.forEach(function(y){var x=y.name,E=y.options,v=E===void 0?{}:E,S=y.effect;if(typeof S=="function"){var k=S({state:d,name:x,instance:p,options:v}),C=function(){};f.push(k||C)}})}function b(){f.forEach(function(y){return y()}),f=[]}return p}}var DM=[GR,pM,YR,FR,dM,iM,gM,zR,lM],wM=kM({defaultModifiers:DM});function AM(e){return _e("MuiPopper",e)}Le("MuiPopper",["root"]);function IM(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function xc(e){return typeof e=="function"?e():e}function PM(e){return e.nodeType!==void 0}const RM=e=>{const{classes:t}=e;return Fe({root:["root"]},AM,t)},MM={},OM=I.forwardRef(function(t,n){const{anchorEl:r,children:o,direction:a,disablePortal:i,modifiers:s,open:l,placement:u,popperOptions:d,popperRef:f,slotProps:h={},slots:p={},TransitionProps:m,ownerState:b,...y}=t,x=I.useRef(null),E=ct(x,n),v=I.useRef(null),S=ct(v,f),k=I.useRef(S);Wt(()=>{k.current=S},[S]),I.useImperativeHandle(f,()=>v.current,[]);const C=IM(u,a),[L,F]=I.useState(C),[B,R]=I.useState(xc(r));I.useEffect(()=>{v.current&&v.current.forceUpdate()}),I.useEffect(()=>{r&&R(xc(r))},[r]),Wt(()=>{if(!B||!l)return;const w=z=>{F(z.placement)};let M=[{name:"preventOverflow",options:{altBoundary:i}},{name:"flip",options:{altBoundary:i}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:z})=>{w(z)}}];s!=null&&(M=M.concat(s)),d&&d.modifiers!=null&&(M=M.concat(d.modifiers));const V=wM(B,x.current,{placement:C,...d,modifiers:M});return k.current(V),()=>{V.destroy(),k.current(null)}},[B,i,s,l,d,C]);const _={placement:L};m!==null&&(_.TransitionProps=m);const T=RM(t),O=p.root??"div",A=dt({elementType:O,externalSlotProps:h.root,externalForwardedProps:y,additionalProps:{role:"tooltip",ref:E},ownerState:t,className:T.root});return c.jsx(O,{...A,children:typeof o=="function"?o(_):o})}),NM=I.forwardRef(function(t,n){const{anchorEl:r,children:o,container:a,direction:i="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:u,open:d,placement:f="bottom",popperOptions:h=MM,popperRef:p,style:m,transition:b=!1,slotProps:y={},slots:x={},...E}=t,[v,S]=I.useState(!0),k=()=>{S(!1)},C=()=>{S(!0)};if(!l&&!d&&(!b||v))return null;let L;if(a)L=a;else if(r){const R=xc(r);L=R&&PM(R)?Vt(R).body:Vt(null).body}const F=!d&&l&&(!b||v)?"none":void 0,B=b?{in:d,onEnter:k,onExited:C}:void 0;return c.jsx(k1,{disablePortal:s,container:L,children:c.jsx(OM,{anchorEl:r,direction:i,disablePortal:s,modifiers:u,ref:n,open:b?!v:d,placement:f,popperOptions:h,popperRef:p,slotProps:y,slots:x,...E,style:{position:"fixed",top:0,left:0,display:F,...m},TransitionProps:B,children:o})})}),LM=le(NM,{name:"MuiPopper",slot:"Root"})({}),Md=I.forwardRef(function(t,n){const r=qn(),o=Qe({props:t,name:"MuiPopper"}),{anchorEl:a,component:i,components:s,componentsProps:l,container:u,disablePortal:d,keepMounted:f,modifiers:h,open:p,placement:m,popperOptions:b,popperRef:y,transition:x,slots:E,slotProps:v,...S}=o,k=E?.root??s?.Root,C={anchorEl:a,container:u,disablePortal:d,keepMounted:f,modifiers:h,open:p,placement:m,popperOptions:b,popperRef:y,transition:x,...S};return c.jsx(LM,{as:i,direction:r?"rtl":"ltr",slots:{root:k},slotProps:v??l,...C,ref:n})});function FM(e){return _e("MuiListSubheader",e)}Le("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const _M=e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:a}=e,i={root:["root",n!=="default"&&`color${De(n)}`,!r&&"gutters",o&&"inset",!a&&"sticky"]};return Fe(i,FM,t)},BM=le("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${De(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(et(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:72}},{props:({ownerState:t})=>!t.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),Ec=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiListSubheader"}),{className:o,color:a="default",component:i="li",disableGutters:s=!1,disableSticky:l=!1,inset:u=!1,...d}=r,f={...r,color:a,component:i,disableGutters:s,disableSticky:l,inset:u},h=_M(f);return c.jsx(BM,{as:i,className:Ae(h.root,o),ref:n,ownerState:f,...d})});Ec&&(Ec.muiSkipListHighlight=!0);const jM=xt(c.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));function $M(e){return _e("MuiChip",e)}const tt=Le("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),HM=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:a,onDelete:i,clickable:s,variant:l}=e,u={root:["root",l,n&&"disabled",`size${De(r)}`,`color${De(o)}`,s&&"clickable",s&&`clickableColor${De(o)}`,i&&"deletable",i&&`deletableColor${De(o)}`,`${l}${De(o)}`],label:["label",`label${De(r)}`],avatar:["avatar",`avatar${De(r)}`,`avatarColor${De(o)}`],icon:["icon",`icon${De(r)}`,`iconColor${De(a)}`],deleteIcon:["deleteIcon",`deleteIcon${De(r)}`,`deleteIconColor${De(o)}`,`deleteIcon${De(l)}Color${De(o)}`]};return Fe(u,$M,t)},UM=le("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:a,onDelete:i,size:s,variant:l}=n;return[{[`& .${tt.avatar}`]:t.avatar},{[`& .${tt.avatar}`]:t[`avatar${De(s)}`]},{[`& .${tt.avatar}`]:t[`avatarColor${De(r)}`]},{[`& .${tt.icon}`]:t.icon},{[`& .${tt.icon}`]:t[`icon${De(s)}`]},{[`& .${tt.icon}`]:t[`iconColor${De(o)}`]},{[`& .${tt.deleteIcon}`]:t.deleteIcon},{[`& .${tt.deleteIcon}`]:t[`deleteIcon${De(s)}`]},{[`& .${tt.deleteIcon}`]:t[`deleteIconColor${De(r)}`]},{[`& .${tt.deleteIcon}`]:t[`deleteIcon${De(l)}Color${De(r)}`]},t.root,t[`size${De(s)}`],t[`color${De(r)}`],a&&t.clickable,a&&r!=="default"&&t[`clickableColor${De(r)})`],i&&t.deletable,i&&r!=="default"&&t[`deletableColor${De(r)}`],t[l],t[`${l}${De(r)}`]]}})(et(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${tt.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${tt.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${tt.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${tt.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${tt.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${tt.icon}`]:{marginLeft:5,marginRight:-6},[`& .${tt.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${tt.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${tt.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(Tn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${tt.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${tt.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${tt.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${tt.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(Tn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${tt.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${tt.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(Tn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${tt.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${tt.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${tt.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${tt.avatar}`]:{marginLeft:4},[`& .${tt.avatarSmall}`]:{marginLeft:2},[`& .${tt.icon}`]:{marginLeft:4},[`& .${tt.iconSmall}`]:{marginLeft:2},[`& .${tt.deleteIcon}`]:{marginRight:5},[`& .${tt.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(Tn()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.alpha((e.vars||e).palette[n].main,.7)}`,[`&.${tt.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${tt.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.focusOpacity)},[`& .${tt.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),zM=le("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${De(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function qh(e){return e.key==="Backspace"||e.key==="Delete"}const J1=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiChip"}),{avatar:o,className:a,clickable:i,color:s="default",component:l,deleteIcon:u,disabled:d=!1,icon:f,label:h,onClick:p,onDelete:m,onKeyDown:b,onKeyUp:y,size:x="medium",variant:E="filled",tabIndex:v,skipFocusWhenDisabled:S=!1,slots:k={},slotProps:C={},...L}=r,F=I.useRef(null),B=ct(F,n),R=q=>{q.stopPropagation(),m&&m(q)},_=q=>{q.currentTarget===q.target&&qh(q)&&q.preventDefault(),b&&b(q)},T=q=>{q.currentTarget===q.target&&m&&qh(q)&&m(q),y&&y(q)},O=i!==!1&&p?!0:i,A=O||m?Jo:l||"div",w={...r,component:A,disabled:d,size:x,color:s,iconColor:I.isValidElement(f)&&f.props.color||s,onDelete:!!m,clickable:O,variant:E},M=HM(w),V=A===Jo?{component:l||"div",focusVisibleClassName:M.focusVisible,...m&&{disableRipple:!0}}:{};let z=null;m&&(z=u&&I.isValidElement(u)?I.cloneElement(u,{className:Ae(u.props.className,M.deleteIcon),onClick:R}):c.jsx(jM,{className:M.deleteIcon,onClick:R}));let U=null;o&&I.isValidElement(o)&&(U=I.cloneElement(o,{className:Ae(M.avatar,o.props.className)}));let D=null;f&&I.isValidElement(f)&&(D=I.cloneElement(f,{className:Ae(M.icon,f.props.className)}));const Y={slots:k,slotProps:C},[te,N]=st("root",{elementType:UM,externalForwardedProps:{...Y,...L},ownerState:w,shouldForwardComponentProp:!0,ref:B,className:Ae(M.root,a),additionalProps:{disabled:O&&d?!0:void 0,tabIndex:S&&d?-1:v,...V},getSlotProps:q=>({...q,onClick:X=>{q.onClick?.(X),p?.(X)},onKeyDown:X=>{q.onKeyDown?.(X),_(X)},onKeyUp:X=>{q.onKeyUp?.(X),T(X)}})}),[ae,Q]=st("label",{elementType:zM,externalForwardedProps:Y,ownerState:w,className:M.label});return c.jsxs(te,{as:A,...N,children:[U||D,c.jsx(ae,{...Q,children:h}),z]})}),VM=xt(c.jsx("path",{d:"M19 6.41L17.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"}));function WM(e){return _e("MuiAutocomplete",e)}const Xe=Le("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var Yh,Kh;const qM=e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:a,hasClearIcon:i,hasPopupIcon:s,inputFocused:l,popupOpen:u,size:d}=e,f={root:["root",r&&"expanded",o&&"focused",a&&"fullWidth",i&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${De(d)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Fe(f,WM,t)},YM=le("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:a,inputFocused:i,size:s}=n;return[{[`& .${Xe.tag}`]:t.tag},{[`& .${Xe.tag}`]:t[`tagSize${De(s)}`]},{[`& .${Xe.inputRoot}`]:t.inputRoot},{[`& .${Xe.input}`]:t.input},{[`& .${Xe.input}`]:i&&t.inputFocused},t.root,r&&t.fullWidth,a&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${Xe.focused} .${Xe.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Xe.clearIndicator}`]:{visibility:"visible"}},[`& .${Xe.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${Xe.inputRoot}`]:{[`.${Xe.hasPopupIcon}&, .${Xe.hasClearIcon}&`]:{paddingRight:30},[`.${Xe.hasPopupIcon}.${Xe.hasClearIcon}&`]:{paddingRight:56},[`& .${Xe.input}`]:{width:0,minWidth:30}},[`& .${$r.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${$r.root}.${xn.sizeSmall}`]:{[`& .${$r.input}`]:{padding:"2px 4px 3px 0"}},[`& .${In.root}`]:{padding:9,[`.${Xe.hasPopupIcon}&, .${Xe.hasClearIcon}&`]:{paddingRight:39},[`.${Xe.hasPopupIcon}.${Xe.hasClearIcon}&`]:{paddingRight:65},[`& .${Xe.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Xe.endAdornment}`]:{right:9}},[`& .${In.root}.${xn.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Xe.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${En.root}`]:{paddingTop:19,paddingLeft:8,[`.${Xe.hasPopupIcon}&, .${Xe.hasClearIcon}&`]:{paddingRight:39},[`.${Xe.hasPopupIcon}.${Xe.hasClearIcon}&`]:{paddingRight:65},[`& .${En.input}`]:{padding:"7px 4px"},[`& .${Xe.endAdornment}`]:{right:9}},[`& .${En.root}.${xn.sizeSmall}`]:{paddingBottom:1,[`& .${En.input}`]:{padding:"2.5px 4px"}},[`& .${xn.hiddenLabel}`]:{paddingTop:8},[`& .${En.root}.${xn.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Xe.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${En.root}.${xn.hiddenLabel}.${xn.sizeSmall}`]:{[`& .${Xe.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Xe.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${Xe.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${Xe.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${Xe.inputRoot}`]:{flexWrap:"wrap"}}}]}),KM=le("div",{name:"MuiAutocomplete",slot:"EndAdornment"})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),GM=le(Qn,{name:"MuiAutocomplete",slot:"ClearIndicator"})({marginRight:-2,padding:4,visibility:"hidden"}),QM=le(Qn,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),XM=le(Md,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Xe.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(et(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),ZM=le(To,{name:"MuiAutocomplete",slot:"Paper"})(et(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),JM=le("div",{name:"MuiAutocomplete",slot:"Loading"})(et(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),eO=le("div",{name:"MuiAutocomplete",slot:"NoOptions"})(et(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),tO=le("ul",{name:"MuiAutocomplete",slot:"Listbox"})(et(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Xe.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${Xe.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${Xe.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Xe.focused}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Xe.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))),nO=le(Ec,{name:"MuiAutocomplete",slot:"GroupLabel"})(et(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),rO=le("ul",{name:"MuiAutocomplete",slot:"GroupUl"})({padding:0,[`& .${Xe.option}`]:{paddingLeft:24}}),Cc=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiAutocomplete"}),{autoComplete:o=!1,autoHighlight:a=!1,autoSelect:i=!1,blurOnSelect:s=!1,ChipProps:l,className:u,clearIcon:d=Yh||(Yh=c.jsx(VM,{fontSize:"small"})),clearOnBlur:f=!r.freeSolo,clearOnEscape:h=!1,clearText:p="Clear",closeText:m="Close",componentsProps:b,defaultValue:y=r.multiple?[]:null,disableClearable:x=!1,disableCloseOnSelect:E=!1,disabled:v=!1,disabledItemsFocusable:S=!1,disableListWrap:k=!1,disablePortal:C=!1,filterOptions:L,filterSelectedOptions:F=!1,forcePopupIcon:B="auto",freeSolo:R=!1,fullWidth:_=!1,getLimitTagsText:T=lt=>`+${lt}`,getOptionDisabled:O,getOptionKey:A,getOptionLabel:w,isOptionEqualToValue:M,groupBy:V,handleHomeEndKeys:z=!r.freeSolo,id:U,includeInputInList:D=!1,inputValue:Y,limitTags:te=-1,ListboxComponent:N,ListboxProps:ae,loading:Q=!1,loadingText:q="Loading…",multiple:X=!1,noOptionsText:G="No options",onChange:ee,onClose:oe,onHighlightChange:ne,onInputChange:pe,onOpen:Z,open:J,openOnFocus:ye=!1,openText:de="Open",options:be,PaperComponent:ie,PopperComponent:Ie,popupIcon:ve=Kh||(Kh=c.jsx(j1,{})),readOnly:Ve=!1,renderGroup:we,renderInput:At,renderOption:rt,renderTags:Ye,renderValue:ue,selectOnFocus:Ce=!r.freeSolo,size:Oe="medium",slots:He={},slotProps:je={},value:Ne,...ot}=r,{getRootProps:Et,getInputProps:mt,getInputLabelProps:se,getPopupIndicatorProps:xe,getClearProps:Re,getItemProps:Be,getListboxProps:We,getOptionProps:vt,value:Mt,dirty:bt,expanded:Ut,id:Dn,popupOpen:St,focused:Jt,focusedItem:pr,anchorEl:wn,setAnchorEl:Kr,inputValue:Hn,groupedOptions:hr}=CR({...r,componentName:"Autocomplete"}),So=!x&&!v&&bt&&!Ve,ya=(!R||B===!0)&&B!==!1,{onMouseDown:Nl}=mt(),{ref:Ll,...Fl}=We(),xa=w||(lt=>lt.label??lt),zt={...r,disablePortal:C,expanded:Ut,focused:Jt,fullWidth:_,getOptionLabel:xa,hasClearIcon:So,hasPopupIcon:ya,inputFocused:pr===-1,popupOpen:St,size:Oe},qt=qM(zt),Or={slots:{paper:ie,popper:Ie,...He},slotProps:{chip:l,listbox:ae,...b,...je}},[Bl,Ea]=st("listbox",{elementType:tO,externalForwardedProps:Or,ownerState:zt,className:qt.listbox,additionalProps:Fl,ref:Ll}),[_i,ge]=st("paper",{elementType:To,externalForwardedProps:Or,ownerState:zt,className:qt.paper}),[me,Me]=st("popper",{elementType:Md,externalForwardedProps:Or,ownerState:zt,className:qt.popper,additionalProps:{disablePortal:C,style:{width:wn?wn.clientWidth:null},role:"presentation",anchorEl:wn,open:St}});let ze;const qe=lt=>({className:qt.tag,disabled:v,...Be(lt)});if(X?Mt.length>0&&(Ye?ze=Ye(Mt,qe,zt):ue?ze=ue(Mt,qe,zt):ze=Mt.map((lt,Nr)=>{const{key:Lr,...Ca}=qe({index:Nr});return c.jsx(J1,{label:xa(lt),size:Oe,...Ca,...Or.slotProps.chip},Lr)})):ue&&Mt!=null&&(ze=ue(Mt,qe,zt)),te>-1&&Array.isArray(ze)){const lt=ze.length-te;!Jt&&lt>0&&(ze=ze.splice(0,te),ze.push(c.jsx("span",{className:qt.tag,children:T(lt)},ze.length)))}const _t=we||(lt=>c.jsxs("li",{children:[c.jsx(nO,{className:qt.groupLabel,ownerState:zt,component:"div",children:lt.group}),c.jsx(rO,{className:qt.groupUl,ownerState:zt,children:lt.children})]},lt.key)),Bi=rt||((lt,Nr)=>{const{key:Lr,...Ca}=lt;return c.jsx("li",{...Ca,children:xa(Nr)},Lr)}),Kd=(lt,Nr)=>{const Lr=vt({option:lt,index:Nr});return Bi({...Lr,className:qt.option},lt,{selected:Lr["aria-selected"],index:Nr,inputValue:Hn},zt)},Gd=Or.slotProps.clearIndicator,Qd=Or.slotProps.popupIndicator;return c.jsxs(I.Fragment,{children:[c.jsx(YM,{ref:n,className:Ae(qt.root,u),ownerState:zt,...Et(ot),children:At({id:Dn,disabled:v,fullWidth:!0,size:Oe==="small"?"small":void 0,InputLabelProps:se(),InputProps:{ref:Kr,className:qt.inputRoot,startAdornment:ze,onMouseDown:lt=>{lt.target===lt.currentTarget&&Nl(lt)},...(So||ya)&&{endAdornment:c.jsxs(KM,{className:qt.endAdornment,ownerState:zt,children:[So?c.jsx(GM,{...Re(),"aria-label":p,title:p,ownerState:zt,...Gd,className:Ae(qt.clearIndicator,Gd?.className),children:d}):null,ya?c.jsx(QM,{...xe(),disabled:v,"aria-label":St?m:de,title:St?m:de,ownerState:zt,...Qd,className:Ae(qt.popupIndicator,Qd?.className),children:ve}):null]})}},inputProps:{className:qt.input,disabled:v,readOnly:Ve,...mt()}})}),wn?c.jsx(XM,{as:me,...Me,children:c.jsxs(ZM,{as:_i,...ge,children:[Q&&hr.length===0?c.jsx(JM,{className:qt.loading,ownerState:zt,children:q}):null,hr.length===0&&!R&&!Q?c.jsx(eO,{className:qt.noOptions,ownerState:zt,role:"presentation",onMouseDown:lt=>{lt.preventDefault()},children:G}):null,hr.length>0?c.jsx(Bl,{as:N,...Ea,children:hr.map((lt,Nr)=>V?_t({key:lt.key,group:lt.group,children:lt.options.map((Lr,Ca)=>Kd(Lr,lt.index+Ca))}):Kd(lt,Nr))}):null]})}):null]})});var hs={exports:{}},oO=hs.exports,Gh;function aO(){return Gh||(Gh=1,(function(e,t){(function(n,r){e.exports=r()})(oO,(function(){var n=1e3,r=6e4,o=36e5,a="millisecond",i="second",s="minute",l="hour",u="day",d="week",f="month",h="quarter",p="year",m="date",b="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,E={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(A){var w=["th","st","nd","rd"],M=A%100;return"["+A+(w[(M-20)%10]||w[M]||w[0])+"]"}},v=function(A,w,M){var V=String(A);return!V||V.length>=w?A:""+Array(w+1-V.length).join(M)+A},S={s:v,z:function(A){var w=-A.utcOffset(),M=Math.abs(w),V=Math.floor(M/60),z=M%60;return(w<=0?"+":"-")+v(V,2,"0")+":"+v(z,2,"0")},m:function A(w,M){if(w.date()<M.date())return-A(M,w);var V=12*(M.year()-w.year())+(M.month()-w.month()),z=w.clone().add(V,f),U=M-z<0,D=w.clone().add(V+(U?-1:1),f);return+(-(V+(M-z)/(U?z-D:D-z))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:f,y:p,w:d,d:u,D:m,h:l,m:s,s:i,ms:a,Q:h}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},k="en",C={};C[k]=E;var L="$isDayjsObject",F=function(A){return A instanceof T||!(!A||!A[L])},B=function A(w,M,V){var z;if(!w)return k;if(typeof w=="string"){var U=w.toLowerCase();C[U]&&(z=U),M&&(C[U]=M,z=U);var D=w.split("-");if(!z&&D.length>1)return A(D[0])}else{var Y=w.name;C[Y]=w,z=Y}return!V&&z&&(k=z),z||!V&&k},R=function(A,w){if(F(A))return A.clone();var M=typeof w=="object"?w:{};return M.date=A,M.args=arguments,new T(M)},_=S;_.l=B,_.i=F,_.w=function(A,w){return R(A,{locale:w.$L,utc:w.$u,x:w.$x,$offset:w.$offset})};var T=(function(){function A(M){this.$L=B(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[L]=!0}var w=A.prototype;return w.parse=function(M){this.$d=(function(V){var z=V.date,U=V.utc;if(z===null)return new Date(NaN);if(_.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var D=z.match(y);if(D){var Y=D[2]-1||0,te=(D[7]||"0").substring(0,3);return U?new Date(Date.UTC(D[1],Y,D[3]||1,D[4]||0,D[5]||0,D[6]||0,te)):new Date(D[1],Y,D[3]||1,D[4]||0,D[5]||0,D[6]||0,te)}}return new Date(z)})(M),this.init()},w.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},w.$utils=function(){return _},w.isValid=function(){return this.$d.toString()!==b},w.isSame=function(M,V){var z=R(M);return this.startOf(V)<=z&&z<=this.endOf(V)},w.isAfter=function(M,V){return R(M)<this.startOf(V)},w.isBefore=function(M,V){return this.endOf(V)<R(M)},w.$g=function(M,V,z){return _.u(M)?this[V]:this.set(z,M)},w.unix=function(){return Math.floor(this.valueOf()/1e3)},w.valueOf=function(){return this.$d.getTime()},w.startOf=function(M,V){var z=this,U=!!_.u(V)||V,D=_.p(M),Y=function(ee,oe){var ne=_.w(z.$u?Date.UTC(z.$y,oe,ee):new Date(z.$y,oe,ee),z);return U?ne:ne.endOf(u)},te=function(ee,oe){return _.w(z.toDate()[ee].apply(z.toDate("s"),(U?[0,0,0,0]:[23,59,59,999]).slice(oe)),z)},N=this.$W,ae=this.$M,Q=this.$D,q="set"+(this.$u?"UTC":"");switch(D){case p:return U?Y(1,0):Y(31,11);case f:return U?Y(1,ae):Y(0,ae+1);case d:var X=this.$locale().weekStart||0,G=(N<X?N+7:N)-X;return Y(U?Q-G:Q+(6-G),ae);case u:case m:return te(q+"Hours",0);case l:return te(q+"Minutes",1);case s:return te(q+"Seconds",2);case i:return te(q+"Milliseconds",3);default:return this.clone()}},w.endOf=function(M){return this.startOf(M,!1)},w.$set=function(M,V){var z,U=_.p(M),D="set"+(this.$u?"UTC":""),Y=(z={},z[u]=D+"Date",z[m]=D+"Date",z[f]=D+"Month",z[p]=D+"FullYear",z[l]=D+"Hours",z[s]=D+"Minutes",z[i]=D+"Seconds",z[a]=D+"Milliseconds",z)[U],te=U===u?this.$D+(V-this.$W):V;if(U===f||U===p){var N=this.clone().set(m,1);N.$d[Y](te),N.init(),this.$d=N.set(m,Math.min(this.$D,N.daysInMonth())).$d}else Y&&this.$d[Y](te);return this.init(),this},w.set=function(M,V){return this.clone().$set(M,V)},w.get=function(M){return this[_.p(M)]()},w.add=function(M,V){var z,U=this;M=Number(M);var D=_.p(V),Y=function(ae){var Q=R(U);return _.w(Q.date(Q.date()+Math.round(ae*M)),U)};if(D===f)return this.set(f,this.$M+M);if(D===p)return this.set(p,this.$y+M);if(D===u)return Y(1);if(D===d)return Y(7);var te=(z={},z[s]=r,z[l]=o,z[i]=n,z)[D]||1,N=this.$d.getTime()+M*te;return _.w(N,this)},w.subtract=function(M,V){return this.add(-1*M,V)},w.format=function(M){var V=this,z=this.$locale();if(!this.isValid())return z.invalidDate||b;var U=M||"YYYY-MM-DDTHH:mm:ssZ",D=_.z(this),Y=this.$H,te=this.$m,N=this.$M,ae=z.weekdays,Q=z.months,q=z.meridiem,X=function(oe,ne,pe,Z){return oe&&(oe[ne]||oe(V,U))||pe[ne].slice(0,Z)},G=function(oe){return _.s(Y%12||12,oe,"0")},ee=q||function(oe,ne,pe){var Z=oe<12?"AM":"PM";return pe?Z.toLowerCase():Z};return U.replace(x,(function(oe,ne){return ne||(function(pe){switch(pe){case"YY":return String(V.$y).slice(-2);case"YYYY":return _.s(V.$y,4,"0");case"M":return N+1;case"MM":return _.s(N+1,2,"0");case"MMM":return X(z.monthsShort,N,Q,3);case"MMMM":return X(Q,N);case"D":return V.$D;case"DD":return _.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return X(z.weekdaysMin,V.$W,ae,2);case"ddd":return X(z.weekdaysShort,V.$W,ae,3);case"dddd":return ae[V.$W];case"H":return String(Y);case"HH":return _.s(Y,2,"0");case"h":return G(1);case"hh":return G(2);case"a":return ee(Y,te,!0);case"A":return ee(Y,te,!1);case"m":return String(te);case"mm":return _.s(te,2,"0");case"s":return String(V.$s);case"ss":return _.s(V.$s,2,"0");case"SSS":return _.s(V.$ms,3,"0");case"Z":return D}return null})(oe)||D.replace(":","")}))},w.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},w.diff=function(M,V,z){var U,D=this,Y=_.p(V),te=R(M),N=(te.utcOffset()-this.utcOffset())*r,ae=this-te,Q=function(){return _.m(D,te)};switch(Y){case p:U=Q()/12;break;case f:U=Q();break;case h:U=Q()/3;break;case d:U=(ae-N)/6048e5;break;case u:U=(ae-N)/864e5;break;case l:U=ae/o;break;case s:U=ae/r;break;case i:U=ae/n;break;default:U=ae}return z?U:_.a(U)},w.daysInMonth=function(){return this.endOf(f).$D},w.$locale=function(){return C[this.$L]},w.locale=function(M,V){if(!M)return this.$L;var z=this.clone(),U=B(M,V,!0);return U&&(z.$L=U),z},w.clone=function(){return _.w(this.$d,this)},w.toDate=function(){return new Date(this.valueOf())},w.toJSON=function(){return this.isValid()?this.toISOString():null},w.toISOString=function(){return this.$d.toISOString()},w.toString=function(){return this.$d.toUTCString()},A})(),O=T.prototype;return R.prototype=O,[["$ms",a],["$s",i],["$m",s],["$H",l],["$W",u],["$M",f],["$y",p],["$D",m]].forEach((function(A){O[A[1]]=function(w){return this.$g(w,A[0],A[1])}})),R.extend=function(A,w){return A.$i||(A(w,T,R),A.$i=!0),R},R.locale=B,R.isDayjs=F,R.unix=function(A){return R(1e3*A)},R.en=C[k],R.Ls=C,R.p={},R}))})(hs)),hs.exports}var iO=aO();const ht=Wn(iO);var ms={exports:{}},sO=ms.exports,Qh;function lO(){return Qh||(Qh=1,(function(e,t){(function(n,r){e.exports=r()})(sO,(function(){var n="week",r="year";return function(o,a,i){var s=a.prototype;s.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var d=i(this).startOf(r).add(1,r).date(u),f=i(this).endOf(n);if(d.isBefore(f))return 1}var h=i(this).startOf(r).date(u).startOf(n).subtract(1,"millisecond"),p=this.diff(h,n,!0);return p<0?i(this).startOf("week").week():Math.ceil(p)},s.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}}))})(ms)),ms.exports}var uO=lO();const cO=Wn(uO);var gs={exports:{}},dO=gs.exports,Xh;function fO(){return Xh||(Xh=1,(function(e,t){(function(n,r){e.exports=r()})(dO,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,a=/\d\d/,i=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},u=function(y){return(y=+y)+(y>68?1900:2e3)},d=function(y){return function(x){this[y]=+x}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=(function(x){if(!x||x==="Z")return 0;var E=x.match(/([+-]|\d\d)/g),v=60*E[1]+(+E[2]||0);return v===0?0:E[0]==="+"?-v:v})(y)}],h=function(y){var x=l[y];return x&&(x.indexOf?x:x.s.concat(x.f))},p=function(y,x){var E,v=l.meridiem;if(v){for(var S=1;S<=24;S+=1)if(y.indexOf(v(S,0,x))>-1){E=S>12;break}}else E=y===(x?"pm":"PM");return E},m={A:[s,function(y){this.afternoon=p(y,!1)}],a:[s,function(y){this.afternoon=p(y,!0)}],Q:[o,function(y){this.month=3*(y-1)+1}],S:[o,function(y){this.milliseconds=100*+y}],SS:[a,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[i,d("seconds")],ss:[i,d("seconds")],m:[i,d("minutes")],mm:[i,d("minutes")],H:[i,d("hours")],h:[i,d("hours")],HH:[i,d("hours")],hh:[i,d("hours")],D:[i,d("day")],DD:[a,d("day")],Do:[s,function(y){var x=l.ordinal,E=y.match(/\d+/);if(this.day=E[0],x)for(var v=1;v<=31;v+=1)x(v).replace(/\[|\]/g,"")===y&&(this.day=v)}],w:[i,d("week")],ww:[a,d("week")],M:[i,d("month")],MM:[a,d("month")],MMM:[s,function(y){var x=h("months"),E=(h("monthsShort")||x.map((function(v){return v.slice(0,3)}))).indexOf(y)+1;if(E<1)throw new Error;this.month=E%12||E}],MMMM:[s,function(y){var x=h("months").indexOf(y)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,d("year")],YY:[a,function(y){this.year=u(y)}],YYYY:[/\d{4}/,d("year")],Z:f,ZZ:f};function b(y){var x,E;x=y,E=l&&l.formats;for(var v=(y=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(R,_,T){var O=T&&T.toUpperCase();return _||E[T]||n[T]||E[O].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(A,w,M){return w||M.slice(1)}))}))).match(r),S=v.length,k=0;k<S;k+=1){var C=v[k],L=m[C],F=L&&L[0],B=L&&L[1];v[k]=B?{regex:F,parser:B}:C.replace(/^\[|\]$/g,"")}return function(R){for(var _={},T=0,O=0;T<S;T+=1){var A=v[T];if(typeof A=="string")O+=A.length;else{var w=A.regex,M=A.parser,V=R.slice(O),z=w.exec(V)[0];M.call(_,z),R=R.replace(z,"")}}return(function(U){var D=U.afternoon;if(D!==void 0){var Y=U.hours;D?Y<12&&(U.hours+=12):Y===12&&(U.hours=0),delete U.afternoon}})(_),_}}return function(y,x,E){E.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(u=y.parseTwoDigitYear);var v=x.prototype,S=v.parse;v.parse=function(k){var C=k.date,L=k.utc,F=k.args;this.$u=L;var B=F[1];if(typeof B=="string"){var R=F[2]===!0,_=F[3]===!0,T=R||_,O=F[2];_&&(O=F[2]),l=this.$locale(),!R&&O&&(l=E.Ls[O]),this.$d=(function(V,z,U,D){try{if(["x","X"].indexOf(z)>-1)return new Date((z==="X"?1e3:1)*V);var Y=b(z)(V),te=Y.year,N=Y.month,ae=Y.day,Q=Y.hours,q=Y.minutes,X=Y.seconds,G=Y.milliseconds,ee=Y.zone,oe=Y.week,ne=new Date,pe=ae||(te||N?1:ne.getDate()),Z=te||ne.getFullYear(),J=0;te&&!N||(J=N>0?N-1:ne.getMonth());var ye,de=Q||0,be=q||0,ie=X||0,Ie=G||0;return ee?new Date(Date.UTC(Z,J,pe,de,be,ie,Ie+60*ee.offset*1e3)):U?new Date(Date.UTC(Z,J,pe,de,be,ie,Ie)):(ye=new Date(Z,J,pe,de,be,ie,Ie),oe&&(ye=D(ye).week(oe).toDate()),ye)}catch{return new Date("")}})(C,B,L,E),this.init(),O&&O!==!0&&(this.$L=this.locale(O).$L),T&&C!=this.format(B)&&(this.$d=new Date("")),l={}}else if(B instanceof Array)for(var A=B.length,w=1;w<=A;w+=1){F[1]=B[w-1];var M=E.apply(this,F);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}w===A&&(this.$d=new Date(""))}else S.call(this,k)}}}))})(gs)),gs.exports}var pO=fO();const hO=Wn(pO);var bs={exports:{}},mO=bs.exports,Zh;function gO(){return Zh||(Zh=1,(function(e,t){(function(n,r){e.exports=r()})(mO,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,a){var i=o.prototype,s=i.format;a.en.formats=n,i.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,d=(function(f,h){return f.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(p,m,b){var y=b&&b.toUpperCase();return m||h[b]||n[b]||h[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(x,E,v){return E||v.slice(1)}))}))})(l,u===void 0?{}:u);return s.call(this,d)}}}))})(bs)),bs.exports}var bO=gO();const yO=Wn(bO);var ys={exports:{}},xO=ys.exports,Jh;function EO(){return Jh||(Jh=1,(function(e,t){(function(n,r){e.exports=r()})(xO,(function(){return function(n,r,o){r.prototype.isBetween=function(a,i,s,l){var u=o(a),d=o(i),f=(l=l||"()")[0]==="(",h=l[1]===")";return(f?this.isAfter(u,s):!this.isBefore(u,s))&&(h?this.isBefore(d,s):!this.isAfter(d,s))||(f?this.isBefore(u,s):!this.isAfter(u,s))&&(h?this.isAfter(d,s):!this.isBefore(d,s))}}}))})(ys)),ys.exports}var CO=EO();const TO=Wn(CO);var xs={exports:{}},vO=xs.exports,em;function SO(){return em||(em=1,(function(e,t){(function(n,r){e.exports=r()})(vO,(function(){return function(n,r){var o=r.prototype,a=o.format;o.format=function(i){var s=this,l=this.$locale();if(!this.isValid())return a.bind(this)(i);var u=this.$utils(),d=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(f){switch(f){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return l.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return l.ordinal(s.week(),"W");case"w":case"ww":return u.s(s.week(),f==="w"?1:2,"0");case"W":case"WW":return u.s(s.isoWeek(),f==="W"?1:2,"0");case"k":case"kk":return u.s(String(s.$H===0?24:s.$H),f==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1e3);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return f}}));return a.bind(this)(d)}}}))})(xs)),xs.exports}var kO=SO();const DO=Wn(kO);ht.extend(yO);ht.extend(cO);ht.extend(TO);ht.extend(DO);const wO={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},AO={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",dayOfMonthFull:"Do",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},wu=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join(`
195
- `),tm=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join(`
196
- `),IO=(e,t)=>t?(...n)=>e(...n).locale(t):e;class Tc{constructor({locale:t,formats:n}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=wO,this.setLocaleToValue=r=>{const o=this.getCurrentLocaleCode();return o===r.locale()?r:r.locale(o)},this.hasUTCPlugin=()=>typeof ht.utc<"u",this.hasTimezonePlugin=()=>typeof ht.tz<"u",this.isSame=(r,o,a)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.format(a)===i.format(a)},this.cleanTimezone=r=>{switch(r){case"default":return;case"system":return ht.tz.guess();default:return r}},this.createSystemDate=r=>{if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const o=ht.tz.guess();return o!=="UTC"?ht.tz(r,o):ht(r)}return ht(r)},this.createUTCDate=r=>{if(!this.hasUTCPlugin())throw new Error(wu);return ht.utc(r)},this.createTZDate=(r,o)=>{if(!this.hasUTCPlugin())throw new Error(wu);if(!this.hasTimezonePlugin())throw new Error(tm);const a=r!==void 0&&!r.endsWith("Z");return ht(r).tz(this.cleanTimezone(o),a)},this.getLocaleFormats=()=>{const r=ht.Ls,o=this.locale||"en";let a=r[o];return a===void 0&&(a=r.en),a.formats},this.adjustOffset=r=>{if(!this.hasTimezonePlugin())return r;const o=this.getTimezone(r);if(o!=="UTC"){const a=r.tz(this.cleanTimezone(o),!0);if(a.$offset===(r.$offset??0))return r;r.$offset=a.$offset}return r},this.date=(r,o="default")=>{if(r===null)return null;let a;return o==="UTC"?a=this.createUTCDate(r):o==="system"||o==="default"&&!this.hasTimezonePlugin()?a=this.createSystemDate(r):a=this.createTZDate(r,o),this.locale===void 0?a:a.locale(this.locale)},this.getInvalidDate=()=>ht(new Date("Invalid date")),this.getTimezone=r=>{if(this.hasTimezonePlugin()){const o=r.$x?.$timezone;if(o)return o}return this.hasUTCPlugin()&&r.isUTC()?"UTC":"system"},this.setTimezone=(r,o)=>{if(this.getTimezone(r)===o)return r;if(o==="UTC"){if(!this.hasUTCPlugin())throw new Error(wu);return r.utc()}if(o==="system")return r.local();if(!this.hasTimezonePlugin()){if(o==="default")return r;throw new Error(tm)}return ht.tz(r,this.cleanTimezone(o))},this.toJsDate=r=>r.toDate(),this.parse=(r,o)=>r===""?null:this.dayjs(r,o,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=r=>{const o=this.getLocaleFormats(),a=i=>i.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(s,l,u)=>l||u.slice(1));return r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(i,s,l)=>{const u=l&&l.toUpperCase();return s||o[l]||a(o[u])})},this.isValid=r=>r==null?!1:r.isValid(),this.format=(r,o)=>this.formatByString(r,this.formats[o]),this.formatByString=(r,o)=>this.dayjs(r).format(o),this.formatNumber=r=>r,this.isEqual=(r,o)=>r===null&&o===null?!0:r===null||o===null?!1:r.toDate().getTime()===o.toDate().getTime(),this.isSameYear=(r,o)=>this.isSame(r,o,"YYYY"),this.isSameMonth=(r,o)=>this.isSame(r,o,"YYYY-MM"),this.isSameDay=(r,o)=>this.isSame(r,o,"YYYY-MM-DD"),this.isSameHour=(r,o)=>r.isSame(o,"hour"),this.isAfter=(r,o)=>r>o,this.isAfterYear=(r,o)=>this.hasUTCPlugin()?!this.isSameYear(r,o)&&r.utc()>o.utc():r.isAfter(o,"year"),this.isAfterDay=(r,o)=>this.hasUTCPlugin()?!this.isSameDay(r,o)&&r.utc()>o.utc():r.isAfter(o,"day"),this.isBefore=(r,o)=>r<o,this.isBeforeYear=(r,o)=>this.hasUTCPlugin()?!this.isSameYear(r,o)&&r.utc()<o.utc():r.isBefore(o,"year"),this.isBeforeDay=(r,o)=>this.hasUTCPlugin()?!this.isSameDay(r,o)&&r.utc()<o.utc():r.isBefore(o,"day"),this.isWithinRange=(r,[o,a])=>r>=o&&r<=a,this.startOfYear=r=>this.adjustOffset(r.startOf("year")),this.startOfMonth=r=>this.adjustOffset(r.startOf("month")),this.startOfWeek=r=>this.adjustOffset(this.setLocaleToValue(r).startOf("week")),this.startOfDay=r=>this.adjustOffset(r.startOf("day")),this.endOfYear=r=>this.adjustOffset(r.endOf("year")),this.endOfMonth=r=>this.adjustOffset(r.endOf("month")),this.endOfWeek=r=>this.adjustOffset(this.setLocaleToValue(r).endOf("week")),this.endOfDay=r=>this.adjustOffset(r.endOf("day")),this.addYears=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"year"):r.add(o,"year")),this.addMonths=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"month"):r.add(o,"month")),this.addWeeks=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"week"):r.add(o,"week")),this.addDays=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"day"):r.add(o,"day")),this.addHours=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"hour"):r.add(o,"hour")),this.addMinutes=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"minute"):r.add(o,"minute")),this.addSeconds=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"second"):r.add(o,"second")),this.getYear=r=>r.year(),this.getMonth=r=>r.month(),this.getDate=r=>r.date(),this.getHours=r=>r.hour(),this.getMinutes=r=>r.minute(),this.getSeconds=r=>r.second(),this.getMilliseconds=r=>r.millisecond(),this.setYear=(r,o)=>this.adjustOffset(r.set("year",o)),this.setMonth=(r,o)=>this.adjustOffset(r.set("month",o)),this.setDate=(r,o)=>this.adjustOffset(r.set("date",o)),this.setHours=(r,o)=>this.adjustOffset(r.set("hour",o)),this.setMinutes=(r,o)=>this.adjustOffset(r.set("minute",o)),this.setSeconds=(r,o)=>this.adjustOffset(r.set("second",o)),this.setMilliseconds=(r,o)=>this.adjustOffset(r.set("millisecond",o)),this.getDaysInMonth=r=>r.daysInMonth(),this.getWeekArray=r=>{const o=this.startOfWeek(this.startOfMonth(r)),a=this.endOfWeek(this.endOfMonth(r));let i=0,s=o;const l=[];for(;s<a;){const u=Math.floor(i/7);l[u]=l[u]||[],l[u].push(s),s=this.addDays(s,1),i+=1}return l},this.getWeekNumber=r=>r.week(),this.getYearRange=([r,o])=>{const a=this.startOfYear(r),i=this.endOfYear(o),s=[];let l=a;for(;this.isBefore(l,i);)s.push(l),l=this.addYears(l,1);return s},this.dayjs=IO(ht,t),this.locale=t,this.formats=K({},AO,n),ht.extend(hO)}getDayOfWeek(t){return t.day()+1}}function PO(e,t,n,r,o){const[a,i]=I.useState(()=>o&&n?n(e).matches:r?r(e).matches:t);return Wt(()=>{if(!n)return;const s=n(e),l=()=>{i(s.matches)};return l(),s.addEventListener("change",l),()=>{s.removeEventListener("change",l)}},[e,n]),a}const RO={...I},eb=RO.useSyncExternalStore;function MO(e,t,n,r,o){const a=I.useCallback(()=>t,[t]),i=I.useMemo(()=>{if(o&&n)return()=>n(e).matches;if(r!==null){const{matches:d}=r(e);return()=>d}return a},[a,e,r,o,n]),[s,l]=I.useMemo(()=>{if(n===null)return[a,()=>()=>{}];const d=n(e);return[()=>d.matches,f=>(d.addEventListener("change",f),()=>{d.removeEventListener("change",f)})]},[a,n,e]);return eb(l,s,i)}function tb(e={}){const{themeId:t}=e;return function(r,o={}){let a=Om();a&&t&&(a=a[t]||a);const i=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:s=!1,matchMedia:l=i?window.matchMedia:null,ssrMatchMedia:u=null,noSsr:d=!1}=y1({name:"MuiUseMediaQuery",props:o,theme:a});let f=typeof r=="function"?r(a):r;return f=f.replace(/^@media( ?)/m,""),f.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
197
- `)),(eb!==void 0?MO:PO)(f,s,l,u,d)}}tb();const nb=tb({themeId:aa}),OO={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},La=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),NO=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let a;if(e!=null)a=e;else if(o.includes(t))a=t;else if(o.length>0)a=o[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:a}},Ks=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},si=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:a,utils:i,timezone:s})=>{const l=Ks(i,i.date(void 0,s),e);n&&i.isBefore(o,l)&&(o=l),t&&i.isAfter(r,l)&&(r=l);let u=e,d=e;for(i.isBefore(e,o)&&(u=o,d=null),i.isAfter(e,r)&&(d&&(d=r),u=null);u||d;){if(u&&i.isAfter(u,r)&&(u=null),d&&i.isBefore(d,o)&&(d=null),u){if(!a(u))return u;u=i.addDays(u,1)}if(d){if(!a(d))return d;d=i.addDays(d,-1)}}return null},LO=(e,t)=>t==null||!e.isValid(t)?null:t,Bn=(e,t,n)=>t==null||!e.isValid(t)?n:t,FO=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),Od=(e,t)=>{const r=[e.startOfYear(t)];for(;r.length<12;){const o=r[r.length-1];r.push(e.addMonths(o,1))}return r},rb=(e,t,n)=>n==="date"?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),_O=["year","month","day"],nm=e=>_O.includes(e),Nd=(e,{format:t,views:n},r)=>{if(t!=null)return t;const o=e.formats;return La(n,["year"])?o.year:La(n,["month"])?o.month:La(n,["day"])?o.dayOfMonth:La(n,["month","year"])?`${o.month} ${o.year}`:La(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},BO=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(r=>e.addDays(n,r))},jO=["hours","minutes","seconds"],$O=e=>jO.includes(e),rm=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),HO=(e,t)=>(n,r)=>e?t.isAfter(n,r):rm(n,t)>rm(r,t),or={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},UO=e=>Math.max(...e.map(t=>or[t.type]??1)),Fa=(e,t,n)=>{if(t===or.year)return e.startOfYear(n);if(t===or.month)return e.startOfMonth(n);if(t===or.day)return e.startOfDay(n);let r=n;return t<or.minutes&&(r=e.setMinutes(r,0)),t<or.seconds&&(r=e.setSeconds(r,0)),t<or.milliseconds&&(r=e.setMilliseconds(r,0)),r},zO=({props:e,utils:t,granularity:n,timezone:r,getTodayDate:o})=>{let a=o?o():Fa(t,n,rb(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,a)&&(a=Fa(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,a)&&(a=Fa(t,n,e.maxDate));const i=HO(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&i(e.minTime,a)&&(a=Fa(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:Ks(t,a,e.minTime))),e.maxTime!=null&&i(a,e.maxTime)&&(a=Fa(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:Ks(t,a,e.maxTime))),a},ob=(e,t)=>{const n=e.formatTokenMap[t];if(n==null)throw new Error([`MUI X: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(`
198
- `));return typeof n=="string"?{type:n,contentType:n==="meridiem"?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},VO=e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},Il=(e,t)=>{const n=[],r=e.date(void 0,"default"),o=e.startOfWeek(r),a=e.endOfWeek(r);let i=o;for(;e.isBefore(i,a);)n.push(i),i=e.addDays(i,1);return n.map(s=>e.formatByString(s,t))},ab=(e,t,n,r)=>{switch(n){case"month":return Od(e,e.date(void 0,t)).map(o=>e.formatByString(o,r));case"weekDay":return Il(e,r);case"meridiem":{const o=e.date(void 0,t);return[e.startOfDay(o),e.endOfDay(o)].map(a=>e.formatByString(a,r))}default:return[]}},om="s",WO=["0","1","2","3","4","5","6","7","8","9"],qO=e=>{const t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),om)==="0"?WO:Array.from({length:10}).map((r,o)=>e.formatByString(e.setSeconds(t,o),om))},bo=(e,t)=>{if(t[0]==="0")return e;const n=[];let r="";for(let o=0;o<e.length;o+=1){r+=e[o];const a=t.indexOf(r);a>-1&&(n.push(a.toString()),r="")}return n.join("")},Ld=(e,t)=>t[0]==="0"?e:e.split("").map(n=>t[Number(n)]).join(""),am=(e,t)=>{const n=bo(e,t);return n!==" "&&!Number.isNaN(Number(n))},ib=(e,t)=>{let n=e;for(n=Number(n).toString();n.length<t;)n=`0${n}`;return n},sb=(e,t,n,r,o)=>{if(o.type==="day"&&o.contentType==="digit-with-letter"){const i=e.setDate(n.longestMonth,t);return e.formatByString(i,o.format)}let a=t.toString();return o.hasLeadingZerosInInput&&(a=ib(a,o.maxLength)),Ld(a,r)},YO=(e,t,n,r,o,a,i,s)=>{const l=VO(r),u=r==="Home",d=r==="End",f=n.value===""||u||d,h=()=>{const m=o[n.type]({currentDate:i,format:n.format,contentType:n.contentType}),b=E=>sb(e,E,m,a,n),y=n.type==="minutes"&&s?.minutesStep?s.minutesStep:1;let x;if(f){if(n.type==="year"&&!d&&!u)return e.formatByString(e.date(void 0,t),n.format);l>0||u?x=m.minimum:x=m.maximum}else x=parseInt(bo(n.value,a),10)+l*y;return x%y!==0&&((l<0||u)&&(x+=y-(y+x)%y),(l>0||d)&&(x-=x%y)),x>m.maximum?b(m.minimum+(x-m.maximum-1)%(m.maximum-m.minimum+1)):x<m.minimum?b(m.maximum-(m.minimum-x-1)%(m.maximum-m.minimum+1)):b(x)},p=()=>{const m=ab(e,t,n.type,n.format);if(m.length===0)return n.value;if(f)return l>0||u?m[0]:m[m.length-1];const x=((m.indexOf(n.value)+l)%m.length+m.length)%m.length;return m[x]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?h():p()},Fd=(e,t,n)=>{let r=e.value||e.placeholder;const o=t==="non-input"?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return t==="non-input"&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(bo(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&e.contentType==="digit"&&!o&&r.length===1&&(r=`${r}‎`),t==="input-rtl"&&(r=`⁨${r}⁩`),r},im=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),KO=(e,t)=>e.formatByString(e.date(void 0,"system"),t).length===4,lb=(e,t,n,r)=>{if(t!=="digit")return!1;const o=e.date(void 0,"default");switch(n){case"year":return e.lib==="dayjs"&&r==="YY"?!0:e.formatByString(e.setYear(o,1),r).startsWith("0");case"month":return e.formatByString(e.startOfYear(o),r).length>1;case"day":return e.formatByString(e.startOfMonth(o),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(o),r).length>1;case"hours":return e.formatByString(e.setHours(o,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(o,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(o,1),r).length>1;default:throw new Error("Invalid section type")}},GO=(e,t,n)=>{const r=t.some(l=>l.type==="day"),o=[],a=[];for(let l=0;l<t.length;l+=1){const u=t[l];r&&u.type==="weekDay"||(o.push(u.format),a.push(Fd(u,"non-input",n)))}const i=o.join(" "),s=a.join(" ");return e.parse(s,i)},QO=e=>e.map(t=>`${t.startSeparator}${t.value||t.placeholder}${t.endSeparator}`).join(""),XO=(e,t,n)=>{const o=e.map(a=>{const i=Fd(a,n?"input-rtl":"input-ltr",t);return`${a.startSeparator}${i}${a.endSeparator}`}).join("");return n?`⁦${o}⁩`:o},ZO=(e,t,n)=>{const r=e.date(void 0,n),o=e.endOfYear(r),a=e.endOfDay(r),{maxDaysInMonth:i,longestMonth:s}=Od(e,r).reduce((l,u)=>{const d=e.getDaysInMonth(u);return d>l.maxDaysInMonth?{maxDaysInMonth:d,longestMonth:u}:l},{maxDaysInMonth:0,longestMonth:null});return{year:({format:l})=>({minimum:0,maximum:KO(e,l)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(o)+1}),day:({currentDate:l})=>({minimum:1,maximum:l!=null&&e.isValid(l)?e.getDaysInMonth(l):i,longestMonth:s}),weekDay:({format:l,contentType:u})=>{if(u==="digit"){const d=Il(e,l).map(Number);return{minimum:Math.min(...d),maximum:Math.max(...d)}}return{minimum:1,maximum:7}},hours:({format:l})=>{const u=e.getHours(a);return bo(e.formatByString(e.endOfDay(r),l),t)!==u.toString()?{minimum:1,maximum:Number(bo(e.formatByString(e.startOfDay(r),l),t))}:{minimum:0,maximum:u}},minutes:()=>({minimum:0,maximum:e.getMinutes(a)}),seconds:()=>({minimum:0,maximum:e.getSeconds(a)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},JO=(e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{const o=Il(e,t.format),a=e.formatByString(n,t.format),i=o.indexOf(a),l=o.indexOf(t.value)-i;return e.addDays(n,l)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{const o=e.getHours(n)<12,a=e.getHours(r);return o&&a>=12?e.addHours(r,-12):!o&&a<12?e.addHours(r,12):r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}},sm={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},lm=(e,t,n,r,o)=>[...n].sort((a,i)=>sm[a.type]-sm[i.type]).reduce((a,i)=>!o||i.modified?JO(e,i,t,a):a,r),eN=()=>navigator.userAgent.toLowerCase().includes("android"),tN=(e,t)=>{const n={};if(!t)return e.forEach((l,u)=>{const d=u===0?null:u-1,f=u===e.length-1?null:u+1;n[u]={leftIndex:d,rightIndex:f}}),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let a=0,i=0,s=e.length-1;for(;s>=0;){i=e.findIndex((l,u)=>u>=a&&l.endSeparator?.includes(" ")&&l.endSeparator!==" / "),i===-1&&(i=e.length-1);for(let l=i;l>=a;l-=1)o[l]=s,r[s]=l,s-=1;a=i+1}return e.forEach((l,u)=>{const d=o[u],f=d===0?null:r[d-1],h=d===e.length-1?null:r[d+1];n[u]={leftIndex:f,rightIndex:h}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}},vc=(e,t)=>{if(e==null)return null;if(e==="all")return"all";if(typeof e=="string"){const n=t.findIndex(r=>r.type===e);return n===-1?null:n}return e},nN=(e,t)=>{if(e.value)switch(e.type){case"month":{if(e.contentType==="digit")return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");const n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return e.contentType==="digit"?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;case"weekDay":return;default:return}},rN=(e,t)=>{if(e.value)switch(e.type){case"weekDay":return e.contentType==="letter"?void 0:Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}case"day":return e.contentType==="digit-with-letter"?parseInt(e.value,10):Number(e.value);case"month":{if(e.contentType==="digit")return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType!=="letter"?Number(e.value):void 0}},oN=["value","referenceDate"],ur={emptyValue:null,getTodayValue:rb,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=Ue(e,oN);return t!=null&&r.utils.isValid(t)?t:n??zO(r)},cleanValue:LO,areValuesEqual:FO,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>t==null||!e.isValid(t)?null:e.getTimezone(t),setTimezone:(e,t,n)=>n==null?null:e.setTimezone(n,t)},aN={updateReferenceValue:(e,t,n)=>t==null||!e.isValid(t)?n:t,getSectionsFromValue:(e,t,n,r)=>!e.isValid(t)&&!!n?n:r(t),getV7HiddenInputValueFromSections:QO,getV6InputValueFromSections:XO,getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:n=>n,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:n==null||!e.isValid(n)?t.referenceValue:n})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},iN=["localeText"],Sc=I.createContext(null),Gs=function(t){const{localeText:n}=t,r=Ue(t,iN),{utils:o,localeText:a}=I.useContext(Sc)??{utils:void 0,localeText:void 0},i=Dt({props:r,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:l,dateFormats:u,dateLibInstance:d,adapterLocale:f,localeText:h}=i,p=I.useMemo(()=>K({},h,a,n),[h,a,n]),m=I.useMemo(()=>{if(!l)return o||null;const x=new l({locale:f,formats:u,instance:d});if(!x.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
199
- `));return x},[l,f,u,d,o]),b=I.useMemo(()=>m?{minDate:m.date("1900-01-01T00:00:00.000"),maxDate:m.date("2099-12-31T00:00:00.000")}:null,[m]),y=I.useMemo(()=>({utils:m,defaultDates:b,localeText:p}),[b,m,p]);return c.jsx(Sc.Provider,{value:y,children:s})},sN=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:K({},e)}}}}),ub=e=>{const{utils:t,formatKey:n,contextTranslation:r,propsTranslation:o}=e;return a=>{const i=a!==null&&t.isValid(a)?t.format(a,n):null;return(o??r)(a,t,i)}},cb={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n,r)=>`Select ${e}. ${!r&&(t===null||!n.isValid(t))?"No time selected":`Selected time is ${r??n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose date, selected date is ${n??t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose time, selected time is ${n??t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},lN=cb;sN(cb);const vo=()=>{const e=I.useContext(Sc);if(e===null)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(`
200
- `));if(e.utils===null)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(`
201
- `));const t=I.useMemo(()=>K({},lN,e.localeText),[e.localeText]);return I.useMemo(()=>K({},e,{localeText:t}),[e,t])},wt=()=>vo().utils,Li=()=>vo().defaultDates,Pl=e=>{const t=wt(),n=I.useRef(void 0);return n.current===void 0&&(n.current=t.date(void 0,e)),n.current};function uN(e){return _e("MuiPickersToolbar",e)}Le("MuiPickersToolbar",["root","content"]);const cN=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],dN=e=>{const{classes:t}=e;return Fe({root:["root"],content:["content"]},uN,t)},fN=le("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),pN=le("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),hN=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiPickersToolbar"}),{children:o,className:a,toolbarTitle:i,hidden:s,titleId:l}=r,u=Ue(r,cN),d=r,f=dN(d);return s?null:c.jsxs(fN,K({ref:n,className:Ae(f.root,a),ownerState:d},u,{children:[c.jsx(ut,{color:"text.secondary",variant:"overline",id:l,children:i}),c.jsx(pN,{className:f.content,ownerState:d,children:o})]}))}),Mr=()=>vo().localeText;function mN(e){return _e("MuiDatePickerToolbar",e)}Le("MuiDatePickerToolbar",["root","title"]);const gN=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],bN=e=>{const{classes:t}=e;return Fe({root:["root"],title:["title"]},mN,t)},yN=le(hN,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),xN=le(ut,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),EN=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiDatePickerToolbar"}),{value:o,isLandscape:a,toolbarFormat:i,toolbarPlaceholder:s="––",views:l,className:u}=r,d=Ue(r,gN),f=wt(),h=Mr(),p=bN(r),m=I.useMemo(()=>{if(!o)return s;const y=Nd(f,{format:i,views:l},!0);return f.formatByString(o,y)},[o,i,s,f,l]),b=r;return c.jsx(yN,K({ref:n,toolbarTitle:h.datePickerToolbarTitle,isLandscape:a,className:Ae(p.root,u)},d,{children:c.jsx(xN,{variant:"h4",align:a?"left":"center",ownerState:b,className:p.title,children:m})}))});function db(e,t){const n=wt(),r=Li(),o=Dt({props:e,name:t}),a=I.useMemo(()=>o.localeText?.toolbarTitle==null?o.localeText:K({},o.localeText,{datePickerToolbarTitle:o.localeText.toolbarTitle}),[o.localeText]);return K({},o,{localeText:a},NO({views:o.views,openTo:o.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:Bn(n,o.minDate,r.minDate),maxDate:Bn(n,o.maxDate,r.maxDate),slots:K({toolbar:EN},o.slots)})}const Fi=({props:e,value:t,timezone:n,adapter:r})=>{if(t===null)return null;const{shouldDisableDate:o,shouldDisableMonth:a,shouldDisableYear:i,disablePast:s,disableFuture:l}=e,u=r.utils.date(void 0,n),d=Bn(r.utils,e.minDate,r.defaultDates.minDate),f=Bn(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(o&&o(t)):return"shouldDisableDate";case!!(a&&a(t)):return"shouldDisableMonth";case!!(i&&i(t)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(t,u)):return"disableFuture";case!!(s&&r.utils.isBeforeDay(t,u)):return"disablePast";case!!(d&&r.utils.isBeforeDay(t,d)):return"minDate";case!!(f&&r.utils.isAfterDay(t,f)):return"maxDate";default:return null}};Fi.valueManager=ur;const fb=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],CN=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],TN=["minDateTime","maxDateTime"],vN=[...fb,...CN,...TN],pb=e=>vN.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});function hb(e){const{props:t,validator:n,value:r,timezone:o,onError:a}=e,i=vo(),s=I.useRef(n.valueManager.defaultErrorState),l=n({adapter:i,value:r,timezone:o,props:t}),u=n.valueManager.hasError(l);I.useEffect(()=>{a&&!n.valueManager.isSameError(l,s.current)&&a(l,r),s.current=l},[n,a,l,r]);const d=Pe(f=>n({adapter:i,value:f,timezone:o,props:t}));return{validationError:l,hasValidationError:u,getValidationErrorForNewValue:d}}function SN(e){return _e("MuiInputAdornment",e)}const um=Le("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var cm;const kN=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${De(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},DN=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:a,variant:i}=e,s={root:["root",n&&"disablePointerEvents",o&&`position${De(o)}`,i,r&&"hiddenLabel",a&&`size${De(a)}`]};return Fe(s,SN,t)},wN=le("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:kN})(et(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${um.positionStart}&:not(.${um.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),mb=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiInputAdornment"}),{children:o,className:a,component:i="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:u,variant:d,...f}=r,h=Xn()||{};let p=d;d&&h.variant,h&&!p&&(p=h.variant);const m={...r,hiddenLabel:h.hiddenLabel,size:h.size,disablePointerEvents:s,position:u,variant:p},b=DN(m);return c.jsx(vl.Provider,{value:null,children:c.jsx(wN,{as:i,ownerState:m,className:Ae(b.root,a),ref:n,...f,children:typeof o=="string"&&!l?c.jsx(ut,{color:"textSecondary",children:o}):c.jsxs(I.Fragment,{children:[u==="start"?cm||(cm=c.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,o]})})})});function AN(e){return _e("MuiPickersPopper",e)}Le("MuiPickersPopper",["root","paper"]);function IN(e,t){return Array.isArray(t)?t.every(n=>e.indexOf(n)!==-1):e.indexOf(t)!==-1}const PN=(e,t)=>n=>{(n.key==="Enter"||n.key===" ")&&(e(n),n.preventDefault(),n.stopPropagation())},un=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?un(t.shadowRoot):t:null},RN="@media (pointer: fine)",MN="@media (prefers-reduced-motion: reduce)",qo=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),dm=qo&&qo[1]?parseInt(qo[1],10):null,fm=qo&&qo[2]?parseInt(qo[2],10):null,ON=dm&&dm<10||fm&&fm<13||!1,gb=()=>nb(MN,{defaultMatches:!1})||ON,NN=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],LN=e=>{const{classes:t}=e;return Fe({root:["root"],paper:["paper"]},AN,t)},FN=le(Md,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.modal})),_N=le(To,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})({outline:0,transformOrigin:"top center",variants:[{props:({placement:e})=>["top","top-start","top-end"].includes(e),style:{transformOrigin:"bottom center"}}]});function BN(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function jN(e,t){const n=I.useRef(!1),r=I.useRef(!1),o=I.useRef(null),a=I.useRef(!1);I.useEffect(()=>{if(!e)return;function l(){a.current=!0}return document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0),()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),a.current=!1}},[e]);const i=Pe(l=>{if(!a.current)return;const u=r.current;r.current=!1;const d=Vt(o.current);if(!o.current||"clientX"in l&&BN(l,d))return;if(n.current){n.current=!1;return}let f;l.composedPath?f=l.composedPath().indexOf(o.current)>-1:f=!d.documentElement.contains(l.target)||o.current.contains(l.target),!f&&!u&&t(l)}),s=()=>{r.current=!0};return I.useEffect(()=>{if(e){const l=Vt(o.current),u=()=>{n.current=!0};return l.addEventListener("touchstart",i),l.addEventListener("touchmove",u),()=>{l.removeEventListener("touchstart",i),l.removeEventListener("touchmove",u)}}},[e,i]),I.useEffect(()=>{if(e){const l=Vt(o.current);return l.addEventListener("click",i),()=>{l.removeEventListener("click",i),r.current=!1}}},[e,i]),[o,s,s]}const $N=I.forwardRef((e,t)=>{const{PaperComponent:n,popperPlacement:r,ownerState:o,children:a,paperSlotProps:i,paperClasses:s,onPaperClick:l,onPaperTouchStart:u}=e,d=Ue(e,NN),f=K({},o,{placement:r}),h=dt({elementType:n,externalSlotProps:i,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:s,ownerState:f});return c.jsx(n,K({},d,h,{onClick:p=>{l(p),h.onClick?.(p)},onTouchStart:p=>{u(p),h.onTouchStart?.(p)},ownerState:f,children:a}))});function HN(e){const t=Dt({props:e,name:"MuiPickersPopper"}),{anchorEl:n,children:r,containerRef:o=null,shouldRestoreFocus:a,onBlur:i,onDismiss:s,open:l,role:u,placement:d,slots:f,slotProps:h,reduceAnimations:p}=t;I.useEffect(()=>{function w(M){l&&M.key==="Escape"&&s()}return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w)}},[s,l]);const m=I.useRef(null);I.useEffect(()=>{u==="tooltip"||a&&!a()||(l?m.current=un(document):m.current&&m.current instanceof HTMLElement&&setTimeout(()=>{m.current instanceof HTMLElement&&m.current.focus()}))},[l,u,a]);const[b,y,x]=jN(l,i??s),E=I.useRef(null),v=ct(E,o),S=ct(v,b),k=t,C=LN(k),L=gb(),F=p??L,B=w=>{w.key==="Escape"&&(w.stopPropagation(),s())},R=f?.desktopTransition??F?mo:hi,_=f?.desktopTrapFocus??S1,T=f?.desktopPaper??_N,O=f?.popper??FN,A=dt({elementType:O,externalSlotProps:h?.popper,additionalProps:{transition:!0,role:u,open:l,anchorEl:n,placement:d,onKeyDown:B},className:C.root,ownerState:t});return c.jsx(O,K({},A,{children:({TransitionProps:w,placement:M})=>c.jsx(_,K({open:l,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:u==="tooltip",isEnabled:()=>!0},h?.desktopTrapFocus,{children:c.jsx(R,K({},w,h?.desktopTransition,{children:c.jsx($N,{PaperComponent:T,ownerState:k,popperPlacement:M,ref:S,onPaperClick:y,onPaperTouchStart:x,paperClasses:C.paper,paperSlotProps:h?.desktopPaper,children:r})}))}))}))}const UN=({open:e,onOpen:t,onClose:n})=>{const r=I.useRef(typeof e=="boolean").current,[o,a]=I.useState(!1);I.useEffect(()=>{if(r){if(typeof e!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");a(e)}},[r,e]);const i=I.useCallback(s=>{r||a(s),s&&t&&t(),!s&&n&&n()},[r,t,n]);return{isOpen:o,setIsOpen:i}},_d=({timezone:e,value:t,defaultValue:n,referenceDate:r,onChange:o,valueManager:a})=>{const i=wt(),s=I.useRef(n),l=t??s.current??a.emptyValue,u=I.useMemo(()=>a.getTimezone(i,l),[i,a,l]),d=Pe(m=>u==null?m:a.setTimezone(i,u,m));let f;e?f=e:u?f=u:r?f=i.getTimezone(r):f="default";const h=I.useMemo(()=>a.setTimezone(i,f,l),[a,i,f,l]),p=Pe((m,...b)=>{const y=d(m);o?.(y,...b)});return{value:h,handleValueChange:p,timezone:f}},Bd=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:o,onChange:a,valueManager:i})=>{const[s,l]=Nn({name:e,state:"value",controlled:n,default:r??i.emptyValue}),u=Pe((d,...f)=>{l(d),a?.(d,...f)});return _d({timezone:t,value:s,defaultValue:void 0,referenceDate:o,onChange:u,valueManager:i})},zN=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o}=e,a=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromField"?!0:t.name==="setValueFromAction"?a&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastPublishedValue):t.name==="setValueFromView"&&t.selectionState!=="shallow"||t.name==="setValueFromShortcut"?a?!0:n(r.lastPublishedValue):!1},VN=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:a}=e,i=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromAction"?i&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastCommittedValue):t.name==="setValueFromView"&&t.selectionState==="finish"&&a?i?!0:n(r.lastCommittedValue):t.name==="setValueFromShortcut"?t.changeImportance==="accept"&&n(r.lastCommittedValue):!1},WN=e=>{const{action:t,closeOnSelect:n}=e;return t.name==="setValueFromAction"?!0:t.name==="setValueFromView"?t.selectionState==="finish"&&n:t.name==="setValueFromShortcut"?t.changeImportance==="accept":!1},qN=({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:a,onChange:i,value:s,defaultValue:l,closeOnSelect:u=r==="desktop",timezone:d,referenceDate:f}=e,{current:h}=I.useRef(l),{current:p}=I.useRef(s!==void 0),[m,b]=I.useState(d),y=wt(),x=vo(),{isOpen:E,setIsOpen:v}=UN(e),{timezone:S,value:k,handleValueChange:C}=_d({timezone:d,value:s,defaultValue:h,referenceDate:f,onChange:i,valueManager:t}),[L,F]=I.useState(()=>{let ee;return k!==void 0?ee=k:h!==void 0?ee=h:ee=t.emptyValue,{draft:ee,lastPublishedValue:ee,lastCommittedValue:ee,lastControlledValue:s,hasBeenModifiedSinceMount:!1}}),B=t.getTimezone(y,L.draft);m!==d&&(b(d),d&&B&&d!==B&&F(ee=>K({},ee,{draft:t.setTimezone(y,d,ee.draft)})));const{getValidationErrorForNewValue:R}=hb({props:e,validator:o,timezone:S,value:L.draft,onError:e.onError}),_=Pe(ee=>{const oe={action:ee,dateState:L,hasChanged:de=>!t.areValuesEqual(y,ee.value,de),isControlled:p,closeOnSelect:u},ne=zN(oe),pe=VN(oe),Z=WN(oe);F(de=>K({},de,{draft:ee.value,lastPublishedValue:ne?ee.value:de.lastPublishedValue,lastCommittedValue:pe?ee.value:de.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let J=null;const ye=()=>(J||(J={validationError:ee.name==="setValueFromField"?ee.context.validationError:R(ee.value)},ee.name==="setValueFromShortcut"&&(J.shortcut=ee.shortcut)),J);ne&&C(ee.value,ye()),pe&&a&&a(ee.value,ye()),Z&&v(!1)});if(L.lastControlledValue!==s){const ee=t.areValuesEqual(y,L.draft,k);F(oe=>K({},oe,{lastControlledValue:s},ee?{}:{lastCommittedValue:k,lastPublishedValue:k,draft:k,hasBeenModifiedSinceMount:!0}))}const T=Pe(()=>{_({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),O=Pe(()=>{_({value:L.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),A=Pe(()=>{_({value:L.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),w=Pe(()=>{_({value:L.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),M=Pe(()=>{_({value:t.getTodayValue(y,S,n),name:"setValueFromAction",pickerAction:"today"})}),V=Pe(ee=>{ee.preventDefault(),v(!0)}),z=Pe(ee=>{ee?.preventDefault(),v(!1)}),U=Pe((ee,oe="partial")=>_({name:"setValueFromView",value:ee,selectionState:oe})),D=Pe((ee,oe,ne)=>_({name:"setValueFromShortcut",value:ee,changeImportance:oe,shortcut:ne})),Y=Pe((ee,oe)=>_({name:"setValueFromField",value:ee,context:oe})),te={onClear:T,onAccept:O,onDismiss:A,onCancel:w,onSetToday:M,onOpen:V,onClose:z},N={value:L.draft,onChange:Y},ae=I.useMemo(()=>t.cleanValue(y,L.draft),[y,t,L.draft]),Q={value:ae,onChange:U,onClose:z,open:E},X=K({},te,{value:ae,onChange:U,onSelectShortcut:D,isValid:ee=>{const oe=o({adapter:x,value:ee,timezone:S,props:e});return!t.hasError(oe)}}),G=I.useMemo(()=>({onOpen:V,onClose:z,open:E}),[E,z,V]);return{open:E,fieldProps:N,viewProps:Q,layoutProps:X,actions:te,contextValue:G}};function bb({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:a,focusedView:i,onFocusedViewChange:s}){const l=I.useRef(n),u=I.useRef(o),d=I.useRef(o.includes(n)?n:o[0]),[f,h]=Nn({name:"useViews",state:"view",controlled:r,default:d.current}),p=I.useRef(a?f:null),[m,b]=Nn({name:"useViews",state:"focusedView",controlled:i,default:p.current});I.useEffect(()=>{(l.current&&l.current!==n||u.current&&u.current.some(L=>!o.includes(L)))&&(h(o.includes(n)?n:o[0]),u.current=o,l.current=n)},[n,h,f,o]);const y=o.indexOf(f),x=o[y-1]??null,E=o[y+1]??null,v=Pe((L,F)=>{b(F?L:B=>L===B?null:B),s?.(L,F)}),S=Pe(L=>{v(L,!0),L!==f&&(h(L),t&&t(L))}),k=Pe(()=>{E&&S(E)}),C=Pe((L,F,B)=>{const R=F==="finish",_=B?o.indexOf(B)<o.length-1:!!E;if(e(L,R&&_?"partial":F,B),B&&B!==f){const O=o[o.indexOf(B)+1];O&&S(O)}else R&&k()});return{view:f,setView:S,focusedView:m,setFocusedView:v,nextView:E,previousView:x,defaultView:o.includes(n)?n:o[0],goToNextView:k,setValueAndGoToNextView:C}}const YN=["className","sx"],KN=({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:r,rendererInterceptor:o,fieldRef:a})=>{const{onChange:i,open:s,onClose:l}=t,{view:u,views:d,openTo:f,onViewChange:h,viewRenderers:p,timezone:m}=e,b=Ue(e,YN),{view:y,setView:x,defaultView:E,focusedView:v,setFocusedView:S,setValueAndGoToNextView:k}=bb({view:u,views:d,openTo:f,onChange:i,onViewChange:h,autoFocus:r}),{hasUIView:C,viewModeLookup:L}=I.useMemo(()=>d.reduce((A,w)=>{let M;return p[w]!=null?M="UI":M="field",A.viewModeLookup[w]=M,M==="UI"&&(A.hasUIView=!0),A},{hasUIView:!1,viewModeLookup:{}}),[p,d]),F=I.useMemo(()=>d.reduce((A,w)=>p[w]!=null&&$O(w)?A+1:A,0),[p,d]),B=L[y],R=Pe(()=>B==="UI"),[_,T]=I.useState(B==="UI"?y:null);return _!==y&&L[y]==="UI"&&T(y),Wt(()=>{B==="field"&&s&&(l(),setTimeout(()=>{a?.current?.setSelectedSections(y),a?.current?.focusField(y)}))},[y]),Wt(()=>{if(!s)return;let A=y;B==="field"&&_!=null&&(A=_),A!==E&&L[A]==="UI"&&L[E]==="UI"&&(A=E),A!==y&&x(A),S(A,!0)},[s]),{hasUIView:C,shouldRestoreFocus:R,layoutProps:{views:d,view:_,onViewChange:x},renderCurrentView:()=>{if(_==null)return null;const A=p[_];if(A==null)return null;const w=K({},b,n,t,{views:d,timezone:m,onChange:k,view:_,onViewChange:x,focusedView:v,onFocusedViewChange:S,showViewSwitcher:F>1,timeViewsCount:F});return o?o(p,_,w):A(w)}}};function pm(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const GN=(e,t)=>{const[n,r]=I.useState(pm);return Wt(()=>{const a=()=>{r(pm())};return window.addEventListener("orientationchange",a),()=>{window.removeEventListener("orientationchange",a)}},[]),IN(e,["hours","minutes","seconds"])?!1:(t||n)==="landscape"},QN=({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=e,a=GN(n.views,o),i=qn();return{layoutProps:K({},n,t,{isLandscape:a,isRtl:i,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}};function XN(e){const{props:t,pickerValueResponse:n}=e;return I.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:t.disabled??!1,readOnly:t.readOnly??!1}),[n.viewProps.value,n.open,t.disabled,t.readOnly])}const yb=({props:e,valueManager:t,valueType:n,wrapperVariant:r,additionalViewProps:o,validator:a,autoFocusView:i,rendererInterceptor:s,fieldRef:l})=>{const u=qN({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:a}),d=KN({props:e,additionalViewProps:o,autoFocusView:i,fieldRef:l,propsFromPickerValue:u.viewProps,rendererInterceptor:s}),f=QN({props:e,wrapperVariant:r,propsFromPickerValue:u.layoutProps,propsFromPickerViews:d.layoutProps}),h=XN({props:e,pickerValueResponse:u});return{open:u.open,actions:u.actions,fieldProps:u.fieldProps,renderCurrentView:d.renderCurrentView,hasUIView:d.hasUIView,shouldRestoreFocus:d.shouldRestoreFocus,layoutProps:f.layoutProps,contextValue:u.contextValue,ownerState:h}};function xb(e){return _e("MuiPickersLayout",e)}const Zr=Le("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),ZN=["onAccept","onClear","onCancel","onSetToday","actions"];function JN(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:o,actions:a}=e,i=Ue(e,ZN),s=Mr();if(a==null||a.length===0)return null;const l=a?.map(u=>{switch(u){case"clear":return c.jsx(Ot,{onClick:n,children:s.clearButtonLabel},u);case"cancel":return c.jsx(Ot,{onClick:r,children:s.cancelButtonLabel},u);case"accept":return c.jsx(Ot,{onClick:t,children:s.okButtonLabel},u);case"today":return c.jsx(Ot,{onClick:o,children:s.todayButtonLabel},u);default:return null}});return c.jsx(Pr,K({},i,{children:l}))}function eL(e){return _e("MuiListItem",e)}Le("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const tL=Le("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function nL(e){return _e("MuiListItemSecondaryAction",e)}Le("MuiListItemSecondaryAction",["root","disableGutters"]);const rL=e=>{const{disableGutters:t,classes:n}=e;return Fe({root:["root",t&&"disableGutters"]},nL,n)},oL=le("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),Eb=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiListItemSecondaryAction"}),{className:o,...a}=r,i=I.useContext(Er),s={...r,disableGutters:i.disableGutters},l=rL(s);return c.jsx(oL,{className:Ae(l.root,o),ownerState:s,ref:n,...a})});Eb.muiName="ListItemSecondaryAction";const aL=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},iL=e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:a,divider:i,hasSecondaryAction:s}=e;return Fe({root:["root",r&&"dense",!o&&"gutters",!a&&"padding",i&&"divider",t==="flex-start"&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},eL,n)},sL=le("div",{name:"MuiListItem",slot:"Root",overridesResolver:aL})(et(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>!t.disablePadding&&t.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:t})=>!t.disablePadding&&!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>!t.disablePadding&&!!t.secondaryAction,style:{paddingRight:48}},{props:({ownerState:t})=>!!t.secondaryAction,style:{[`& > .${tL.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>t.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:t})=>t.hasSecondaryAction,style:{paddingRight:48}}]}))),lL=le("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),uL=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiListItem"}),{alignItems:o="center",children:a,className:i,component:s,components:l={},componentsProps:u={},ContainerComponent:d="li",ContainerProps:{className:f,...h}={},dense:p=!1,disableGutters:m=!1,disablePadding:b=!1,divider:y=!1,secondaryAction:x,slotProps:E={},slots:v={},...S}=r,k=I.useContext(Er),C=I.useMemo(()=>({dense:p||k.dense||!1,alignItems:o,disableGutters:m}),[o,k.dense,p,m]),L=I.useRef(null),F=I.Children.toArray(a),B=F.length&&ns(F[F.length-1],["ListItemSecondaryAction"]),R={...r,alignItems:o,dense:C.dense,disableGutters:m,disablePadding:b,divider:y,hasSecondaryAction:B},_=iL(R),T=ct(L,n),O=v.root||l.Root||sL,A=E.root||u.root||{},w={className:Ae(_.root,A.className,i),...S};let M=s||"li";return B?(M=!w.component&&!s?"div":M,d==="li"&&(M==="li"?M="div":w.component==="li"&&(w.component="div")),c.jsx(Er.Provider,{value:C,children:c.jsxs(lL,{as:d,className:Ae(_.container,f),ref:T,ownerState:R,...h,children:[c.jsx(O,{...A,...!ea(O)&&{as:M,ownerState:{...R,...A.ownerState}},...w,children:F}),F.pop()]})})):c.jsx(Er.Provider,{value:C,children:c.jsxs(O,{...A,as:M,ref:T,...!ea(O)&&{ownerState:{...R,...A.ownerState}},...w,children:[F,x&&c.jsx(Eb,{children:x})]})})}),xi=36,Rl=2,Ml=320,cL=280,jd=336,dL=["items","changeImportance","isLandscape","onChange","isValid"],fL=["getValue"];function pL(e){const{items:t,changeImportance:n="accept",onChange:r,isValid:o}=e,a=Ue(e,dL);if(t==null||t.length===0)return null;const i=t.map(s=>{let{getValue:l}=s,u=Ue(s,fL);const d=l({isValid:o});return K({},u,{label:u.label,onClick:()=>{r(d,n,u)},disabled:!o(d)})});return c.jsx(O1,K({dense:!0,sx:[{maxHeight:jd,maxWidth:200,overflow:"auto"},...Array.isArray(a.sx)?a.sx:[a.sx]]},a,{children:i.map(s=>c.jsx(uL,{children:c.jsx(J1,K({},s))},s.id??s.label))}))}function hL(e){return e.view!==null}const mL=e=>{const{classes:t,isLandscape:n}=e;return Fe({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},xb,t)},gL=e=>{const{wrapperVariant:t,onAccept:n,onClear:r,onCancel:o,onSetToday:a,view:i,views:s,onViewChange:l,value:u,onChange:d,onSelectShortcut:f,isValid:h,isLandscape:p,disabled:m,readOnly:b,children:y,slots:x,slotProps:E}=e,v=mL(e),S=x?.actionBar??JN,k=dt({elementType:S,externalSlotProps:E?.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:o,onSetToday:a,actions:t==="desktop"?[]:["cancel","accept"]},className:v.actionBar,ownerState:K({},e,{wrapperVariant:t})}),C=c.jsx(S,K({},k)),L=x?.toolbar,F=dt({elementType:L,externalSlotProps:E?.toolbar,additionalProps:{isLandscape:p,onChange:d,value:u,view:i,onViewChange:l,views:s,disabled:m,readOnly:b},className:v.toolbar,ownerState:K({},e,{wrapperVariant:t})}),B=hL(F)&&L?c.jsx(L,K({},F)):null,R=y,_=x?.tabs,T=i&&_?c.jsx(_,K({view:i,onViewChange:l,className:v.tabs},E?.tabs)):null,O=x?.shortcuts??pL,A=dt({elementType:O,externalSlotProps:E?.shortcuts,additionalProps:{isValid:h,isLandscape:p,onChange:f},className:v.shortcuts,ownerState:{isValid:h,isLandscape:p,onChange:f,wrapperVariant:t}}),w=i&&O?c.jsx(O,K({},A)):null;return{toolbar:B,content:R,tabs:T,actionBar:C,shortcuts:w}},bL=e=>{const{isLandscape:t,classes:n}=e;return Fe({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},xb,n)},yL=le("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${Zr.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${Zr.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${Zr.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${Zr.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${Zr.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${Zr.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${Zr.shortcuts}`]:{gridColumn:3}}}]}),xL=le("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Cb=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiPickersLayout"}),{toolbar:o,content:a,tabs:i,actionBar:s,shortcuts:l}=gL(r),{sx:u,className:d,isLandscape:f,wrapperVariant:h}=r,p=bL(r);return c.jsxs(yL,{ref:n,sx:u,className:Ae(p.root,d),ownerState:r,children:[f?l:o,f?o:l,c.jsx(xL,{className:p.contentWrapper,children:h==="desktop"?c.jsxs(I.Fragment,{children:[a,i]}):c.jsxs(I.Fragment,{children:[i,a]})}),s]})}),EL=I.createContext(null);function Tb(e){const{contextValue:t,localeText:n,children:r}=e;return c.jsx(EL.Provider,{value:t,children:c.jsx(Gs,{localeText:n,children:r})})}const CL=["props","getOpenDialogAriaText"],TL=["ownerState"],vL=["ownerState"],SL=e=>{let{props:t,getOpenDialogAriaText:n}=e,r=Ue(e,CL);const{slots:o,slotProps:a,className:i,sx:s,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:d,selectedSections:f,onSelectedSectionsChange:h,timezone:p,name:m,label:b,inputRef:y,readOnly:x,disabled:E,autoFocus:v,localeText:S,reduceAnimations:k}=t,C=I.useRef(null),L=I.useRef(null),F=Yn(),B=a?.toolbar?.hidden??!1,{open:R,actions:_,hasUIView:T,layoutProps:O,renderCurrentView:A,shouldRestoreFocus:w,fieldProps:M,contextValue:V,ownerState:z}=yb(K({},r,{props:t,fieldRef:L,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),U=o.inputAdornment??mb,D=dt({elementType:U,externalSlotProps:a?.inputAdornment,additionalProps:{position:"end"},ownerState:t}),Y=Ue(D,TL),te=o.openPickerButton??Qn,N=dt({elementType:te,externalSlotProps:a?.openPickerButton,additionalProps:{disabled:E||x,onClick:R?_.onClose:_.onOpen,"aria-label":n(M.value),edge:Y.position},ownerState:t}),ae=Ue(N,vL),Q=o.openPickerIcon,q=dt({elementType:Q,externalSlotProps:a?.openPickerIcon,ownerState:z}),X=o.field,G=dt({elementType:X,externalSlotProps:a?.field,additionalProps:K({},M,B&&{id:F},{readOnly:x,disabled:E,className:i,sx:s,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:d,selectedSections:f,onSelectedSectionsChange:h,timezone:p,label:b,name:m,autoFocus:v&&!t.open,focused:R?!0:void 0},y?{inputRef:y}:{}),ownerState:t});T&&(G.InputProps=K({},G.InputProps,{ref:C},!t.disableOpenPicker&&{[`${Y.position}Adornment`]:c.jsx(U,K({},Y,{children:c.jsx(te,K({},ae,{children:c.jsx(Q,K({},q))}))}))}));const ee=K({textField:o.textField,clearIcon:o.clearIcon,clearButton:o.clearButton},G.slots),oe=o.layout??Cb;let ne=F;B&&(b?ne=`${F}-label`:ne=void 0);const pe=K({},a,{toolbar:K({},a?.toolbar,{titleId:F}),popper:K({"aria-labelledby":ne},a?.popper)}),Z=ct(L,G.unstableFieldRef);return{renderPicker:()=>c.jsxs(Tb,{contextValue:V,localeText:S,children:[c.jsx(X,K({},G,{slots:ee,slotProps:pe,unstableFieldRef:Z})),c.jsx(HN,K({role:"dialog",placement:"bottom-start",anchorEl:C.current},_,{open:R,slots:o,slotProps:pe,shouldRestoreFocus:w,reduceAnimations:k,children:c.jsx(oe,K({},O,pe?.layout,{slots:o,slotProps:pe,children:A()}))}))]})}},kL=xt(c.jsx("path",{d:"M7 10l5 5 5-5z"})),DL=xt(c.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})),wL=xt(c.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),AL=xt(c.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}));xt(c.jsxs(I.Fragment,{children:[c.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),c.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}));xt(c.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}));xt(c.jsxs(I.Fragment,{children:[c.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),c.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}));const IL=xt(c.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"})),PL=({utils:e,format:t})=>{let n=10,r=t,o=e.expandFormat(t);for(;o!==r;)if(r=o,o=e.expandFormat(r),n-=1,n<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return o},RL=({utils:e,expandedFormat:t})=>{const n=[],{start:r,end:o}=e.escapedCharacters,a=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let i=null;for(;i=a.exec(t);)n.push({start:i.index,end:a.lastIndex-1});return n},ML=(e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}},OL=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:a,token:i,startSeparator:s})=>{if(i==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=ob(e,i),u=lb(e,l.contentType,l.type,i),d=n?u:l.contentType==="digit",f=t!=null&&e.isValid(t);let h=f?e.formatByString(t,i):"",p=null;if(d)if(u)p=h===""?e.formatByString(a,i).length:h.length;else{if(l.maxLength==null)throw new Error(`MUI X: The token ${i} should have a 'maxDigitNumber' property on it's adapter`);p=l.maxLength,f&&(h=Ld(ib(bo(h,o),p),o))}return K({},l,{format:i,maxLength:p,value:h,placeholder:ML(e,r,l,i),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:d,startSeparator:s,endSeparator:"",modified:!1})},NL=e=>{const{utils:t,expandedFormat:n,escapedParts:r}=e,o=t.date(void 0),a=[];let i="";const s=Object.keys(t.formatTokenMap).sort((p,m)=>m.length-p.length),l=/^([a-zA-Z]+)/,u=new RegExp(`^(${s.join("|")})*$`),d=new RegExp(`^(${s.join("|")})`),f=p=>r.find(m=>m.start<=p&&m.end>=p);let h=0;for(;h<n.length;){const p=f(h),m=p!=null,b=l.exec(n.slice(h))?.[1];if(!m&&b!=null&&u.test(b)){let y=b;for(;y.length>0;){const x=d.exec(y)[1];y=y.slice(x.length),a.push(OL(K({},e,{now:o,token:x,startSeparator:i}))),i=""}h+=b.length}else{const y=n[h];m&&p?.start===h||p?.end===h||(a.length===0?i+=y:a[a.length-1].endSeparator+=y),h+=1}}return a.length===0&&i.length>0&&a.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:i,endSeparator:"",modified:!1}),a},LL=({isRtl:e,formatDensity:t,sections:n})=>n.map(r=>{const o=a=>{let i=a;return e&&i!==null&&i.includes(" ")&&(i=`⁩${i}⁦`),t==="spacious"&&["/",".","-"].includes(i)&&(i=` ${i} `),i};return r.startSeparator=o(r.startSeparator),r.endSeparator=o(r.endSeparator),r}),hm=e=>{let t=PL(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=RL(K({},e,{expandedFormat:t})),r=NL(K({},e,{expandedFormat:t,escapedParts:n}));return LL(K({},e,{sections:r}))},FL=e=>{const t=wt(),n=Mr(),r=vo(),o=qn(),{valueManager:a,fieldValueManager:i,valueType:s,validator:l,internalProps:u,internalProps:{value:d,defaultValue:f,referenceDate:h,onChange:p,format:m,formatDensity:b="dense",selectedSections:y,onSelectedSectionsChange:x,shouldRespectLeadingZeros:E=!1,timezone:v,enableAccessibleFieldDOMStructure:S=!1}}=e,{timezone:k,value:C,handleValueChange:L}=_d({timezone:v,value:d,defaultValue:f,referenceDate:h,onChange:p,valueManager:a}),F=I.useMemo(()=>qO(t),[t]),B=I.useMemo(()=>ZO(t,F,k),[t,F,k]),R=I.useCallback((Q,q=null)=>i.getSectionsFromValue(t,Q,q,X=>hm({utils:t,localeText:n,localizedDigits:F,format:m,date:X,formatDensity:b,shouldRespectLeadingZeros:E,enableAccessibleFieldDOMStructure:S,isRtl:o})),[i,m,n,F,o,E,t,b,S]),[_,T]=I.useState(()=>{const Q=R(C),q={sections:Q,value:C,referenceValue:a.emptyValue,tempValueStrAndroid:null},X=UO(Q),G=a.getInitialReferenceValue({referenceDate:h,value:C,utils:t,props:u,granularity:X,timezone:k});return K({},q,{referenceValue:G})}),[O,A]=Nn({controlled:y,default:null,name:"useField",state:"selectedSections"}),w=Q=>{A(Q),x?.(Q)},M=I.useMemo(()=>vc(O,_.sections),[O,_.sections]),V=M==="all"?0:M,z=({value:Q,referenceValue:q,sections:X})=>{if(T(ee=>K({},ee,{sections:X,value:Q,referenceValue:q,tempValueStrAndroid:null})),a.areValuesEqual(t,_.value,Q))return;const G={validationError:l({adapter:r,value:Q,timezone:k,props:u})};L(Q,G)},U=(Q,q)=>{const X=[..._.sections];return X[Q]=K({},X[Q],{value:q,modified:!0}),X},D=()=>{z({value:a.emptyValue,referenceValue:_.referenceValue,sections:R(a.emptyValue)})},Y=()=>{if(V==null)return;const Q=_.sections[V],q=i.getActiveDateManager(t,_,Q),G=q.getSections(_.sections).filter(pe=>pe.value!=="").length===(Q.value===""?0:1),ee=U(V,""),oe=G?null:t.getInvalidDate(),ne=q.getNewValuesFromNewActiveDate(oe);z(K({},ne,{sections:ee}))},te=Q=>{const q=(ee,oe)=>{const ne=t.parse(ee,m);if(ne==null||!t.isValid(ne))return null;const pe=hm({utils:t,localeText:n,localizedDigits:F,format:m,date:ne,formatDensity:b,shouldRespectLeadingZeros:E,enableAccessibleFieldDOMStructure:S,isRtl:o});return lm(t,ne,pe,oe,!1)},X=i.parseValueStr(Q,_.referenceValue,q),G=i.updateReferenceValue(t,X,_.referenceValue);z({value:X,referenceValue:G,sections:R(X,_.sections)})},N=({activeSection:Q,newSectionValue:q,shouldGoToNextSection:X})=>{X&&V<_.sections.length-1&&w(V+1);const G=i.getActiveDateManager(t,_,Q),ee=U(V,q),oe=G.getSections(ee),ne=GO(t,oe,F);let pe,Z;if(ne!=null&&t.isValid(ne)){const J=lm(t,ne,oe,G.referenceDate,!0);pe=G.getNewValuesFromNewActiveDate(J),Z=!0}else pe=G.getNewValuesFromNewActiveDate(ne),Z=(ne!=null&&!t.isValid(ne))!=(G.date!=null&&!t.isValid(G.date));return Z?z(K({},pe,{sections:ee})):T(J=>K({},J,pe,{sections:ee,tempValueStrAndroid:null}))},ae=Q=>T(q=>K({},q,{tempValueStrAndroid:Q}));return I.useEffect(()=>{const Q=R(_.value);T(q=>K({},q,{sections:Q}))},[m,t.locale,o]),I.useEffect(()=>{let Q;a.areValuesEqual(t,_.value,C)?Q=a.getTimezone(t,_.value)!==a.getTimezone(t,C):Q=!0,Q&&T(q=>K({},q,{value:C,referenceValue:i.updateReferenceValue(t,C,q.referenceValue),sections:R(C)}))},[C]),{state:_,activeSectionIndex:V,parsedSelectedSections:M,setSelectedSections:w,clearValue:D,clearActiveSection:Y,updateSectionValue:N,updateValueFromValueStr:te,setTempAndroidValueStr:ae,getSectionsFromValue:R,sectionsValueBoundaries:B,localizedDigits:F,timezone:k}},_L=5e3,Lo=e=>e.saveQuery!=null,BL=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:o,timezone:a})=>{const i=wt(),[s,l]=I.useState(null),u=Pe(()=>l(null));I.useEffect(()=>{s!=null&&e[s.sectionIndex]?.type!==s.sectionType&&u()},[e,s,u]),I.useEffect(()=>{if(s!=null){const m=setTimeout(()=>u(),_L);return()=>{clearTimeout(m)}}return()=>{}},[s,u]);const d=({keyPressed:m,sectionIndex:b},y,x)=>{const E=m.toLowerCase(),v=e[b];if(s!=null&&(!x||x(s.value))&&s.sectionIndex===b){const k=`${s.value}${E}`,C=y(k,v);if(!Lo(C))return l({sectionIndex:b,value:k,sectionType:v.type}),C}const S=y(E,v);return Lo(S)&&!S.saveQuery?(u(),null):(l({sectionIndex:b,value:E,sectionType:v.type}),Lo(S)?null:S)},f=m=>{const b=(E,v,S)=>{const k=v.filter(C=>C.toLowerCase().startsWith(S));return k.length===0?{saveQuery:!1}:{sectionValue:k[0],shouldGoToNextSection:k.length===1}},y=(E,v,S,k)=>{const C=L=>ab(i,a,v.type,L);if(v.contentType==="letter")return b(v.format,C(v.format),E);if(S&&k!=null&&ob(i,S).contentType==="letter"){const L=C(S),F=b(S,L,E);return Lo(F)?{saveQuery:!1}:K({},F,{sectionValue:k(F.sectionValue,L)})}return{saveQuery:!1}};return d(m,(E,v)=>{switch(v.type){case"month":{const S=k=>im(i,k,i.formats.month,v.format);return y(E,v,i.formats.month,S)}case"weekDay":{const S=(k,C)=>C.indexOf(k).toString();return y(E,v,i.formats.weekday,S)}case"meridiem":return y(E,v);default:return{saveQuery:!1}}})},h=m=>{const b=(x,E)=>{const v=bo(x,r),S=Number(v),k=n[E.type]({currentDate:null,format:E.format,contentType:E.contentType});if(S>k.maximum)return{saveQuery:!1};if(S<k.minimum)return{saveQuery:!0};const C=S*10>k.maximum||v.length===k.maximum.toString().length;return{sectionValue:sb(i,S,k,r,E),shouldGoToNextSection:C}};return d(m,(x,E)=>{if(E.contentType==="digit"||E.contentType==="digit-with-letter")return b(x,E);if(E.type==="month"){lb(i,"digit","month","MM");const v=b(x,{type:E.type,format:"MM",hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(Lo(v))return v;const S=im(i,v.sectionValue,"MM",E.format);return K({},v,{sectionValue:S})}if(E.type==="weekDay"){const v=b(x,E);if(Lo(v))return v;const S=Il(i,E.format)[Number(v.sectionValue)-1];return K({},v,{sectionValue:S})}return{saveQuery:!1}},x=>am(x,r))};return{applyCharacterEditing:Pe(m=>{const b=e[m.sectionIndex],x=am(m.keyPressed,r)?h(K({},m,{keyPressed:Ld(m.keyPressed,r)})):f(m);if(x==null){o(null);return}t({activeSection:b,newSectionValue:x.sectionValue,shouldGoToNextSection:x.shouldGoToNextSection})}),resetCharacterQuery:u}},jL=e=>{const{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:o,onClick:a,onFocus:i,onInput:s,onPaste:l,focused:u,autoFocus:d=!1},fieldValueManager:f,applyCharacterEditing:h,resetCharacterQuery:p,setSelectedSections:m,parsedSelectedSections:b,state:y,clearActiveSection:x,clearValue:E,updateSectionValue:v,updateValueFromValueStr:S,sectionOrder:k,areAllSectionsEmpty:C,sectionsValueBoundaries:L}=e,F=I.useRef(null),B=ct(r,F),R=Mr(),_=wt(),T=Yn(),[O,A]=I.useState(!1),w=I.useMemo(()=>({syncSelectionToDOM:()=>{if(!F.current)return;const Z=document.getSelection();if(!Z)return;if(b==null){Z.rangeCount>0&&F.current.getRoot().contains(Z.getRangeAt(0).startContainer)&&Z.removeAllRanges(),O&&F.current.getRoot().blur();return}if(!F.current.getRoot().contains(un(document)))return;const J=new window.Range;let ye;b==="all"?ye=F.current.getRoot():y.sections[b].type==="empty"?ye=F.current.getSectionContainer(b):ye=F.current.getSectionContent(b),J.selectNodeContents(ye),ye.focus(),Z.removeAllRanges(),Z.addRange(J)},getActiveSectionIndexFromDOM:()=>{const Z=un(document);return!Z||!F.current||!F.current.getRoot().contains(Z)?null:F.current.getSectionIndexFromDOMElement(Z)},focusField:(Z=0)=>{if(!F.current||w.getActiveSectionIndexFromDOM()!=null)return;const J=vc(Z,y.sections);A(!0),F.current.getSectionContent(J).focus()},setSelectedSections:Z=>{if(!F.current)return;const J=vc(Z,y.sections);A((J==="all"?0:J)!==null),m(Z)},isFieldFocused:()=>{const Z=un(document);return!!F.current&&F.current.getRoot().contains(Z)}}),[b,m,y.sections,O]),M=Pe(Z=>{if(!F.current)return;const J=y.sections[Z];F.current.getSectionContent(Z).innerHTML=J.value||J.placeholder,w.syncSelectionToDOM()}),V=Pe((Z,...J)=>{Z.isDefaultPrevented()||!F.current||(A(!0),a?.(Z,...J),b==="all"?setTimeout(()=>{const ye=document.getSelection().getRangeAt(0).startOffset;if(ye===0){m(k.startIndex);return}let de=0,be=0;for(;be<ye&&de<y.sections.length;){const ie=y.sections[de];de+=1,be+=`${ie.startSeparator}${ie.value||ie.placeholder}${ie.endSeparator}`.length}m(de-1)}):O?F.current.getRoot().contains(Z.target)||m(k.startIndex):(A(!0),m(k.startIndex)))}),z=Pe(Z=>{if(s?.(Z),!F.current||b!=="all")return;const ye=Z.target.textContent??"";F.current.getRoot().innerHTML=y.sections.map(de=>`${de.startSeparator}${de.value||de.placeholder}${de.endSeparator}`).join(""),w.syncSelectionToDOM(),ye.length===0||ye.charCodeAt(0)===10?(p(),E(),m("all")):ye.length>1?S(ye):(b==="all"&&m(0),h({keyPressed:ye,sectionIndex:0}))}),U=Pe(Z=>{if(l?.(Z),n||b!=="all"){Z.preventDefault();return}const J=Z.clipboardData.getData("text");Z.preventDefault(),p(),S(J)}),D=Pe((...Z)=>{if(i?.(...Z),O||!F.current)return;A(!0),F.current.getSectionIndexFromDOMElement(un(document))!=null||m(k.startIndex)}),Y=Pe((...Z)=>{o?.(...Z),setTimeout(()=>{if(!F.current)return;const J=un(document);!F.current.getRoot().contains(J)&&(A(!1),m(null))})}),te=Pe(Z=>J=>{J.isDefaultPrevented()||m(Z)}),N=Pe(Z=>{Z.preventDefault()}),ae=Pe(Z=>()=>{m(Z)}),Q=Pe(Z=>{if(Z.preventDefault(),n||t||typeof b!="number")return;const J=y.sections[b],ye=Z.clipboardData.getData("text"),de=/^[a-zA-Z]+$/.test(ye),be=/^[0-9]+$/.test(ye),ie=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(ye);J.contentType==="letter"&&de||J.contentType==="digit"&&be||J.contentType==="digit-with-letter"&&ie?(p(),v({activeSection:J,newSectionValue:ye,shouldGoToNextSection:!0})):!de&&!be&&(p(),S(ye))}),q=Pe(Z=>{Z.preventDefault(),Z.dataTransfer.dropEffect="none"}),X=Pe(Z=>{if(!F.current)return;const J=Z.target,ye=J.textContent??"",de=F.current.getSectionIndexFromDOMElement(J),be=y.sections[de];if(n||!F.current){M(de);return}if(ye.length===0){if(be.value===""){M(de);return}const ie=Z.nativeEvent.inputType;if(ie==="insertParagraph"||ie==="insertLineBreak"){M(de);return}p(),x();return}h({keyPressed:ye,sectionIndex:de}),M(de)});Wt(()=>{if(!(!O||!F.current)){if(b==="all")F.current.getRoot().focus();else if(typeof b=="number"){const Z=F.current.getSectionContent(b);Z&&Z.focus()}}},[b,O]);const G=I.useMemo(()=>y.sections.reduce((Z,J)=>(Z[J.type]=L[J.type]({currentDate:null,contentType:J.contentType,format:J.format}),Z),{}),[L,y.sections]),ee=b==="all",oe=I.useMemo(()=>y.sections.map((Z,J)=>{const ye=!ee&&!t&&!n;return{container:{"data-sectionindex":J,onClick:te(J)},content:{tabIndex:ee||J>0?-1:0,contentEditable:!ee&&!t&&!n,role:"spinbutton",id:`${T}-${Z.type}`,"aria-labelledby":`${T}-${Z.type}`,"aria-readonly":n,"aria-valuenow":rN(Z,_),"aria-valuemin":G[Z.type].minimum,"aria-valuemax":G[Z.type].maximum,"aria-valuetext":Z.value?nN(Z,_):R.empty,"aria-label":R[Z.type],"aria-disabled":t,spellCheck:ye?!1:void 0,autoCapitalize:ye?"off":void 0,autoCorrect:ye?"off":void 0,[parseInt(I.version,10)>=17?"enterKeyHint":"enterkeyhint"]:ye?"next":void 0,children:Z.value||Z.placeholder,onInput:X,onPaste:Q,onFocus:ae(J),onDragOver:q,onMouseUp:N,inputMode:Z.contentType==="letter"?"text":"numeric"},before:{children:Z.startSeparator},after:{children:Z.endSeparator}}}),[y.sections,ae,Q,q,X,te,N,t,n,ee,R,_,G,T]),ne=Pe(Z=>{S(Z.target.value)}),pe=I.useMemo(()=>C?"":f.getV7HiddenInputValueFromSections(y.sections),[C,y.sections,f]);return I.useEffect(()=>{if(F.current==null)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.","","If you want to keep using an `<input />` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:","","<DatePicker slots={{ textField: MyCustomTextField }} />","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join(`
202
- `));d&&F.current&&F.current.getSectionContent(k.startIndex).focus()},[]),{interactions:w,returnedValue:{autoFocus:d,readOnly:n,focused:u??O,sectionListRef:B,onBlur:Y,onClick:V,onFocus:D,onInput:z,onPaste:U,enableAccessibleFieldDOMStructure:!0,elements:oe,tabIndex:b===0?-1:0,contentEditable:ee,value:pe,onChange:ne,areAllSectionsEmpty:C}}},$o=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),$L=(e,t,n)=>{let r=0,o=n?1:0;const a=[];for(let i=0;i<e.length;i+=1){const s=e[i],l=Fd(s,n?"input-rtl":"input-ltr",t),u=`${s.startSeparator}${l}${s.endSeparator}`,d=$o(u).length,f=u.length,h=$o(l),p=o+(h===""?0:l.indexOf(h[0]))+s.startSeparator.length,m=p+h.length;a.push(K({},s,{start:r,end:r+d,startInInput:p,endInInput:m})),r+=d,o+=f}return a},HL=e=>{const t=qn(),n=I.useRef(void 0),r=I.useRef(void 0),{forwardedProps:{onFocus:o,onClick:a,onPaste:i,onBlur:s,inputRef:l,placeholder:u},internalProps:{readOnly:d=!1,disabled:f=!1},parsedSelectedSections:h,activeSectionIndex:p,state:m,fieldValueManager:b,valueManager:y,applyCharacterEditing:x,resetCharacterQuery:E,updateSectionValue:v,updateValueFromValueStr:S,clearActiveSection:k,clearValue:C,setTempAndroidValueStr:L,setSelectedSections:F,getSectionsFromValue:B,areAllSectionsEmpty:R,localizedDigits:_}=e,T=I.useRef(null),O=ct(l,T),A=I.useMemo(()=>$L(m.sections,_,t),[m.sections,_,t]),w=I.useMemo(()=>({syncSelectionToDOM:()=>{if(!T.current)return;if(h==null){T.current.scrollLeft&&(T.current.scrollLeft=0);return}if(T.current!==un(document))return;const X=T.current.scrollTop;if(h==="all")T.current.select();else{const G=A[h],ee=G.type==="empty"?G.startInInput-G.startSeparator.length:G.startInInput,oe=G.type==="empty"?G.endInInput+G.endSeparator.length:G.endInInput;(ee!==T.current.selectionStart||oe!==T.current.selectionEnd)&&T.current===un(document)&&T.current.setSelectionRange(ee,oe),clearTimeout(r.current),r.current=setTimeout(()=>{T.current&&T.current===un(document)&&T.current.selectionStart===T.current.selectionEnd&&(T.current.selectionStart!==ee||T.current.selectionEnd!==oe)&&w.syncSelectionToDOM()})}T.current.scrollTop=X},getActiveSectionIndexFromDOM:()=>{const X=T.current.selectionStart??0,G=T.current.selectionEnd??0;if(X===0&&G===0)return null;const ee=X<=A[0].startInInput?1:A.findIndex(oe=>oe.startInInput-oe.startSeparator.length>X);return ee===-1?A.length-1:ee-1},focusField:(X=0)=>{un(document)!==T.current&&(T.current?.focus(),F(X))},setSelectedSections:X=>F(X),isFieldFocused:()=>T.current===un(document)}),[T,h,A,F]),M=()=>{const X=T.current.selectionStart??0;let G;X<=A[0].startInInput||X>=A[A.length-1].endInInput?G=1:G=A.findIndex(oe=>oe.startInInput-oe.startSeparator.length>X);const ee=G===-1?A.length-1:G-1;F(ee)},V=Pe((...X)=>{o?.(...X);const G=T.current;clearTimeout(n.current),n.current=setTimeout(()=>{!G||G!==T.current||p==null&&(G.value.length&&Number(G.selectionEnd)-Number(G.selectionStart)===G.value.length?F("all"):M())})}),z=Pe((X,...G)=>{X.isDefaultPrevented()||(a?.(X,...G),M())}),U=Pe(X=>{if(i?.(X),X.preventDefault(),d||f)return;const G=X.clipboardData.getData("text");if(typeof h=="number"){const ee=m.sections[h],oe=/^[a-zA-Z]+$/.test(G),ne=/^[0-9]+$/.test(G),pe=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(G);if(ee.contentType==="letter"&&oe||ee.contentType==="digit"&&ne||ee.contentType==="digit-with-letter"&&pe){E(),v({activeSection:ee,newSectionValue:G,shouldGoToNextSection:!0});return}if(oe||ne)return}E(),S(G)}),D=Pe((...X)=>{s?.(...X),F(null)}),Y=Pe(X=>{if(d)return;const G=X.target.value;if(G===""){E(),C();return}const ee=X.nativeEvent.data,oe=ee&&ee.length>1,ne=oe?ee:G,pe=$o(ne);if(h==="all"&&F(p),p==null||oe){S(oe?ee:pe);return}let Z;if(h==="all"&&pe.length===1)Z=pe;else{const J=$o(b.getV6InputValueFromSections(A,_,t));let ye=-1,de=-1;for(let ve=0;ve<J.length;ve+=1)ye===-1&&J[ve]!==pe[ve]&&(ye=ve),de===-1&&J[J.length-ve-1]!==pe[pe.length-ve-1]&&(de=ve);const be=A[p];if(ye<be.start||J.length-de-1>be.end)return;const Ie=pe.length-J.length+be.end-$o(be.endSeparator||"").length;Z=pe.slice(be.start+$o(be.startSeparator||"").length,Ie)}if(Z.length===0){eN()&&L(ne),E(),k();return}x({keyPressed:Z,sectionIndex:p})}),te=I.useMemo(()=>u!==void 0?u:b.getV6InputValueFromSections(B(y.emptyValue),_,t),[u,b,B,y.emptyValue,_,t]),N=I.useMemo(()=>m.tempValueStrAndroid??b.getV6InputValueFromSections(m.sections,_,t),[m.sections,b,m.tempValueStrAndroid,_,t]);I.useEffect(()=>(T.current&&T.current===un(document)&&F("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);const ae=I.useMemo(()=>p==null||m.sections[p].contentType==="letter"?"text":"numeric",[p,m.sections]),q=!(T.current&&T.current===un(document))&&R;return{interactions:w,returnedValue:{readOnly:d,onBlur:D,onClick:z,onFocus:V,onPaste:U,inputRef:O,enableAccessibleFieldDOMStructure:!1,placeholder:te,inputMode:ae,autoComplete:"off",value:q?"":N,onChange:Y}}},UL=e=>{const t=wt(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:a=!1,disabled:i=!1,readOnly:s=!1},forwardedProps:{onKeyDown:l,error:u,clearable:d,onClear:f},fieldValueManager:h,valueManager:p,validator:m}=e,b=qn(),y=FL(e),{state:x,activeSectionIndex:E,parsedSelectedSections:v,setSelectedSections:S,clearValue:k,clearActiveSection:C,updateSectionValue:L,setTempAndroidValueStr:F,sectionsValueBoundaries:B,localizedDigits:R,timezone:_}=y,T=BL({sections:x.sections,updateSectionValue:L,sectionsValueBoundaries:B,localizedDigits:R,setTempAndroidValueStr:F,timezone:_}),{resetCharacterQuery:O}=T,A=p.areValuesEqual(t,x.value,p.emptyValue),w=a?jL:HL,M=I.useMemo(()=>tN(x.sections,b&&!a),[x.sections,b,a]),{returnedValue:V,interactions:z}=w(K({},e,y,T,{areAllSectionsEmpty:A,sectionOrder:M})),U=Pe(Q=>{if(l?.(Q),!i)switch(!0){case((Q.ctrlKey||Q.metaKey)&&String.fromCharCode(Q.keyCode)==="A"&&!Q.shiftKey&&!Q.altKey):{Q.preventDefault(),S("all");break}case Q.key==="ArrowRight":{if(Q.preventDefault(),v==null)S(M.startIndex);else if(v==="all")S(M.endIndex);else{const q=M.neighbors[v].rightIndex;q!==null&&S(q)}break}case Q.key==="ArrowLeft":{if(Q.preventDefault(),v==null)S(M.endIndex);else if(v==="all")S(M.startIndex);else{const q=M.neighbors[v].leftIndex;q!==null&&S(q)}break}case Q.key==="Delete":{if(Q.preventDefault(),s)break;v==null||v==="all"?k():C(),O();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(Q.key):{if(Q.preventDefault(),s||E==null)break;v==="all"&&S(E);const q=x.sections[E],X=h.getActiveDateManager(t,x,q),G=YO(t,_,q,Q.key,B,R,X.date,{minutesStep:o});L({activeSection:q,newSectionValue:G,shouldGoToNextSection:!1});break}}});Wt(()=>{z.syncSelectionToDOM()});const{hasValidationError:D}=hb({props:n,validator:m,timezone:_,value:x.value,onError:n.onError}),Y=I.useMemo(()=>u!==void 0?u:D,[D,u]);I.useEffect(()=>{!Y&&E==null&&O()},[x.referenceValue,E,Y]),I.useEffect(()=>{x.tempValueStrAndroid!=null&&E!=null&&(O(),C())},[x.sections]),I.useImperativeHandle(r,()=>({getSections:()=>x.sections,getActiveSectionIndex:z.getActiveSectionIndexFromDOM,setSelectedSections:z.setSelectedSections,focusField:z.focusField,isFieldFocused:z.isFieldFocused}));const te=Pe((Q,...q)=>{Q.preventDefault(),f?.(Q,...q),k(),z.isFieldFocused()?S(M.startIndex):z.focusField(0)}),N={onKeyDown:U,onClear:te,error:Y,clearable:!!(d&&!A&&!s&&!i)},ae={disabled:i,readOnly:s};return K({},e.forwardedProps,N,ae,V)},zL=["clearable","onClear","InputProps","sx","slots","slotProps"],VL=["ownerState"],WL=e=>{const t=Mr(),{clearable:n,onClear:r,InputProps:o,sx:a,slots:i,slotProps:s}=e,l=Ue(e,zL),u=i?.clearButton??Qn,d=dt({elementType:u,externalSlotProps:s?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),f=Ue(d,VL),h=i?.clearIcon??IL,p=dt({elementType:h,externalSlotProps:s?.clearIcon,ownerState:{}});return K({},l,{InputProps:K({},o,{endAdornment:c.jsxs(I.Fragment,{children:[n&&c.jsx(mb,{position:"end",sx:{marginRight:o?.endAdornment?-1:-1.5},children:c.jsx(u,K({},f,{onClick:r,children:c.jsx(h,K({fontSize:"small"},p))}))}),o?.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(a)?a:[a]]})},qL=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],YL=(e,t)=>I.useMemo(()=>{const n=K({},e),r={},o=a=>{n.hasOwnProperty(a)&&(r[a]=n[a],delete n[a])};return qL.forEach(o),fb.forEach(o),{forwardedProps:n,internalProps:r}},[e,t]),KL=e=>{const t=wt(),n=Li();return K({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??t.formats.keyboardDate,minDate:Bn(t,e.minDate,n.minDate),maxDate:Bn(t,e.maxDate,n.maxDate)})},GL=e=>{const t=KL(e),{forwardedProps:n,internalProps:r}=YL(t,"date");return UL({forwardedProps:n,internalProps:r,valueManager:ur,fieldValueManager:aN,validator:Fi,valueType:"date"})};function QL(e){return _e("MuiPickersTextField",e)}Le("MuiPickersTextField",["root","focused","disabled","error","required"]);function XL(e){return _e("MuiPickersInputBase",e)}const Yo=Le("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function ZL(e){return _e("MuiPickersSectionList",e)}const _a=Le("MuiPickersSectionList",["root","section","sectionContent"]),JL=["slots","slotProps","elements","sectionListRef"],vb=le("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),Sb=le("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),kb=le("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),Db=le("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),eF=e=>{const{classes:t}=e;return Fe({root:["root"],section:["section"],sectionContent:["sectionContent"]},ZL,t)};function tF(e){const{slots:t,slotProps:n,element:r,classes:o}=e,a=t?.section??Sb,i=dt({elementType:a,externalSlotProps:n?.section,externalForwardedProps:r.container,className:o.section,ownerState:{}}),s=t?.sectionContent??Db,l=dt({elementType:s,externalSlotProps:n?.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:{}}),u=t?.sectionSeparator??kb,d=dt({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),f=dt({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return c.jsxs(a,K({},i,{children:[c.jsx(u,K({},d)),c.jsx(s,K({},l)),c.jsx(u,K({},f))]}))}const nF=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiPickersSectionList"}),{slots:o,slotProps:a,elements:i,sectionListRef:s}=r,l=Ue(r,JL),u=eF(r),d=I.useRef(null),f=ct(n,d),h=b=>{if(!d.current)throw new Error(`MUI X: Cannot call sectionListRef.${b} before the mount of the component.`);return d.current};I.useImperativeHandle(s,()=>({getRoot(){return h("getRoot")},getSectionContainer(b){return h("getSectionContainer").querySelector(`.${_a.section}[data-sectionindex="${b}"]`)},getSectionContent(b){return h("getSectionContent").querySelector(`.${_a.section}[data-sectionindex="${b}"] .${_a.sectionContent}`)},getSectionIndexFromDOMElement(b){const y=h("getSectionIndexFromDOMElement");if(b==null||!y.contains(b))return null;let x=null;return b.classList.contains(_a.section)?x=b:b.classList.contains(_a.sectionContent)&&(x=b.parentElement),x==null?null:Number(x.dataset.sectionindex)}}));const p=o?.root??vb,m=dt({elementType:p,externalSlotProps:a?.root,externalForwardedProps:l,additionalProps:{ref:f,suppressContentEditableWarning:!0},className:u.root,ownerState:{}});return c.jsx(p,K({},m,{children:m.contentEditable?i.map(({content:b,before:y,after:x})=>`${y.children}${b.children}${x.children}`).join(""):c.jsx(I.Fragment,{children:i.map((b,y)=>c.jsx(tF,{slots:o,slotProps:a,element:b,classes:u},y))})}))}),rF=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],oF=e=>Math.round(e*1e5)/1e5,Ol=le("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>K({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${oF(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),$d=le(vb,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:t,focused:n,filled:r,label:o})=>!t&&!n&&!r&&o==null,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode==="light"?.42:.5}}]})),aF=le(Sb,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),iF=le(Db,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),sF=le(kb,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),lF=le("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(K({},OO)),uF=e=>{const{focused:t,disabled:n,error:r,classes:o,fullWidth:a,readOnly:i,color:s,size:l,endAdornment:u,startAdornment:d}=e,f={root:["root",t&&!n&&"focused",n&&"disabled",i&&"readOnly",r&&"error",a&&"fullWidth",`color${De(s)}`,l==="small"&&"inputSizeSmall",!!d&&"adornedStart",!!u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return Fe(f,XL,o)},Hd=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:a,value:i,onChange:s,id:l,endAdornment:u,startAdornment:d,renderSuffix:f,slots:h,slotProps:p,contentEditable:m,tabIndex:b,onInput:y,onPaste:x,onKeyDown:E,name:v,readOnly:S,inputProps:k,inputRef:C,sectionListRef:L}=r,F=Ue(r,rF),B=I.useRef(null),R=ct(n,B),_=ct(k?.ref,C),T=qn(),O=Xn();if(!O)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const A=D=>{if(O.disabled){D.stopPropagation();return}O.onFocus?.(D)};I.useEffect(()=>{O&&O.setAdornedStart(!!d)},[O,d]),I.useEffect(()=>{O&&(a?O.onEmpty():O.onFilled())},[O,a]);const w=K({},r,O,{isRtl:T}),M=uF(w),V=h?.root||Ol,z=dt({elementType:V,externalSlotProps:p?.root,externalForwardedProps:F,additionalProps:{"aria-invalid":O.error,ref:R},className:M.root,ownerState:w}),U=h?.input||$d;return c.jsxs(V,K({},z,{children:[d,c.jsx(nF,{sectionListRef:L,elements:o,contentEditable:m,tabIndex:b,className:M.sectionsContainer,onFocus:A,onBlur:O.onBlur,onInput:y,onPaste:x,onKeyDown:E,slots:{root:U,section:aF,sectionContent:iF,sectionSeparator:sF},slotProps:{root:{ownerState:w},sectionContent:{className:Yo.sectionContent},sectionSeparator:({position:D})=>({className:D==="before"?Yo.sectionBefore:Yo.sectionAfter})}}),u,f?f(K({},O)):null,c.jsx(lF,K({name:v,className:M.input,value:i,onChange:s,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:S,required:O.required,disabled:O.disabled},k,{ref:_}))]}))});function cF(e){return _e("MuiPickersOutlinedInput",e)}const zn=K({},Yo,Le("MuiPickersOutlinedInput",["root","notchedOutline","input"])),dF=["children","className","label","notched","shrink"],fF=le("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),mm=le("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),pF=le("legend")(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function hF(e){const{className:t,label:n}=e,r=Ue(e,dF),o=n!=null&&n!=="",a=K({},e,{withLabel:o});return c.jsx(fF,K({"aria-hidden":!0,className:t},r,{ownerState:a,children:c.jsx(pF,{ownerState:a,children:o?c.jsx(mm,{children:n}):c.jsx(mm,{className:"notranslate",children:"​"})})}))}const mF=["label","autoFocus","ownerState","notched"],gF=le(Ol,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${zn.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${zn.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${zn.focused} .${zn.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${zn.disabled}`]:{[`& .${zn.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${zn.error} .${zn.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(n=>(e.vars??e).palette[n]?.main??!1).map(n=>({props:{color:n},style:{[`&.${zn.focused}:not(.${zn.error}) .${zn.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),bF=le($d,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),yF=e=>{const{classes:t}=e,r=Fe({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},cF,t);return K({},t,r)},wb=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiPickersOutlinedInput"}),{label:o,ownerState:a,notched:i}=r,s=Ue(r,mF),l=Xn(),u=K({},r,a,l,{color:l?.color||"primary"}),d=yF(u);return c.jsx(Hd,K({slots:{root:gF,input:bF},renderSuffix:f=>c.jsx(hF,{shrink:!!(i||f.adornedStart||f.focused||f.filled),notched:!!(i||f.adornedStart||f.focused||f.filled),className:d.notchedOutline,label:o!=null&&o!==""&&l?.required?c.jsxs(I.Fragment,{children:[o," ","*"]}):o,ownerState:u})},s,{label:o,classes:d,ref:n}))});wb.muiName="Input";function xF(e){return _e("MuiPickersFilledInput",e)}const Jr=K({},Yo,Le("MuiPickersFilledInput",["root","underline","input"])),EF=["label","autoFocus","disableUnderline","ownerState"],CF=le(Ol,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>Rt.shouldForwardProp(e)&&e!=="disableUnderline"})(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Jr.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Jr.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[...Object.keys((e.vars??e).palette).filter(i=>(e.vars??e).palette[i].main).map(i=>({props:{color:i,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[i]?.main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Jr.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Jr.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Jr.disabled}, .${Jr.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Jr.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:i})=>!!i,style:{paddingLeft:12}},{props:({endAdornment:i})=>!!i,style:{paddingRight:12}}]}}),TF=le($d,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),vF=e=>{const{classes:t,disableUnderline:n}=e,o=Fe({root:["root",!n&&"underline"],input:["input"]},xF,t);return K({},t,o)},Ab=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:a=!1,ownerState:i}=r,s=Ue(r,EF),l=Xn(),u=K({},r,i,l,{color:l?.color||"primary"}),d=vF(u);return c.jsx(Hd,K({slots:{root:CF,input:TF},slotProps:{root:{disableUnderline:a}}},s,{label:o,classes:d,ref:n}))});Ab.muiName="Input";function SF(e){return _e("MuiPickersFilledInput",e)}const Ba=K({},Yo,Le("MuiPickersInput",["root","input"])),kF=["label","autoFocus","disableUnderline","ownerState"],DF=le(Ol,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(r=>(e.vars??e).palette[r].main).map(r=>({props:{color:r},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Ba.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ba.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Ba.disabled}, .${Ba.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Ba.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),wF=e=>{const{classes:t,disableUnderline:n}=e,o=Fe({root:["root",!n&&"underline"],input:["input"]},SF,t);return K({},t,o)},Ib=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiPickersInput"}),{label:o,disableUnderline:a=!1,ownerState:i}=r,s=Ue(r,kF),l=Xn(),u=K({},r,i,l,{disableUnderline:a,color:l?.color||"primary"}),d=wF(u);return c.jsx(Hd,K({slots:{root:DF}},s,{label:o,classes:d,ref:n}))});Ib.muiName="Input";const AF=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],IF={standard:Ib,filled:Ab,outlined:wb},PF=le(Vs,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({maxWidth:"100%"}),RF=e=>{const{focused:t,disabled:n,classes:r,required:o}=e;return Fe({root:["root",t&&!n&&"focused",n&&"disabled",o&&"required"]},QL,r)},MF=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiPickersTextField"}),{onFocus:o,onBlur:a,className:i,color:s="primary",disabled:l=!1,error:u=!1,variant:d="outlined",required:f=!1,InputProps:h,inputProps:p,inputRef:m,sectionListRef:b,elements:y,areAllSectionsEmpty:x,onClick:E,onKeyDown:v,onKeyUp:S,onPaste:k,onInput:C,endAdornment:L,startAdornment:F,tabIndex:B,contentEditable:R,focused:_,value:T,onChange:O,fullWidth:A,id:w,name:M,helperText:V,FormHelperTextProps:z,label:U,InputLabelProps:D}=r,Y=Ue(r,AF),te=I.useRef(null),N=ct(n,te),ae=Yn(w),Q=V&&ae?`${ae}-helper-text`:void 0,q=U&&ae?`${ae}-label`:void 0,X=K({},r,{color:s,disabled:l,error:u,focused:_,required:f,variant:d}),G=RF(X),ee=IF[d];return c.jsxs(PF,K({className:Ae(G.root,i),ref:N,focused:_,onFocus:o,onBlur:a,disabled:l,variant:d,error:u,color:s,fullWidth:A,required:f,ownerState:X},Y,{children:[c.jsx(zs,K({htmlFor:ae,id:q},D,{children:U})),c.jsx(ee,K({elements:y,areAllSectionsEmpty:x,onClick:E,onKeyDown:v,onKeyUp:S,onInput:C,onPaste:k,endAdornment:L,startAdornment:F,tabIndex:B,contentEditable:R,value:T,onChange:O,id:ae,fullWidth:A,inputProps:p,inputRef:m,sectionListRef:b,label:U,name:M,role:"group","aria-labelledby":q,"aria-describedby":Q,"aria-live":Q?"polite":void 0},h)),V&&c.jsx(M1,K({id:Q},z,{children:V}))]}))}),OF=["enableAccessibleFieldDOMStructure"],NF=["InputProps","readOnly"],LF=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],FF=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=Ue(e,OF);if(t){const{InputProps:f,readOnly:h}=n,p=Ue(n,NF);return K({},p,{InputProps:K({},f??{},{readOnly:h})})}const{onPaste:r,onKeyDown:o,inputMode:a,readOnly:i,InputProps:s,inputProps:l,inputRef:u}=n,d=Ue(n,LF);return K({},d,{InputProps:K({},s??{},{readOnly:i}),inputProps:K({},l??{},{inputMode:a,onPaste:r,onKeyDown:o,ref:u})})},_F=["slots","slotProps","InputProps","inputProps"],Pb=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiDateField"}),{slots:o,slotProps:a,InputProps:i,inputProps:s}=r,l=Ue(r,_F),u=r,d=o?.textField??(t.enableAccessibleFieldDOMStructure?MF:Je),f=dt({elementType:d,externalSlotProps:a?.textField,externalForwardedProps:l,additionalProps:{ref:n},ownerState:u});f.inputProps=K({},s,f.inputProps),f.InputProps=K({},i,f.InputProps);const h=GL(f),p=FF(h),m=WL(K({},p,{slots:o,slotProps:a}));return c.jsx(d,K({},m))}),Rb=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:a,disablePast:i,timezone:s})=>{const l=vo();return I.useCallback(u=>Fi({adapter:l,value:u,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:a,disablePast:i}})!==null,[l,e,t,n,r,o,a,i,s])},BF=(e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return K({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const a=o.newTimezone;if(n.getTimezone(r.currentMonth)===a)return r;let i=n.setTimezone(r.currentMonth,a);return n.getMonth(i)!==n.getMonth(r.currentMonth)&&(i=n.setMonth(i,n.getMonth(r.currentMonth))),K({},r,{currentMonth:i})}case"finishMonthSwitchingAnimation":return K({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(r.focusedDay!=null&&o.focusedDay!=null&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const a=o.focusedDay!=null&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return K({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:a&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:a?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:o.focusedDay!=null&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},jF=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:a=!1,maxDate:i,minDate:s,onMonthChange:l,reduceAnimations:u,shouldDisableDate:d,timezone:f}=e,h=wt(),p=I.useRef(BF(!!u,a,h)).current,m=I.useMemo(()=>ur.getInitialReferenceValue({value:t,utils:h,timezone:f,props:e,referenceDate:n,granularity:or.day}),[n,f]),[b,y]=I.useReducer(p,{isMonthSwitchingAnimating:!1,focusedDay:m,currentMonth:h.startOfMonth(m),slideDirection:"left"});I.useEffect(()=>{y({type:"changeMonthTimezone",newTimezone:h.getTimezone(m)})},[m,h]);const x=I.useCallback(C=>{y(K({type:"changeMonth"},C)),l&&l(C.newMonth)},[l]),E=I.useCallback(C=>{const L=C;h.isSameMonth(L,b.currentMonth)||x({newMonth:h.startOfMonth(L),direction:h.isAfterDay(L,b.currentMonth)?"left":"right"})},[b.currentMonth,x,h]),v=Rb({shouldDisableDate:d,minDate:s,maxDate:i,disableFuture:r,disablePast:o,timezone:f}),S=I.useCallback(()=>{y({type:"finishMonthSwitchingAnimation"})},[]),k=Pe((C,L)=>{v(C)||y({type:"changeFocusedDay",focusedDay:C,withoutMonthSwitchingAnimation:L})});return{referenceDate:m,calendarState:b,changeMonth:E,changeFocusedDay:k,isDateDisabled:v,onMonthSwitchingAnimationEnd:S,handleChangeMonth:x}},$F=e=>_e("MuiPickersFadeTransitionGroup",e);Le("MuiPickersFadeTransitionGroup",["root"]);const HF=e=>{const{classes:t}=e;return Fe({root:["root"]},$F,t)},UF=le(Ri,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function Mb(e){const t=Dt({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:a}=t,i=HF(t),s=yo();return o?n:c.jsx(UF,{className:Ae(i.root,r),children:c.jsx(mo,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:n},a)})}function zF(e){return _e("MuiPickersDay",e)}const eo=Le("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),VF=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],WF=e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:a,outsideCurrentMonth:i,showDaysOutsideCurrentMonth:s,classes:l}=e,u=i&&!s;return Fe({root:["root",t&&!u&&"selected",a&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",i&&s&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},zF,l)},Ob=({theme:e})=>K({},e.typography.caption,{width:xi,height:xi,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Rt.alpha(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:Rt.alpha(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${eo.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${eo.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${eo.disabled}:not(.${eo.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${eo.disabled}&.${eo.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${Rl}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${eo.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),Nb=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},qF=le(Jo,{name:"MuiPickersDay",slot:"Root",overridesResolver:Nb})(Ob),YF=le("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Nb})(({theme:e})=>K({},Ob({theme:e}),{opacity:0,pointerEvents:"none"})),ja=()=>{},KF=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:a,day:i,disabled:s=!1,disableHighlightToday:l=!1,disableMargin:u=!1,isAnimating:d,onClick:f,onDaySelect:h,onFocus:p=ja,onBlur:m=ja,onKeyDown:b=ja,onMouseDown:y=ja,onMouseEnter:x=ja,outsideCurrentMonth:E,selected:v=!1,showDaysOutsideCurrentMonth:S=!1,children:k,today:C=!1}=r,L=Ue(r,VF),F=K({},r,{autoFocus:o,disabled:s,disableHighlightToday:l,disableMargin:u,selected:v,showDaysOutsideCurrentMonth:S,today:C}),B=WF(F),R=wt(),_=I.useRef(null),T=ct(_,n);Wt(()=>{o&&!s&&!d&&!E&&_.current.focus()},[o,s,d,E]);const O=w=>{y(w),E&&w.preventDefault()},A=w=>{s||h(i),E&&w.currentTarget.focus(),f&&f(w)};return E&&!S?c.jsx(YF,{className:Ae(B.root,B.hiddenDaySpacingFiller,a),ownerState:F,role:L.role}):c.jsx(qF,K({className:Ae(B.root,a),ref:T,centerRipple:!0,disabled:s,tabIndex:v?0:-1,onKeyDown:w=>b(w,i),onFocus:w=>p(w,i),onBlur:w=>m(w,i),onMouseEnter:w=>x(w,i),onClick:A,onMouseDown:O},L,{ownerState:F,children:k||R.format(i,"dayOfMonth")}))}),GF=I.memo(KF),QF=e=>_e("MuiPickersSlideTransition",e),An=Le("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),XF=["children","className","reduceAnimations","slideDirection","transKey","classes"],ZF=e=>{const{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Fe(r,QF,t)},JF=le(Ri,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${An["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${An["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${An.slideEnterActive}`]:t.slideEnterActive},{[`.${An.slideExit}`]:t.slideExit},{[`.${An["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${An["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${An["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${An["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${An.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${An.slideExit}`]:{transform:"translate(0%)"},[`& .${An["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${An["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function e_(e){const t=Dt({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:a}=t,i=Ue(t,XF),s=ZF(t),l=yo();if(o)return c.jsx("div",{className:Ae(s.root,r),children:n});const u={exit:s.exit,enterActive:s.enterActive,enter:s.enter,exitActive:s.exitActive};return c.jsx(JF,{className:Ae(s.root,r),childFactory:d=>I.cloneElement(d,{classNames:u}),role:"presentation",children:c.jsx(hd,K({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:u},i,{children:n}),a)})}const t_=e=>_e("MuiDayCalendar",e);Le("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const n_=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],r_=["ownerState"],o_=e=>{const{classes:t}=e;return Fe({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},t_,t)},Lb=(xi+Rl*2)*6,a_=le("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),i_=le("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),s_=le(ut,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),l_=le(ut,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),u_=le(ut,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>K({},e.typography.caption,{width:xi,height:xi,padding:0,margin:`0 ${Rl}px`,color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),c_=le("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:Lb}),d_=le(e_,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:Lb}),f_=le("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),p_=le("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${Rl}px 0`,display:"flex",justifyContent:"center"});function h_(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:o,isDateDisabled:a,currentMonthNumber:i,isViewFocused:s}=e,l=Ue(e,n_);const{disabled:u,disableHighlightToday:d,isMonthSwitchingAnimating:f,showDaysOutsideCurrentMonth:h,slots:p,slotProps:m,timezone:b}=t,y=wt(),x=Pl(b),E=r!==null&&y.isSameDay(n,r),v=o.some(T=>y.isSameDay(T,n)),S=y.isSameDay(n,x),k=p?.day??GF,C=dt({elementType:k,externalSlotProps:m?.day,additionalProps:K({disableHighlightToday:d,showDaysOutsideCurrentMonth:h,role:"gridcell",isAnimating:f,"data-timestamp":y.toJsDate(n).valueOf()},l),ownerState:K({},t,{day:n,selected:v})}),L=Ue(C,r_),F=I.useMemo(()=>u||a(n),[u,a,n]),B=I.useMemo(()=>y.getMonth(n)!==i,[y,n,i]),R=I.useMemo(()=>{const T=y.startOfMonth(y.setMonth(n,i));return h?y.isSameDay(n,y.startOfWeek(T)):y.isSameDay(n,T)},[i,n,h,y]),_=I.useMemo(()=>{const T=y.endOfMonth(y.setMonth(n,i));return h?y.isSameDay(n,y.endOfWeek(T)):y.isSameDay(n,T)},[i,n,h,y]);return c.jsx(k,K({},L,{day:n,disabled:F,autoFocus:s&&E,today:S,outsideCurrentMonth:B,isFirstVisibleCell:R,isLastVisibleCell:_,selected:v,tabIndex:E?0:-1,"aria-selected":v,"aria-current":S?"date":void 0}))}function m_(e){const t=Dt({props:e,name:"MuiDayCalendar"}),n=wt(),{onFocusedDayChange:r,className:o,currentMonth:a,selectedDays:i,focusedDay:s,loading:l,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:d,readOnly:f,reduceAnimations:h,renderLoading:p=()=>c.jsx("span",{children:"..."}),slideDirection:m,TransitionProps:b,disablePast:y,disableFuture:x,minDate:E,maxDate:v,shouldDisableDate:S,shouldDisableMonth:k,shouldDisableYear:C,dayOfWeekFormatter:L=de=>n.format(de,"weekdayShort").charAt(0).toUpperCase(),hasFocus:F,onFocusedViewChange:B,gridLabelId:R,displayWeekNumber:_,fixedWeekNumber:T,autoFocus:O,timezone:A}=t,w=Pl(A),M=o_(t),V=qn(),z=Rb({shouldDisableDate:S,shouldDisableMonth:k,shouldDisableYear:C,minDate:E,maxDate:v,disablePast:y,disableFuture:x,timezone:A}),U=Mr(),[D,Y]=Nn({name:"DayCalendar",state:"hasFocus",controlled:F,default:O??!1}),[te,N]=I.useState(()=>s||w),ae=Pe(de=>{f||u(de)}),Q=de=>{z(de)||(r(de),N(de),B?.(!0),Y(!0))},q=Pe((de,be)=>{switch(de.key){case"ArrowUp":Q(n.addDays(be,-7)),de.preventDefault();break;case"ArrowDown":Q(n.addDays(be,7)),de.preventDefault();break;case"ArrowLeft":{const ie=n.addDays(be,V?1:-1),Ie=n.addMonths(be,V?1:-1),ve=si({utils:n,date:ie,minDate:V?ie:n.startOfMonth(Ie),maxDate:V?n.endOfMonth(Ie):ie,isDateDisabled:z,timezone:A});Q(ve||ie),de.preventDefault();break}case"ArrowRight":{const ie=n.addDays(be,V?-1:1),Ie=n.addMonths(be,V?-1:1),ve=si({utils:n,date:ie,minDate:V?n.startOfMonth(Ie):ie,maxDate:V?ie:n.endOfMonth(Ie),isDateDisabled:z,timezone:A});Q(ve||ie),de.preventDefault();break}case"Home":Q(n.startOfWeek(be)),de.preventDefault();break;case"End":Q(n.endOfWeek(be)),de.preventDefault();break;case"PageUp":Q(n.addMonths(be,1)),de.preventDefault();break;case"PageDown":Q(n.addMonths(be,-1)),de.preventDefault();break}}),X=Pe((de,be)=>Q(be)),G=Pe((de,be)=>{D&&n.isSameDay(te,be)&&B?.(!1)}),ee=n.getMonth(a),oe=n.getYear(a),ne=I.useMemo(()=>i.filter(de=>!!de).map(de=>n.startOfDay(de)),[n,i]),pe=`${oe}-${ee}`,Z=I.useMemo(()=>I.createRef(),[pe]),J=I.useMemo(()=>{const de=n.startOfMonth(a),be=n.endOfMonth(a);return z(te)||n.isAfterDay(te,be)||n.isBeforeDay(te,de)?si({utils:n,date:te,minDate:de,maxDate:be,disablePast:y,disableFuture:x,isDateDisabled:z,timezone:A}):te},[a,x,y,te,z,n,A]),ye=I.useMemo(()=>{const de=n.getWeekArray(a);let be=n.addMonths(a,1);for(;T&&de.length<T;){const ie=n.getWeekArray(be),Ie=n.isSameDay(de[de.length-1][0],ie[0][0]);ie.slice(Ie?1:0).forEach(ve=>{de.length<T&&de.push(ve)}),be=n.addMonths(be,1)}return de},[a,T,n]);return c.jsxs(a_,{role:"grid","aria-labelledby":R,className:M.root,children:[c.jsxs(i_,{role:"row",className:M.header,children:[_&&c.jsx(l_,{variant:"caption",role:"columnheader","aria-label":U.calendarWeekNumberHeaderLabel,className:M.weekNumberLabel,children:U.calendarWeekNumberHeaderText}),BO(n,w).map((de,be)=>c.jsx(s_,{variant:"caption",role:"columnheader","aria-label":n.format(de,"weekday"),className:M.weekDayLabel,children:L(de)},be.toString()))]}),l?c.jsx(c_,{className:M.loadingContainer,children:p()}):c.jsx(d_,K({transKey:pe,onExited:d,reduceAnimations:h,slideDirection:m,className:Ae(o,M.slideTransition)},b,{nodeRef:Z,children:c.jsx(f_,{ref:Z,role:"rowgroup",className:M.monthContainer,children:ye.map((de,be)=>c.jsxs(p_,{role:"row",className:M.weekContainer,"aria-rowindex":be+1,children:[_&&c.jsx(u_,{className:M.weekNumber,role:"rowheader","aria-label":U.calendarWeekNumberAriaLabelText(n.getWeekNumber(de[0])),children:U.calendarWeekNumberText(n.getWeekNumber(de[0]))}),de.map((ie,Ie)=>c.jsx(h_,{parentProps:t,day:ie,selectedDays:ne,focusableDay:J,onKeyDown:q,onFocus:X,onBlur:G,onDaySelect:ae,isDateDisabled:z,currentMonthNumber:ee,isViewFocused:D,"aria-colindex":Ie+1},ie.toString()))]},`week-${de[0]}`))})}))]})}function g_(e){return _e("MuiPickersMonth",e)}const Ji=Le("MuiPickersMonth",["root","monthButton","disabled","selected"]),b_=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],y_=e=>{const{disabled:t,selected:n,classes:r}=e;return Fe({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},g_,r)},x_=le("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),E_=le("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${Ji.disabled}`]:t.disabled},{[`&.${Ji.selected}`]:t.selected}]})(({theme:e})=>K({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Rt.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Rt.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Ji.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Ji.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),C_=I.memo(function(t){const n=Dt({props:t,name:"MuiPickersMonth"}),{autoFocus:r,className:o,children:a,disabled:i,selected:s,value:l,tabIndex:u,onClick:d,onKeyDown:f,onFocus:h,onBlur:p,"aria-current":m,"aria-label":b,slots:y,slotProps:x}=n,E=Ue(n,b_),v=I.useRef(null),S=y_(n);Wt(()=>{r&&v.current?.focus()},[r]);const k=y?.monthButton??E_,C=dt({elementType:k,externalSlotProps:x?.monthButton,additionalProps:{children:a,disabled:i,tabIndex:u,ref:v,type:"button",role:"radio","aria-current":m,"aria-checked":s,"aria-label":b,onClick:L=>d(L,l),onKeyDown:L=>f(L,l),onFocus:L=>h(L,l),onBlur:L=>p(L,l)},ownerState:n,className:S.monthButton});return c.jsx(x_,K({className:Ae(S.root,o),ownerState:n},E,{children:c.jsx(k,K({},C))}))});function T_(e){return _e("MuiMonthCalendar",e)}Le("MuiMonthCalendar",["root"]);const v_=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],S_=e=>{const{classes:t}=e;return Fe({root:["root"]},T_,t)};function k_(e,t){const n=wt(),r=Li(),o=Dt({props:e,name:t});return K({disableFuture:!1,disablePast:!1},o,{minDate:Bn(n,o.minDate,r.minDate),maxDate:Bn(n,o.maxDate,r.maxDate)})}const D_=le("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:Ml,boxSizing:"border-box"}),w_=I.forwardRef(function(t,n){const r=k_(t,"MuiMonthCalendar"),{className:o,value:a,defaultValue:i,referenceDate:s,disabled:l,disableFuture:u,disablePast:d,maxDate:f,minDate:h,onChange:p,shouldDisableMonth:m,readOnly:b,autoFocus:y=!1,onMonthFocus:x,hasFocus:E,onFocusedViewChange:v,monthsPerRow:S=3,timezone:k,gridLabelId:C,slots:L,slotProps:F}=r,B=Ue(r,v_),{value:R,handleValueChange:_,timezone:T}=Bd({name:"MonthCalendar",timezone:k,value:a,defaultValue:i,referenceDate:s,onChange:p,valueManager:ur}),O=Pl(T),A=qn(),w=wt(),M=I.useMemo(()=>ur.getInitialReferenceValue({value:R,utils:w,props:r,timezone:T,referenceDate:s,granularity:or.month}),[]),V=r,z=S_(V),U=I.useMemo(()=>w.getMonth(O),[w,O]),D=I.useMemo(()=>R!=null?w.getMonth(R):null,[R,w]),[Y,te]=I.useState(()=>D||w.getMonth(M)),[N,ae]=Nn({name:"MonthCalendar",state:"hasFocus",controlled:E,default:y??!1}),Q=Pe(pe=>{ae(pe),v&&v(pe)}),q=I.useCallback(pe=>{const Z=w.startOfMonth(d&&w.isAfter(O,h)?O:h),J=w.startOfMonth(u&&w.isBefore(O,f)?O:f),ye=w.startOfMonth(pe);return w.isBefore(ye,Z)||w.isAfter(ye,J)?!0:m?m(ye):!1},[u,d,f,h,O,m,w]),X=Pe((pe,Z)=>{if(b)return;const J=w.setMonth(R??M,Z);_(J)}),G=Pe(pe=>{q(w.setMonth(R??M,pe))||(te(pe),Q(!0),x&&x(pe))});I.useEffect(()=>{te(pe=>D!==null&&pe!==D?D:pe)},[D]);const ee=Pe((pe,Z)=>{switch(pe.key){case"ArrowUp":G((12+Z-3)%12),pe.preventDefault();break;case"ArrowDown":G((12+Z+3)%12),pe.preventDefault();break;case"ArrowLeft":G((12+Z+(A?1:-1))%12),pe.preventDefault();break;case"ArrowRight":G((12+Z+(A?-1:1))%12),pe.preventDefault();break}}),oe=Pe((pe,Z)=>{G(Z)}),ne=Pe((pe,Z)=>{Y===Z&&Q(!1)});return c.jsx(D_,K({ref:n,className:Ae(z.root,o),ownerState:V,role:"radiogroup","aria-labelledby":C},B,{children:Od(w,R??M).map(pe=>{const Z=w.getMonth(pe),J=w.format(pe,"monthShort"),ye=w.format(pe,"month"),de=Z===D,be=l||q(pe);return c.jsx(C_,{selected:de,value:Z,onClick:X,onKeyDown:ee,autoFocus:N&&Z===Y,disabled:be,tabIndex:Z===Y&&!be?0:-1,onFocus:oe,onBlur:ne,"aria-current":U===Z?"date":void 0,"aria-label":ye,monthsPerRow:S,slots:L,slotProps:F,children:J},J)})}))});function A_(e){return _e("MuiPickersYear",e)}const es=Le("MuiPickersYear",["root","yearButton","selected","disabled"]),I_=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],P_=e=>{const{disabled:t,selected:n,classes:r}=e;return Fe({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},A_,r)},R_=le("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),M_=le("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${es.disabled}`]:t.disabled},{[`&.${es.selected}`]:t.selected}]})(({theme:e})=>K({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:Rt.alpha(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Rt.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${es.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${es.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),O_=I.memo(function(t){const n=Dt({props:t,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:a,disabled:i,selected:s,value:l,tabIndex:u,onClick:d,onKeyDown:f,onFocus:h,onBlur:p,"aria-current":m,slots:b,slotProps:y}=n,x=Ue(n,I_),E=I.useRef(null),v=P_(n);Wt(()=>{r&&E.current?.focus()},[r]);const S=b?.yearButton??M_,k=dt({elementType:S,externalSlotProps:y?.yearButton,additionalProps:{children:a,disabled:i,tabIndex:u,ref:E,type:"button",role:"radio","aria-current":m,"aria-checked":s,onClick:C=>d(C,l),onKeyDown:C=>f(C,l),onFocus:C=>h(C,l),onBlur:C=>p(C,l)},ownerState:n,className:v.yearButton});return c.jsx(R_,K({className:Ae(v.root,o),ownerState:n},x,{children:c.jsx(S,K({},k))}))});function N_(e){return _e("MuiYearCalendar",e)}Le("MuiYearCalendar",["root"]);const L_=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],F_=e=>{const{classes:t}=e;return Fe({root:["root"]},N_,t)};function __(e,t){const n=wt(),r=Li(),o=Dt({props:e,name:t});return K({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:Bn(n,o.minDate,r.minDate),maxDate:Bn(n,o.maxDate,r.maxDate)})}const B_=le("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:Ml,maxHeight:cL,boxSizing:"border-box",position:"relative"}),j_=I.forwardRef(function(t,n){const r=__(t,"MuiYearCalendar"),{autoFocus:o,className:a,value:i,defaultValue:s,referenceDate:l,disabled:u,disableFuture:d,disablePast:f,maxDate:h,minDate:p,onChange:m,readOnly:b,shouldDisableYear:y,onYearFocus:x,hasFocus:E,onFocusedViewChange:v,yearsOrder:S="asc",yearsPerRow:k,timezone:C,gridLabelId:L,slots:F,slotProps:B}=r,R=Ue(r,L_),{value:_,handleValueChange:T,timezone:O}=Bd({name:"YearCalendar",timezone:C,value:i,defaultValue:s,referenceDate:l,onChange:m,valueManager:ur}),A=Pl(O),w=qn(),M=wt(),V=I.useMemo(()=>ur.getInitialReferenceValue({value:_,utils:M,props:r,timezone:O,referenceDate:l,granularity:or.year}),[]),z=r,U=F_(z),D=I.useMemo(()=>M.getYear(A),[M,A]),Y=I.useMemo(()=>_!=null?M.getYear(_):null,[_,M]),[te,N]=I.useState(()=>Y||M.getYear(V)),[ae,Q]=Nn({name:"YearCalendar",state:"hasFocus",controlled:E,default:o??!1}),q=Pe(ie=>{Q(ie),v&&v(ie)}),X=I.useCallback(ie=>{if(f&&M.isBeforeYear(ie,A)||d&&M.isAfterYear(ie,A)||p&&M.isBeforeYear(ie,p)||h&&M.isAfterYear(ie,h))return!0;if(!y)return!1;const Ie=M.startOfYear(ie);return y(Ie)},[d,f,h,p,A,y,M]),G=Pe((ie,Ie)=>{if(b)return;const ve=M.setYear(_??V,Ie);T(ve)}),ee=Pe(ie=>{X(M.setYear(_??V,ie))||(N(ie),q(!0),x?.(ie))});I.useEffect(()=>{N(ie=>Y!==null&&ie!==Y?Y:ie)},[Y]);const oe=S!=="desc"?k*1:k*-1,ne=w&&S==="asc"||!w&&S==="desc"?-1:1,pe=Pe((ie,Ie)=>{switch(ie.key){case"ArrowUp":ee(Ie-oe),ie.preventDefault();break;case"ArrowDown":ee(Ie+oe),ie.preventDefault();break;case"ArrowLeft":ee(Ie-ne),ie.preventDefault();break;case"ArrowRight":ee(Ie+ne),ie.preventDefault();break}}),Z=Pe((ie,Ie)=>{ee(Ie)}),J=Pe((ie,Ie)=>{te===Ie&&q(!1)}),ye=I.useRef(null),de=ct(n,ye);I.useEffect(()=>{if(o||ye.current===null)return;const ie=ye.current.querySelector('[tabindex="0"]');if(!ie)return;const Ie=ie.offsetHeight,ve=ie.offsetTop,Ve=ye.current.clientHeight,we=ye.current.scrollTop,At=ve+Ie;Ie>Ve||ve<we||(ye.current.scrollTop=At-Ve/2-Ie/2)},[o]);const be=M.getYearRange([p,h]);return S==="desc"&&be.reverse(),c.jsx(B_,K({ref:de,className:Ae(U.root,a),ownerState:z,role:"radiogroup","aria-labelledby":L},R,{children:be.map(ie=>{const Ie=M.getYear(ie),ve=Ie===Y,Ve=u||X(ie);return c.jsx(O_,{selected:ve,value:Ie,onClick:G,onKeyDown:pe,autoFocus:ae&&Ie===te,disabled:Ve,tabIndex:Ie===te&&!Ve?0:-1,onFocus:Z,onBlur:J,"aria-current":D===Ie?"date":void 0,yearsPerRow:k,slots:F,slotProps:B,children:M.format(ie,"year")},M.format(ie,"year"))})}))}),$_=e=>_e("MuiPickersCalendarHeader",e),H_=Le("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function U_(e){return _e("MuiPickersArrowSwitcher",e)}Le("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const z_=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],V_=["ownerState"],W_=["ownerState"],q_=le("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),Y_=le("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),gm=le(Qn,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),K_=e=>{const{classes:t}=e;return Fe({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},U_,t)},G_=I.forwardRef(function(t,n){const r=qn(),o=Dt({props:t,name:"MuiPickersArrowSwitcher"}),{children:a,className:i,slots:s,slotProps:l,isNextDisabled:u,isNextHidden:d,onGoToNext:f,nextLabel:h,isPreviousDisabled:p,isPreviousHidden:m,onGoToPrevious:b,previousLabel:y,labelId:x}=o,E=Ue(o,z_),v=o,S=K_(v),k={isDisabled:u,isHidden:d,goTo:f,label:h},C={isDisabled:p,isHidden:m,goTo:b,label:y},L=s?.previousIconButton??gm,F=dt({elementType:L,externalSlotProps:l?.previousIconButton,additionalProps:{size:"medium",title:C.label,"aria-label":C.label,disabled:C.isDisabled,edge:"end",onClick:C.goTo},ownerState:K({},v,{hidden:C.isHidden}),className:Ae(S.button,S.previousIconButton)}),B=s?.nextIconButton??gm,R=dt({elementType:B,externalSlotProps:l?.nextIconButton,additionalProps:{size:"medium",title:k.label,"aria-label":k.label,disabled:k.isDisabled,edge:"start",onClick:k.goTo},ownerState:K({},v,{hidden:k.isHidden}),className:Ae(S.button,S.nextIconButton)}),_=s?.leftArrowIcon??DL,T=dt({elementType:_,externalSlotProps:l?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:v,className:S.leftArrowIcon}),O=Ue(T,V_),A=s?.rightArrowIcon??wL,w=dt({elementType:A,externalSlotProps:l?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:v,className:S.rightArrowIcon}),M=Ue(w,W_);return c.jsxs(q_,K({ref:n,className:Ae(S.root,i),ownerState:v},E,{children:[c.jsx(L,K({},F,{children:r?c.jsx(A,K({},M)):c.jsx(_,K({},O))})),a?c.jsx(ut,{variant:"subtitle1",component:"span",id:x,children:a}):c.jsx(Y_,{className:S.spacer,ownerState:v}),c.jsx(B,K({},R,{children:r?c.jsx(_,K({},O)):c.jsx(A,K({},M))}))]}))});function Q_(e,{disableFuture:t,maxDate:n,timezone:r}){const o=wt();return I.useMemo(()=>{const a=o.date(void 0,r),i=o.startOfMonth(t&&o.isBefore(a,n)?a:n);return!o.isAfter(i,e)},[t,n,e,o,r])}function X_(e,{disablePast:t,minDate:n,timezone:r}){const o=wt();return I.useMemo(()=>{const a=o.date(void 0,r),i=o.startOfMonth(t&&o.isAfter(a,n)?a:n);return!o.isBefore(i,e)},[t,n,e,o,r])}const Z_=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],J_=["ownerState"],e7=e=>{const{classes:t}=e;return Fe({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},$_,t)},t7=le("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),n7=le("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>K({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),r7=le("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),o7=le(Qn,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${H_.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),a7=le(kL,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),i7=I.forwardRef(function(t,n){const r=Mr(),o=wt(),a=Dt({props:t,name:"MuiPickersCalendarHeader"}),{slots:i,slotProps:s,currentMonth:l,disabled:u,disableFuture:d,disablePast:f,maxDate:h,minDate:p,onMonthChange:m,onViewChange:b,view:y,reduceAnimations:x,views:E,labelId:v,className:S,timezone:k,format:C=`${o.formats.month} ${o.formats.year}`}=a,L=Ue(a,Z_),F=a,B=e7(a),R=i?.switchViewButton??o7,_=dt({elementType:R,externalSlotProps:s?.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(y)},ownerState:F,className:B.switchViewButton}),T=i?.switchViewIcon??a7,O=dt({elementType:T,externalSlotProps:s?.switchViewIcon,ownerState:F,className:B.switchViewIcon}),A=Ue(O,J_),w=()=>m(o.addMonths(l,1),"left"),M=()=>m(o.addMonths(l,-1),"right"),V=Q_(l,{disableFuture:d,maxDate:h,timezone:k}),z=X_(l,{disablePast:f,minDate:p,timezone:k}),U=()=>{if(!(E.length===1||!b||u))if(E.length===2)b(E.find(Y=>Y!==y)||E[0]);else{const Y=E.indexOf(y)!==0?0:1;b(E[Y])}};if(E.length===1&&E[0]==="year")return null;const D=o.formatByString(l,C);return c.jsxs(t7,K({},L,{ownerState:F,className:Ae(B.root,S),ref:n,children:[c.jsxs(n7,{role:"presentation",onClick:U,ownerState:F,"aria-live":"polite",className:B.labelContainer,children:[c.jsx(Mb,{reduceAnimations:x,transKey:D,children:c.jsx(r7,{id:v,ownerState:F,className:B.label,children:D})}),E.length>1&&!u&&c.jsx(R,K({},_,{children:c.jsx(T,K({},A))}))]}),c.jsx(mo,{in:y==="day",appear:!x,enter:!x,children:c.jsx(G_,{slots:i,slotProps:s,onGoToPrevious:M,isPreviousDisabled:z,previousLabel:r.previousMonth,onGoToNext:w,isNextDisabled:V,nextLabel:r.nextMonth})})]}))}),s7=le("div")({overflow:"hidden",width:Ml,maxHeight:jd,display:"flex",flexDirection:"column",margin:"0 auto"}),l7=e=>_e("MuiDateCalendar",e);Le("MuiDateCalendar",["root","viewTransitionContainer"]);const u7=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],c7=e=>{const{classes:t}=e;return Fe({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},l7,t)};function d7(e,t){const n=wt(),r=Li(),o=gb(),a=Dt({props:e,name:t});return K({},a,{loading:a.loading??!1,disablePast:a.disablePast??!1,disableFuture:a.disableFuture??!1,openTo:a.openTo??"day",views:a.views??["year","day"],reduceAnimations:a.reduceAnimations??o,renderLoading:a.renderLoading??(()=>c.jsx("span",{children:"..."})),minDate:Bn(n,a.minDate,r.minDate),maxDate:Bn(n,a.maxDate,r.maxDate)})}const f7=le(s7,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:jd}),p7=le(Mb,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),h7=I.forwardRef(function(t,n){const r=wt(),o=Yn(),a=d7(t,"MuiDateCalendar"),{autoFocus:i,onViewChange:s,value:l,defaultValue:u,referenceDate:d,disableFuture:f,disablePast:h,onChange:p,onYearChange:m,onMonthChange:b,reduceAnimations:y,shouldDisableDate:x,shouldDisableMonth:E,shouldDisableYear:v,view:S,views:k,openTo:C,className:L,disabled:F,readOnly:B,minDate:R,maxDate:_,disableHighlightToday:T,focusedView:O,onFocusedViewChange:A,showDaysOutsideCurrentMonth:w,fixedWeekNumber:M,dayOfWeekFormatter:V,slots:z,slotProps:U,loading:D,renderLoading:Y,displayWeekNumber:te,yearsOrder:N,yearsPerRow:ae,monthsPerRow:Q,timezone:q}=a,X=Ue(a,u7),{value:G,handleValueChange:ee,timezone:oe}=Bd({name:"DateCalendar",timezone:q,value:l,defaultValue:u,referenceDate:d,onChange:p,valueManager:ur}),{view:ne,setView:pe,focusedView:Z,setFocusedView:J,goToNextView:ye,setValueAndGoToNextView:de}=bb({view:S,views:k,openTo:C,onChange:ee,onViewChange:s,autoFocus:i,focusedView:O,onFocusedViewChange:A}),{referenceDate:be,calendarState:ie,changeFocusedDay:Ie,changeMonth:ve,handleChangeMonth:Ve,isDateDisabled:we,onMonthSwitchingAnimationEnd:At}=jF({value:G,referenceDate:d,reduceAnimations:y,onMonthChange:b,minDate:R,maxDate:_,shouldDisableDate:x,disablePast:h,disableFuture:f,timezone:oe}),rt=F&&G||R,Ye=F&&G||_,ue=`${o}-grid-label`,Ce=Z!==null,Oe=z?.calendarHeader??i7,He=dt({elementType:Oe,externalSlotProps:U?.calendarHeader,additionalProps:{views:k,view:ne,currentMonth:ie.currentMonth,onViewChange:pe,onMonthChange:(We,vt)=>Ve({newMonth:We,direction:vt}),minDate:rt,maxDate:Ye,disabled:F,disablePast:h,disableFuture:f,reduceAnimations:y,timezone:oe,labelId:ue},ownerState:a}),je=Pe(We=>{const vt=r.startOfMonth(We),Mt=r.endOfMonth(We),bt=we(We)?si({utils:r,date:We,minDate:r.isBefore(R,vt)?vt:R,maxDate:r.isAfter(_,Mt)?Mt:_,disablePast:h,disableFuture:f,isDateDisabled:we,timezone:oe}):We;bt?(de(bt,"finish"),b?.(vt)):(ye(),ve(vt)),Ie(bt,!0)}),Ne=Pe(We=>{const vt=r.startOfYear(We),Mt=r.endOfYear(We),bt=we(We)?si({utils:r,date:We,minDate:r.isBefore(R,vt)?vt:R,maxDate:r.isAfter(_,Mt)?Mt:_,disablePast:h,disableFuture:f,isDateDisabled:we,timezone:oe}):We;bt?(de(bt,"finish"),m?.(bt)):(ye(),ve(vt)),Ie(bt,!0)}),ot=Pe(We=>ee(We&&Ks(r,We,G??be),"finish",ne));I.useEffect(()=>{G!=null&&r.isValid(G)&&ve(G)},[G]);const Et=a,mt=c7(Et),se={disablePast:h,disableFuture:f,maxDate:_,minDate:R},xe={disableHighlightToday:T,readOnly:B,disabled:F,timezone:oe,gridLabelId:ue,slots:z,slotProps:U},Re=I.useRef(ne);I.useEffect(()=>{Re.current!==ne&&(Z===Re.current&&J(ne,!0),Re.current=ne)},[Z,J,ne]);const Be=I.useMemo(()=>[G],[G]);return c.jsxs(f7,K({ref:n,className:Ae(mt.root,L),ownerState:Et},X,{children:[c.jsx(Oe,K({},He,{slots:z,slotProps:U})),c.jsx(p7,{reduceAnimations:y,className:mt.viewTransitionContainer,transKey:ne,ownerState:Et,children:c.jsxs("div",{children:[ne==="year"&&c.jsx(j_,K({},se,xe,{value:G,onChange:Ne,shouldDisableYear:v,hasFocus:Ce,onFocusedViewChange:We=>J("year",We),yearsOrder:N,yearsPerRow:ae,referenceDate:be})),ne==="month"&&c.jsx(w_,K({},se,xe,{hasFocus:Ce,className:L,value:G,onChange:je,shouldDisableMonth:E,onFocusedViewChange:We=>J("month",We),monthsPerRow:Q,referenceDate:be})),ne==="day"&&c.jsx(m_,K({},ie,se,xe,{onMonthSwitchingAnimationEnd:At,onFocusedDayChange:Ie,reduceAnimations:y,selectedDays:Be,onSelectedDaysChange:ot,shouldDisableDate:x,shouldDisableMonth:E,shouldDisableYear:v,hasFocus:Ce,onFocusedViewChange:We=>J("day",We),showDaysOutsideCurrentMonth:w,fixedWeekNumber:M,dayOfWeekFormatter:V,displayWeekNumber:te,loading:D,renderLoading:Y}))]})})]}))}),Ko=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:a,defaultValue:i,referenceDate:s,onChange:l,className:u,classes:d,disableFuture:f,disablePast:h,minDate:p,maxDate:m,shouldDisableDate:b,shouldDisableMonth:y,shouldDisableYear:x,reduceAnimations:E,onMonthChange:v,monthsPerRow:S,onYearChange:k,yearsOrder:C,yearsPerRow:L,slots:F,slotProps:B,loading:R,renderLoading:_,disableHighlightToday:T,readOnly:O,disabled:A,showDaysOutsideCurrentMonth:w,dayOfWeekFormatter:M,sx:V,autoFocus:z,fixedWeekNumber:U,displayWeekNumber:D,timezone:Y})=>c.jsx(h7,{view:e,onViewChange:t,views:n.filter(nm),focusedView:r&&nm(r)?r:null,onFocusedViewChange:o,value:a,defaultValue:i,referenceDate:s,onChange:l,className:u,classes:d,disableFuture:f,disablePast:h,minDate:p,maxDate:m,shouldDisableDate:b,shouldDisableMonth:y,shouldDisableYear:x,reduceAnimations:E,onMonthChange:v,monthsPerRow:S,onYearChange:k,yearsOrder:C,yearsPerRow:L,slots:F,slotProps:B,loading:R,renderLoading:_,disableHighlightToday:T,readOnly:O,disabled:A,showDaysOutsideCurrentMonth:w,dayOfWeekFormatter:M,sx:V,autoFocus:z,fixedWeekNumber:U,displayWeekNumber:D,timezone:Y}),Fb=I.forwardRef(function(t,n){const r=Mr(),o=wt(),a=db(t,"MuiDesktopDatePicker"),i=K({day:Ko,month:Ko,year:Ko},a.viewRenderers),s=K({},a,{viewRenderers:i,format:Nd(o,a,!1),yearsPerRow:a.yearsPerRow??4,slots:K({openPickerIcon:AL,field:Pb},a.slots),slotProps:K({},a.slotProps,{field:u=>K({},Tl(a.slotProps?.field,u),pb(a),{ref:n}),toolbar:K({hidden:!0},a.slotProps?.toolbar)})}),{renderPicker:l}=SL({props:s,valueManager:ur,valueType:"date",getOpenDialogAriaText:ub({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:s.localeText?.openDatePickerDialogue}),validator:Fi});return l()});Fb.propTypes={autoFocus:ce.bool,className:ce.string,closeOnSelect:ce.bool,dayOfWeekFormatter:ce.func,defaultValue:ce.object,disabled:ce.bool,disableFuture:ce.bool,disableHighlightToday:ce.bool,disableOpenPicker:ce.bool,disablePast:ce.bool,displayWeekNumber:ce.bool,enableAccessibleFieldDOMStructure:ce.any,fixedWeekNumber:ce.number,format:ce.string,formatDensity:ce.oneOf(["dense","spacious"]),inputRef:x1,label:ce.node,loading:ce.bool,localeText:ce.object,maxDate:ce.object,minDate:ce.object,monthsPerRow:ce.oneOf([3,4]),name:ce.string,onAccept:ce.func,onChange:ce.func,onClose:ce.func,onError:ce.func,onMonthChange:ce.func,onOpen:ce.func,onSelectedSectionsChange:ce.func,onViewChange:ce.func,onYearChange:ce.func,open:ce.bool,openTo:ce.oneOf(["day","month","year"]),orientation:ce.oneOf(["landscape","portrait"]),readOnly:ce.bool,reduceAnimations:ce.bool,referenceDate:ce.object,renderLoading:ce.func,selectedSections:ce.oneOfType([ce.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),ce.number]),shouldDisableDate:ce.func,shouldDisableMonth:ce.func,shouldDisableYear:ce.func,showDaysOutsideCurrentMonth:ce.bool,slotProps:ce.object,slots:ce.object,sx:ce.oneOfType([ce.arrayOf(ce.oneOfType([ce.func,ce.object,ce.bool])),ce.func,ce.object]),timezone:ce.string,value:ce.object,view:ce.oneOf(["day","month","year"]),viewRenderers:ce.shape({day:ce.func,month:ce.func,year:ce.func}),views:ce.arrayOf(ce.oneOf(["day","month","year"]).isRequired),yearsOrder:ce.oneOf(["asc","desc"]),yearsPerRow:ce.oneOf([3,4])};const m7=le(Ir)({[`& .${ri.container}`]:{outline:0},[`& .${ri.paper}`]:{outline:0,minWidth:Ml}}),g7=le(Rr)({"&:first-of-type":{padding:0}});function b7(e){const{children:t,onDismiss:n,open:r,slots:o,slotProps:a}=e,i=o?.dialog??m7,s=o?.mobileTransition??mo;return c.jsx(i,K({open:r,onClose:n},a?.dialog,{TransitionComponent:s,TransitionProps:a?.mobileTransition,PaperComponent:o?.mobilePaper,PaperProps:a?.mobilePaper,children:c.jsx(g7,{children:t})}))}const y7=["props","getOpenDialogAriaText"],x7=e=>{let{props:t,getOpenDialogAriaText:n}=e,r=Ue(e,y7);const{slots:o,slotProps:a,className:i,sx:s,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:d,selectedSections:f,onSelectedSectionsChange:h,timezone:p,name:m,label:b,inputRef:y,readOnly:x,disabled:E,localeText:v}=t,S=I.useRef(null),k=Yn(),C=a?.toolbar?.hidden??!1,{open:L,actions:F,layoutProps:B,renderCurrentView:R,fieldProps:_,contextValue:T}=yb(K({},r,{props:t,fieldRef:S,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),O=o.field,A=dt({elementType:O,externalSlotProps:a?.field,additionalProps:K({},_,C&&{id:k},!(E||x)&&{onClick:F.onOpen,onKeyDown:PN(F.onOpen)},{readOnly:x??!0,disabled:E,className:i,sx:s,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:d,selectedSections:f,onSelectedSectionsChange:h,timezone:p,label:b,name:m},y?{inputRef:y}:{}),ownerState:t});A.inputProps=K({},A.inputProps,{"aria-label":n(_.value)});const w=K({textField:o.textField},A.slots),M=o.layout??Cb;let V=k;C&&(b?V=`${k}-label`:V=void 0);const z=K({},a,{toolbar:K({},a?.toolbar,{titleId:k}),mobilePaper:K({"aria-labelledby":V},a?.mobilePaper)}),U=ct(S,A.unstableFieldRef);return{renderPicker:()=>c.jsxs(Tb,{contextValue:T,localeText:v,children:[c.jsx(O,K({},A,{slots:w,slotProps:z,unstableFieldRef:U})),c.jsx(b7,K({},F,{open:L,slots:o,slotProps:z,children:c.jsx(M,K({},B,z?.layout,{slots:o,slotProps:z,children:R()}))}))]})}},_b=I.forwardRef(function(t,n){const r=Mr(),o=wt(),a=db(t,"MuiMobileDatePicker"),i=K({day:Ko,month:Ko,year:Ko},a.viewRenderers),s=K({},a,{viewRenderers:i,format:Nd(o,a,!1),slots:K({field:Pb},a.slots),slotProps:K({},a.slotProps,{field:u=>K({},Tl(a.slotProps?.field,u),pb(a),{ref:n}),toolbar:K({hidden:!1},a.slotProps?.toolbar)})}),{renderPicker:l}=x7({props:s,valueManager:ur,valueType:"date",getOpenDialogAriaText:ub({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:s.localeText?.openDatePickerDialogue}),validator:Fi});return l()});_b.propTypes={autoFocus:ce.bool,className:ce.string,closeOnSelect:ce.bool,dayOfWeekFormatter:ce.func,defaultValue:ce.object,disabled:ce.bool,disableFuture:ce.bool,disableHighlightToday:ce.bool,disableOpenPicker:ce.bool,disablePast:ce.bool,displayWeekNumber:ce.bool,enableAccessibleFieldDOMStructure:ce.any,fixedWeekNumber:ce.number,format:ce.string,formatDensity:ce.oneOf(["dense","spacious"]),inputRef:x1,label:ce.node,loading:ce.bool,localeText:ce.object,maxDate:ce.object,minDate:ce.object,monthsPerRow:ce.oneOf([3,4]),name:ce.string,onAccept:ce.func,onChange:ce.func,onClose:ce.func,onError:ce.func,onMonthChange:ce.func,onOpen:ce.func,onSelectedSectionsChange:ce.func,onViewChange:ce.func,onYearChange:ce.func,open:ce.bool,openTo:ce.oneOf(["day","month","year"]),orientation:ce.oneOf(["landscape","portrait"]),readOnly:ce.bool,reduceAnimations:ce.bool,referenceDate:ce.object,renderLoading:ce.func,selectedSections:ce.oneOfType([ce.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),ce.number]),shouldDisableDate:ce.func,shouldDisableMonth:ce.func,shouldDisableYear:ce.func,showDaysOutsideCurrentMonth:ce.bool,slotProps:ce.object,slots:ce.object,sx:ce.oneOfType([ce.arrayOf(ce.oneOfType([ce.func,ce.object,ce.bool])),ce.func,ce.object]),timezone:ce.string,value:ce.object,view:ce.oneOf(["day","month","year"]),viewRenderers:ce.shape({day:ce.func,month:ce.func,year:ce.func}),views:ce.arrayOf(ce.oneOf(["day","month","year"]).isRequired),yearsOrder:ce.oneOf(["asc","desc"]),yearsPerRow:ce.oneOf([3,4])};const E7=["desktopModeMediaQuery"],Es=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=RN}=r,a=Ue(r,E7);return nb(o,{defaultMatches:!0})?c.jsx(Fb,K({ref:n},a)):c.jsx(_b,K({ref:n},a))});var Cs={exports:{}},C7=Cs.exports,bm;function T7(){return bm||(bm=1,(function(e,t){(function(n,r){e.exports=r()})(C7,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(a,i,s){var l=i.prototype;s.utc=function(b){var y={date:b,utc:!0,args:arguments};return new i(y)},l.utc=function(b){var y=s(this.toDate(),{locale:this.$L,utc:!0});return b?y.add(this.utcOffset(),n):y},l.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var u=l.parse;l.parse=function(b){b.utc&&(this.$u=!0),this.$utils().u(b.$offset)||(this.$offset=b.$offset),u.call(this,b)};var d=l.init;l.init=function(){if(this.$u){var b=this.$d;this.$y=b.getUTCFullYear(),this.$M=b.getUTCMonth(),this.$D=b.getUTCDate(),this.$W=b.getUTCDay(),this.$H=b.getUTCHours(),this.$m=b.getUTCMinutes(),this.$s=b.getUTCSeconds(),this.$ms=b.getUTCMilliseconds()}else d.call(this)};var f=l.utcOffset;l.utcOffset=function(b,y){var x=this.$utils().u;if(x(b))return this.$u?0:x(this.$offset)?f.call(this):this.$offset;if(typeof b=="string"&&(b=(function(k){k===void 0&&(k="");var C=k.match(r);if(!C)return null;var L=(""+C[0]).match(o)||["-",0,0],F=L[0],B=60*+L[1]+ +L[2];return B===0?0:F==="+"?B:-B})(b),b===null))return this;var E=Math.abs(b)<=16?60*b:b;if(E===0)return this.utc(y);var v=this.clone();if(y)return v.$offset=E,v.$u=!1,v;var S=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(v=this.local().add(E+S,n)).$offset=E,v.$x.$localOffset=S,v};var h=l.format;l.format=function(b){var y=b||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,y)},l.valueOf=function(){var b=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*b},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var p=l.toDate;l.toDate=function(b){return b==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var m=l.diff;l.diff=function(b,y,x){if(b&&this.$u===b.$u)return m.call(this,b,y,x);var E=this.local(),v=s(b).local();return m.call(E,v,y,x)}}}))})(Cs)),Cs.exports}var v7=T7();const Bb=Wn(v7);ht.extend(Bb);function Au(e){switch(e){case"Star":return["Equals","Contains"];case"MinMax":return["Equals","Less Than","Greater Than","Between"];case"DateMinMax":return["Equals","Before","After","Between"];case"Retrieval":return["Semantic Search"];case"Boolean":return["Equals"];case"NONE":default:return[]}}function S7(e){return e==="DateMinMax"}function Iu(e){return e==="Between"}function jb({spec:e,values:t,selection:n,onChange:r,retrievalFn:o}){const a=()=>n?.matchType?n.matchType:e.defaultMatchType?e.defaultMatchType:e.filterType==="DateMinMax"?"Between":Au(e.filterType)[0]||"Equals",[i,s]=H.useState(a()),[l,u]=H.useState(n?.value??""),[d,f]=H.useState(n?.value2??""),[h,p]=H.useState([]),[m,b]=H.useState(!1),[y,x]=H.useState(""),[E,v]=H.useState(!1),[S,k]=H.useState(!1),C=H.useRef(null),L=H.useRef(0),[F,B]=H.useState(!1);H.useEffect(()=>{if(e.filterType!=="Retrieval"||!o)return;const D=y.trim();if(D.length<=2){p([]),v(!1);return}return C.current&&clearTimeout(C.current),C.current=setTimeout(async()=>{L.current+=1;const Y=L.current;b(!0);try{const te=await o(D,e);Y===L.current&&p(te)}catch(te){Y===L.current&&(console.error("Retrieval failed",te),p([]))}finally{Y===L.current&&(b(!1),v(!0))}},500),()=>{C.current&&clearTimeout(C.current)}},[y,e,o]),H.useEffect(()=>{n===null?(u(""),f(""),s(e.defaultMatchType??(e.filterType==="DateMinMax"?"Between":Au(e.filterType)[0]||"Equals"))):n&&(s(n.matchType),u(n.value??""),f(n.value2??""))},[n,e.filterType,e.defaultMatchType]);const R=Au(e.filterType),_=S7(e.filterType),T=Iu(i),O=_&&t.length>=2&&t[0].value instanceof Date?ht.utc(t[0].value):void 0,A=_&&t.length>=2&&t[1].value instanceof Date?ht.utc(t[1].value):void 0,w=e.filterType==="MinMax"&&t.length>=2&&typeof t[0].value=="number"?t[0].value:void 0,M=e.filterType==="MinMax"&&t.length>=2&&typeof t[1].value=="number"?t[1].value:void 0;if(R.length===0)return null;const V=D=>{const Y=D.target.value;s(Y),Iu(Y)||f(""),l&&r({dimensionName:e.dimensionName,source:e.source,filterName:e.filterName,matchType:Y,value:l,...Iu(Y)&&d&&{value2:d}})},z=(D,Y)=>{u(D??""),Y!==void 0&&f(Y??"");const te=Array.isArray(D)&&D.length===0;r(!te&&D!==""&&D!==null&&D!==void 0?{dimensionName:e.dimensionName,source:e.source,filterName:e.filterName,matchType:i,value:D,...T&&Y&&{value2:Y}}:null)},U=()=>{u(""),f(""),r(null)};return c.jsxs(kt,{sx:{display:"flex",flexDirection:"column",gap:1.5,fontSize:"0.75rem","& .MuiInputBase-root":{fontSize:"0.75rem"},"& .MuiInputBase-input":{padding:"6px 10px"},"& .MuiSelect-select":{padding:"6px 10px !important"},"& .MuiAutocomplete-input":{padding:"0 !important"},"& .MuiAutocomplete-root .MuiInputBase-root":{padding:"5px 10px",minHeight:"29.5px",boxSizing:"border-box",flexWrap:"wrap"},"& .MuiChip-root":{height:"16px",margin:"0 2px 0 0"},"& .MuiChip-label":{fontSize:"0.7rem",padding:"0 6px"},"& .MuiChip-deleteIcon":{fontSize:"14px",margin:"0 2px 0 -4px"},"& .MuiInputLabel-root":{fontSize:"0.75rem",transform:"translate(10px, 6px) scale(1)"},"& .MuiInputLabel-shrink":{fontSize:"0.85rem",transform:"translate(14px, -9px) scale(0.75)"},"& .MuiOutlinedInput-notchedOutline legend":{fontSize:"0.65rem"},"& .MuiFormHelperText-root":{fontSize:"0.65rem",marginTop:"2px"},"& .MuiSvgIcon-root":{fontSize:"1.25rem"}},children:[c.jsxs(kt,{sx:{fontWeight:600,color:e.required&&!n?"error.main":"text.primary"},children:[e.label??e.dimensionName,e.required&&c.jsx(kt,{component:"span",sx:{color:n?"text.secondary":"error.main",fontWeight:400,fontSize:"0.7rem",ml:.5},children:"(required)"})]}),e.filterType!=="Boolean"&&!e.defaultMatchType&&R.length>1&&c.jsxs(Vs,{size:"small",fullWidth:!0,children:[c.jsx(zs,{children:"Match Type"}),c.jsx(Ws,{value:i,label:"Match Type",onChange:V,MenuProps:{PaperProps:{sx:{"& .MuiMenuItem-root":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}},children:R.map(D=>c.jsx(Gt,{value:D,children:D},D))})]}),e.filterType==="Star"&&i==="Equals"&&c.jsx(Cc,{multiple:!0,size:"small",options:t,getOptionLabel:D=>typeof D=="string"?D:typeof D=="object"&&D!==null&&"value"in D?String(D.value):String(D),value:Array.isArray(l)?l.map(D=>t.find(Y=>Y.value===D)||D):l?[t.find(D=>D.value===l)||l]:[],onChange:(D,Y)=>{const te=Y.map(N=>typeof N=="string"?N:N&&typeof N=="object"&&"value"in N?N.value:N);z(te)},noOptionsText:"No matches found",renderInput:D=>c.jsx(Je,{...D,size:"small",label:"Values",placeholder:"Select values..."}),freeSolo:!e.values||e.values.length===0,slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}}}),e.filterType==="Star"&&i==="Contains"&&c.jsx(Je,{size:"small",label:"Search Text",value:l,onChange:D=>u(D.target.value),onBlur:()=>z(l),onKeyDown:D=>{D.key==="Enter"&&z(l)},placeholder:"Enter text to search...",fullWidth:!0}),e.filterType==="Boolean"&&c.jsxs(Vs,{size:"small",fullWidth:!0,children:[c.jsx(zs,{children:"Value"}),c.jsxs(Ws,{value:l===!0?"true":l===!1?"false":"",label:"Value",onChange:D=>{const Y=D.target.value;Y==="true"?z(!0):Y==="false"?z(!1):U()},MenuProps:{PaperProps:{sx:{"& .MuiMenuItem-root":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}},children:[c.jsx(Gt,{value:"",children:c.jsx("em",{children:"Blank"})}),c.jsx(Gt,{value:"true",children:"True"}),c.jsx(Gt,{value:"false",children:"False"})]})]}),e.filterType==="Retrieval"&&i==="Semantic Search"&&c.jsx(Cc,{multiple:!0,size:"small",options:h,loading:m,getOptionLabel:D=>typeof D=="string"?D:typeof D=="object"&&D!==null&&"value"in D?String(D.value):String(D),value:Array.isArray(l)?l.map(D=>h.find(te=>te.value===D)||{value:D}):l?[{value:l}]:[],onInputChange:(D,Y)=>{x(Y)},onChange:(D,Y)=>{const te=Y.map(N=>typeof N=="string"?N:N&&typeof N=="object"&&"value"in N?N.value:N);z(te)},noOptionsText:y.trim().length<=2?"Type at least 3 characters to search":"No matches found",renderInput:D=>c.jsx(Je,{...D,size:"small",label:"Search Values",placeholder:"Type to search...",onFocus:()=>k(!0),onBlur:()=>k(!1),helperText:S&&!m&&E&&h.length===0?"No matches found":void 0,InputProps:{...D.InputProps,endAdornment:c.jsxs(c.Fragment,{children:[m?c.jsx(yd,{color:"inherit",size:20}):null,D.InputProps.endAdornment]})}}),freeSolo:!0,filterOptions:D=>D,slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}}}),e.filterType==="MinMax"&&!T&&c.jsx(Je,{size:"small",type:"number",label:"Value",value:l,onChange:D=>z(parseFloat(D.target.value)||""),onFocus:()=>B(!0),onBlur:()=>B(!1),placeholder:"Enter number...",fullWidth:!0,inputProps:{min:w,max:M},helperText:F&&w!==void 0&&M!==void 0?`Valid range: [${w} - ${M}]`:void 0}),e.filterType==="MinMax"&&T&&c.jsxs(kt,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c.jsxs(kt,{sx:{display:"flex",gap:1,alignItems:"center"},children:[c.jsx(Je,{size:"small",type:"number",label:"From",value:l,onChange:D=>z(parseFloat(D.target.value)||"",d),onFocus:()=>B(!0),onBlur:()=>B(!1),placeholder:"Min...",fullWidth:!0,inputProps:{min:w,max:d||M}}),c.jsx(kt,{children:"to"}),c.jsx(Je,{size:"small",type:"number",label:"To",value:d,onChange:D=>z(l,parseFloat(D.target.value)||""),onFocus:()=>B(!0),onBlur:()=>B(!1),placeholder:"Max...",fullWidth:!0,inputProps:{min:l||w,max:M}})]}),F&&w!==void 0&&M!==void 0&&c.jsxs(ut,{variant:"caption",color:"text.secondary",sx:{mt:-.5,ml:1.5},children:["Valid range: [",w," - ",M,"]"]})]}),_&&!T&&c.jsx(Gs,{dateAdapter:Tc,children:c.jsx(Es,{label:"Date",value:l instanceof Date?ht.utc(l):null,onChange:D=>{D===null?z(null):D.isValid()&&z(D.utc().toDate())},timezone:"UTC",minDate:l instanceof Date?void 0:O,maxDate:l instanceof Date?void 0:A,referenceDate:i==="After"&&O?O:void 0,slotProps:{textField:{size:"small",fullWidth:!0,sx:{minWidth:150},onFocus:()=>B(!0),onBlur:()=>B(!1),helperText:F&&O&&A?`Valid range: [${O.format("YYYY-MM-DD")} - ${A.format("YYYY-MM-DD")}]`:void 0},openPickerButton:{sx:{backgroundColor:"transparent"}}}})}),_&&T&&c.jsx(Gs,{dateAdapter:Tc,children:c.jsxs(kt,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c.jsxs(kt,{sx:{display:"flex",gap:1,alignItems:"center"},children:[c.jsx(kt,{sx:{flex:1,minWidth:0},children:c.jsx(Es,{label:"From",value:l instanceof Date?ht.utc(l):null,onChange:D=>{D===null?z(null,d):D.isValid()&&z(D.utc().toDate(),d)},timezone:"UTC",minDate:l instanceof Date?void 0:O,maxDate:d instanceof Date?ht.utc(d):l instanceof Date?void 0:A,referenceDate:O,slotProps:{textField:{size:"small",fullWidth:!0,onFocus:()=>B(!0),onBlur:()=>B(!1)},openPickerButton:{sx:{backgroundColor:"transparent"}}}})}),c.jsx(kt,{children:"to"}),c.jsx(kt,{sx:{flex:1,minWidth:0},children:c.jsx(Es,{label:"To",value:d instanceof Date?ht.utc(d):null,onChange:D=>{D===null?z(l,null):D.isValid()&&z(l,D.utc().toDate())},timezone:"UTC",minDate:l instanceof Date?ht.utc(l):d instanceof Date?void 0:O,maxDate:d instanceof Date?void 0:A,referenceDate:l instanceof Date?ht.utc(l):O,slotProps:{textField:{size:"small",fullWidth:!0,onFocus:()=>B(!0),onBlur:()=>B(!1)},openPickerButton:{sx:{backgroundColor:"transparent"}}}})})]}),F&&O&&A&&c.jsxs(ut,{variant:"caption",color:"text.secondary",sx:{mt:-.5,ml:1.5},children:["Valid range: [",O.format("YYYY-MM-DD")," -"," ",A.format("YYYY-MM-DD"),"]"]})]})})]})}function k7(e){const t=new Set,n=e.schema?.fields;if(!n)return t;for(const r of n)"kind"in r&&r.kind==="join"&&r.name&&t.add(r.name);return t}function $b(e){if(!e)return null;for(const t of e)if(t.startsWith("##(filters)")){const n=t.slice(11).trim();try{const r=JSON.parse(n);if(Array.isArray(r)){const o=[];for(const a of r)if(typeof a=="string"){const i=a.indexOf(".");i>0&&i<a.length-1&&o.push({source:a.substring(0,i),dimension:a.substring(i+1)})}if(o.length>0)return{filters:o}}}catch(r){console.error(`Failed to parse "${t}" annotation:`,r)}}return null}function Hb(e){if(e.startsWith("#(filter)")){const t=e.slice(9).trim();try{const n=JSON.parse(t);if(n.type)return n}catch(n){console.error(`Failed to parse "${e}" annotation:`,n)}}return null}function D7(e){const t=e.match(/^#\s*label\s*=\s*"([^"]+)"/);return t?t[1]:null}function Ub(e){const t=new Map;let n="";for(const r of e)if(r.type==="code"){if(!n&&r.text){const o=r.text.match(/import\s+(?:\{[^}]*\}\s+from\s+)?['"]([^'"]+)['"]/);o&&(n=o[1])}if(r.newSources&&r.newSources.length>0)for(const o of r.newSources)try{const a=JSON.parse(o);a.name&&t.set(a.name,a)}catch(a){console.error("Failed to parse SourceInfo:",a)}}return{sourceInfoMap:t,modelPath:n}}function zb(e,t,n){const r=[];for(const{source:o,dimension:a}of t){const i=e.get(o);if(!i){console.warn(`Source "${o}" not found in notebook sources`),r.push({source:o,model:n,dimensionName:a,filterType:"Star"});continue}const s=i.schema?.fields;if(!s){r.push({source:o,model:n,dimensionName:a,filterType:"Star"});continue}const l=s.find(f=>f.name===a);if(!l){console.warn(`Dimension "${a}" not found in source "${o}"`),r.push({source:o,model:n,dimensionName:a,filterType:"Star"});continue}let u="Star",d;if("annotations"in l&&l.annotations){for(const f of l.annotations)if(f.value){const h=Hb(f.value);h&&(u=h.type);const p=D7(f.value);p&&(d=p)}}r.push({source:o,model:n,dimensionName:a,filterType:u,label:d})}return r}function w7(e,t,n){return e.length===0?"":e.map(o=>{const{dimensionName:a,source:i,matchType:s,value:l,value2:u}=o,f=i&&i!==n?`\`${i}\`.\`${a}\``:`\`${a}\``,h=l instanceof Date,p=(m,b=!1)=>m==null?"null":b&&m instanceof Date?`@${m.getFullYear()}-${String(m.getMonth()+1).padStart(2,"0")}-${String(m.getDate()).padStart(2,"0")}`:typeof m=="string"?`'${m.replace(/'/g,"\\'")}'`:typeof m=="boolean"?m?"true":"false":String(m);switch(s){case"Equals":case"Semantic Search":return Array.isArray(l)&&l.length>0?`(${l.map(b=>`${f} = ${p(b,h)}`).join(" or ")})`:`${f} = ${p(l,h)}`;case"Contains":return typeof l=="string"?`${f} ~ f'%${l.replace(/'/g,"\\'")}%'`:`${f} = ${p(l)}`;case"After":case"Greater Than":return`${f} > ${p(l,h)}`;case"Before":case"Less Than":return`${f} < ${p(l,h)}`;case"Between":return u!==void 0?`${f} >= ${p(l,h)} and ${f} <= ${p(u,h)}`:`${f} >= ${p(l,h)}`;default:return""}}).filter(o=>o.length>0).join(" and ")}function A7(e){const t=e.match(/run\s*:\s*(\w+)\s*->/);if(t)return t[1];const n=e.match(/^\s*(\w+)\s*->/m);return n?n[1]:null}function I7(e,t){return`${e.trimEnd()} + {where: ${t}}`}const P7=xt(c.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"})),Vb=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/)[1]||t;if(r.length<=120)return r;const o=r.substring(0,120).split(" ");return o.pop(),o.join(" ")+"..."},Wb=(e,t)=>{const n=(e.readme||void 0)?.split(`
203
- `)??[];return n.length===0&&(n.push(`# ${e.name}`),n.push("")),(e.readme?.length??0)>0&&t?n.splice(2,1,t):t&&n.push(t),n.join(`
204
- `)};function R7(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:o,resumeHideDuration:a}=e,i=bd();I.useEffect(()=>{if(!o)return;function x(E){E.defaultPrevented||E.key==="Escape"&&r?.(E,"escapeKeyDown")}return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[o,r]);const s=Pe((x,E)=>{r?.(x,E)}),l=Pe(x=>{!r||x==null||i.start(x,()=>{s(null,"timeout")})});I.useEffect(()=>(o&&l(t),i.clear),[o,t,l,i]);const u=x=>{r?.(x,"clickaway")},d=i.clear,f=I.useCallback(()=>{t!=null&&l(a??t*.5)},[t,a,l]),h=x=>E=>{const v=x.onBlur;v?.(E),f()},p=x=>E=>{const v=x.onFocus;v?.(E),d()},m=x=>E=>{const v=x.onMouseEnter;v?.(E),d()},b=x=>E=>{const v=x.onMouseLeave;v?.(E),f()};return I.useEffect(()=>{if(!n&&o)return window.addEventListener("focus",f),window.addEventListener("blur",d),()=>{window.removeEventListener("focus",f),window.removeEventListener("blur",d)}},[n,o,f,d]),{getRootProps:(x={})=>{const E={...$s(e),...$s(x)};return{role:"presentation",...x,...E,onBlur:h(E),onFocus:p(E),onMouseEnter:m(E),onMouseLeave:b(E)}},onClickAway:u}}function ym(e){return e.substring(2).toLowerCase()}function M7(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function O7(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:o,touchEvent:a="onTouchEnd"}=e,i=I.useRef(!1),s=I.useRef(null),l=I.useRef(!1),u=I.useRef(!1);I.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const d=ct(ga(t),s),f=Pe(m=>{const b=u.current;u.current=!1;const y=Vt(s.current);if(!l.current||!s.current||"clientX"in m&&M7(m,y))return;if(i.current){i.current=!1;return}let x;m.composedPath?x=m.composedPath().includes(s.current):x=!y.documentElement.contains(m.target)||s.current.contains(m.target),!x&&(n||!b)&&o(m)}),h=m=>b=>{u.current=!0;const y=t.props[m];y&&y(b)},p={ref:d};return a!==!1&&(p[a]=h(a)),I.useEffect(()=>{if(a!==!1){const m=ym(a),b=Vt(s.current),y=()=>{i.current=!0};return b.addEventListener(m,f),b.addEventListener("touchmove",y),()=>{b.removeEventListener(m,f),b.removeEventListener("touchmove",y)}}},[f,a]),r!==!1&&(p[r]=h(r)),I.useEffect(()=>{if(r!==!1){const m=ym(r),b=Vt(s.current);return b.addEventListener(m,f),()=>{b.removeEventListener(m,f)}}},[f,r]),I.cloneElement(t,p)}function N7(e){return _e("MuiSnackbarContent",e)}Le("MuiSnackbarContent",["root","message","action"]);const L7=e=>{const{classes:t}=e;return Fe({root:["root"],action:["action"],message:["message"]},N7,t)},F7=le(To,{name:"MuiSnackbarContent",slot:"Root"})(et(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98;return{...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(Lu(e.palette.background.default,t)),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:Lu(e.palette.background.default,t),display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),_7=le("div",{name:"MuiSnackbarContent",slot:"Message"})({padding:"8px 0"}),B7=le("div",{name:"MuiSnackbarContent",slot:"Action"})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),j7=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiSnackbarContent"}),{action:o,className:a,message:i,role:s="alert",...l}=r,u=r,d=L7(u);return c.jsxs(F7,{role:s,elevation:6,className:Ae(d.root,a),ownerState:u,ref:n,...l,children:[c.jsx(_7,{className:d.message,ownerState:u,children:i}),o?c.jsx(B7,{className:d.action,ownerState:u,children:o}):null]})});function $7(e){return _e("MuiSnackbar",e)}Le("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const H7=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${De(n.vertical)}${De(n.horizontal)}`]};return Fe(r,$7,t)},U7=le("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${De(n.anchorOrigin.vertical)}${De(n.anchorOrigin.horizontal)}`]]}})(et(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center",variants:[{props:({ownerState:t})=>t.anchorOrigin.vertical==="top",style:{top:8,[e.breakpoints.up("sm")]:{top:24}}},{props:({ownerState:t})=>t.anchorOrigin.vertical!=="top",style:{bottom:8,[e.breakpoints.up("sm")]:{bottom:24}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="left",style:{justifyContent:"flex-start",[e.breakpoints.up("sm")]:{left:24,right:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="right",style:{justifyContent:"flex-end",[e.breakpoints.up("sm")]:{right:24,left:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="center",style:{[e.breakpoints.up("sm")]:{left:"50%",right:"auto",transform:"translateX(-50%)"}}}]}))),z7=I.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiSnackbar"}),o=yo(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:i,anchorOrigin:{vertical:s,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:u=null,children:d,className:f,ClickAwayListenerProps:h,ContentProps:p,disableWindowBlurListener:m=!1,message:b,onBlur:y,onClose:x,onFocus:E,onMouseEnter:v,onMouseLeave:S,open:k,resumeHideDuration:C,slots:L={},slotProps:F={},TransitionComponent:B,transitionDuration:R=a,TransitionProps:{onEnter:_,onExited:T,...O}={},...A}=r,w={...r,anchorOrigin:{vertical:s,horizontal:l},autoHideDuration:u,disableWindowBlurListener:m,TransitionComponent:B,transitionDuration:R},M=H7(w),{getRootProps:V,onClickAway:z}=R7({...w}),[U,D]=I.useState(!0),Y=Z=>{D(!0),T&&T(Z)},te=(Z,J)=>{D(!1),_&&_(Z,J)},N={slots:{transition:B,...L},slotProps:{content:p,clickAwayListener:h,transition:O,...F}},[ae,Q]=st("root",{ref:n,className:[M.root,f],elementType:U7,getSlotProps:V,externalForwardedProps:{...N,...A},ownerState:w}),[q,{ownerState:X,...G}]=st("clickAwayListener",{elementType:O7,externalForwardedProps:N,getSlotProps:Z=>({onClickAway:(...J)=>{const ye=J[0];Z.onClickAway?.(...J),!ye?.defaultMuiPrevented&&z(...J)}}),ownerState:w}),[ee,oe]=st("content",{elementType:j7,shouldForwardComponentProp:!0,externalForwardedProps:N,additionalProps:{message:b,action:i},ownerState:w}),[ne,pe]=st("transition",{elementType:hi,externalForwardedProps:N,getSlotProps:Z=>({onEnter:(...J)=>{Z.onEnter?.(...J),te(...J)},onExited:(...J)=>{Z.onExited?.(...J),Y(...J)}}),additionalProps:{appear:!0,in:k,timeout:R,direction:s==="top"?"down":"up"},ownerState:w});return!k&&U?null:c.jsx(q,{...G,...L.clickAwayListener&&{ownerState:X},children:c.jsx(ae,{...Q,children:c.jsx(ne,{...pe,children:d||c.jsx(ee,{...oe})})})})});function xm(){const[e,t]=H.useState(!1),{apiClients:n}=it.useServer(),[r,o]=H.useState(""),a=()=>{t(!0)},i=()=>{t(!1)},s=wr.useQueryClient(),l=ir({async mutationFn(d){return n.environments.createEnvironment({name:d.name,readme:Wb({name:d.name,readme:""},d.description)})},onSuccess(){i(),s.invalidateQueries({queryKey:["environments"]}),o("Environment created successfully")},onError(d){o(d instanceof Error?d.message:"An unknown error occurred")}}),u=async d=>{d.preventDefault();const f=new FormData(d.currentTarget),h=f.get("name")?.toString(),p=f.get("description")?.toString();if(!h)throw new Error("Name is required");l.mutate({name:h,description:p})};return c.jsxs(H.Fragment,{children:[c.jsx(Ot,{variant:"contained",onClick:a,startIcon:c.jsx(fn.AddCircleRounded,{}),sx:{mt:2,color:"white"},children:"Create New Environment"}),c.jsxs(Ir,{open:e,onClose:i,children:[c.jsx(qr,{children:"Create New Environment"}),c.jsxs(Rr,{children:[c.jsx(Mi,{children:"Add a new environment to start exploring semantic models and analyzing data."}),c.jsxs("form",{onSubmit:u,id:"environment-form",children:[c.jsx(Je,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Environment Name",type:"text",fullWidth:!0,variant:"standard"}),c.jsx(Je,{margin:"dense",id:"description",name:"description",label:"Environment Description",placeholder:"Explore semantic models, run queries, and build dashboards",type:"text",fullWidth:!0,variant:"standard"})]})]}),c.jsxs(Pr,{children:[c.jsx(Ot,{disabled:l.isPending,onClick:i,children:"Cancel"}),c.jsx(Ot,{type:"submit",form:"environment-form",loading:l.isPending,children:"Create Environment"})]})]}),c.jsx(z7,{open:r!=="",autoHideDuration:6e3,onClose:()=>o(""),message:r})]})}function V7({environment:e,onCloseDialog:t}){const[n,r]=H.useState(!1),{apiClients:o}=it.useServer(),a=wr.useQueryClient(),[i,s]=H.useState(""),l=()=>{r(!0)},u=()=>{r(!1),t()},d=ir({mutationFn:()=>o.environments.deleteEnvironment(e.name),onSuccess(){u(),a.invalidateQueries({queryKey:["environments"]}),s("Environment deleted successfully")},onError(f){s(f instanceof Error?f.message:"An unknown error occurred")}});return c.jsxs(H.Fragment,{children:[c.jsxs(P.MenuItem,{onClick:l,children:[c.jsx(P.ListItemIcon,{children:c.jsx(fn.Delete,{fontSize:"small"})}),c.jsx(P.ListItemText,{children:"Delete"})]}),c.jsxs(Ir,{onClose:u,"aria-labelledby":"customized-dialog-title",open:n,children:[c.jsx(qr,{sx:{m:0,p:2},id:"customized-dialog-title",children:"Delete Environment"}),c.jsx(Qn,{"aria-label":"close",onClick:u,sx:f=>({position:"absolute",right:8,top:8,color:f.palette.grey[500]}),children:c.jsx(Sr,{})}),c.jsx(Rr,{dividers:!0,children:c.jsxs(ut,{gutterBottom:!0,children:['Are you sure you want to delete "',e.name,'"? This action cannot be undone.']})}),c.jsxs(Pr,{children:[c.jsx(Ot,{variant:"outlined",onClick:u,style:{borderColor:so.teal,color:so.teal},children:"Cancel"}),c.jsx(Ot,{loading:d.isPending,variant:"contained",autoFocus:!0,onClick:()=>d.mutate(),color:"error",children:"Delete"})]}),c.jsx(P.Snackbar,{open:i!=="",autoHideDuration:6e3,onClose:()=>s(""),message:i})]})]})}function W7({environment:e,onCloseDialog:t}){const[n,r]=H.useState(!1),{apiClients:o}=it.useServer(),a=wr.useQueryClient(),[i,s]=H.useState(""),l=()=>{r(!0)},u=()=>{r(!1),t()},d=ir({async mutationFn(h){return o.environments.updateEnvironment(e.name,{name:e.name,readme:Wb({name:e.name,readme:e.readme},h.description)})},onSuccess(){u(),a.invalidateQueries({queryKey:["environments"]}),s("Environment updated successfully")},onError(h){s(h instanceof Error?h.message:"An unknown error occurred")}}),f=h=>{h.preventDefault();const m=new FormData(h.currentTarget).get("description")?.toString();d.mutate({description:m})};return c.jsxs(H.Fragment,{children:[c.jsxs(P.MenuItem,{onClick:l,children:[c.jsx(P.ListItemIcon,{children:c.jsx(fn.Edit,{fontSize:"small"})}),c.jsx(P.ListItemText,{children:"Edit"})]}),c.jsxs(Ir,{open:n,onClose:u,children:[c.jsx(qr,{children:"Edit Environment"}),c.jsxs(Rr,{children:[c.jsx(Mi,{children:"Edit this environment's description."}),c.jsxs("form",{onSubmit:f,id:"environment-form",children:[c.jsx(Je,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Environment Name",disabled:!0,type:"text",fullWidth:!0,variant:"standard",defaultValue:e.name}),c.jsx(Je,{margin:"dense",id:"description",name:"description",label:"Environment Description",type:"text",fullWidth:!0,variant:"standard",defaultValue:Vb(e.readme)})]})]}),c.jsxs(Pr,{children:[c.jsx(Ot,{disabled:d.isPending,onClick:u,children:"Cancel"}),c.jsx(Ot,{type:"submit",form:"environment-form",loading:d.isPending,children:"Save Changes"})]})]}),c.jsx(P.Snackbar,{open:i!=="",autoHideDuration:6e3,onClose:()=>s(""),message:i})]})}const q7=[{title:"Ad-hoc analysis",body:"Browse semantic sources, build queries, and run nested logic in Explorer — no code.",href:"https://github.com/malloydata/publisher/blob/main/README.md#ad-hoc-data-analysis"},{title:"Notebook dashboards",body:"Code-first dashboards using Malloy notebooks. Versioned alongside your models.",href:"https://github.com/malloydata/publisher/blob/main/README.md#notebook-based-dashboards"},{title:"AI data agents",body:"Expose models via MCP so agents can discover sources and ask well-formed questions.",href:"https://github.com/malloydata/publisher/blob/main/README.md#mcp-based-ai-data-agents"}];function Y7({onClickEnvironment:e}){const{apiClients:t,mutable:n}=it.useServer(),{data:r,isSuccess:o,isError:a,error:i}=Xt({queryKey:["environments"],queryFn:()=>t.environments.listEnvironments()});if(a)return c.jsx(mn,{error:i,context:"Environments List"});if(!o)return c.jsx(hn,{text:"Loading environments..."});const s=r.data??[];return c.jsxs(P.Container,{maxWidth:"md",sx:{py:6},children:[c.jsxs(P.Box,{sx:{mb:5},children:[c.jsx(P.Typography,{variant:"h3",component:"h1",sx:{fontWeight:500,letterSpacing:"-0.025em",mb:1},children:"Publisher"}),c.jsx(P.Typography,{variant:"body1",color:"text.secondary",sx:{mb:3},children:"The open-source semantic model server for the Malloy data language."}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{maxWidth:720,lineHeight:1.6},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."})]}),c.jsx(P.Grid,{container:!0,spacing:4,sx:{mb:5},children:q7.map(l=>c.jsx(P.Grid,{size:{xs:12,md:4},children:c.jsxs(P.Stack,{spacing:1,children:[c.jsx(P.Typography,{variant:"body2",component:"a",href:l.href,target:"_blank",rel:"noopener noreferrer",sx:{fontWeight:500,color:"text.primary",textDecoration:"none","&:hover":{textDecoration:"underline"}},children:l.title}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{lineHeight:1.6},children:l.body})]})},l.title))}),c.jsx(P.Divider,{sx:{my:4}}),s.length>0?c.jsxs(P.Box,{sx:{mb:4},children:[c.jsxs(P.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",sx:{mb:3},children:[c.jsxs(P.Box,{children:[c.jsx(P.Typography,{variant:"h5",sx:{fontWeight:500,letterSpacing:"-0.025em",mb:.5},children:"Environments"}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Published environments available on this server"})]}),n&&c.jsx(xm,{})]}),c.jsx(P.Grid,{container:!0,spacing:2,children:s.map(l=>c.jsx(P.Grid,{size:{xs:12,sm:6,md:4},children:c.jsx(K7,{environment:l,onClickEnvironment:e})},l.name))})]}):c.jsxs(P.Box,{sx:{mb:4},children:[c.jsx(P.Typography,{variant:"h5",sx:{fontWeight:500,letterSpacing:"-0.025em",mb:1},children:"Get started"}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{mb:3,maxWidth:600},children:"Create your first Malloy environment to start exploring semantic models and building data experiences."}),n?c.jsx(xm,{}):c.jsx(P.Button,{variant:"contained",color:"primary",href:"https://github.com/malloydata/publisher/blob/main/README.md#server-configuration",target:"_blank",rel:"noopener noreferrer",children:"Learn how to create models"})]}),c.jsx(P.Divider,{sx:{my:4}}),c.jsxs(P.Typography,{variant:"body2",color:"text.secondary",children:["Publisher is built on fully open infrastructure and designed for the AI era. Join the"," ",c.jsx(P.Box,{component:"a",href:"https://join.slack.com/t/malloy-community/shared_invite/zt-1kgfwgi5g-CrsdaRqs81QY67QW0~t_uw",target:"_blank",rel:"noopener noreferrer",sx:{color:"text.primary",textDecoration:"underline"},children:"Malloy Slack community"})," ","to ask questions, share ideas, and contribute."]})]})}function K7({environment:e,onClickEnvironment:t}){const{mutable:n}=it.useServer(),[r,o]=H.useState(null),a=!!r,i=Vb(e.readme),s=d=>{e.name&&t&&t(`/${e.name}/`,d)},l=d=>{d.stopPropagation(),o(d.currentTarget)},u=()=>{o(null)};return c.jsx(P.Card,{variant:"outlined",onClick:s,sx:{height:"100%",cursor:"pointer",borderRadius:3,borderColor:"divider",boxShadow:"none",transition:"all 0.2s ease-in-out","&:hover":{boxShadow:2,borderColor:"primary.main"}},children:c.jsx(P.CardContent,{sx:{p:2.5,"&:last-child":{pb:2.5}},children:c.jsxs(P.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[c.jsx(P.Box,{sx:{width:36,height:36,borderRadius:1.5,bgcolor:"grey.100",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:"text.primary"},children:c.jsx(P7,{sx:{fontSize:20}})}),c.jsxs(P.Box,{sx:{flex:1,minWidth:0},children:[c.jsx(P.Typography,{variant:"subtitle1",component:"h6",noWrap:!0,sx:{fontWeight:600,mb:.5},children:e.name}),c.jsx(P.Tooltip,{title:i,followCursor:!0,enterDelay:1e3,children:c.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",lineHeight:1.5},children:i})})]}),n&&c.jsxs(c.Fragment,{children:[c.jsx(P.IconButton,{size:"small",onClick:l,"aria-label":`Environment actions for ${e.name}`,sx:{flexShrink:0,mt:-.5,mr:-.5},children:c.jsx(fn.MoreVert,{fontSize:"small"})}),c.jsxs(P.Menu,{anchorEl:r,open:a,onClose:u,onClick:d=>d.stopPropagation(),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[c.jsx(W7,{environment:e,onCloseDialog:u}),c.jsx(V7,{environment:e,onCloseDialog:u})]})]})]})})})}const Qs=xt(c.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"})),G7=xt(c.jsx("path",{d:"M8 5v14l11-7z"}));function qb({open:e,onClose:t,result:n,title:r="Results"}){return c.jsxs(P.Dialog,{open:e,onClose:t,maxWidth:!1,fullWidth:!0,sx:{"& .MuiDialog-paper":{width:"95vw",height:"95vh",maxWidth:"none"}},children:[c.jsxs(P.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[r,c.jsx(P.IconButton,{onClick:t,sx:{color:"text.secondary"},children:c.jsx(Sr,{})})]}),c.jsx(P.DialogContent,{sx:{height:"calc(95vh - 120px)",overflow:"auto",padding:"0 16px"},children:c.jsx(ma,{result:n,maxHeight:800,maxResultSize:1e6})})]})}function Q7({queryName:e,annotations:t,resourceUri:n,runOnDemand:r=!1,maxResultSize:o=0}){const[a,i]=H.useState(),[s,l]=H.useState(!1),[u,d]=H.useState(!1),{packageName:f,environmentName:h,versionId:p,modelPath:m}=Nt(n),{apiClients:b}=it.useServer(),{data:y,isSuccess:x,isLoading:E}=Xt({queryKey:["namedQueryResult",n,e],queryFn:()=>b.models.executeQueryModel(h,f,m,{query:void 0,sourceName:void 0,queryName:e,versionId:p}),enabled:r?u:!0});return H.useEffect(()=>{if(t&&t.length>0){const v=t.map(S=>`// ${S}`).join(`
205
- `);_s(v,"typescript").then(S=>{i(S)})}},[t]),c.jsxs($u,{children:[a&&c.jsx(P.Box,{sx:{marginBottom:"16px"},children:c.jsx(P.Typography,{fontSize:"12px",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:c.jsx("div",{className:"content",dangerouslySetInnerHTML:{__html:a}})})}),c.jsxs(P.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"},children:[c.jsx(P.Typography,{variant:"body2",sx:{fontSize:"15px",fontWeight:"600",color:"#495057",padding:"8px 16px",backgroundColor:"#f8f9fa",borderRadius:"6px",border:"1px solid #e9ecef"},children:e}),c.jsx(P.IconButton,{sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px"},onClick:()=>l(!0),children:c.jsx(Qs,{sx:{fontSize:"18px",color:"text.secondary"}})})]}),c.jsxs(rs,{sx:{position:"relative"},children:[r&&!u&&c.jsxs(P.Box,{sx:{padding:"40px 20px",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[c.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Click Run to execute the query"}),c.jsx(P.Button,{variant:"contained",startIcon:c.jsx(G7,{}),onClick:()=>d(!0),sx:{backgroundColor:"#1976d2","&:hover":{backgroundColor:"#1565c0"},textTransform:"none",fontSize:"14px",fontWeight:600,padding:"8px 24px"},children:"Run Query"})]}),(!r||u)&&E&&c.jsx(P.Box,{sx:{padding:"20px",textAlign:"center"},children:c.jsx(P.Typography,{children:"Loading results..."})}),(!r||u)&&x&&y?.data?.result&&c.jsx(ma,{result:y.data.result,maxHeight:600,maxResultSize:o})]}),c.jsx(qb,{open:s,onClose:()=>l(!1),result:y?.data?.result||"",title:`Query: ${e}`})]})}function Ud(e,t=!0){const{modelPath:n,environmentName:r,packageName:o,versionId:a}=Nt(e),{apiClients:i}=it.useServer();return Xt({queryKey:["package",r,o,n,a],queryFn:async()=>(await i.models.getModel(r,o,n,a)).data,enabled:t})}function zd({data:e,onChange:t,existingQuery:n,initialSelectedSourceIndex:r=0,onSourceChange:o,resourceUri:a}){const[i,s]=H.useState(r);H.useEffect(()=>{s(r)},[r]);const{data:l,isError:u,isLoading:d,error:f}=Ud(a,!e),{modelPath:h}=Nt(a),p=e||l;if(d&&!e)return c.jsx(hn,{text:"Fetching Model..."});if(u&&!e)return console.log("error",f),c.jsx(mn,{error:f,context:`ModelExplorer > ${h}`});if(!p)return c.jsx(hn,{text:"Loading..."});const m=(p?.sourceInfos||[]).map((y,x)=>{try{return JSON.parse(y)?.name||`Source ${x+1}`}catch{return`Source ${x+1}`}}),b=m[i]||"";return c.jsxs(ws,{variant:"outlined",children:[c.jsx(Hm,{children:c.jsx(P.Stack,{sx:{flexDirection:"row"},children:c.jsx(Cc,{size:"small",id:"size-small-standard",disablePortal:!0,options:m,value:b,onChange:(y,x)=>{if(!x)return;const E=m.indexOf(x);E>=0&&(s(E),o?.(E))},renderInput:y=>c.jsx(Je,{...y}),style:{width:350,marginTop:"3px",marginLeft:"6px",marginBottom:"8px"}})})}),c.jsx(Oc,{children:c.jsxs(P.Stack,{spacing:2,component:"section",children:[Array.isArray(p.sourceInfos)&&p.sourceInfos.length>0&&c.jsx(dd,{sourceAndPaths:p.sourceInfos.map(y=>({sourceInfo:JSON.parse(y),modelPath:h})),selectedSourceIndex:i,existingQuery:n,onQueryChange:t,resourceUri:a}),c.jsx(P.Box,{height:"5px"})]})})]})}function Vd({open:e,onClose:t,resourceUri:n,data:r,title:o="Data Sources",hasValidImport:a=!0,existingQuery:i,initialSelectedSourceIndex:s,onChange:l,onSourceChange:u}){return c.jsxs(P.Dialog,{open:e,onClose:t,fullScreen:!0,children:[c.jsxs(P.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[o,c.jsx(P.IconButton,{onClick:t,sx:{color:"text.secondary"},children:c.jsx(Sr,{})})]}),c.jsx(P.DialogContent,{children:a?c.jsx(zd,{resourceUri:n,data:r,existingQuery:i,initialSelectedSourceIndex:s,onChange:l,onSourceChange:u}):c.jsx("div",{children:"No valid import statement found in cell"})})]})}function X7({onChange:e,resourceUri:t,runOnDemand:n=!1,maxResultSize:r=0}){const{modelPath:o}=Nt(t),{data:a,isError:i,isLoading:s,error:l}=Ud(t),[u,d]=H.useState(!1),[f,h]=H.useState(),[p,m]=H.useState(0),[b,y]=H.useState("");if(s)return c.jsx(hn,{text:"Fetching Model..."});if(i)return console.log("error",l),c.jsx(mn,{error:l,context:`Model > ${o}`});const x=S=>{h(S),e&&e(S)},E=S=>{m(S)},v=()=>{const S=window.location.href;navigator.clipboard.writeText(S).then(()=>y("URL copied to clipboard!")).catch(()=>y("Failed to copy URL"))};return c.jsxs(c.Fragment,{children:[c.jsxs(P.Box,{sx:{position:"relative",maxWidth:"1200px",margin:"0 auto",paddingTop:"24px"},children:[Array.isArray(a?.sourceInfos)&&a.sourceInfos.length>0&&c.jsxs(P.Stack,{spacing:2,component:"section",children:[c.jsxs(P.Box,{sx:{padding:"0 0 16px 0",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[c.jsx(P.Typography,{variant:"h1",sx:{fontSize:"28px",fontWeight:"600",color:"#1a1a1a",marginBottom:"8px",marginTop:"0",paddingLeft:"0"},children:"Sources"}),c.jsx(P.Tooltip,{title:"Click to copy link",children:c.jsx(Nc,{sx:{fontSize:"24px",color:"text.secondary",cursor:"pointer"},onClick:v})})]}),c.jsx(zd,{data:a,onChange:x,onSourceChange:E,existingQuery:f,initialSelectedSourceIndex:p,resourceUri:t}),c.jsx(P.IconButton,{sx:{position:"absolute",top:"90px",right:"4px",backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px",zIndex:2},onClick:()=>d(!0),children:c.jsx(Qs,{sx:{fontSize:"18px",color:"text.secondary",marginBottom:"5px"}})})]}),a?.queries?.length>0&&c.jsxs(P.Stack,{spacing:2,component:"section",sx:{marginTop:"24px"},children:[c.jsx(P.Box,{sx:{padding:"0 0 16px 0"},children:c.jsx(P.Typography,{variant:"h2",sx:{fontSize:"24px",fontWeight:"600",color:"#1a1a1a",marginBottom:"0",marginTop:"8px",paddingLeft:"0"},children:"Named Queries"})}),a.queries.map(S=>c.jsx(Q7,{queryName:S.name,annotations:S.annotations,resourceUri:t,runOnDemand:n,maxResultSize:r},S.name))]}),c.jsx(Vd,{open:u,onClose:()=>d(!1),resourceUri:t,data:a,title:`Model: ${o.split("/").pop()}`,existingQuery:f,initialSelectedSourceIndex:p,onChange:x,onSourceChange:E})]}),c.jsx(P.Snackbar,{open:b!=="",autoHideDuration:6e3,onClose:()=>y(""),message:b})]})}function Yb(e,t){return`${e}:${t}`}function Dr(e){return Yb(e.source,e.filterName??e.dimensionName)}function Kb(e){return e.replace(/'/g,"\\'").replace(/\\/g,"\\\\")}function Jn(e,t=!1){return e==null?"null":t?e instanceof Date?`@${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`:`@${e}`:typeof e=="string"?`'${Kb(e)}'`:typeof e=="number"?String(e):typeof e=="boolean"?e?"true":"false":String(e)}function Z7(e){const{dimensionName:t,matchType:n,value:r,value2:o}=e,a=`\`${t}\``,i=r instanceof Date;switch(n){case"Equals":case"Semantic Search":return Array.isArray(r)&&r.length>0?`(${r.map(l=>`${a} = ${Jn(l,i)}`).join(" or ")})`:Array.isArray(r)?"":`${a} = ${Jn(r,i)}`;case"Contains":return typeof r=="string"?`${a} ~ f'%${Kb(r)}%'`:Array.isArray(r)?"":`${a} = ${Jn(r)}`;case"After":return Array.isArray(r)?"":`${a} > ${Jn(r,i)}`;case"Before":return Array.isArray(r)?"":`${a} < ${Jn(r,i)}`;case"Greater Than":return Array.isArray(r)?"":`${a} > ${Jn(r)}`;case"Less Than":return Array.isArray(r)?"":`${a} < ${Jn(r)}`;case"Between":return Array.isArray(r)?"":o!==void 0?`${a} >= ${Jn(r,i)} and ${a} <= ${Jn(o,i)}`:`${a} >= ${Jn(r,i)}`;default:return""}}function J7(e){const t=new Map;for(const n of e){const r=`${n.source}|${n.model}`,o=t.get(r)||[];o.push(n),t.set(r,o)}return t}function e9(e,t,n,r){const o=t.filter(u=>(u.filterType==="Star"||u.filterType==="MinMax"||u.filterType==="DateMinMax")&&!u.values);if(o.length===0)return"";const i=[...new Set(o.map(u=>u.dimensionName))].map(u=>`\`${u}\``).join(", "),s=r?.filter(u=>u.source===e)||[],l=s.length>0?s.map(u=>Z7(u)).filter(u=>u.length>0).join(" and "):"";return`
206
- run: ${e} -> {
207
- ${l?`where: ${l}`:""}
208
- index: ${i}
209
- } -> {
210
- select: *
211
- order_by: weight desc
212
-
213
- limit: ${n}
214
- }
215
- `}function t9(e,t){const n=new Map;for(const d of t){const f=Dr(d);n.set(f,[])}const r=JSON.parse(e),o=r.schema.fields,a=new Map;o.forEach((d,f)=>{a.set(d.name,f)});const i=d=>{if(!d)return null;switch(d.kind){case"string_cell":return d.string_value??null;case"number_cell":return d.number_value??null;case"boolean_cell":return d.boolean_value??null;case"null_cell":return null;default:return console.log("Unknown cell kind: "+d.kind),null}},l=(r.data?.array_value||[]).map(d=>{const f={};return d.kind==="record_cell"&&d.record_value&&d.record_value.forEach((h,p)=>{const m=o[p]?.name;if(m){const b=i(h);m==="fieldName"&&typeof b=="string"?f.fieldName=b:m==="fieldPath"&&typeof b=="string"?f.fieldPath=b:m==="fieldType"&&typeof b=="string"?f.fieldType=b:m==="fieldValue"&&typeof b=="string"?f.fieldValue=b:m==="weight"&&typeof b=="number"&&(f.weight=b)}}),f}),u=l.length===0||l.every(d=>!d.fieldName);for(const d of t){if(d.filterType==="NONE"||d.filterType==="Retrieval")continue;const f=l.filter(p=>{const m=p.fieldName||"",b=p.fieldPath||"";if(m===d.dimensionName||b===d.dimensionName||m.toLowerCase()===d.dimensionName.toLowerCase()||b.toLowerCase()===d.dimensionName.toLowerCase())return!0;const y=b.split(".").pop()||"";return y===d.dimensionName||y.toLowerCase()===d.dimensionName.toLowerCase()});if(f.length===0)continue;const h=Dr(d);if(d.filterType==="Star"){const p=f.filter(m=>m.fieldType==="string").map(m=>({value:m.fieldValue??"",count:m.weight})).sort((m,b)=>(b.count??0)-(m.count??0));n.set(h,p)}else if(d.filterType==="MinMax"){console.log("MinMax dimensionEntries: "+JSON.stringify(f,null,2)),console.log("All MinMax dimension entries fieldTypes:",f.map(m=>m.fieldType));const p=f.find(m=>m.fieldType==="number");if(console.log("numericEntry: "+JSON.stringify(p,null,2)),p?.fieldValue){const m=p.fieldValue,b=m.split(" to ");if(console.log("rangeParts: "+b),b.length===2){const y=[{value:parseFloat(b[0])},{value:parseFloat(b[1])}];n.set(h,y)}else console.warn(`Could not parse numeric range for ${d.dimensionName}: ${m}`)}else console.warn(`No numeric entry found for ${d.dimensionName}. Available entries:`,f)}else if(d.filterType==="DateMinMax"){const p=f.find(m=>m.fieldType==="date"||m.fieldType==="timestamp"||m.fieldType==="string");if(console.log("dateEntry: "+JSON.stringify(p,null,2)),console.log("All date dimension entries fieldTypes:",f.map(m=>m.fieldType)),p?.fieldValue){const m=p.fieldValue,b=m.split(" to ");if(console.log("date rangeParts: "+b),b.length===2){const y=[{value:new Date(b[0].trim())},{value:new Date(b[1].trim())}];n.set(h,y)}else console.warn(`Could not parse date range for ${d.dimensionName}: ${m}`)}else console.warn(`No date entry found for ${d.dimensionName}. Available entries:`,f)}}return{values:n,noRowsMatchedFilter:u}}function Wd(e){const{environment:t,package:n,dimensionSpecs:r,versionId:o,enabled:a=!0,indexLimit:i=1e4,activeFilters:s=[]}=e,l=H.useMemo(()=>J7(r),[r]),u=H.useMemo(()=>{const b=[];for(const[y,x]of l){const[E,v]=y.split("|"),S=e9(E,x,i,s);S?b.push({key:y,source:E,model:v,query:S,specs:x}):console.log("No query for source: ",E,"model: ",v)}return b},[l,i,s]),d=H.useMemo(()=>a&&u.length>0&&r.some(b=>b.filterType==="Star"||b.filterType==="MinMax"||b.filterType==="DateMinMax"),[a,u,r]),{apiClients:f}=it.useServer(),h=Xt({queryKey:["dimensionalFilter",t,n,r,o,s],queryFn:async()=>{if(!d){const E=new Map;for(const v of r){const S=Dr(v);E.set(S,[])}return{values:E,noRowsMatchedFilter:!1}}const b=await Promise.all(u.map(async E=>{const v=await f.models.executeQueryModel(t,n,E.model,{query:E.query,versionId:o,bypassFilters:!0});return{config:E,result:t9(v.data.result,E.specs)}})),y=new Map;let x=!1;for(const{result:E}of b){for(const[v,S]of E.values)y.set(v,S);E.noRowsMatchedFilter&&(x=!0)}return{values:y,noRowsMatchedFilter:x}},enabled:d,staleTime:300*1e3,placeholderData:b=>b}),p=h.data?.values;return{data:H.useMemo(()=>{const b=new Map;for(const y of r){const x=Dr(y);y.values?b.set(x,y.values.map(E=>({value:E}))):b.set(x,[])}if(p)for(const[y,x]of p)x.length>0&&b.set(y,x);return b},[r,p]),noRowsMatchedFilter:h.data?.noRowsMatchedFilter??!1,isLoading:d?h.isPending:!1,isError:d?h.isError:!1,error:d?h.error:null,refetch:h.refetch}}function Gb(e){return e.replace(/'/g,"\\'").replace(/\\/g,"\\\\")}function er(e,t=!1){return e==null?"null":t?e instanceof Date?`@${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`:`@${e}`:typeof e=="string"?`'${Gb(e)}'`:typeof e=="number"?String(e):typeof e=="boolean"?e?"true":"false":String(e)}function n9(e){const{dimensionName:t,matchType:n,value:r,value2:o}=e,a=`\`${t}\``,i=r instanceof Date;switch(n){case"Equals":case"Semantic Search":return Array.isArray(r)&&r.length>0?`(${r.map(l=>`${a} = ${er(l,i)}`).join(" or ")})`:Array.isArray(r)?"":`${a} = ${er(r,i)}`;case"Contains":return typeof r=="string"?`${a} ~ f'%${Gb(r)}%'`:Array.isArray(r)?"":`${a} = ${er(r)}`;case"After":return Array.isArray(r)?"":`${a} > ${er(r,i)}`;case"Before":return Array.isArray(r)?"":`${a} < ${er(r,i)}`;case"Greater Than":return Array.isArray(r)?"":`${a} > ${er(r)}`;case"Less Than":return Array.isArray(r)?"":`${a} < ${er(r)}`;case"Between":return Array.isArray(r)?"":o!==void 0?`${a} >= ${er(r,i)} and ${a} <= ${er(o,i)}`:`${a} >= ${er(r,i)}`;default:return""}}function qd(e){const{dimensionSpecs:t}=e,[n,r]=H.useState(()=>{const u=new Map;return t.forEach(d=>{const f=Dr(d);u.set(f,{spec:d,selection:null})}),u});H.useEffect(()=>{r(u=>{const d=new Map;return t.forEach(f=>{const h=Dr(f),p=u.get(h);d.set(h,{spec:f,selection:p?.selection??null})}),d})},[t]);const o=H.useCallback((u,d)=>{r(f=>{const h=new Map(f),p=h.get(u);return p&&h.set(u,{...p,selection:d}),h})},[]),a=H.useCallback(u=>{o(u,null)},[o]),i=H.useCallback(()=>{r(u=>{const d=new Map(u);return d.forEach((f,h)=>{d.set(h,{...f,selection:null})}),d})},[]),s=H.useCallback(()=>{const u=[];return n.forEach(d=>{d.selection&&u.push(d.selection)}),u},[n]),l=H.useCallback(()=>{const u=s();if(u.length===0)return"";const d=u.map(f=>n9(f)).filter(f=>f.length>0);return d.length===0?"":`where ${d.join(" and ")}`},[s]);return{filterStates:n,updateFilter:o,clearFilter:a,clearAllFilters:i,getActiveFilters:s,generateWhereClause:l}}function Qb(e){const[t,n]=H.useState(()=>new Map);H.useEffect(()=>{n(s=>{const l=new Set(e.map(d=>d.name).filter(d=>!!d)),u=new Map;return s.forEach((d,f)=>{l.has(f)&&u.set(f,d)}),u})},[e]);const r=H.useCallback((s,l)=>{n(u=>{const d=new Map(u);return l===null?d.delete(s):d.set(s,l),d})},[]),o=H.useCallback(s=>{n(l=>{if(!l.has(s))return l;const u=new Map(l);return u.delete(s),u})},[]),a=H.useCallback(()=>{n(s=>s.size===0?s:new Map)},[]),i=H.useCallback(()=>{const s=new Map;return t.forEach((l,u)=>{l!=null&&s.set(u,l)}),s},[t]);return{givenValues:t,updateGiven:r,clearGiven:o,clearAll:a,getActiveGivens:i}}function Xb(e){return H.useMemo(()=>{if(!e?.sources?.length)return[];const t=new Map;for(const n of e.sources)if(n.givens?.length)for(const r of n.givens)r.name&&!t.has(r.name)&&t.set(r.name,r);return Array.from(t.values())},[e])}const r9=xt(c.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"}));ht.extend(Bb);function o9(e){const t=(e.annotations??[]).filter(r=>r.trim().startsWith("#("));if(t.length===0)return;const n=[];for(const r of t){const o=r.trim(),a=o.match(/description="([^"]*)"/);if(a){n.push(a[1]);continue}const i=o.replace(/^#\(/,"").replace(/\)\s*$/,"").trim();i&&n.push(i)}return n.length>0?n.join(`
216
- `):void 0}function a9({given:e,value:t,onChange:n}){const r=e.name??"",o=e.type??"string",a=o9(e);if(o==="boolean"){const s=t===!0;return c.jsx(P.FormControlLabel,{control:c.jsx(P.Checkbox,{checked:s,onChange:l=>n(l.target.checked)}),label:r})}if(o==="number"){const s=typeof t=="number"?t:"";return c.jsx(P.TextField,{label:r,type:"number",value:s,onChange:l=>{const u=l.target.value;n(u===""?null:Number(u))},helperText:a,slotProps:{input:{endAdornment:s!==""&&c.jsx(Em,{onClear:()=>n(null)})}},fullWidth:!0,size:"small"})}if(o==="date"||o==="timestamp"||o==="timestamptz"){const s=t instanceof Date?ht.utc(t):null;return c.jsx(Gs,{dateAdapter:Tc,children:c.jsx(Es,{label:r,value:s,onChange:l=>n(l?l.toDate():null),slotProps:{textField:{fullWidth:!0,size:"small",helperText:a},field:{clearable:!0,onClear:()=>n(null)}}})})}if(o.startsWith("array<")){const s=Array.isArray(t)?t.map(String):[];return c.jsx(P.Autocomplete,{multiple:!0,freeSolo:!0,options:[],value:s,onChange:(l,u)=>n(u.length===0?null:u),renderInput:l=>c.jsx(P.TextField,{...l,label:r,size:"small",helperText:a}),fullWidth:!0})}const i=typeof t=="string"?t:"";return c.jsx(P.TextField,{label:r,value:i,onChange:s=>{const l=s.target.value;n(l===""?null:l)},placeholder:o.startsWith("filter<")?o:void 0,helperText:a,slotProps:{input:{endAdornment:i!==""&&c.jsx(Em,{onClear:()=>n(null)})}},fullWidth:!0,size:"small"})}function Em({onClear:e}){return c.jsx(P.InputAdornment,{position:"end",children:c.jsx(P.IconButton,{size:"small","aria-label":"clear value",onClick:e,edge:"end",children:c.jsx(r9,{fontSize:"small"})})})}function i9({givens:e,values:t,onChange:n,onClearAll:r}){if(e.length===0)return null;const o=t.size>0;return c.jsxs(P.Paper,{elevation:0,sx:{p:3,backgroundColor:"transparent",border:"none",boxShadow:"none"},children:[c.jsxs(P.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{mb:2},children:[c.jsx(P.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:"#333"},children:"Parameters"}),o&&c.jsx(P.Button,{variant:"text",size:"small",onClick:r,sx:{textTransform:"none"},children:"Reset"})]}),c.jsx(P.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))",gap:3},children:e.map(a=>c.jsx(P.Box,{children:c.jsx(a9,{given:a,value:a.name?t.get(a.name):void 0,onChange:i=>a.name&&n(a.name,i)})},a.name))})]})}const s9=xt(c.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"}));function Yd(e){const{environmentName:t,packageName:n}=Nt(e.resourceUri);if(!t||!n)throw new Error("Environment and Package name must be provided for query embedding.");return JSON.stringify({...e})}function l9({embeddedQueryResult:e}){const{query:t,sourceName:n,queryName:r,resourceUri:o,height:a}=JSON.parse(e),{modelPath:i}=Nt(o);if(!i||!t&&(!r||!n)||typeof i!="string")throw new Error("Invalid embedded query result: "+e);return c.jsx(Zb,{query:t,sourceName:n,queryName:r,resourceUri:o,height:a})}function Zb({query:e,sourceName:t,queryName:n,resourceUri:r,height:o=400}){const{modelPath:a,environmentName:i,packageName:s,versionId:l}=Nt(r),{apiClients:u}=it.useServer();if(!i||!s)throw new Error("No environment or package name provided. A resource URI must be provided.");const{data:d,isSuccess:f,isError:h,error:p}=Xt({queryKey:[r,e,t,n],queryFn:()=>u.models.executeQueryModel(i,s,a,{query:e,sourceName:t,queryName:n,versionId:l})});return c.jsxs(c.Fragment,{children:[!f&&!h&&c.jsx(hn,{text:"Fetching Query Results..."}),f&&c.jsx(H.Suspense,{fallback:c.jsx("div",{children:"Loading..."}),children:c.jsx(ma,{result:d.data.result,maxHeight:o})}),h&&c.jsx(mn,{context:`${i} > ${s} > ${a}`,error:p})]})}function u9({cell:e,hideCodeCellIcon:t,hideEmbeddingIcon:n,resourceUri:r,index:o,maxResultSize:a,isExecuting:i}){const[s,l]=H.useState(!1),[u,d]=H.useState(!1),[f,h]=H.useState(!1),[p,m]=H.useState(),[b,y]=H.useState(),[x,E]=H.useState(!1),[v,S]=H.useState(""),k=/import\s*\{([^}]+)\}\s*from\s*['"`][^'"`]+['"`]/,C=/import\s*(?:\{[^}]*\}\s*from\s*)?['"`]([^'"`]+)['"`]/,L=O=>O.split(`
217
- `).filter(A=>!A.trimStart().startsWith("##")).join(`
218
- `),F=!!e.text&&(k.test(e.text)||C.test(e.text)),B=()=>{if(!e.newSources||e.newSources.length===0)return 0;let O=[],A="";if(e.text){const w=e.text.match(k);w&&(O=w[1].split(",").map(V=>V.trim()));const M=e.text.match(C);M&&(A=M[1].trim())}for(let w=0;w<e.newSources.length;w++)try{const M=JSON.parse(e.newSources[w]);if(O.length>0&&O.includes(M.name)||A&&A===M.path)return w}catch{continue}return 0},R=e.newSources&&e.newSources.length>0?{sourceInfos:e.newSources,resource:r}:void 0,_=Yd({query:e.text,resourceUri:r});H.useEffect(()=>{e.type==="code"&&_s(L(e.text),"malloy").then(O=>{m(O)})},[e]),H.useEffect(()=>{_s(_,"typescript").then(O=>{y(O)})},[_]);const T=()=>{const O=window.location.href;navigator.clipboard.writeText(O).then(()=>S("URL copied to clipboard!")).catch(()=>S("Failed to copy URL"))};return e.type==="markdown"&&c.jsx($u,{children:c.jsxs(P.Box,{sx:{"& h1, & h2, & h3, & h4, & h5, & h6":{fontWeight:"600",color:"#1a1a1a",marginBottom:"8px",marginTop:"16px"},"& h1":{fontSize:"28px"},"& h2":{fontSize:"24px"},"& h3":{fontSize:"20px"},"& p":{color:"#333333",lineHeight:"1.7",marginBottom:"8px",fontSize:"16px"},"& ul, & ol":{color:"#333333",lineHeight:"1.7",marginBottom:"8px",fontSize:"16px"},"& li":{marginBottom:"4px"}},children:[o===0?c.jsxs(P.Stack,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",children:[c.jsx(Ts,{children:e.text}),c.jsx(P.Tooltip,{title:"Click to copy link",children:c.jsx(Nc,{sx:{fontSize:"24px",color:"text.secondary",cursor:"pointer",marginTop:"26px"},onClick:T})})]}):c.jsx(Ts,{children:e.text}),c.jsx(P.Snackbar,{open:v!=="",autoHideDuration:6e3,onClose:()=>S(""),message:v})]})})||e.type==="code"&&c.jsxs($u,{children:[(!t||!n&&e.result||e.newSources&&e.newSources.length>0)&&c.jsx(P.Stack,{sx:{flexDirection:"column",gap:"8px",marginBottom:"2px"},children:e.newSources&&e.newSources.length>0&&c.jsx(rs,{sx:{position:"relative",padding:"0"},children:c.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:"24px",paddingRight:"8px"},children:[p&&c.jsx("span",{dangerouslySetInnerHTML:{__html:p},style:{fontFamily:"monospace",fontSize:"14px",flex:1,marginRight:"8px"}}),F&&c.jsx(P.IconButton,{sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px",flexShrink:0},onClick:()=>E(!0),children:c.jsx(Qs,{sx:{fontSize:"18px",color:"text.secondary"}})})]})})}),c.jsx(Vd,{open:x,onClose:()=>E(!1),title:"Data Sources",hasValidImport:F,resourceUri:r,data:R,initialSelectedSourceIndex:B()}),c.jsxs(P.Dialog,{open:s,onClose:()=>l(!1),maxWidth:"lg",fullWidth:!0,children:[c.jsxs(P.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["Malloy Code",c.jsx(P.IconButton,{onClick:()=>l(!1),sx:{color:"text.secondary"},children:c.jsx(Sr,{})})]}),c.jsx(P.DialogContent,{children:c.jsx(P.Box,{sx:{border:"1px solid #e0e0e0",borderRadius:"8px",padding:"16px",fontFamily:"monospace",fontSize:"14px",lineHeight:"1.5",overflow:"auto",maxHeight:"70vh",backgroundColor:"#ffffff"},children:c.jsx("pre",{className:"code-display",style:{margin:0},dangerouslySetInnerHTML:{__html:p}})})})]}),c.jsxs(P.Dialog,{open:u,onClose:()=>d(!1),maxWidth:"lg",fullWidth:!0,children:[c.jsxs(P.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["Embeddable Code",c.jsx(P.IconButton,{onClick:()=>d(!1),sx:{color:"text.secondary"},children:c.jsx(Sr,{})})]}),c.jsx(P.DialogContent,{children:c.jsxs(P.Stack,{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},children:[c.jsx(P.Typography,{component:"div",sx:{fontSize:"12px",fontFamily:"monospace","& .line":{textWrap:"wrap"},flex:1},dangerouslySetInnerHTML:{__html:b}}),c.jsx(P.Tooltip,{title:"Copy Embeddable Code",children:c.jsx(P.IconButton,{sx:{width:"24px",height:"24px",marginLeft:"8px",color:"text.secondary"},onClick:()=>{navigator.clipboard.writeText(_)},children:c.jsx(s9,{})})})]})})]}),c.jsx(qb,{open:f,onClose:()=>h(!1),result:e.result||"",title:"Results"}),i&&!e.result&&!F&&!(e.newSources&&e.newSources.length>0)&&c.jsx(rs,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:200},children:c.jsx(P.CircularProgress,{size:32})}),e.result&&c.jsxs(rs,{sx:{position:"relative"},children:[c.jsx(P.Box,{sx:{paddingTop:"24px"},children:c.jsx(ma,{result:e.result,maxHeight:700,maxResultSize:a})}),c.jsxs(P.Stack,{sx:{position:"absolute",top:"8px",right:"8px",flexDirection:"row",gap:"8px",alignItems:"center",zIndex:2},children:[!t&&c.jsx(P.IconButton,{sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px"},onClick:O=>{O.stopPropagation(),l(!0)},children:c.jsx(zm,{sx:{fontSize:"18px",color:"text.secondary"}})}),c.jsx(P.IconButton,{sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px"},onClick:()=>h(!0),children:c.jsx(Qs,{sx:{fontSize:"18px",color:"text.secondary"}})})]})]})]})}const c9=4;function Jb({resourceUri:e,maxResultSize:t=0,retrievalFn:n}){const{apiClients:r}=it.useServer(),{environmentName:o,packageName:a,versionId:i,modelPath:s}=Nt(e),{data:l,isSuccess:u,isError:d,error:f}=Xt({queryKey:[e],queryFn:async()=>(await r.notebooks.getNotebook(o,a,s,i)).data}),[h,p]=H.useState([]),[m,b]=H.useState(!1),[y,x]=H.useState(null),E=H.useMemo(()=>l?$b(l.annotations):null,[l]),v=H.useMemo(()=>l?.notebookCells?Ub(l.notebookCells):null,[l]),S=H.useMemo(()=>v?.sourceInfoMap??new Map,[v]),k=v?.modelPath??null,C=H.useMemo(()=>{const N=new Map;if(!l?.sources)return N;for(const ae of l.sources)if(ae.name&&ae.filters&&ae.filters.length>0){const Q=ae.filters.filter(q=>!q.implicit);Q.length>0&&N.set(ae.name,Q)}return N},[l]),L=C.size>0,F=H.useMemo(()=>{if(L&&k){const N=[];for(const[ae,Q]of C)for(const q of Q??[]){if(!q.dimension||!q.type)continue;let X;const G=q.dimensionType;G==="boolean"?X="Boolean":G==="date"||G==="timestamp"||G==="timestamptz"?X="DateMinMax":G==="number"?X=q.type==="equal"||q.type==="in"?"Star":"MinMax":X={equal:"Star",in:"Star",like:"Star",greater_than:"MinMax",less_than:"MinMax"}[q.type]??"Star";const oe={equal:"Equals",in:"Equals",like:"Contains",greater_than:X==="DateMinMax"?"After":"Greater Than",less_than:X==="DateMinMax"?"Before":"Less Than"}[q.type],ne=q.name!==q.dimension?q.name:void 0;N.push({source:ae,model:k,dimensionName:q.dimension,filterType:X,label:ne,filterName:q.name??q.dimension,defaultMatchType:oe,required:q.required??!1})}return N}return!E||S.size===0||!k?[]:zb(S,E.filters,k)},[L,C,E,S,k]),{filterStates:B,updateFilter:R,getActiveFilters:_}=qd({dimensionSpecs:F}),T=H.useMemo(()=>_(),[B,_]),O=Xb(l),{givenValues:A,updateGiven:w,clearAll:M}=Qb(O);H.useMemo(()=>{const N=new Map;for(const ae of F){const Q=Dr(ae);N.set(Q,ae.source)}return N},[F]);const{data:V}=Wd({environment:o,package:a,dimensionSpecs:F,versionId:i,enabled:F.length>0}),z=H.useCallback(N=>{if(N.length===0)return;const ae=q=>q instanceof Date?q.toISOString().slice(0,10):String(q),Q={};for(const q of N){const X=q.filterName??q.dimensionName,G=q.value;Array.isArray(G)?Q[X]=G.map(ae):G!=null&&(Q[X]=ae(G))}return Object.keys(Q).length>0?JSON.stringify(Q):void 0},[]),U=H.useCallback(N=>{if(N.size===0)return;const ae=q=>q instanceof Date?q.toISOString().slice(0,10):Array.isArray(q)?q.map(X=>ae(X)):q,Q={};return N.forEach((q,X)=>{q!=null&&(Q[X]=ae(q))}),Object.keys(Q).length>0?JSON.stringify(Q):void 0},[]),D=H.useCallback(async(N=[],ae=new Map)=>{if(!u||!l?.notebookCells)return;p(X=>X.length===0?l.notebookCells.map(G=>({...G})):X.map(G=>({...G,result:void 0}))),b(!0),x(null);const Q=L?z(N):void 0,q=U(ae);try{const X=[];for(let ee=0;ee<l.notebookCells.length;ee++){const oe=l.notebookCells[ee];if(oe.type==="markdown")continue;const ne=ee,pe=async()=>{try{const J=(await r.notebooks.executeNotebookCell(o,a,s,ne,i,Q,void 0,q)).data,ye=J.result,de=oe.newSources||J.newSources;p(be=>{const ie=[...be];return ie[ne]||(ie[ne]={...oe}),ie[ne]={...ie[ne],result:ye,newSources:de},ie})}catch(Z){console.error(`Error executing cell ${ne}:`,Z)}};X.push(pe)}const G=[];for(const ee of X){const oe=ee().then(()=>{G.splice(G.indexOf(oe),1)});G.push(oe),G.length>=c9&&await Promise.race(G)}await Promise.all(G)}catch(X){console.error("Error executing notebook cells:",X),x(X)}finally{b(!1)}},[u,l,L,z,U,o,a,s,i,r.notebooks]);H.useEffect(()=>{!u||!l?.notebookCells||D([],new Map)},[u,l,D]);const Y=H.useRef("");H.useEffect(()=>{const N=JSON.stringify({filters:T.map(ae=>({dim:ae.dimensionName,type:ae.matchType,val:ae.value,val2:ae.value2})),givens:Array.from(A.entries()).sort(([ae],[Q])=>ae.localeCompare(Q))});if(N!==Y.current){if(Y.current===""&&T.length===0&&A.size===0){Y.current=N;return}Y.current=N,m||D(T,A)}},[T,A,m,D]);const te=H.useCallback(N=>ae=>{R(N,ae)},[R]);return F.some(N=>N.filterType==="Retrieval"),c.jsx(H2,{children:c.jsx(U2,{children:c.jsxs(P.Stack,{spacing:3,component:"section",children:[c.jsx(i9,{givens:O,values:A,onChange:w,onClearAll:M}),F.length>0&&V&&c.jsxs(P.Paper,{elevation:0,sx:{p:3,backgroundColor:"transparent",border:"none",boxShadow:"none"},children:[c.jsx(P.Typography,{variant:"subtitle2",sx:{fontWeight:600,mb:2,color:"#333"},children:"Filters"}),c.jsx(P.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))",gap:3},children:F.map(N=>{const ae=Dr(N),Q=V.get(ae)||[],q=B.get(ae);return N.filterType==="Retrieval"&&!n?null:c.jsx(P.Box,{children:c.jsx(jb,{spec:N,values:Q,selection:q?.selection,onChange:te(ae),retrievalFn:n})},ae)})})]}),!u&&!d&&c.jsx(hn,{text:"Fetching Notebook..."}),u&&(h.length>0?h:l?.notebookCells||[]).map((N,ae)=>c.jsx(u9,{cell:N,index:ae,resourceUri:e,maxResultSize:t,isExecuting:m},ae)),d&&f.status===404&&c.jsxs(P.Typography,{variant:"body2",sx:{color:"text.secondary"},children:[c.jsx("code",{children:`${o} > ${a} > ${s}`})," ","not found."]}),d&&f.status!==404&&c.jsx(mn,{error:f,context:`${o} > ${a} > ${s}`}),y&&c.jsx(mn,{error:{message:y.message,status:500,name:"ExecutionError"},context:"Notebook Execution"})]})})})}const d9=xt(c.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}));function Pu({type:e,size:t=18,sx:n,...r}){return c.jsxs(Ds,{...r,viewBox:"0 0 24 24",sx:{width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",...n},children:[e==="report"&&c.jsx(f9,{}),e==="model"&&c.jsx(p9,{}),e==="data"&&c.jsx(h9,{})]})}function f9(){return c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"M14 3 H6 a2 2 0 0 0 -2 2 v14 a2 2 0 0 0 2 2 h12 a2 2 0 0 0 2 -2 V9 z"}),c.jsx("path",{d:"M14 3 v4 a2 2 0 0 0 2 2 h4"}),c.jsx("path",{d:"M8 17 v-3"}),c.jsx("path",{d:"M12 17 v-6"}),c.jsx("path",{d:"M16 17 v-4"})]})}function p9(){return c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"M12 3 L4 7 v10 l8 4 l8 -4 V7 z"}),c.jsx("path",{d:"M4 7 l8 4 l8 -4"}),c.jsx("path",{d:"M12 11 v10"})]})}function h9(){return c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"3.5",y:"3.5",width:"17",height:"17",rx:"2"}),c.jsx("path",{d:"M3.5 9.5 H20.5"}),c.jsx("path",{d:"M9.5 3.5 V20.5"})]})}const Cm="README.malloynb";function m9({onClickPackageFile:e,resourceUri:t,retrievalFn:n}){const{apiClients:r}=it.useServer(),o=e??(k=>{window.location.href=k}),{environmentName:a,packageName:i,versionId:s}=Nt(t),[l,u]=H.useState(null),d=Xt({queryKey:["package",a,i,s],queryFn:()=>r.packages.getPackage(a,i,s,!1)}),f=Xt({queryKey:["notebooks",a,i,s],queryFn:()=>r.notebooks.listNotebooks(a,i,s)}),h=Xt({queryKey:["models",a,i,s],queryFn:()=>r.models.listModels(a,i,s)}),p=Xt({queryKey:["databases",a,i,s],queryFn:()=>r.databases.listDatabases(a,i,s)}),m=(f.data?.data??[]).slice().sort((k,C)=>k.path.localeCompare(C.path)),b=(h.data?.data??[]).slice().sort((k,C)=>k.path.localeCompare(C.path)),y=(p.data?.data??[]).slice().sort((k,C)=>k.path.localeCompare(C.path)),x=d.data?.data?.description??"",E=m.some(k=>k.path===Cm),v=Pi({environmentName:a,packageName:i,versionId:s,modelPath:Cm}),S=!f.isSuccess&&!f.isError;return d.isError?c.jsx(mn,{error:d.error,context:`${a} > ${i}`}):c.jsxs(P.Container,{maxWidth:!1,sx:{maxWidth:1024,mx:"auto",px:3,py:6},children:[c.jsxs(P.Box,{sx:{mb:4},children:[c.jsxs(P.Link,{onClick:k=>o(`/${a}/`,k),underline:"none",sx:{display:"inline-flex",alignItems:"center",gap:.5,cursor:"pointer",color:"text.secondary",fontSize:"0.875rem",mb:2,"&:hover":{color:"primary.main"}},children:[c.jsx(d9,{sx:{fontSize:18}}),"Back to ",a]}),c.jsx(P.Typography,{variant:"h4",component:"h1",sx:{fontWeight:600,letterSpacing:"-0.025em",mb:.5},children:i}),x&&c.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:x})]}),S&&c.jsx(hn,{text:"Loading package..."}),!S&&c.jsxs(c.Fragment,{children:[c.jsxs(Ru,{title:"Governed Reports",count:m.length,children:[m.map(k=>c.jsx(Mu,{icon:c.jsx(Pu,{type:"report"}),tint:so.teal,label:k.path,onClick:C=>o(k.path,C)},k.path)),m.length===0&&c.jsx(Ou,{label:"No notebooks"})]}),c.jsxs(Ru,{title:"Semantic Models",count:b.length,children:[b.map(k=>c.jsx(Mu,{icon:c.jsx(Pu,{type:"model"}),tint:so.orange,label:k.path,onClick:C=>o(k.path,C)},k.path)),b.length===0&&c.jsx(Ou,{label:"No models"})]}),c.jsxs(Ru,{title:"Package Data",count:y.length,children:[y.map(k=>c.jsx(Mu,{icon:c.jsx(Pu,{type:"data"}),tint:so.darkBlue,label:k.path,rightLabel:g9(k.info.rowCount),onClick:()=>u(k)},k.path)),y.length===0&&c.jsx(Ou,{label:"No data files"})]}),E&&c.jsx(P.Box,{sx:{mt:6},children:c.jsx(Jb,{resourceUri:v,retrievalFn:n})})]}),c.jsxs(P.Dialog,{open:l!==null,onClose:()=>u(null),maxWidth:"sm",fullWidth:!0,children:[c.jsxs(P.DialogTitle,{sx:{pr:6},children:[l?.path,c.jsx(P.IconButton,{"aria-label":"close",onClick:()=>u(null),sx:{position:"absolute",right:8,top:8},children:c.jsx(Sr,{fontSize:"small"})})]}),c.jsx(P.DialogContent,{children:l?.info?.columns&&c.jsxs(P.Table,{size:"small",children:[c.jsx(P.TableHead,{children:c.jsxs(P.TableRow,{children:[c.jsx(P.TableCell,{children:"Column"}),c.jsx(P.TableCell,{children:"Type"})]})}),c.jsx(P.TableBody,{children:l.info.columns.map(k=>c.jsxs(P.TableRow,{children:[c.jsx(P.TableCell,{component:"th",scope:"row",children:k.name}),c.jsx(P.TableCell,{children:k.type})]},k.name))})]})})]})]})}function Ru({title:e,count:t,children:n}){return c.jsxs(P.Box,{sx:{mb:4},children:[c.jsxs(P.Stack,{direction:"row",alignItems:"baseline",spacing:1,sx:{mb:1},children:[c.jsx(P.Typography,{variant:"h6",sx:{fontWeight:600,letterSpacing:"-0.025em"},children:e}),c.jsxs(P.Typography,{variant:"caption",color:"text.secondary",children:["(",t,")"]})]}),c.jsx(P.Box,{children:n})]})}function Mu({icon:e,tint:t,label:n,rightLabel:r,onClick:o}){const a=!!o,i=s=>{o&&(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),o(s))};return c.jsxs(P.Box,{onClick:o,onKeyDown:a?i:void 0,role:a?"button":void 0,tabIndex:a?0:void 0,sx:{display:"flex",alignItems:"center",gap:1.5,py:1,px:1,mx:-1,cursor:a?"pointer":"default",borderRadius:1.5,transition:"background-color 0.1s","&:hover":a?{backgroundColor:"grey.100"}:void 0,"&:focus-visible":a?{outline:"2px solid",outlineColor:"primary.main",outlineOffset:2}:void 0},children:[c.jsx(P.Box,{sx:{width:32,height:32,borderRadius:1,bgcolor:t,color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e}),c.jsx(P.Typography,{variant:"body2",sx:{fontFamily:$2,flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n}),r&&c.jsx(P.Typography,{variant:"caption",color:"text.secondary",sx:{flexShrink:0},children:r})]})}function Ou({label:e}){return c.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{py:1,fontStyle:"italic"},children:e})}function g9(e){return e>=1e9?`${(e/1e9).toFixed(1)} B rows`:e>=1e6?`${(e/1e6).toFixed(1)} M rows`:e>=1e3?`${(e/1e3).toFixed(1)} K rows`:`${e} rows`}const b9=async e=>{if(typeof window>"u")throw new Error("MalloyRenderer can only be used in browser environment");const{MalloyRenderer:t}=await import("@malloydata/render");return new t({onClick:e,onError:r=>{console.error("Error rendering visualization:",typeof r,r)}}).createViz()};function y9({result:e,height:t,onDrill:n,onSizeChange:r}){const o=H.useRef(null),a=H.useRef(!1);return H.useLayoutEffect(()=>{if(!o.current||!e)return;let i=!0;const s=o.current;for(;s.firstChild;)s.removeChild(s.firstChild);a.current=!1;let l=null,u=null;const d=()=>{if(a.current||!i||!s.firstElementChild)return;const h=s.firstElementChild.firstElementChild;if(!h)return;const p=h.firstElementChild;let m=h.scrollHeight||h.offsetHeight||0;p&&h.classList.contains("malloy-dashboard")&&(m=p.scrollHeight||p.offsetHeight||0),m>0&&(a.current=!0,r&&r(m))};return b9(n).then(f=>{if(i){l=new MutationObserver(()=>{u&&clearTimeout(u),u=setTimeout(()=>{d(),l?.disconnect()},100)}),l.observe(s,{childList:!0,subtree:!0,attributes:!0});try{f.setResult(JSON.parse(e)),f.render(s)}catch(h){console.error("Error rendering visualization:",h),l?.disconnect()}}}).catch(f=>{console.error("Failed to create renderer:",f)}),()=>{i=!1,l?.disconnect(),u&&clearTimeout(u)}},[e,n,r]),c.jsx("div",{ref:o,style:{width:"100%",height:t?`${t}px`:"400px"}})}function ey(e){return typeof window>"u"?c.jsx(P.Box,{sx:{width:"100%",height:e.height?`${e.height}px`:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary"},children:"Loading..."}):c.jsx(H.Suspense,{fallback:c.jsx(P.Box,{sx:{width:"100%",height:e.height?`${e.height}px`:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary"},children:"Loading visualization..."}),children:c.jsx(y9,{...e})})}const x9=Object.freeze(Object.defineProperty({__proto__:null,default:ey},Symbol.toStringTag,{value:"Module"}));function ty(e){return e.replace(/'/g,"\\'").replace(/\\/g,"\\\\")}function tr(e,t=!1){return e==null?"null":t?e instanceof Date?`@${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`:`@${e}`:typeof e=="string"?`'${ty(e)}'`:typeof e=="number"?String(e):typeof e=="boolean"?e?"true":"false":String(e)}function E9(e){const{dimensionName:t,matchType:n,value:r,value2:o}=e,a=`\`${t}\``,i=r instanceof Date;switch(n){case"Equals":case"Semantic Search":return Array.isArray(r)&&r.length>0?`(${r.map(l=>`${a} = ${tr(l,i)}`).join(" or ")})`:Array.isArray(r)?"":`${a} = ${tr(r,i)}`;case"Contains":return typeof r=="string"?`${a} ~ f'%${ty(r)}%'`:Array.isArray(r)?"":`${a} = ${tr(r)}`;case"After":return Array.isArray(r)?"":`${a} > ${tr(r,i)}`;case"Before":return Array.isArray(r)?"":`${a} < ${tr(r,i)}`;case"Greater Than":return Array.isArray(r)?"":`${a} > ${tr(r)}`;case"Less Than":return Array.isArray(r)?"":`${a} < ${tr(r)}`;case"Between":return Array.isArray(r)?"":o!==void 0?`${a} >= ${tr(r,i)} and ${a} <= ${tr(o,i)}`:`${a} >= ${tr(r,i)}`;default:return""}}function C9(e){if(e.length===0)return"";const t=e.map(n=>E9(n)).filter(n=>n.length>0);return t.length===0?"":t.join(" and ")}function T9(e,t,n,r=1e3){const o=C9(t),i=n&&n.length>0?`group_by: ${n.map(s=>`\`${s}\``).join(", ")}`:"select: *";return o?`
219
- run: ${e} -> {
220
- where: ${o}
221
- ${i}
222
- limit: ${r}
223
- }
224
- `:`
225
- run: ${e} -> {
226
- ${i}
227
- limit: ${r}
228
- }
229
- `}function ny(e){const{environment:t,package:n,model:r,source:o,filterSelections:a,fields:i,limit:s=1e3}=e,[l,u]=H.useState(null),d=H.useMemo(()=>T9(o,a,i,s),[o,a,i,s]),f=H.useMemo(()=>Pi({environmentName:t,packageName:n,modelPath:r}),[t,n,r]),h=a.length>0,p=H.useCallback(()=>{if(!h){u(null);return}const m=Yd({resourceUri:f,query:d});u(m)},[h,f,d]);return{embeddedQueryResult:l,queryString:d,resourceUri:f,executeQuery:p,canExecute:h}}function v9(e,t=5e3){const n=e.dimensionSpecs[0]?.source??"",r=e.dimensionSpecs[0]?.model??"",{filterStates:o,updateFilter:a,clearAllFilters:i,getActiveFilters:s}=qd({dimensionSpecs:e.dimensionSpecs}),l=H.useMemo(()=>s(),[o,s]),{data:u,noRowsMatchedFilter:d,isLoading:f,isError:h,error:p,refetch:m}=Wd({environment:e.environment,package:e.package,indexLimit:e.indexLimit,dimensionSpecs:e.dimensionSpecs,versionId:e.versionId,activeFilters:l}),b=f&&!u,{embeddedQueryResult:y,queryString:x,executeQuery:E,canExecute:v}=ny({environment:e.environment,package:e.package,model:r,source:n,filterSelections:l,limit:t,fields:e.selectFields});return{filterStates:o,updateFilter:a,clearAllFilters:i,activeFilters:l,data:u,noRowsMatchedFilter:d,isLoading:f,isInitialLoading:b,isError:h,error:p,refetch:m,embeddedQueryResult:y,queryString:x,executeQuery:E,canExecute:v}}function S9({modelPath:e,query:t,sourceName:n,queryName:r,enabled:o=!0,resourceUri:a}){const{environmentName:i,packageName:s,versionId:l}=Nt(a),{apiClients:u}=it.useServer(),{data:d,isSuccess:f,isError:h,error:p,isLoading:m}=Xt({queryKey:["rawQueryData",i,s,e,l,t,n,r],queryFn:()=>u.models.executeQueryModel(i,s,e,{query:t,sourceName:n,queryName:r,versionId:l}),enabled:o});return{data:f&&d?.data?.result?(()=>{try{return JSON.parse(d.data.result).data?.array_value||[]}catch(y){return console.error("Failed to parse query result:",y),[]}})():[],isSuccess:f,isError:h,error:p,isLoading:m}}exports.AnalyzePackageButton=I4;exports.BrowserWorkbookStorage=A4;exports.ConnectionExplorer=U1;exports.DimensionFilter=jb;exports.EmbeddedQueryResult=l9;exports.Environment=mR;exports.Home=Y7;exports.Loading=hn;exports.Model=X7;exports.ModelExplorer=zd;exports.ModelExplorerDialog=Vd;exports.Notebook=Jb;exports.Package=m9;exports.Packages=z1;exports.QueryResult=Zb;exports.RenderedResult=ey;exports.ResultContainer=ma;exports.SourceExplorerComponent=p1;exports.SourcesExplorer=dd;exports.Workbook=D4;exports.WorkbookList=g1;exports.WorkbookManager=Uo;exports.WorkbookStorageProvider=v4;exports.ccount=Xu;exports.createEmbeddedQueryResult=Yd;exports.encodeResourceUri=Pi;exports.extractDimensionSpecs=zb;exports.extractSourceFromQuery=A7;exports.find=Si;exports.generateFilterClause=w7;exports.getDimensionKey=Dr;exports.getJoinedSources=k7;exports.html=sa;exports.htmlVoidElements=ig;exports.injectWhereClause=I7;exports.makeDimensionKey=Yb;exports.parseAllSourceInfos=Ub;exports.parseDimensionFilterAnnotation=Hb;exports.parseNotebookFilterAnnotation=$b;exports.parseResourceUri=Nt;exports.stringify=ll;exports.stringify$1=ul;exports.svg=Vr;exports.useDimensionFilters=qd;exports.useDimensionFiltersFromSpec=v9;exports.useDimensionFiltersQuery=ny;exports.useDimensionalFilterRangeData=Wd;exports.useGivensForm=Qb;exports.useModelData=Ud;exports.useModelGivens=Xb;exports.useRawQueryData=S9;exports.useRouterClickHandler=m1;exports.whitespace=Lc;exports.zwitch=gl;