@malloy-publisher/sdk 0.0.198-dev → 0.0.198-dev1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ServerProvider-DDScRRDc.es.js → ServerProvider-BuM1usxf.es.js} +181 -177
- package/dist/{ServerProvider-IhQ4aYBm.cjs.js → ServerProvider-C_Mnvmgc.cjs.js} +1 -1
- package/dist/client/api.d.ts +61 -4
- package/dist/client/index.cjs.js +1 -1
- package/dist/client/index.es.js +1 -1
- package/dist/components/Package/ContentTypeIcon.d.ts +16 -0
- package/dist/components/Package/index.d.ts +0 -1
- package/dist/components/styles.d.ts +16 -0
- package/dist/{core-w79IMXAG.es.js → core-DfcpQGVP.es.js} +1 -1
- package/dist/{core-7-3Jcsb0.cjs.js → core-yDgxkpo0.cjs.js} +1 -1
- package/dist/index-CMA8U4-B.cjs.js +228 -0
- package/dist/{index-CN0_kZSF.es.js → index-Y4ooZDYA.es.js} +17654 -20603
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +33 -34
- package/package.json +5 -5
- package/src/components/Environment/AddPackageDialog.tsx +116 -79
- package/src/components/Environment/DeletePackageDialog.tsx +3 -2
- package/src/components/Environment/Environment.tsx +44 -23
- package/src/components/Environment/Packages.tsx +164 -156
- package/src/components/Home/DeleteEnvironmentDialog.tsx +3 -2
- package/src/components/Home/Home.tsx +272 -389
- package/src/components/Model/Model.tsx +2 -2
- package/src/components/Model/ModelCell.tsx +1 -1
- package/src/components/Model/ModelExplorerDialog.tsx +1 -1
- package/src/components/Model/SourcesExplorer.tsx +4 -4
- package/src/components/Notebook/Notebook.tsx +4 -9
- package/src/components/Notebook/NotebookCell.tsx +10 -7
- package/src/components/Package/ContentTypeIcon.tsx +79 -0
- package/src/components/Package/Package.tsx +387 -55
- package/src/components/Package/index.ts +0 -1
- package/src/components/QueryResult/QueryResult.tsx +1 -1
- package/src/components/RenderedResult/RenderedResult.tsx +9 -8
- package/src/components/ResultsDialog.tsx +1 -1
- package/src/components/styles.ts +28 -15
- package/dist/components/Package/Config.d.ts +0 -5
- package/dist/components/Package/Databases.d.ts +0 -5
- package/dist/components/Package/FileTreeView.d.ts +0 -9
- package/dist/components/Package/Models.d.ts +0 -6
- package/dist/components/Package/Notebooks.d.ts +0 -6
- package/dist/index-Xo_ADux9.cjs.js +0 -233
- package/src/components/Package/Config.tsx +0 -97
- package/src/components/Package/Databases.tsx +0 -228
- package/src/components/Package/FileTreeView.tsx +0 -241
- package/src/components/Package/Models.tsx +0 -68
- package/src/components/Package/Notebooks.tsx +0 -77
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
"use strict";var zx=Object.create;var fp=Object.defineProperty;var Vx=Object.getOwnPropertyDescriptor;var Wx=Object.getOwnPropertyNames;var qx=Object.getPrototypeOf,Yx=Object.prototype.hasOwnProperty;var Kx=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Wx(t))!Yx.call(e,o)&&o!==n&&fp(e,o,{get:()=>t[o],enumerable:!(r=Vx(t,o))||r.enumerable});return e};var Zl=(e,t,n)=>(n=e!=null?zx(qx(e)):{},Kx(t||!e||!e.__esModule?fp(n,"default",{value:e,enumerable:!0}):n,e));const c=require("react/jsx-runtime"),P=require("@mui/material"),q=require("react"),Mr=require("@tanstack/react-query"),st=require("./ServerProvider-IhQ4aYBm.cjs.js"),Bs=require("markdown-to-jsx"),Dn=require("@mui/icons-material"),dt=require("@mui/system"),Gx=require("@emotion/styled"),Qx=require("@emotion/react"),Zi=require("react-dom"),Hm=require("@react-spring/web"),Xx=require("react-router-dom");function Um(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 D=Um(q),Zx=Um(Zi),hp=e=>e,Jx=()=>{let e=hp;return{configure(t){e=t},generate(t){return e(t)},reset(){e=hp}}},zm=Jx();function wr(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 ke(e){if(typeof e!="string")throw new Error(wr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function mp(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function Zn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jl={exports:{}},eu,gp;function ey(){if(gp)return eu;gp=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return eu=e,eu}var tu,bp;function ty(){if(bp)return tu;bp=1;var e=ey();function t(){}function n(){}return n.resetWarningCache=t,tu=function(){function r(a,s,l,u,d,p){if(p!==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 i={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 i.PropTypes=i,i},tu}var xp;function ny(){return xp||(xp=1,Jl.exports=ty()()),Jl.exports}var ry=ny();const ce=Zn(ry);function Vm(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=Vm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Pe(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Vm(e))&&(r&&(r+=" "),r+=t);return r}function Fe(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let l=0;l<i.length;l+=1){const u=i[l];u&&(a+=(s===!0?"":" ")+t(u),s=!1,n&&n[u]&&(a+=" "+n[u]))}r[o]=a}return r}var nu={exports:{}},bt={};/**
|
|
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 yp;function oy(){if(yp)return bt;yp=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"),i=Symbol.for("react.consumer"),a=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"),p=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),f=Symbol.for("react.client.reference");function m(b){if(typeof b=="object"&&b!==null){var x=b.$$typeof;switch(x){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 a:case s:case p:case d:return b;case i:return b;default:return x}}case t:return x}}}return bt.ContextConsumer=i,bt.ContextProvider=a,bt.Element=e,bt.ForwardRef=s,bt.Fragment=n,bt.Lazy=p,bt.Memo=d,bt.Portal=t,bt.Profiler=o,bt.StrictMode=r,bt.Suspense=l,bt.SuspenseList=u,bt.isContextConsumer=function(b){return m(b)===i},bt.isContextProvider=function(b){return m(b)===a},bt.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},bt.isForwardRef=function(b){return m(b)===s},bt.isFragment=function(b){return m(b)===n},bt.isLazy=function(b){return m(b)===p},bt.isMemo=function(b){return m(b)===d},bt.isPortal=function(b){return m(b)===t},bt.isProfiler=function(b){return m(b)===o},bt.isStrictMode=function(b){return m(b)===r},bt.isSuspense=function(b){return m(b)===l},bt.isSuspenseList=function(b){return m(b)===u},bt.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===p||b.$$typeof===d||b.$$typeof===a||b.$$typeof===i||b.$$typeof===s||b.$$typeof===f||b.getModuleId!==void 0)},bt.typeOf=m,bt}var Ep;function iy(){return Ep||(Ep=1,nu.exports=oy()),nu.exports}var Wm=iy();function lr(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 qm(e){if(D.isValidElement(e)||Wm.isValidElementType(e)||!lr(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=qm(e[n])}),t}function rn(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return lr(e)&&lr(t)&&Object.keys(t).forEach(o=>{D.isValidElement(t[o])||Wm.isValidElementType(t[o])?r[o]=t[o]:lr(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&lr(e[o])?r[o]=rn(e[o],t[o],n):n.clone?r[o]=lr(t[o])?qm(t[o]):t[o]:r[o]=t[o]}),r}function ra(e,t){return t?rn(e,t,{clone:!1}):e}function Cp(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,o)=>{const i=/min-width:\s*([0-9.]+)/;return+(r.match(i)?.[1]||0)-+(o.match(i)?.[1]||0)});return n.length?n.reduce((r,o)=>{const i=t[o];return delete r[o],r[o]=i,r},{...t}):t}function ay(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function sy(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function ly(e){const t=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function n(i,a){i.up=(...s)=>t(e.breakpoints.up(...s),a),i.down=(...s)=>t(e.breakpoints.down(...s),a),i.between=(...s)=>t(e.breakpoints.between(...s),a),i.only=(...s)=>t(e.breakpoints.only(...s),a),i.not=(...s)=>{const l=t(e.breakpoints.not(...s),a);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=i=>(n(r,i),r);return n(o),{...e,containerQueries:o}}const ll={xs:0,sm:600,md:900,lg:1200,xl:1536},Tp={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ll[e]}px)`},uy={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:ll[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Ir(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||Tp;return t.reduce((a,s,l)=>(a[i.up(i.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const i=r.breakpoints||Tp;return Object.keys(t).reduce((a,s)=>{if(ay(i.keys,s)){const l=sy(r.containerQueries?r:uy,s);l&&(a[l]=n(t[s],s))}else if(Object.keys(i.values||ll).includes(s)){const l=i.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function cy(e={}){return e.keys?.reduce((n,r)=>{const o=e.up(r);return n[o]={},n},{})||{}}function vp(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function ul(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function js(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=ul(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,i=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,u=ul(l,r)||{};return Ir(a,s,p=>{let h=js(u,o,p);return p===h&&typeof p=="string"&&(h=js(u,o,`${t}${p==="default"?"":ke(p)}`,p)),n===!1?h:{[n]:h}})};return i.propTypes={},i.filterProps=[t],i}function dy(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const py={m:"margin",p:"padding"},fy={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Sp={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},hy=dy(e=>{if(e.length>2)if(Sp[e])e=Sp[e];else return[e];const[t,n]=e.split(""),r=py[t],o=fy[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),_c=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Bc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[..._c,...Bc];function Na(e,t,n,r){const o=ul(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:typeof o=="string"?o.startsWith("var(")&&i===0?0:o.startsWith("var(")&&i===1?o:`calc(${i} * ${o})`:o*i:Array.isArray(o)?i=>{if(typeof i=="string")return i;const a=Math.abs(i),s=o[a];return i>=0?s:typeof s=="number"?-s:typeof s=="string"&&s.startsWith("var(")?`calc(-1 * ${s})`:`-${s}`}:typeof o=="function"?o:()=>{}}function jc(e){return Na(e,"spacing",8)}function Fa(e,t){return typeof t=="string"||t==null?t:e(t)}function my(e,t){return n=>e.reduce((r,o)=>(r[o]=Fa(t,n),r),{})}function gy(e,t,n,r){if(!t.includes(n))return null;const o=hy(n),i=my(o,r),a=e[n];return Ir(e,a,i)}function Ym(e,t){const n=jc(e.theme);return Object.keys(e).map(r=>gy(e,t,r,n)).reduce(ra,{})}function Nt(e){return Ym(e,_c)}Nt.propTypes={};Nt.filterProps=_c;function Ft(e){return Ym(e,Bc)}Ft.propTypes={};Ft.filterProps=Bc;function cl(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?ra(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Ln(e){return typeof e!="number"?e:`${e}px solid`}function zn(e,t){return jt({prop:e,themeKey:"borders",transform:t})}const by=zn("border",Ln),xy=zn("borderTop",Ln),yy=zn("borderRight",Ln),Ey=zn("borderBottom",Ln),Cy=zn("borderLeft",Ln),Ty=zn("borderColor"),vy=zn("borderTopColor"),Sy=zn("borderRightColor"),ky=zn("borderBottomColor"),Dy=zn("borderLeftColor"),wy=zn("outline",Ln),Iy=zn("outlineColor"),dl=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Na(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Fa(t,r)});return Ir(e,e.borderRadius,n)}return null};dl.propTypes={};dl.filterProps=["borderRadius"];cl(by,xy,yy,Ey,Cy,Ty,vy,Sy,ky,Dy,dl,wy,Iy);const pl=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Na(e.theme,"spacing",8),n=r=>({gap:Fa(t,r)});return Ir(e,e.gap,n)}return null};pl.propTypes={};pl.filterProps=["gap"];const fl=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Na(e.theme,"spacing",8),n=r=>({columnGap:Fa(t,r)});return Ir(e,e.columnGap,n)}return null};fl.propTypes={};fl.filterProps=["columnGap"];const hl=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Na(e.theme,"spacing",8),n=r=>({rowGap:Fa(t,r)});return Ir(e,e.rowGap,n)}return null};hl.propTypes={};hl.filterProps=["rowGap"];const Ay=jt({prop:"gridColumn"}),Py=jt({prop:"gridRow"}),Ry=jt({prop:"gridAutoFlow"}),My=jt({prop:"gridAutoColumns"}),Oy=jt({prop:"gridAutoRows"}),Ly=jt({prop:"gridTemplateColumns"}),Ny=jt({prop:"gridTemplateRows"}),Fy=jt({prop:"gridTemplateAreas"}),_y=jt({prop:"gridArea"});cl(pl,fl,hl,Ay,Py,Ry,My,Oy,Ly,Ny,Fy,_y);function Xo(e,t){return t==="grey"?t:e}const By=jt({prop:"color",themeKey:"palette",transform:Xo}),jy=jt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Xo}),$y=jt({prop:"backgroundColor",themeKey:"palette",transform:Xo});cl(By,jy,$y);function vn(e){return e<=1&&e!==0?`${e*100}%`:e}const Hy=jt({prop:"width",transform:vn}),$c=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const r=e.theme?.breakpoints?.values?.[n]||ll[n];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:vn(n)}};return Ir(e,e.maxWidth,t)}return null};$c.filterProps=["maxWidth"];const Uy=jt({prop:"minWidth",transform:vn}),zy=jt({prop:"height",transform:vn}),Vy=jt({prop:"maxHeight",transform:vn}),Wy=jt({prop:"minHeight",transform:vn});jt({prop:"size",cssProperty:"width",transform:vn});jt({prop:"size",cssProperty:"height",transform:vn});const qy=jt({prop:"boxSizing"});cl(Hy,$c,Uy,zy,Vy,Wy,qy);const _a={border:{themeKey:"borders",transform:Ln},borderTop:{themeKey:"borders",transform:Ln},borderRight:{themeKey:"borders",transform:Ln},borderBottom:{themeKey:"borders",transform:Ln},borderLeft:{themeKey:"borders",transform:Ln},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ln},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:dl},color:{themeKey:"palette",transform:Xo},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Xo},backgroundColor:{themeKey:"palette",transform:Xo},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:Nt},mt:{style:Nt},mr:{style:Nt},mb:{style:Nt},ml:{style:Nt},mx:{style:Nt},my:{style:Nt},margin:{style:Nt},marginTop:{style:Nt},marginRight:{style:Nt},marginBottom:{style:Nt},marginLeft:{style:Nt},marginX:{style:Nt},marginY:{style:Nt},marginInline:{style:Nt},marginInlineStart:{style:Nt},marginInlineEnd:{style:Nt},marginBlock:{style:Nt},marginBlockStart:{style:Nt},marginBlockEnd:{style:Nt},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:pl},rowGap:{style:hl},columnGap:{style:fl},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:vn},maxWidth:{style:$c},minWidth:{transform:vn},height:{transform:vn},maxHeight:{transform:vn},minHeight:{transform:vn},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 Yy(...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 Ky(e,t){return typeof e=="function"?e(t):e}function Gy(){function e(n,r,o,i){const a={[n]:r,theme:o},s=i[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:d,style:p}=s;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=ul(o,u)||{};return p?p(a):Ir(a,r,m=>{let b=js(h,d,m);return m===b&&typeof m=="string"&&(b=js(h,d,`${n}${m==="default"?"":ke(m)}`,m)),l===!1?b:{[l]:b}})}function t(n){const{sx:r,theme:o={},nested:i}=n||{};if(!r)return null;const a=o.unstable_sxConfig??_a;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=cy(o.breakpoints),p=Object.keys(d);let h=d;return Object.keys(u).forEach(f=>{const m=Ky(u[f],o);if(m!=null)if(typeof m=="object")if(a[f])h=ra(h,e(f,m,o,a));else{const b=Ir({theme:o},m,x=>({[f]:x}));Yy(b,m)?h[f]=t({sx:m,theme:o,nested:!0}):h=ra(h,b)}else h=ra(h,e(f,m,o,a))}),!i&&o.modularCssLayers?{"@layer sx":Cp(o,vp(p,h))}:Cp(o,vp(p,h))}return Array.isArray(r)?r.map(s):s(r)}return t}const ii=Gy();ii.filterProps=["sx"];const Qy=e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??_a;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t};function Xy(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=Qy(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...a)=>{const s=t(...a);return lr(s)?{...r,...s}:r}:i={...r,...t},{...o,sx:i}}function Zy(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Hc(e,t=0,n=1){return Zy(e,t,n)}function Jy(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 Yr(e){if(e.type)return e;if(e.charAt(0)==="#")return Yr(Jy(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(wr(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(wr(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const e2=e=>{const t=Yr(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},Ji=(e,t)=>{try{return e2(e)}catch{return e}};function ml(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,i)=>i<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 Km(e){e=Yr(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(u,d=(u+n/30)%12)=>o-i*Math.max(Math.min(d-3,9-d,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),ml({type:s,values:l})}function Wu(e){e=Yr(e);let t=e.type==="hsl"||e.type==="hsla"?Yr(Km(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 t2(e,t){const n=Wu(e),r=Wu(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function $s(e,t){return e=Yr(e),t=Hc(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,ml(e)}function no(e,t,n){try{return $s(e,t)}catch{return e}}function gl(e,t){if(e=Yr(e),t=Hc(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 ml(e)}function ht(e,t,n){try{return gl(e,t)}catch{return e}}function bl(e,t){if(e=Yr(e),t=Hc(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 ml(e)}function mt(e,t,n){try{return bl(e,t)}catch{return e}}function qu(e,t=.15){return Wu(e)>.5?gl(e,t):bl(e,t)}function es(e,t,n){try{return qu(e,t)}catch{return e}}const Ea={black:"#000",white:"#fff"},n2={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"},No={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Fo={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Li={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},_o={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Bo={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},jo={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Gm(){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:Ea.white,default:Ea.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 Qm=Gm();function Xm(){return{text:{primary:Ea.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:Ea.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 Yu=Xm();function kp(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=bl(e.main,o):t==="dark"&&(e.dark=gl(e.main,i)))}function Dp(e,t,n,r,o){const i=o.light||o,a=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 ${(i*100).toFixed(0)}%)`:n==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(a*100).toFixed(0)}%)`))}function r2(e="light"){return e==="dark"?{main:_o[200],light:_o[50],dark:_o[400]}:{main:_o[700],light:_o[400],dark:_o[800]}}function o2(e="light"){return e==="dark"?{main:No[200],light:No[50],dark:No[400]}:{main:No[500],light:No[300],dark:No[700]}}function i2(e="light"){return e==="dark"?{main:Fo[500],light:Fo[300],dark:Fo[700]}:{main:Fo[700],light:Fo[400],dark:Fo[800]}}function a2(e="light"){return e==="dark"?{main:Bo[400],light:Bo[300],dark:Bo[700]}:{main:Bo[700],light:Bo[500],dark:Bo[900]}}function s2(e="light"){return e==="dark"?{main:jo[400],light:jo[300],dark:jo[700]}:{main:jo[800],light:jo[500],dark:jo[900]}}function l2(e="light"){return e==="dark"?{main:Li[400],light:Li[300],dark:Li[700]}:{main:"#ed6c02",light:Li[500],dark:Li[900]}}function u2(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function Uc(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:o,...i}=e,a=e.primary||r2(t),s=e.secondary||o2(t),l=e.error||i2(t),u=e.info||a2(t),d=e.success||s2(t),p=e.warning||l2(t);function h(x){return o?u2(x):t2(x,Yu.text.primary)>=n?Yu.text.primary:Qm.text.primary}const f=({color:x,name:y,mainShade:E=500,lightShade:C=300,darkShade:k=700})=>{if(x={...x},!x.main&&x[E]&&(x.main=x[E]),!x.hasOwnProperty("main"))throw new Error(wr(11,y?` (${y})`:"",E));if(typeof x.main!="string")throw new Error(wr(12,y?` (${y})`:"",JSON.stringify(x.main)));return o?(Dp(o,x,"light",C,r),Dp(o,x,"dark",k,r)):(kp(x,"light",C,r),kp(x,"dark",k,r)),x.contrastText||(x.contrastText=h(x.main)),x};let m;return t==="light"?m=Gm():t==="dark"&&(m=Xm()),rn({common:{...Ea},mode:t,primary:f({color:a,name:"primary"}),secondary:f({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:l,name:"error"}),warning:f({color:p,name:"warning"}),info:f({color:u,name:"info"}),success:f({color:d,name:"success"}),grey:n2,contrastThreshold:n,getContrastText:h,augmentColor:f,tonalOffset:r,...m},i)}function c2(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 d2={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 p2(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var f2=/[A-Z]|^ms/g,h2=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Zm=function(t){return t.charCodeAt(1)===45},wp=function(t){return t!=null&&typeof t!="boolean"},ru=p2(function(e){return Zm(e)?e:e.replace(f2,"-$&").toLowerCase()}),Ip=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(h2,function(r,o,i){return Vr={name:o,styles:i,next:Vr},o})}return d2[t]!==1&&!Zm(t)&&typeof n=="number"&&n!==0?n+"px":n};function Hs(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 Vr={name:o.name,styles:o.styles,next:Vr},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Vr={name:a.name,styles:a.styles,next:Vr},a=a.next;var s=i.styles+";";return s}return m2(e,t,n)}}var l=n;return l}function m2(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Hs(e,t,n[o])+";";else for(var i in n){var a=n[i];if(typeof a!="object"){var s=a;wp(s)&&(r+=ru(i)+":"+Ip(i,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var l=0;l<a.length;l++)wp(a[l])&&(r+=ru(i)+":"+Ip(i,a[l])+";");else{var u=Hs(e,t,a);switch(i){case"animation":case"animationName":{r+=ru(i)+":"+u+";";break}default:r+=i+"{"+u+"}"}}}return r}var Ap=/label:\s*([^\s;{]+)\s*(;|$)/g,Vr;function g2(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="";Vr=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,o+=Hs(n,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=Hs(n,t,e[s]),r){var l=i;o+=l[s]}Ap.lastIndex=0;for(var u="",d;(d=Ap.exec(o))!==null;)u+="-"+d[1];var p=c2(o)+u;return{name:p,styles:o,next:Vr}}function b2(e,t){return Gx(e,t)}function x2(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Pp=[];function ho(e){return Pp[0]=e,g2(Pp)}const Wt=typeof window<"u"?D.useLayoutEffect:D.useEffect;function y2(e){return Object.keys(e).length===0}function Jm(e=null){const t=D.useContext(Qx.ThemeContext);return!t||y2(t)?e:t}const E2=D.createContext(),Vn=()=>D.useContext(E2)??!1;function Ca(e,t,n=!1){const r={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const i=o;if(i==="components"||i==="slots")r[i]={...e[i],...r[i]};else if(i==="componentsProps"||i==="slotProps"){const a=e[i],s=t[i];if(!s)r[i]=a||{};else if(!a)r[i]=s;else{r[i]={...s};for(const l in a)if(Object.prototype.hasOwnProperty.call(a,l)){const u=l;r[i][u]=Ca(a[u],s[u],n)}}}else i==="className"&&n&&t.className?r.className=Pe(e?.className,t?.className):i==="style"&&n&&t.style?r.style={...e?.style,...t?.style}:r[i]===void 0&&(r[i]=e[i])}return r}const C2=D.createContext(void 0);function T2(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?Ca(o.defaultProps,r,t.components.mergeClassNameAndStyle):!o.styleOverrides&&!o.variants?Ca(o,r,t.components.mergeClassNameAndStyle):r}function v2({props:e,name:t}){const n=D.useContext(C2);return T2({props:e,name:t,theme:{components:n}})}let Rp=0;function S2(e){const[t,n]=D.useState(e),r=e||t;return D.useEffect(()=>{t==null&&(Rp+=1,n(`mui-${Rp}`))},[t]),r}const k2={...D},Mp=k2.useId;function Jn(e){if(Mp!==void 0){const t=Mp();return e??t}return S2(e)}const D2=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 w2(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=D2(t),a=Object.keys(i);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,f){const m=a.indexOf(f);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:f)-r/100}${n})`}function d(h){return a.indexOf(h)+1<a.length?u(h,a[a.indexOf(h)+1]):s(h)}function p(h){const f=a.indexOf(h);return f===0?s(a[1]):f===a.length-1?l(a[f]):u(h,a[a.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:a,values:i,up:s,down:l,between:u,only:d,not:p,unit:n,...o}}const I2={borderRadius:4};function A2(e=8,t=jc({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(i=>{const a=t(i);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function P2(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 zc(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e,s=w2(n),l=A2(o);let u=rn({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...I2,...i}},a);return u=ly(u),u.applyStyles=P2,u=t.reduce((d,p)=>rn(d,p),u),u.unstable_sxConfig={..._a,...a?.unstable_sxConfig},u.unstable_sx=function(p){return ii({sx:p,theme:this})},u}const R2=zc();function M2(e=R2){return Jm(e)}const Op=(e,t,n,r=[])=>{let o=e;t.forEach((i,a)=>{a===t.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},O2=(e,t,n)=>{function r(o,i=[],a=[]){Object.entries(o).forEach(([s,l])=>{(!n||n&&!n([...i,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...i,s],Array.isArray(l)?[...a,s]:a):t([...i,s],l,a))})}r(e)},L2=(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 ou(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};return O2(e,(s,l,u)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const d=`--${n?`${n}-`:""}${s.join("-")}`,p=L2(s,l);Object.assign(o,{[d]:p}),Op(i,s,`var(${d})`,u),Op(a,s,`var(${d}, ${p})`,u)}},s=>s[0]==="vars"),{css:o,vars:i,varsWithDefaults:a}}function N2(e,t={}){const{getSelector:n=y,disableCssColorScheme:r,colorSchemeSelector:o,enableContrastVars:i}=t,{colorSchemes:a={},components:s,defaultColorScheme:l="light",...u}=e,{vars:d,css:p,varsWithDefaults:h}=ou(u,t);let f=h;const m={},{[l]:b,...x}=a;if(Object.entries(x||{}).forEach(([k,v])=>{const{vars:S,css:N,varsWithDefaults:O}=ou(v,t);f=rn(f,O),m[k]={css:N,vars:S}}),b){const{css:k,vars:v,varsWithDefaults:S}=ou(b,t);f=rn(f,S),m[l]={css:k,vars:v}}function y(k,v){let S=o;if(o==="class"&&(S=".%s"),o==="data"&&(S="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(S=`[${o}="%s"]`),k){if(S==="media")return e.defaultColorScheme===k?":root":{[`@media (prefers-color-scheme: ${a[k]?.palette?.mode||k})`]:{":root":v}};if(S)return e.defaultColorScheme===k?`:root, ${S.replace("%s",String(k))}`:S.replace("%s",String(k))}return":root"}return{vars:f,generateThemeVars:()=>{let k={...d};return Object.entries(m).forEach(([,{vars:v}])=>{k=rn(k,v)}),k},generateStyleSheets:()=>{const k=[],v=e.defaultColorScheme||"light";function S(B,R){Object.keys(R).length&&k.push(typeof B=="string"?{[B]:{...R}}:B)}S(n(void 0,{...p}),p);const{[v]:N,...O}=m;if(N){const{css:B}=N,R=a[v]?.palette?.mode,F=!r&&R?{colorScheme:R,...B}:{...B};S(n(v,{...F}),F)}return Object.entries(O).forEach(([B,{css:R}])=>{const F=a[B]?.palette?.mode,T=!r&&F?{colorScheme:F,...R}:{...R};S(n(B,{...T}),T)}),i&&k.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)"}}),k}}}function F2(e){const t={};return Object.entries(e).forEach(r=>{const[o,i]=r;typeof i=="object"&&(t[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function _2(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 B2={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=B2[t];return r?`${n}-${r}`:`${zm.generate(e)}-${t}`}function j2(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function $2(e){return Math.round(e*1e5)/1e5}const Lp={textTransform:"uppercase"},Np='"Roboto", "Helvetica", "Arial", sans-serif';function H2(e,t){const{fontFamily:n=Np,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:u,pxToRem:d,...p}=typeof t=="function"?t(e):t,h=r/14,f=d||(x=>`${x/l*h}rem`),m=(x,y,E,C,k)=>({fontFamily:n,fontWeight:x,fontSize:f(y),lineHeight:E,...n===Np?{letterSpacing:`${$2(C/y)}em`}:{},...k,...u}),b={h1:m(o,96,1.167,-1.5),h2:m(o,60,1.2,-.5),h3:m(i,48,1.167,0),h4:m(i,34,1.235,.25),h5:m(i,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(i,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(i,16,1.5,.15),body2:m(i,14,1.43,.15),button:m(a,14,1.75,.4,Lp),caption:m(i,12,1.66,.4),overline:m(i,12,2.66,1,Lp),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return rn({htmlFontSize:l,pxToRem:f,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...b},p,{clone:!1})}const U2=.2,z2=.14,V2=.12;function Mt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${U2})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${z2})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${V2})`].join(",")}const W2=["none",Mt(0,2,1,-1,0,1,1,0,0,1,3,0),Mt(0,3,1,-2,0,2,2,0,0,1,5,0),Mt(0,3,3,-2,0,3,4,0,0,1,8,0),Mt(0,2,4,-1,0,4,5,0,0,1,10,0),Mt(0,3,5,-1,0,5,8,0,0,1,14,0),Mt(0,3,5,-1,0,6,10,0,0,1,18,0),Mt(0,4,5,-2,0,7,10,1,0,2,16,1),Mt(0,5,5,-3,0,8,10,1,0,3,14,2),Mt(0,5,6,-3,0,9,12,1,0,3,16,2),Mt(0,6,6,-3,0,10,14,1,0,4,18,3),Mt(0,6,7,-4,0,11,15,1,0,4,20,3),Mt(0,7,8,-4,0,12,17,2,0,5,22,4),Mt(0,7,8,-4,0,13,19,2,0,5,24,4),Mt(0,7,9,-4,0,14,21,2,0,5,26,4),Mt(0,8,9,-5,0,15,22,2,0,6,28,5),Mt(0,8,10,-5,0,16,24,2,0,6,30,5),Mt(0,8,11,-5,0,17,26,2,0,6,32,5),Mt(0,9,11,-5,0,18,28,2,0,7,34,6),Mt(0,9,12,-6,0,19,29,2,0,7,36,6),Mt(0,10,13,-6,0,20,31,3,0,8,38,7),Mt(0,10,13,-6,0,21,33,3,0,8,40,7),Mt(0,10,14,-6,0,22,35,3,0,8,42,7),Mt(0,11,14,-7,0,23,36,3,0,9,44,8),Mt(0,11,15,-7,0,24,38,3,0,9,46,8)],q2={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)"},e0={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Fp(e){return`${Math.round(e)}ms`}function Y2(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function K2(e){const t={...q2,...e.easing},n={...e0,...e.duration};return{getAutoHeightDuration:Y2,create:(o=["all"],i={})=>{const{duration:a=n.standard,easing:s=t.easeInOut,delay:l=0,...u}=i;return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof a=="string"?a:Fp(a)} ${s} ${typeof l=="string"?l:Fp(l)}`).join(",")},...e,easing:t,duration:n}}const G2={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Q2(e){return lr(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function t0(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let i=0;i<o.length;i++){const[a,s]=o[i];!Q2(s)||a.startsWith("unstable_")?delete r[a]:lr(s)&&(r[a]={...s},n(r[a]))}}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 _p(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const X2=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 Z2(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})`:$s(t,X2(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${_p(n)})`:bl(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${_p(n)})`:gl(t,n)}})}function Ku(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:s={},shape:l,colorSpace:u,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(wr(20));const p=Uc({...i,colorSpace:u}),h=zc(e);let f=rn(h,{mixins:j2(h.breakpoints,r),palette:p,shadows:W2.slice(),typography:H2(p,s),transitions:K2(a),zIndex:{...G2}});return f=rn(f,d),f=t.reduce((m,b)=>rn(m,b),f),f.unstable_sxConfig={..._a,...d?.unstable_sxConfig},f.unstable_sx=function(b){return ii({sx:b,theme:this})},f.toRuntimeSource=t0,Z2(f),f}function Gu(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 J2=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Gu(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function n0(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function r0(e){return e==="dark"?J2:[]}function eE(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:o,...i}=e,a=Uc({...t,colorSpace:o});return{palette:a,opacity:{...n0(a.mode),...n},overlays:r||r0(a.mode),...i}}function tE(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 nE=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],rE=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return nE(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:i?{[i.replace("%s",t)]:a,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function oE(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function he(e,t,n){!e[t]&&n&&(e[t]=n)}function ea(e){return typeof e!="string"||!e.startsWith("hsl")?e:Km(e)}function Cr(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Ji(ea(e[t])))}function iE(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const tr=e=>{try{return e()}catch{}},aE=(e="mui")=>dt.unstable_createGetCssVar(e);function iu(e,t,n,r,o){if(!n)return;n=n===!0?{}:n;const i=o==="dark"?"dark":"light";if(!r){t[o]=eE({...n,palette:{mode:i,...n?.palette},colorSpace:e});return}const{palette:a,...s}=Ku({...r,palette:{mode:i,...n?.palette},colorSpace:e});return t[o]={...n,palette:a,opacity:{...n0(i),...n?.opacity},overlays:n?.overlays||r0(i)},s}function sE(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",nativeColor:a=!1,shouldSkipGeneratingVar:s=tE,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:u=":root",...d}=e,p=Object.keys(n)[0],h=r||(n.light&&p!=="light"?"light":p),f=aE(i),{[h]:m,light:b,dark:x,...y}=n,E={...y};let C=m;if((h==="dark"&&!("dark"in n)||h==="light"&&!("light"in n))&&(C=!0),!C)throw new Error(wr(21,h));let k;a&&(k="oklch");const v=iu(k,E,C,d,h);b&&!E.light&&iu(k,E,b,void 0,"light"),x&&!E.dark&&iu(k,E,x,void 0,"dark");let S={defaultColorScheme:h,...v,cssVarPrefix:i,colorSchemeSelector:l,rootSelector:u,getCssVar:f,colorSchemes:E,font:{...F2(v.typography),...v.font},spacing:iE(d.spacing)};Object.keys(S.colorSchemes).forEach(F=>{const T=S.colorSchemes[F].palette,L=A=>{const M=A.split("-"),W=M[1],H=M[2];return f(A,T[W][H])};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 I(A,M,W){if(k){let H;return A===no&&(H=`transparent ${((1-W)*100).toFixed(0)}%`),A===ht&&(H=`#000 ${(W*100).toFixed(0)}%`),A===mt&&(H=`#fff ${(W*100).toFixed(0)}%`),`color-mix(in ${k}, ${M}, ${H})`}return A(M,W)}if(oE(T,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),T.mode==="light"){he(T.Alert,"errorColor",I(ht,T.error.light,.6)),he(T.Alert,"infoColor",I(ht,T.info.light,.6)),he(T.Alert,"successColor",I(ht,T.success.light,.6)),he(T.Alert,"warningColor",I(ht,T.warning.light,.6)),he(T.Alert,"errorFilledBg",L("palette-error-main")),he(T.Alert,"infoFilledBg",L("palette-info-main")),he(T.Alert,"successFilledBg",L("palette-success-main")),he(T.Alert,"warningFilledBg",L("palette-warning-main")),he(T.Alert,"errorFilledColor",tr(()=>T.getContrastText(T.error.main))),he(T.Alert,"infoFilledColor",tr(()=>T.getContrastText(T.info.main))),he(T.Alert,"successFilledColor",tr(()=>T.getContrastText(T.success.main))),he(T.Alert,"warningFilledColor",tr(()=>T.getContrastText(T.warning.main))),he(T.Alert,"errorStandardBg",I(mt,T.error.light,.9)),he(T.Alert,"infoStandardBg",I(mt,T.info.light,.9)),he(T.Alert,"successStandardBg",I(mt,T.success.light,.9)),he(T.Alert,"warningStandardBg",I(mt,T.warning.light,.9)),he(T.Alert,"errorIconColor",L("palette-error-main")),he(T.Alert,"infoIconColor",L("palette-info-main")),he(T.Alert,"successIconColor",L("palette-success-main")),he(T.Alert,"warningIconColor",L("palette-warning-main")),he(T.AppBar,"defaultBg",L("palette-grey-100")),he(T.Avatar,"defaultBg",L("palette-grey-400")),he(T.Button,"inheritContainedBg",L("palette-grey-300")),he(T.Button,"inheritContainedHoverBg",L("palette-grey-A100")),he(T.Chip,"defaultBorder",L("palette-grey-400")),he(T.Chip,"defaultAvatarColor",L("palette-grey-700")),he(T.Chip,"defaultIconColor",L("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",I(mt,T.primary.main,.62)),he(T.LinearProgress,"secondaryBg",I(mt,T.secondary.main,.62)),he(T.LinearProgress,"errorBg",I(mt,T.error.main,.62)),he(T.LinearProgress,"infoBg",I(mt,T.info.main,.62)),he(T.LinearProgress,"successBg",I(mt,T.success.main,.62)),he(T.LinearProgress,"warningBg",I(mt,T.warning.main,.62)),he(T.Skeleton,"bg",k?I(no,T.text.primary,.11):`rgba(${L("palette-text-primaryChannel")} / 0.11)`),he(T.Slider,"primaryTrack",I(mt,T.primary.main,.62)),he(T.Slider,"secondaryTrack",I(mt,T.secondary.main,.62)),he(T.Slider,"errorTrack",I(mt,T.error.main,.62)),he(T.Slider,"infoTrack",I(mt,T.info.main,.62)),he(T.Slider,"successTrack",I(mt,T.success.main,.62)),he(T.Slider,"warningTrack",I(mt,T.warning.main,.62));const A=k?I(ht,T.background.default,.6825):es(T.background.default,.8);he(T.SnackbarContent,"bg",A),he(T.SnackbarContent,"color",tr(()=>k?Yu.text.primary:T.getContrastText(A))),he(T.SpeedDialAction,"fabHoverBg",es(T.background.paper,.15)),he(T.StepConnector,"border",L("palette-grey-400")),he(T.StepContent,"border",L("palette-grey-400")),he(T.Switch,"defaultColor",L("palette-common-white")),he(T.Switch,"defaultDisabledColor",L("palette-grey-100")),he(T.Switch,"primaryDisabledColor",I(mt,T.primary.main,.62)),he(T.Switch,"secondaryDisabledColor",I(mt,T.secondary.main,.62)),he(T.Switch,"errorDisabledColor",I(mt,T.error.main,.62)),he(T.Switch,"infoDisabledColor",I(mt,T.info.main,.62)),he(T.Switch,"successDisabledColor",I(mt,T.success.main,.62)),he(T.Switch,"warningDisabledColor",I(mt,T.warning.main,.62)),he(T.TableCell,"border",I(mt,I(no,T.divider,1),.88)),he(T.Tooltip,"bg",I(no,T.grey[700],.92))}if(T.mode==="dark"){he(T.Alert,"errorColor",I(mt,T.error.light,.6)),he(T.Alert,"infoColor",I(mt,T.info.light,.6)),he(T.Alert,"successColor",I(mt,T.success.light,.6)),he(T.Alert,"warningColor",I(mt,T.warning.light,.6)),he(T.Alert,"errorFilledBg",L("palette-error-dark")),he(T.Alert,"infoFilledBg",L("palette-info-dark")),he(T.Alert,"successFilledBg",L("palette-success-dark")),he(T.Alert,"warningFilledBg",L("palette-warning-dark")),he(T.Alert,"errorFilledColor",tr(()=>T.getContrastText(T.error.dark))),he(T.Alert,"infoFilledColor",tr(()=>T.getContrastText(T.info.dark))),he(T.Alert,"successFilledColor",tr(()=>T.getContrastText(T.success.dark))),he(T.Alert,"warningFilledColor",tr(()=>T.getContrastText(T.warning.dark))),he(T.Alert,"errorStandardBg",I(ht,T.error.light,.9)),he(T.Alert,"infoStandardBg",I(ht,T.info.light,.9)),he(T.Alert,"successStandardBg",I(ht,T.success.light,.9)),he(T.Alert,"warningStandardBg",I(ht,T.warning.light,.9)),he(T.Alert,"errorIconColor",L("palette-error-main")),he(T.Alert,"infoIconColor",L("palette-info-main")),he(T.Alert,"successIconColor",L("palette-success-main")),he(T.Alert,"warningIconColor",L("palette-warning-main")),he(T.AppBar,"defaultBg",L("palette-grey-900")),he(T.AppBar,"darkBg",L("palette-background-paper")),he(T.AppBar,"darkColor",L("palette-text-primary")),he(T.Avatar,"defaultBg",L("palette-grey-600")),he(T.Button,"inheritContainedBg",L("palette-grey-800")),he(T.Button,"inheritContainedHoverBg",L("palette-grey-700")),he(T.Chip,"defaultBorder",L("palette-grey-700")),he(T.Chip,"defaultAvatarColor",L("palette-grey-300")),he(T.Chip,"defaultIconColor",L("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",I(ht,T.primary.main,.5)),he(T.LinearProgress,"secondaryBg",I(ht,T.secondary.main,.5)),he(T.LinearProgress,"errorBg",I(ht,T.error.main,.5)),he(T.LinearProgress,"infoBg",I(ht,T.info.main,.5)),he(T.LinearProgress,"successBg",I(ht,T.success.main,.5)),he(T.LinearProgress,"warningBg",I(ht,T.warning.main,.5)),he(T.Skeleton,"bg",k?I(no,T.text.primary,.13):`rgba(${L("palette-text-primaryChannel")} / 0.13)`),he(T.Slider,"primaryTrack",I(ht,T.primary.main,.5)),he(T.Slider,"secondaryTrack",I(ht,T.secondary.main,.5)),he(T.Slider,"errorTrack",I(ht,T.error.main,.5)),he(T.Slider,"infoTrack",I(ht,T.info.main,.5)),he(T.Slider,"successTrack",I(ht,T.success.main,.5)),he(T.Slider,"warningTrack",I(ht,T.warning.main,.5));const A=k?I(mt,T.background.default,.985):es(T.background.default,.98);he(T.SnackbarContent,"bg",A),he(T.SnackbarContent,"color",tr(()=>k?Qm.text.primary:T.getContrastText(A))),he(T.SpeedDialAction,"fabHoverBg",es(T.background.paper,.15)),he(T.StepConnector,"border",L("palette-grey-600")),he(T.StepContent,"border",L("palette-grey-600")),he(T.Switch,"defaultColor",L("palette-grey-300")),he(T.Switch,"defaultDisabledColor",L("palette-grey-600")),he(T.Switch,"primaryDisabledColor",I(ht,T.primary.main,.55)),he(T.Switch,"secondaryDisabledColor",I(ht,T.secondary.main,.55)),he(T.Switch,"errorDisabledColor",I(ht,T.error.main,.55)),he(T.Switch,"infoDisabledColor",I(ht,T.info.main,.55)),he(T.Switch,"successDisabledColor",I(ht,T.success.main,.55)),he(T.Switch,"warningDisabledColor",I(ht,T.warning.main,.55)),he(T.TableCell,"border",I(ht,I(no,T.divider,1),.68)),he(T.Tooltip,"bg",I(no,T.grey[700],.92))}Cr(T.background,"default"),Cr(T.background,"paper"),Cr(T.common,"background"),Cr(T.common,"onBackground"),Cr(T,"divider"),Object.keys(T).forEach(A=>{const M=T[A];A!=="tonalOffset"&&M&&typeof M=="object"&&(M.main&&he(T[A],"mainChannel",Ji(ea(M.main))),M.light&&he(T[A],"lightChannel",Ji(ea(M.light))),M.dark&&he(T[A],"darkChannel",Ji(ea(M.dark))),M.contrastText&&he(T[A],"contrastTextChannel",Ji(ea(M.contrastText))),A==="text"&&(Cr(T[A],"primary"),Cr(T[A],"secondary")),A==="action"&&(M.active&&Cr(T[A],"active"),M.selected&&Cr(T[A],"selected")))})}),S=t.reduce((F,T)=>rn(F,T),S);const N={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:s,getSelector:rE(S),enableContrastVars:a},{vars:O,generateThemeVars:B,generateStyleSheets:R}=N2(S,N);return S.vars=O,Object.entries(S.colorSchemes[S.defaultColorScheme]).forEach(([F,T])=>{S[F]=T}),S.generateThemeVars=B,S.generateStyleSheets=R,S.generateSpacing=function(){return dt.createSpacing(d.spacing,jc(this))},S.getColorSchemeSelector=_2(l),S.spacing=S.generateSpacing(),S.shouldSkipGeneratingVar=s,S.unstable_sxConfig={..._a,...d?.unstable_sxConfig},S.unstable_sx=function(T){return ii({sx:T,theme:this})},S.toRuntimeSource=t0,S}function Bp(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Uc({...n===!0?{}:n.palette,mode:t})})}function o0(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n?.mode,...a}=e,s=i||"light",l=o?.[s],u={...o,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Ku(e,...t);let d=n;"palette"in e||u[s]&&(u[s]!==!0?d=u[s].palette:s==="dark"&&(d={mode:"dark"}));const p=Ku({...e,palette:d},...t);return p.defaultColorScheme=s,p.colorSchemes=u,p.palette.mode==="light"&&(p.colorSchemes.light={...u.light!==!0&&u.light,palette:p.palette},Bp(p,"dark",u.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:p.palette},Bp(p,"light",u.light)),p}return!n&&!("light"in u)&&s==="light"&&(u.light=!0),sE({...a,colorSchemes:u,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}const xl=o0(),gi="$$material";function Gr(){const e=dt.useTheme(xl);return e[gi]||e}function lE(e){return c.jsx(dt.GlobalStyles,{...e,defaultTheme:xl,themeId:gi})}function uE(e){const{variants:t,...n}=e,r={variants:t,style:ho(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=ho(o.style))}),r}const cE=zc();function qr(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function co(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function dE(e){return e?(t,n)=>n[e]:null}function pE(e,t,n){e.theme=mE(e.theme)?n:e.theme[t]||e.theme}function gs(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(o=>gs(e,o,n));if(Array.isArray(r?.variants)){let o;if(r.isProcessed)o=n?co(r.style,n):r.style;else{const{variants:i,...a}=r;o=n?co(ho(a),n):a}return i0(e,r.variants,[o],n)}return r?.isProcessed?n?co(ho(r.style),n):r.style:n?co(ho(r),n):r}function i0(e,t,n=[],r=void 0){let o;e:for(let i=0;i<t.length;i+=1){const a=t[i];if(typeof a.props=="function"){if(o??={...e,...e.ownerState,ownerState:e.ownerState},!a.props(o))continue}else for(const s in a.props)if(e[s]!==a.props[s]&&e.ownerState?.[s]!==a.props[s])continue e;typeof a.style=="function"?(o??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?co(ho(a.style(o)),r):a.style(o))):n.push(r?co(ho(a.style),r):a.style)}return n}function fE(e={}){const{themeId:t,defaultTheme:n=cE,rootShouldForwardProp:r=qr,slotShouldForwardProp:o=qr}=e;function i(s){pE(s,t,n)}return(s,l={})=>{x2(s,S=>S.filter(N=>N!==ii));const{name:u,slot:d,skipVariantsResolver:p,skipSx:h,overridesResolver:f=dE(bE(d)),...m}=l,b=u&&u.startsWith("Mui")||d?"components":"custom",x=p!==void 0?p:d&&d!=="Root"&&d!=="root"||!1,y=h||!1;let E=qr;d==="Root"||d==="root"?E=r:d?E=o:gE(s)&&(E=void 0);const C=b2(s,{shouldForwardProp:E,label:hE(),...m}),k=S=>{if(S.__emotion_real===S)return S;if(typeof S=="function")return function(O){return gs(O,S,O.theme.modularCssLayers?b:void 0)};if(lr(S)){const N=uE(S);return function(B){return N.variants?gs(B,N,B.theme.modularCssLayers?b:void 0):B.theme.modularCssLayers?co(N.style,b):N.style}}return S},v=(...S)=>{const N=[],O=S.map(k),B=[];if(N.push(i),u&&f&&B.push(function(L){const A=L.theme.components?.[u]?.styleOverrides;if(!A)return null;const M={};for(const W in A)M[W]=gs(L,A[W],L.theme.modularCssLayers?"theme":void 0);return f(L,M)}),u&&!x&&B.push(function(L){const A=L.theme?.components?.[u]?.variants;return A?i0(L,A,[],L.theme.modularCssLayers?"theme":void 0):null}),y||B.push(ii),Array.isArray(O[0])){const T=O.shift(),L=new Array(N.length).fill(""),I=new Array(B.length).fill("");let A;A=[...L,...T,...I],A.raw=[...L,...T.raw,...I],N.unshift(A)}const R=[...N,...O,...B],F=C(...R);return s.muiName&&(F.muiName=s.muiName),F};return C.withConfig&&(v.withConfig=C.withConfig),v}}function hE(e,t){return void 0}function mE(e){for(const t in e)return!1;return!0}function gE(e){return typeof e=="string"&&e.charCodeAt(0)>96}function bE(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function a0(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const dn=e=>a0(e)&&e!=="classes",ie=fE({themeId:gi,defaultTheme:xl,rootShouldForwardProp:dn});function xE(e){return function(n){return c.jsx(lE,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function yE(){return Xy}const et=dt.unstable_memoTheme;function Xe(e){return v2(e)}function Me(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=_e(e,o,n)}),r}function EE(e){return _e("MuiSvgIcon",e)}Me("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const CE=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${ke(t)}`,`fontSize${ke(n)}`]};return Fe(o,EE,r)},TE=ie("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${ke(n.color)}`],t[`fontSize${ke(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}}]}))),Qu=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:p,viewBox:h="0 0 24 24",...f}=r,m=D.isValidElement(o)&&o.type==="svg",b={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:m},x={};d||(x.viewBox=h);const y=CE(b);return c.jsxs(TE,{as:s,className:Pe(y.root,i),focusable:"false",color:u,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:n,...x,...f,...m&&o.props,ownerState:b,children:[m?o.props.children:o,p?c.jsx("title",{children:p}):null]})});Qu.muiName="SvgIcon";function tt(e,t){function n(r,o){return c.jsx(Qu,{"data-testid":void 0,ref:o,...r,children:e})}return n.muiName=Qu.muiName,D.memo(D.forwardRef(n))}function s0(e,t=166){let n;function r(...o){const i=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function bs(e,t){return D.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}function Ut(e){return e&&e.ownerDocument||document}function Ar(e){return Ut(e).defaultView||window}function Xu(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Sn(e){const{controlled:t,default:n,name:r,state:o="value"}=e,{current:i}=D.useRef(t!==void 0),[a,s]=D.useState(n),l=i?t:a,u=D.useCallback(d=>{i||s(d)},[]);return[l,u]}function Ae(e){const t=D.useRef(e);return Wt(()=>{t.current=e}),D.useRef((...n)=>(0,t.current)(...n)).current}function ot(...e){const t=D.useRef(void 0),n=D.useCallback(r=>{const o=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const a=i,s=a(r);return typeof s=="function"?s:()=>{a(null)}}return i.current=r,()=>{i.current=null}});return()=>{o.forEach(i=>i?.())}},e);return D.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function vE(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function l0(e,t){if(!e)return t;function n(a,s){const l={};return Object.keys(s).forEach(u=>{vE(u,s[u])&&typeof a[u]=="function"&&(l[u]=(...d)=>{a[u](...d),s[u](...d)})}),l}if(typeof e=="function"||typeof t=="function")return a=>{const s=typeof t=="function"?t(a):t,l=typeof e=="function"?e({...a,...s}):e,u=Pe(a?.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),i=Pe(r?.className,e?.className);return{...t,...e,...o,...!!i&&{className:i},...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 Vc=tt(c.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),$o=dt.createStack({createStyledComponent:ie("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Xe({props:e,name:"MuiStack"})});class Zo{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 Zo(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 Zo(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 Zo(t,r)}}const Us=P.styled(P.Card)({display:"flex",flexDirection:"column",height:"100%",boxShadow:"none",border:"none",backgroundColor:"transparent"}),u0=P.styled(P.CardContent)({display:"flex",flexDirection:"column",padding:"0",flexGrow:1}),Wc=P.styled(P.CardMedia)({padding:"0"}),SE=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 kE=P.styled("div")({marginBottom:"48px",padding:"0",backgroundColor:"transparent",border:"none",boxShadow:"none"}),Zu=P.styled("div")({marginBottom:"0",padding:"0",backgroundColor:"transparent",border:"none",boxShadow:"none"}),xs=P.styled("div")({backgroundColor:"#ffffff",paddingTop:"12px",paddingBottom:"2px",borderRadius:"8px",border:"1px solid #f0f0f0",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.04)",marginBottom:"0",transition:"box-shadow 0.2s ease-in-out","&:hover":{boxShadow:"0 2px 6px rgba(0, 0, 0, 0.08)"}});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 DE=P.styled("div")({height:"100%"});P.styled("div")({height:"30px",backgroundColor:"rgba(225, 240, 255, 1)",display:"flex",padding:"4px",alignItems:"center"});const c0=P.styled("div")({height:"75vh",width:"100%",overflowY:"auto"});P.styled("div")({position:"relative",height:"100%",flex:"0 0 auto"});const Qr=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)"}}),Xr=P.styled(P.CardContent)({padding:"0","&:last-child":{paddingBottom:"0"}}),wo=P.styled("div")({fontSize:"12px",fontWeight:"600",color:"#666666",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:"16px",paddingBottom:"8px",borderBottom:"1px solid #f0f0f0"}),wE=P.styled("div")({padding:"32px",maxWidth:"1400px",margin:"0 auto",minHeight:"100vh"}),ts=tt(c.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),d0=tt(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"})),jp=tt(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"})),qc=tt(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 U(){return U=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},U.apply(null,arguments)}function $e(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 Ju(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const a=n.slice(o,r).trim();(a||!i)&&t.push(a),o=r+1,r=n.indexOf(",",o)}return t}function yl(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const IE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,AE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,PE={};function $p(e,t){return(PE.jsx?AE:IE).test(e)}const RE=/[ \t\n\f\r]/g;function Yc(e){return typeof e=="object"?e.type==="text"?Hp(e.value):!1:Hp(e)}function Hp(e){return e.replace(RE,"")===""}let Ba=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Ba.prototype.normal={};Ba.prototype.property={};Ba.prototype.space=void 0;function p0(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Ba(n,r,t)}function Ta(e){return e.toLowerCase()}let xn=class{constructor(t,n){this.attribute=n,this.property=t}};xn.prototype.attribute="";xn.prototype.booleanish=!1;xn.prototype.boolean=!1;xn.prototype.commaOrSpaceSeparated=!1;xn.prototype.commaSeparated=!1;xn.prototype.defined=!1;xn.prototype.mustUseProperty=!1;xn.prototype.number=!1;xn.prototype.overloadedBoolean=!1;xn.prototype.property="";xn.prototype.spaceSeparated=!1;xn.prototype.space=void 0;let ME=0;const Ge=Io(),$t=Io(),ec=Io(),we=Io(),St=Io(),Jo=Io(),yn=Io();function Io(){return 2**++ME}const tc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:$t,commaOrSpaceSeparated:yn,commaSeparated:Jo,number:we,overloadedBoolean:ec,spaceSeparated:St},Symbol.toStringTag,{value:"Module"})),au=Object.keys(tc);let Kc=class extends xn{constructor(t,n,r,o){let i=-1;if(super(t,n),Up(this,"space",o),typeof r=="number")for(;++i<au.length;){const a=au[i];Up(this,au[i],(r&tc[a])===tc[a])}}};Kc.prototype.defined=!0;function Up(e,t,n){n&&(e[t]=n)}function bi(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new Kc(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Ta(r)]=r,n[Ta(i.attribute)]=r}return new Ba(t,n,e.space)}const f0=bi({properties:{ariaActiveDescendant:null,ariaAtomic:$t,ariaAutoComplete:null,ariaBusy:$t,ariaChecked:$t,ariaColCount:we,ariaColIndex:we,ariaColSpan:we,ariaControls:St,ariaCurrent:null,ariaDescribedBy:St,ariaDetails:null,ariaDisabled:$t,ariaDropEffect:St,ariaErrorMessage:null,ariaExpanded:$t,ariaFlowTo:St,ariaGrabbed:$t,ariaHasPopup:null,ariaHidden:$t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:St,ariaLevel:we,ariaLive:null,ariaModal:$t,ariaMultiLine:$t,ariaMultiSelectable:$t,ariaOrientation:null,ariaOwns:St,ariaPlaceholder:null,ariaPosInSet:we,ariaPressed:$t,ariaReadOnly:$t,ariaRelevant:null,ariaRequired:$t,ariaRoleDescription:St,ariaRowCount:we,ariaRowIndex:we,ariaRowSpan:we,ariaSelected:$t,ariaSetSize:we,ariaSort:null,ariaValueMax:we,ariaValueMin:we,ariaValueNow:we,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function h0(e,t){return t in e?e[t]:t}function m0(e,t){return h0(e,t.toLowerCase())}const OE=bi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Jo,acceptCharset:St,accessKey:St,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:St,autoFocus:Ge,autoPlay:Ge,blocking:St,capture:null,charSet:null,checked:Ge,cite:null,className:St,cols:we,colSpan:null,content:null,contentEditable:$t,controls:Ge,controlsList:St,coords:we|Jo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:ec,draggable:$t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:St,height:we,hidden:ec,high:we,href:null,hrefLang:null,htmlFor:St,httpEquiv:St,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:St,itemRef:St,itemScope:Ge,itemType:St,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:we,manifest:null,max:null,maxLength:we,media:null,method:null,min:null,minLength:we,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:we,pattern:null,ping:St,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:St,required:Ge,reversed:Ge,rows:we,rowSpan:we,sandbox:St,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shape:null,size:we,sizes:null,slot:null,span:we,spellCheck:$t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:we,step:null,style:null,tabIndex:we,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:$t,width:we,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:St,axis:null,background:null,bgColor:null,border:we,borderColor:null,bottomMargin:we,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:we,leftMargin:we,link:null,longDesc:null,lowSrc:null,marginHeight:we,marginWidth:we,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:we,rules:null,scheme:null,scrolling:$t,standby:null,summary:null,text:null,topMargin:we,valueType:null,version:null,vAlign:null,vLink:null,vSpace:we,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:we,security:null,unselectable:null},space:"html",transform:m0}),LE=bi({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:yn,accentHeight:we,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:we,amplitude:we,arabicForm:null,ascent:we,attributeName:null,attributeType:null,azimuth:we,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:we,by:null,calcMode:null,capHeight:we,className:St,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:we,diffuseConstant:we,direction:null,display:null,dur:null,divisor:we,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:we,enableBackground:null,end:null,event:null,exponent:we,externalResourcesRequired:null,fill:null,fillOpacity:we,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:Jo,g2:Jo,glyphName:Jo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:we,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:we,horizOriginX:we,horizOriginY:we,id:null,ideographic:we,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:we,k:we,k1:we,k2:we,k3:we,k4:we,kernelMatrix:yn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:we,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:we,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:we,overlineThickness:we,paintOrder:null,panose1:null,path:null,pathLength:we,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:St,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:we,pointsAtY:we,pointsAtZ:we,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:we,specularExponent:we,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:we,strikethroughThickness:we,string:null,stroke:null,strokeDashArray:yn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:we,strokeOpacity:we,strokeWidth:null,style:null,surfaceScale:we,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:yn,tabIndex:we,tableValues:null,target:null,targetX:we,targetY:we,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:we,underlineThickness:we,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:we,values:null,vAlphabetic:we,vMathematical:we,vectorEffect:null,vHanging:we,vIdeographic:we,version:null,vertAdvY:we,vertOriginX:we,vertOriginY:we,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:we,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:h0}),g0=bi({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()}}),b0=bi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:m0}),x0=bi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),NE={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"},FE=/[A-Z]/g,zp=/-[a-z]/g,_E=/^data[-\w.:]+$/i;function ja(e,t){const n=Ta(t);let r=t,o=xn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&_E.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(zp,jE);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!zp.test(i)){let a=i.replace(FE,BE);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Kc}return new o(r,t)}function BE(e){return"-"+e.toLowerCase()}function jE(e){return e.charAt(1).toUpperCase()}const xi=p0([f0,OE,g0,b0,x0],"html"),Zr=p0([f0,LE,g0,b0,x0],"svg");function nc(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function El(e){return e.join(" ").trim()}var Ho={},su,Vp;function $E(){if(Vp)return su;Vp=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
|
|
22
|
-
`,u="/",d="*",p="",h="comment",f="declaration";su=function(b,x){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];x=x||{};var y=1,E=1;function C(L){var I=L.match(t);I&&(y+=I.length);var A=L.lastIndexOf(l);E=~A?L.length-A:E+L.length}function k(){var L={line:y,column:E};return function(I){return I.position=new v(L),O(),I}}function v(L){this.start=L,this.end={line:y,column:E},this.source=x.source}v.prototype.content=b;function S(L){var I=new Error(x.source+":"+y+":"+E+": "+L);if(I.reason=L,I.filename=x.source,I.line=y,I.column=E,I.source=b,!x.silent)throw I}function N(L){var I=L.exec(b);if(I){var A=I[0];return C(A),b=b.slice(A.length),I}}function O(){N(n)}function B(L){var I;for(L=L||[];I=R();)I!==!1&&L.push(I);return L}function R(){var L=k();if(!(u!=b.charAt(0)||d!=b.charAt(1))){for(var I=2;p!=b.charAt(I)&&(d!=b.charAt(I)||u!=b.charAt(I+1));)++I;if(I+=2,p===b.charAt(I-1))return S("End of comment missing");var A=b.slice(2,I-2);return E+=2,C(A),b=b.slice(I),E+=2,L({type:h,comment:A})}}function F(){var L=k(),I=N(r);if(I){if(R(),!N(o))return S("property missing ':'");var A=N(i),M=L({type:f,property:m(I[0].replace(e,p)),value:A?m(A[0].replace(e,p)):p});return N(a),M}}function T(){var L=[];B(L);for(var I;I=F();)I!==!1&&(L.push(I),B(L));return L}return O(),T()};function m(b){return b?b.replace(s,p):p}return su}var Wp;function HE(){if(Wp)return Ho;Wp=1;var e=Ho&&Ho.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.default=n;var t=e($E());function n(r,o){var i=null;if(!r||typeof r!="string")return i;var a=(0,t.default)(r),s=typeof o=="function";return a.forEach(function(l){if(l.type==="declaration"){var u=l.property,d=l.value;s?o(u,d,l):d&&(i=i||{},i[u]=d)}}),i}return Ho}var Ni={},qp;function UE(){if(qp)return Ni;qp=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,i=function(u){return!u||n.test(u)||e.test(u)},a=function(u,d){return d.toUpperCase()},s=function(u,d){return"".concat(d,"-")},l=function(u,d){return d===void 0&&(d={}),i(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(o,s):u=u.replace(r,s),u.replace(t,a))};return Ni.camelCase=l,Ni}var Fi,Yp;function zE(){if(Yp)return Fi;Yp=1;var e=Fi&&Fi.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(HE()),n=UE();function r(o,i){var a={};return!o||typeof o!="string"||(0,t.default)(o,function(s,l){s&&l&&(a[(0,n.camelCase)(s,i)]=l)}),a}return r.default=r,Fi=r,Fi}var VE=zE();const WE=Zn(VE),Cl=y0("end"),fr=y0("start");function y0(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 qE(e){const t=fr(e),n=Cl(e);if(t&&n)return{start:t,end:n}}function oa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Kp(e.position):"start"in e||"end"in e?Kp(e):"line"in e||"column"in e?rc(e):""}function rc(e){return Gp(e&&e.line)+":"+Gp(e&&e.column)}function Kp(e){return rc(e&&e.start)+"-"+rc(e&&e.end)}function Gp(e){return e&&typeof e=="number"?e:1}class on extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.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=oa(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}on.prototype.file="";on.prototype.name="";on.prototype.reason="";on.prototype.message="";on.prototype.stack="";on.prototype.column=void 0;on.prototype.line=void 0;on.prototype.ancestors=void 0;on.prototype.cause=void 0;on.prototype.fatal=void 0;on.prototype.place=void 0;on.prototype.ruleId=void 0;on.prototype.source=void 0;const Gc={}.hasOwnProperty,YE=new Map,KE=/[A-Z]/g,GE=new Set(["table","tbody","thead","tfoot","tr"]),QE=new Set(["td","th"]),E0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function XE(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=iC(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=oC(n,t.jsx,t.jsxs)}const 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"?Zr:xi,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=C0(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function C0(e,t,n){if(t.type==="element")return ZE(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return JE(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return tC(e,t,n);if(t.type==="mdxjsEsm")return eC(e,t);if(t.type==="root")return nC(e,t,n);if(t.type==="text")return rC(e,t)}function ZE(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Zr,e.schema=o),e.ancestors.push(t);const i=v0(e,t.tagName,!1),a=aC(e,t);let s=Xc(e,t);return GE.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!Yc(l):!0})),T0(e,a,i,t),Qc(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function JE(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)}va(e,t.position)}function eC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);va(e,t.position)}function tC(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Zr,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:v0(e,t.name,!0),a=sC(e,t),s=Xc(e,t);return T0(e,a,i,t),Qc(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function nC(e,t,n){const r={};return Qc(r,Xc(e,t)),e.create(t,e.Fragment,r,n)}function rC(e,t){return t.value}function T0(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Qc(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function oC(e,t,n){return r;function r(o,i,a,s){const u=Array.isArray(a.children)?n:t;return s?u(i,a,s):u(i,a)}}function iC(e,t){return n;function n(r,o,i,a){const s=Array.isArray(i.children),l=fr(r);return t(o,i,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function aC(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Gc.call(t.properties,o)){const i=lC(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&QE.has(t.tagName)?r=s:n[a]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function sC(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else va(e,t.position);else{const o=r.name;let i;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,i=e.evaluater.evaluateExpression(s.expression)}else va(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function Xc(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:YE;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const u=o.get(l)||0;a=l+"-"+u,o.set(l,u+1)}}const s=C0(e,i,a);s!==void 0&&n.push(s)}return n}function lC(e,t,n){const r=ja(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?yl(n):El(n)),r.property==="style"){let o=typeof n=="object"?n:uC(e,String(n));return e.stylePropertyNameCase==="css"&&(o=cC(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?NE[r.property]||r.property:r.attribute,n]}}function uC(e,t){try{return WE(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new on("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=E0+"#cannot-parse-style-attribute",o}}function v0(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,a;for(;++i<o.length;){const s=$p(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=a}else r=$p(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Gc.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);va(e)}function va(e,t){const n=new on("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=E0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function cC(e){const t={};let n;for(n in e)Gc.call(e,n)&&(t[dC(n)]=e[n]);return t}function dC(e){let t=e.replace(KE,pC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function pC(e){return"-"+e.toLowerCase()}const lu={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"]},fC={};function Zc(e,t){const n=fC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return S0(e,r,o)}function S0(e,t,n){if(hC(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 Qp(e.children,t,n)}return Array.isArray(e)?Qp(e,t,n):""}function Qp(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=S0(e[o],t,n);return r.join("")}function hC(e){return!!(e&&typeof e=="object")}const Xp=document.createElement("i");function Jc(e){const t="&"+e+";";Xp.innerHTML=t;const n=Xp.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function kn(e,t,n,r){const o=e.length;let i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function Nn(e,t){return e.length>0?(kn(e,e.length,0,t),e):t}const Zp={}.hasOwnProperty;function k0(e){const t={};let n=-1;for(;++n<e.length;)mC(t,e[n]);return t}function mC(e,t){let n;for(n in t){const o=(Zp.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){Zp.call(o,a)||(o[a]=[]);const s=i[a];gC(o[a],Array.isArray(s)?s:s?[s]:[])}}}function gC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);kn(e,0,0,r)}function D0(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 Xn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ln=Jr(/[A-Za-z]/),nn=Jr(/[\dA-Za-z]/),bC=Jr(/[#-'*+\--9=?A-Z^-~]/);function zs(e){return e!==null&&(e<32||e===127)}const oc=Jr(/\d/),xC=Jr(/[\dA-Fa-f]/),yC=Jr(/[!-/:-@[-`{-~]/);function Ue(e){return e!==null&&e<-2}function Ct(e){return e!==null&&(e<0||e===32)}function at(e){return e===-2||e===-1||e===32}const Tl=Jr(/\p{P}|\p{S}/u),Eo=Jr(/\s/);function Jr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function yi(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&&nn(e.charCodeAt(n+1))&&nn(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(a=String.fromCharCode(i,s),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function ut(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(l){return at(l)?(e.enter(n),s(l)):t(l)}function s(l){return at(l)&&i++<o?(e.consume(l),s):(e.exit(n),t(l))}}const EC={tokenize:CC};function CC(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"),ut(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Ue(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const TC={tokenize:vC},Jp={tokenize:SC};function vC(e){const t=this,n=[];let r=0,o,i,a;return s;function s(C){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,l,u)(C)}return u(C)}function l(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&E();const k=t.events.length;let v=k,S;for(;v--;)if(t.events[v][0]==="exit"&&t.events[v][1].type==="chunkFlow"){S=t.events[v][1].end;break}y(r);let N=k;for(;N<t.events.length;)t.events[N][1].end={...S},N++;return kn(t.events,v+1,0,t.events.slice(k)),t.events.length=N,u(C)}return s(C)}function u(C){if(r===n.length){if(!o)return h(C);if(o.currentConstruct&&o.currentConstruct.concrete)return m(C);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Jp,d,p)(C)}function d(C){return o&&E(),y(r),h(C)}function p(C){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,m(C)}function h(C){return t.containerState={},e.attempt(Jp,f,m)(C)}function f(C){return r++,n.push([t.currentConstruct,t.containerState]),h(C)}function m(C){if(C===null){o&&E(),y(0),e.consume(C);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:i}),b(C)}function b(C){if(C===null){x(e.exit("chunkFlow"),!0),y(0),e.consume(C);return}return Ue(C)?(e.consume(C),x(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(C),b)}function x(C,k){const v=t.sliceStream(C);if(k&&v.push(null),C.previous=i,i&&(i.next=C),i=C,o.defineSkip(C.start),o.write(v),t.parser.lazy[C.start.line]){let S=o.events.length;for(;S--;)if(o.events[S][1].start.offset<a&&(!o.events[S][1].end||o.events[S][1].end.offset>a))return;const N=t.events.length;let O=N,B,R;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(B){R=t.events[O][1].end;break}B=!0}for(y(r),S=N;S<t.events.length;)t.events[S][1].end={...R},S++;kn(t.events,O+1,0,t.events.slice(N)),t.events.length=S}}function y(C){let k=n.length;for(;k-- >C;){const v=n[k];t.containerState=v[1],v[0].exit.call(t,e)}n.length=C}function E(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function SC(e,t,n){return ut(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ai(e){if(e===null||Ct(e)||Eo(e))return 1;if(Tl(e))return 2}function vl(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const ic={name:"attention",resolveAll:kC,tokenize:DC};function kC(e,t){let n=-1,r,o,i,a,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 p={...e[r][1].end},h={...e[n][1].start};ef(p,-l),ef(h,l),a={type:l>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[r][1].end={...a.start},e[n][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Nn(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Nn(u,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),u=Nn(u,vl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Nn(u,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=Nn(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,kn(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 DC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=ai(r);let i;return a;function a(l){return i=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===i)return e.consume(l),s;const u=e.exit("attentionSequence"),d=ai(l),p=!d||d===2&&o||n.includes(l),h=!o||o===2&&d||n.includes(r);return u._open=!!(i===42?p:p&&(o||!h)),u._close=!!(i===42?h:h&&(d||!p)),t(l)}}function ef(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const wC={name:"autolink",tokenize:IC};function IC(e,t,n){let r=0;return o;function o(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(f){return ln(f)?(e.consume(f),a):f===64?n(f):u(f)}function a(f){return f===43||f===45||f===46||nn(f)?(r=1,s(f)):u(f)}function s(f){return f===58?(e.consume(f),r=0,l):(f===43||f===45||f===46||nn(f))&&r++<32?(e.consume(f),s):(r=0,u(f))}function l(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||zs(f)?n(f):(e.consume(f),l)}function u(f){return f===64?(e.consume(f),d):bC(f)?(e.consume(f),u):n(f)}function d(f){return nn(f)?p(f):n(f)}function p(f){return f===46?(e.consume(f),r=0,d):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):h(f)}function h(f){if((f===45||nn(f))&&r++<63){const m=f===45?h:p;return e.consume(f),m}return n(f)}}const $a={partial:!0,tokenize:AC};function AC(e,t,n){return r;function r(i){return at(i)?ut(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||Ue(i)?t(i):n(i)}}const w0={continuation:{tokenize:RC},exit:MC,name:"blockQuote",tokenize:PC};function PC(e,t,n){const r=this;return o;function o(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return n(a)}function i(a){return at(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function RC(e,t,n){const r=this;return o;function o(a){return at(a)?ut(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(w0,t,n)(a)}}function MC(e){e.exit("blockQuote")}const I0={name:"characterEscape",tokenize:OC};function OC(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return yC(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const A0={name:"characterReference",tokenize:LC};function LC(e,t,n){const r=this;let o=0,i,a;return s;function s(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),l}function l(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,a=nn,d(p))}function u(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=xC,d):(e.enter("characterReferenceValue"),i=7,a=oc,d(p))}function d(p){if(p===59&&o){const h=e.exit("characterReferenceValue");return a===nn&&!Jc(r.sliceSerialize(h))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(p)&&o++<i?(e.consume(p),d):n(p)}}const tf={partial:!0,tokenize:FC},nf={concrete:!0,name:"codeFenced",tokenize:NC};function NC(e,t,n){const r=this,o={partial:!0,tokenize:v};let i=0,a=0,s;return l;function l(S){return u(S)}function u(S){const N=r.events[r.events.length-1];return i=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,s=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(S)}function d(S){return S===s?(a++,e.consume(S),d):a<3?n(S):(e.exit("codeFencedFenceSequence"),at(S)?ut(e,p,"whitespace")(S):p(S))}function p(S){return S===null||Ue(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(tf,b,k)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||Ue(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(S)):at(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ut(e,f,"whitespace")(S)):S===96&&S===s?n(S):(e.consume(S),h)}function f(S){return S===null||Ue(S)?p(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||Ue(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(S)):S===96&&S===s?n(S):(e.consume(S),m)}function b(S){return e.attempt(o,k,x)(S)}function x(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),y}function y(S){return i>0&&at(S)?ut(e,E,"linePrefix",i+1)(S):E(S)}function E(S){return S===null||Ue(S)?e.check(tf,b,k)(S):(e.enter("codeFlowValue"),C(S))}function C(S){return S===null||Ue(S)?(e.exit("codeFlowValue"),E(S)):(e.consume(S),C)}function k(S){return e.exit("codeFenced"),t(S)}function v(S,N,O){let B=0;return R;function R(A){return S.enter("lineEnding"),S.consume(A),S.exit("lineEnding"),F}function F(A){return S.enter("codeFencedFence"),at(A)?ut(S,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):T(A)}function T(A){return A===s?(S.enter("codeFencedFenceSequence"),L(A)):O(A)}function L(A){return A===s?(B++,S.consume(A),L):B>=a?(S.exit("codeFencedFenceSequence"),at(A)?ut(S,I,"whitespace")(A):I(A)):O(A)}function I(A){return A===null||Ue(A)?(S.exit("codeFencedFence"),N(A)):O(A)}}}function FC(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const uu={name:"codeIndented",tokenize:BC},_C={partial:!0,tokenize:jC};function BC(e,t,n){const r=this;return o;function o(u){return e.enter("codeIndented"),ut(e,i,"linePrefix",5)(u)}function i(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):Ue(u)?e.attempt(_C,a,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||Ue(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function jC(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):Ue(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):ut(e,i,"linePrefix",5)(a)}function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):Ue(a)?o(a):n(a)}}const $C={name:"codeText",previous:UC,resolve:HC,tokenize:zC};function HC(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 UC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function zC(e,t,n){let r=0,o,i;return a;function a(p){return e.enter("codeText"),e.enter("codeTextSequence"),s(p)}function s(p){return p===96?(e.consume(p),r++,s):(e.exit("codeTextSequence"),l(p))}function l(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),l):p===96?(i=e.enter("codeTextSequence"),o=0,d(p)):Ue(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(p))}function u(p){return p===null||p===32||p===96||Ue(p)?(e.exit("codeTextData"),l(p)):(e.consume(p),u)}function d(p){return p===96?(e.consume(p),o++,d):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(i.type="codeTextData",u(p))}}class VC{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 i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&_i(this.left,r),i.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),_i(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),_i(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);_i(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);_i(this.left,n.reverse())}}}function _i(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 P0(e){const t={};let n=-1,r,o,i,a,s,l,u;const d=new VC(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,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,WC(d,n)),n=t[n],u=!0);else if(r[1]._container){for(i=n,o=void 0;i--;)if(a=d.get(i),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(d.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);else if(!(a[1].type==="linePrefix"||a[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 kn(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function WC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],u={};let d,p,h=-1,f=n,m=0,b=0;const x=[b];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(d=r.sliceStream(f),f.next||d.push(null),p&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),p=f,f=f.next}for(f=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,x.push(b),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):x.pop(),h=x.length;h--;){const y=s.slice(x[h],x[h+1]),E=i.pop();l.push([E,E+y.length-1]),e.splice(E,2,y)}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 qC={resolve:KC,tokenize:GC},YC={partial:!0,tokenize:QC};function KC(e){return P0(e),e}function GC(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?i(s):Ue(s)?e.check(YC,a,i)(s):(e.consume(s),o)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function QC(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ut(e,i,"linePrefix")}function i(a){if(a===null||Ue(a))return n(a);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(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function R0(e,t,n,r,o,i,a,s,l){const u=l||Number.POSITIVE_INFINITY;let d=0;return p;function p(y){return y===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(y),e.exit(i),h):y===null||y===32||y===41||zs(y)?n(y):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),b(y))}function h(y){return y===62?(e.enter(i),e.consume(y),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(s),h(y)):y===null||y===60||Ue(y)?n(y):(e.consume(y),y===92?m:f)}function m(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function b(y){return!d&&(y===null||y===41||Ct(y))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(y)):d<u&&y===40?(e.consume(y),d++,b):y===41?(e.consume(y),d--,b):y===null||y===32||y===40||zs(y)?n(y):(e.consume(y),y===92?x:b)}function x(y){return y===40||y===41||y===92?(e.consume(y),b):b(y)}}function M0(e,t,n,r,o,i){const a=this;let s=0,l;return u;function u(f){return e.enter(r),e.enter(o),e.consume(f),e.exit(o),e.enter(i),d}function d(f){return s>999||f===null||f===91||f===93&&!l||f===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):f===93?(e.exit(i),e.enter(o),e.consume(f),e.exit(o),e.exit(r),t):Ue(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),p(f))}function p(f){return f===null||f===91||f===93||Ue(f)||s++>999?(e.exit("chunkString"),d(f)):(e.consume(f),l||(l=!at(f)),f===92?h:p)}function h(f){return f===91||f===92||f===93?(e.consume(f),s++,p):p(f)}}function O0(e,t,n,r,o,i){let a;return s;function s(h){return h===34||h===39||h===40?(e.enter(r),e.enter(o),e.consume(h),e.exit(o),a=h===40?41:h,l):n(h)}function l(h){return h===a?(e.enter(o),e.consume(h),e.exit(o),e.exit(r),t):(e.enter(i),u(h))}function u(h){return h===a?(e.exit(i),l(a)):h===null?n(h):Ue(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),ut(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===a||h===null||Ue(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?p:d)}function p(h){return h===a||h===92?(e.consume(h),d):d(h)}}function ia(e,t){let n;return r;function r(o){return Ue(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):at(o)?ut(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const XC={name:"definition",tokenize:JC},ZC={partial:!0,tokenize:eT};function JC(e,t,n){const r=this;let o;return i;function i(f){return e.enter("definition"),a(f)}function a(f){return M0.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return o=Xn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):n(f)}function l(f){return Ct(f)?ia(e,u)(f):u(f)}function u(f){return R0(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function d(f){return e.attempt(ZC,p,p)(f)}function p(f){return at(f)?ut(e,h,"whitespace")(f):h(f)}function h(f){return f===null||Ue(f)?(e.exit("definition"),r.parser.defined.push(o),t(f)):n(f)}}function eT(e,t,n){return r;function r(s){return Ct(s)?ia(e,o)(s):n(s)}function o(s){return O0(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return at(s)?ut(e,a,"whitespace")(s):a(s)}function a(s){return s===null||Ue(s)?t(s):n(s)}}const tT={name:"hardBreakEscape",tokenize:nT};function nT(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return Ue(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const rT={name:"headingAtx",resolve:oT,tokenize:iT};function oT(e,t){let n=e.length-2,r=3,o,i;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},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},kn(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function iT(e,t,n){let r=0;return o;function o(d){return e.enter("atxHeading"),i(d)}function i(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||Ct(d)?(e.exit("atxHeadingSequence"),s(d)):n(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),l(d)):d===null||Ue(d)?(e.exit("atxHeading"),t(d)):at(d)?ut(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||Ct(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),u)}}const aT=["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"],rf=["pre","script","style","textarea"],sT={concrete:!0,name:"htmlFlow",resolveTo:cT,tokenize:dT},lT={partial:!0,tokenize:fT},uT={partial:!0,tokenize:pT};function cT(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 dT(e,t,n){const r=this;let o,i,a,s,l;return u;function u(_){return d(_)}function d(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),p}function p(_){return _===33?(e.consume(_),h):_===47?(e.consume(_),i=!0,b):_===63?(e.consume(_),o=3,r.interrupt?t:w):ln(_)?(e.consume(_),a=String.fromCharCode(_),x):n(_)}function h(_){return _===45?(e.consume(_),o=2,f):_===91?(e.consume(_),o=5,s=0,m):ln(_)?(e.consume(_),o=4,r.interrupt?t:w):n(_)}function f(_){return _===45?(e.consume(_),r.interrupt?t:w):n(_)}function m(_){const de="CDATA[";return _===de.charCodeAt(s++)?(e.consume(_),s===de.length?r.interrupt?t:T:m):n(_)}function b(_){return ln(_)?(e.consume(_),a=String.fromCharCode(_),x):n(_)}function x(_){if(_===null||_===47||_===62||Ct(_)){const de=_===47,Z=a.toLowerCase();return!de&&!i&&rf.includes(Z)?(o=1,r.interrupt?t(_):T(_)):aT.includes(a.toLowerCase())?(o=6,de?(e.consume(_),y):r.interrupt?t(_):T(_)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):i?E(_):C(_))}return _===45||nn(_)?(e.consume(_),a+=String.fromCharCode(_),x):n(_)}function y(_){return _===62?(e.consume(_),r.interrupt?t:T):n(_)}function E(_){return at(_)?(e.consume(_),E):R(_)}function C(_){return _===47?(e.consume(_),R):_===58||_===95||ln(_)?(e.consume(_),k):at(_)?(e.consume(_),C):R(_)}function k(_){return _===45||_===46||_===58||_===95||nn(_)?(e.consume(_),k):v(_)}function v(_){return _===61?(e.consume(_),S):at(_)?(e.consume(_),v):C(_)}function S(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),l=_,N):at(_)?(e.consume(_),S):O(_)}function N(_){return _===l?(e.consume(_),l=null,B):_===null||Ue(_)?n(_):(e.consume(_),N)}function O(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Ct(_)?v(_):(e.consume(_),O)}function B(_){return _===47||_===62||at(_)?C(_):n(_)}function R(_){return _===62?(e.consume(_),F):n(_)}function F(_){return _===null||Ue(_)?T(_):at(_)?(e.consume(_),F):n(_)}function T(_){return _===45&&o===2?(e.consume(_),M):_===60&&o===1?(e.consume(_),W):_===62&&o===4?(e.consume(_),V):_===63&&o===3?(e.consume(_),w):_===93&&o===5?(e.consume(_),j):Ue(_)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(lT,J,L)(_)):_===null||Ue(_)?(e.exit("htmlFlowData"),L(_)):(e.consume(_),T)}function L(_){return e.check(uT,I,J)(_)}function I(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),A}function A(_){return _===null||Ue(_)?L(_):(e.enter("htmlFlowData"),T(_))}function M(_){return _===45?(e.consume(_),w):T(_)}function W(_){return _===47?(e.consume(_),a="",H):T(_)}function H(_){if(_===62){const de=a.toLowerCase();return rf.includes(de)?(e.consume(_),V):T(_)}return ln(_)&&a.length<8?(e.consume(_),a+=String.fromCharCode(_),H):T(_)}function j(_){return _===93?(e.consume(_),w):T(_)}function w(_){return _===62?(e.consume(_),V):_===45&&o===2?(e.consume(_),w):T(_)}function V(_){return _===null||Ue(_)?(e.exit("htmlFlowData"),J(_)):(e.consume(_),V)}function J(_){return e.exit("htmlFlow"),t(_)}}function pT(e,t,n){const r=this;return o;function o(a){return Ue(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function fT(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt($a,t,n)}}const hT={name:"htmlText",tokenize:mT};function mT(e,t,n){const r=this;let o,i,a;return s;function s(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),l}function l(w){return w===33?(e.consume(w),u):w===47?(e.consume(w),v):w===63?(e.consume(w),C):ln(w)?(e.consume(w),O):n(w)}function u(w){return w===45?(e.consume(w),d):w===91?(e.consume(w),i=0,m):ln(w)?(e.consume(w),E):n(w)}function d(w){return w===45?(e.consume(w),f):n(w)}function p(w){return w===null?n(w):w===45?(e.consume(w),h):Ue(w)?(a=p,W(w)):(e.consume(w),p)}function h(w){return w===45?(e.consume(w),f):p(w)}function f(w){return w===62?M(w):w===45?h(w):p(w)}function m(w){const V="CDATA[";return w===V.charCodeAt(i++)?(e.consume(w),i===V.length?b:m):n(w)}function b(w){return w===null?n(w):w===93?(e.consume(w),x):Ue(w)?(a=b,W(w)):(e.consume(w),b)}function x(w){return w===93?(e.consume(w),y):b(w)}function y(w){return w===62?M(w):w===93?(e.consume(w),y):b(w)}function E(w){return w===null||w===62?M(w):Ue(w)?(a=E,W(w)):(e.consume(w),E)}function C(w){return w===null?n(w):w===63?(e.consume(w),k):Ue(w)?(a=C,W(w)):(e.consume(w),C)}function k(w){return w===62?M(w):C(w)}function v(w){return ln(w)?(e.consume(w),S):n(w)}function S(w){return w===45||nn(w)?(e.consume(w),S):N(w)}function N(w){return Ue(w)?(a=N,W(w)):at(w)?(e.consume(w),N):M(w)}function O(w){return w===45||nn(w)?(e.consume(w),O):w===47||w===62||Ct(w)?B(w):n(w)}function B(w){return w===47?(e.consume(w),M):w===58||w===95||ln(w)?(e.consume(w),R):Ue(w)?(a=B,W(w)):at(w)?(e.consume(w),B):M(w)}function R(w){return w===45||w===46||w===58||w===95||nn(w)?(e.consume(w),R):F(w)}function F(w){return w===61?(e.consume(w),T):Ue(w)?(a=F,W(w)):at(w)?(e.consume(w),F):B(w)}function T(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),o=w,L):Ue(w)?(a=T,W(w)):at(w)?(e.consume(w),T):(e.consume(w),I)}function L(w){return w===o?(e.consume(w),o=void 0,A):w===null?n(w):Ue(w)?(a=L,W(w)):(e.consume(w),L)}function I(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||Ct(w)?B(w):(e.consume(w),I)}function A(w){return w===47||w===62||Ct(w)?B(w):n(w)}function M(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function W(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),H}function H(w){return at(w)?ut(e,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):j(w)}function j(w){return e.enter("htmlTextData"),a(w)}}const ed={name:"labelEnd",resolveAll:yT,resolveTo:ET,tokenize:CT},gT={tokenize:TT},bT={tokenize:vT},xT={tokenize:ST};function yT(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&&kn(e,0,e.length,n),e}function ET(e,t){let n=e.length,r=0,o,i,a,s;for(;n--;)if(o=e[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[a][1].end}},d={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",l,t],["enter",u,t]],s=Nn(s,e.slice(i+1,i+r+3)),s=Nn(s,[["enter",d,t]]),s=Nn(s,vl(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),s=Nn(s,[["exit",d,t],e[a-2],e[a-1],["exit",u,t]]),s=Nn(s,e.slice(a+1)),s=Nn(s,[["exit",l,t]]),kn(e,i,e.length,s),e}function CT(e,t,n){const r=this;let o=r.events.length,i,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return s;function s(h){return i?i._inactive?p(h):(a=r.parser.defined.includes(Xn(r.sliceSerialize({start:i.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(gT,d,a?d:p)(h):h===91?e.attempt(bT,d,a?u:p)(h):a?d(h):p(h)}function u(h){return e.attempt(xT,d,p)(h)}function d(h){return t(h)}function p(h){return i._balanced=!0,n(h)}}function TT(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),o}function o(p){return Ct(p)?ia(e,i)(p):i(p)}function i(p){return p===41?d(p):R0(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return Ct(p)?ia(e,l)(p):d(p)}function s(p){return n(p)}function l(p){return p===34||p===39||p===40?O0(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):d(p)}function u(p){return Ct(p)?ia(e,d)(p):d(p)}function d(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function vT(e,t,n){const r=this;return o;function o(s){return M0.call(r,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(Xn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function ST(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const kT={name:"labelStartImage",resolveAll:ed.resolveAll,tokenize:DT};function DT(e,t,n){const r=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const wT={name:"labelStartLink",resolveAll:ed.resolveAll,tokenize:IT};function IT(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const cu={name:"lineEnding",tokenize:AT};function AT(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ut(e,t,"linePrefix")}}const ys={name:"thematicBreak",tokenize:PT};function PT(e,t,n){let r=0,o;return i;function i(u){return e.enter("thematicBreak"),a(u)}function a(u){return o=u,s(u)}function s(u){return u===o?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||Ue(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===o?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),at(u)?ut(e,s,"whitespace")(u):s(u))}}const fn={continuation:{tokenize:LT},exit:FT,name:"list",tokenize:OT},RT={partial:!0,tokenize:_T},MT={partial:!0,tokenize:NT};function OT(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(f){const m=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:oc(f)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(ys,n,u)(f):u(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return n(f)}function l(f){return oc(f)&&++a<10?(e.consume(f),l):(!r.interrupt||a<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):n(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check($a,r.interrupt?n:d,e.attempt(RT,h,p))}function d(f){return r.containerState.initialBlankLine=!0,i++,h(f)}function p(f){return at(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),h):n(f)}function h(f){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function LT(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check($a,o,i);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ut(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!at(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(MT,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,ut(e,e.attempt(fn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function NT(e,t,n){const r=this;return ut(e,o,"listItemIndent",r.containerState.size+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(i):n(i)}}function FT(e){e.exit(this.containerState.type)}function _T(e,t,n){const r=this;return ut(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){const a=r.events[r.events.length-1];return!at(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const of={name:"setextUnderline",resolveTo:BT,tokenize:jT};function BT(e,t){let n=e.length,r,o,i;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),!i&&e[n][1].type==="definition"&&(i=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function jT(e,t,n){const r=this;let o;return i;function i(u){let d=r.events.length,p;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){p=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),o=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===o?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),at(u)?ut(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||Ue(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const $T={tokenize:HT};function HT(e){const t=this,n=e.attempt($a,r,e.attempt(this.parser.constructs.flowInitial,o,ut(e,e.attempt(this.parser.constructs.flow,o,e.attempt(qC,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const UT={resolveAll:N0()},zT=L0("string"),VT=L0("text");function L0(e){return{resolveAll:N0(e==="text"?WT:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,a,s);return a;function a(d){return u(d)?i(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"),i(d)):(n.consume(d),l)}function u(d){if(d===null)return!0;const p=o[d];let h=-1;if(p)for(;++h<p.length;){const f=p[h];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function N0(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function WT(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 i=o.length,a=-1,s=0,l;for(;i--;){const u=o[i];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(u===-2)l=!0,s++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,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 qT={42:fn,43:fn,45:fn,48:fn,49:fn,50:fn,51:fn,52:fn,53:fn,54:fn,55:fn,56:fn,57:fn,62:w0},YT={91:XC},KT={[-2]:uu,[-1]:uu,32:uu},GT={35:rT,42:ys,45:[of,ys],60:sT,61:of,95:ys,96:nf,126:nf},QT={38:A0,92:I0},XT={[-5]:cu,[-4]:cu,[-3]:cu,33:kT,38:A0,42:ic,60:[wC,hT],91:wT,92:[tT,I0],93:ed,95:ic,96:$C},ZT={null:[ic,UT]},JT={null:[42,95]},ev={null:[]},tv=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:JT,contentInitial:YT,disable:ev,document:qT,flow:GT,flowInitial:KT,insideSpan:ZT,string:QT,text:XT},Symbol.toStringTag,{value:"Module"}));function nv(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={},i=[];let a=[],s=[];const l={attempt:N(v),check:N(S),consume:E,enter:C,exit:k,interrupt:N(S,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:m,parser:e,previous:null,sliceSerialize:h,sliceStream:f,write:p};let d=t.tokenize.call(u,l);return t.resolveAll&&i.push(t),u;function p(F){return a=Nn(a,F),x(),a[a.length-1]!==null?[]:(O(t,0),u.events=vl(i,u.events,u),u.events)}function h(F,T){return ov(f(F),T)}function f(F){return rv(a,F)}function m(){const{_bufferIndex:F,_index:T,line:L,column:I,offset:A}=r;return{_bufferIndex:F,_index:T,line:L,column:I,offset:A}}function b(F){o[F.line]=F.column,R()}function x(){let F;for(;r._index<a.length;){const T=a[r._index];if(typeof T=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<T.length;)y(T.charCodeAt(r._bufferIndex));else y(T)}}function y(F){d=d(F)}function E(F){Ue(F)?(r.line++,r.column=1,r.offset+=F===-3?2:1,R()):F!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=F}function C(F,T){const L=T||{};return L.type=F,L.start=m(),u.events.push(["enter",L,u]),s.push(L),L}function k(F){const T=s.pop();return T.end=m(),u.events.push(["exit",T,u]),T}function v(F,T){O(F,T.from)}function S(F,T){T.restore()}function N(F,T){return L;function L(I,A,M){let W,H,j,w;return Array.isArray(I)?J(I):"tokenize"in I?J([I]):V(I);function V(Y){return te;function te(X){const re=X!==null&&Y[X],Q=X!==null&&Y.null,K=[...Array.isArray(re)?re:re?[re]:[],...Array.isArray(Q)?Q:Q?[Q]:[]];return J(K)(X)}}function J(Y){return W=Y,H=0,Y.length===0?M:_(Y[H])}function _(Y){return te;function te(X){return w=B(),j=Y,Y.partial||(u.currentConstruct=Y),Y.name&&u.parser.constructs.disable.null.includes(Y.name)?Z():Y.tokenize.call(T?Object.assign(Object.create(u),T):u,l,de,Z)(X)}}function de(Y){return F(j,w),A}function Z(Y){return w.restore(),++H<W.length?_(W[H]):M}}}function O(F,T){F.resolveAll&&!i.includes(F)&&i.push(F),F.resolve&&kn(u.events,T,u.events.length-T,F.resolve(u.events.slice(T),u)),F.resolveTo&&(u.events=F.resolveTo(u.events,u))}function B(){const F=m(),T=u.previous,L=u.currentConstruct,I=u.events.length,A=Array.from(s);return{from:I,restore:M};function M(){r=F,u.previous=T,u.currentConstruct=L,u.events.length=I,s=A,R()}}function R(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function rv(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function ov(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
|
|
23
|
-
`;break}case-3:{a=`\r
|
|
24
|
-
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,r.push(a)}return r.join("")}function iv(e){const r={constructs:k0([tv,...(e||{}).extensions||[]]),content:o(EC),defined:[],document:o(TC),flow:o($T),lazy:{},string:o(zT),text:o(VT)};return r;function o(i){return a;function a(s){return nv(r,i,s)}}}function av(e){for(;!P0(e););return e}const af=/[\0\t\n\r]/g;function sv(){let e=1,t="",n=!0,r;return o;function o(i,a,s){const l=[];let u,d,p,h,f;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),p=0,t="",n&&(i.charCodeAt(0)===65279&&p++,n=void 0);p<i.length;){if(af.lastIndex=p,u=af.exec(i),h=u&&u.index!==void 0?u.index:i.length,f=i.charCodeAt(h),!u){t=i.slice(p);break}if(f===10&&p===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),p<h&&(l.push(i.slice(p,h)),e+=h-p),f){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}p=h+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const lv=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function uv(e){return e.replace(lv,cv)}function cv(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return D0(n.slice(i?2:1),i?16:10)}return Jc(n)||e}const F0={}.hasOwnProperty;function dv(e,t,n){return typeof t!="string"&&(n=t,t=void 0),pv(n)(av(iv(n).document().write(sv()(e,t,!0))))}function pv(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Re),autolinkProtocol:B,autolinkEmail:B,atxHeading:i(ye),blockQuote:i(Q),characterEscape:B,characterReference:B,codeFenced:i(K),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(K,a),codeText:i(ae,a),codeTextData:B,data:B,codeFlowValue:B,definition:i(ee),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(ne),hardBreakEscape:i(pe),hardBreakTrailing:i(pe),htmlFlow:i(be,a),htmlFlowData:B,htmlText:i(be,a),htmlTextData:B,image:i(le),label:a,link:i(Re),listItem:i(ze),listItemValue:h,listOrdered:i(ve,p),listUnordered:i(ve),paragraph:i(De),reference:_,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(ye),strong:i(vt),thematicBreak:i(qe)},exit:{atxHeading:l(),atxHeadingSequence:v,autolink:l(),autolinkEmail:re,autolinkProtocol:X,blockQuote:l(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:Z,characterReferenceMarkerNumeric:Z,characterReferenceValue:Y,characterReference:te,codeFenced:l(x),codeFencedFence:b,codeFencedFenceInfo:f,codeFencedFenceMeta:m,codeFlowValue:R,codeIndented:l(y),codeText:l(A),codeTextData:R,data:R,definition:l(),definitionDestinationString:k,definitionLabelString:E,definitionTitleString:C,emphasis:l(),hardBreakEscape:l(T),hardBreakTrailing:l(T),htmlFlow:l(L),htmlFlowData:R,htmlText:l(I),htmlTextData:R,image:l(W),label:j,labelText:H,lineEnding:F,link:l(M),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:de,resourceDestinationString:w,resourceTitleString:V,resource:J,setextHeading:l(O),setextHeadingLineSequence:N,setextHeadingText:S,strong:l(),thematicBreak:l()}};_0(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:a,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 Le=He.pop();je=o(ue,Le,je)}for(je=-1;++je<ue.length;){const Le=t[ue[je][0]];F0.call(Le,ue[je][1].type)&&Le[ue[je][1].type].call(Object.assign({sliceSerialize:ue[je][2].sliceSerialize},Oe),ue[je][1])}if(Oe.tokenStack.length>0){const Le=Oe.tokenStack[Oe.tokenStack.length-1];(Le[1]||sf).call(Oe,void 0,Le[0])}for(Ce.position={start:jr(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:jr(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,Le=!1,Je,gt,ft,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"&&(Je&&!se&&!je&&!ft&&(ft=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(Je){let Te=He;for(gt=void 0;Te--;){const Be=ue[Te];if(Be[1].type==="lineEnding"||Be[1].type==="lineEndingBlank"){if(Be[0]==="exit")continue;gt&&(ue[gt][1].type="lineEndingBlank",Le=!0),Be[1].type="lineEnding",gt=Te}else if(!(Be[1].type==="linePrefix"||Be[1].type==="blockQuotePrefix"||Be[1].type==="blockQuotePrefixWhitespace"||Be[1].type==="blockQuoteMarker"||Be[1].type==="listItemIndent"))break}ft&&(!gt||ft<gt)&&(Je._spread=!0),Je.end=Object.assign({},gt?ue[gt][1].start:xe[1].end),ue.splice(gt||He,0,["exit",Je,xe[2]]),He++,Oe++}if(xe[1].type==="listItemPrefix"){const Te={type:"listItem",_spread:!1,start:Object.assign({},xe[1].start),end:void 0};Je=Te,ue.splice(He,0,["enter",Te,xe[2]]),He++,Oe++,ft=void 0,se=!0}}}return ue[Ce][1]._spread=Le,Oe}function i(ue,Ce){return Oe;function Oe(He){s.call(this,ue(He),He),Ce&&Ce.call(this,He)}}function a(){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:jr(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]||sf).call(this,ue,He[0]));else throw new Error("Cannot close `"+ue.type+"` ("+oa({start:ue.start,end:ue.end})+"): it’s not open");Oe.position.end=jr(ue.end)}function d(){return Zc(this.stack.pop())}function p(){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 f(){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 x(){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 y(){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=Xn(this.sliceSerialize(ue)).toLowerCase()}function C(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=ue}function k(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=ue}function v(ue){const Ce=this.stack[this.stack.length-1];if(!Ce.depth){const Oe=this.sliceSerialize(ue).length;Ce.depth=Oe}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function N(ue){const Ce=this.stack[this.stack.length-1];Ce.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function O(){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=lt(),He.position={start:jr(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=jr(ue.end)}function F(ue){const Ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=Ce.children[Ce.children.length-1];Oe.position.end=jr(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 L(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ue}function I(){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 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 W(){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 H(ue){const Ce=this.sliceSerialize(ue),Oe=this.stack[this.stack.length-2];Oe.label=uv(Ce),Oe.identifier=Xn(Ce).toLowerCase()}function j(){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 w(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=ue}function V(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=ue}function J(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function de(ue){const Ce=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=Ce,Oe.identifier=Xn(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function Z(ue){this.data.characterReferenceType=ue.type}function Y(ue){const Ce=this.sliceSerialize(ue),Oe=this.data.characterReferenceType;let He;Oe?(He=D0(Ce,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):He=Jc(Ce);const je=this.stack[this.stack.length-1];je.value+=He}function te(ue){const Ce=this.stack.pop();Ce.position.end=jr(ue.end)}function X(ue){R.call(this,ue);const Ce=this.stack[this.stack.length-1];Ce.url=this.sliceSerialize(ue)}function re(ue){R.call(this,ue);const Ce=this.stack[this.stack.length-1];Ce.url="mailto:"+this.sliceSerialize(ue)}function Q(){return{type:"blockquote",children:[]}}function K(){return{type:"code",lang:null,meta:null,value:""}}function ae(){return{type:"inlineCode",value:""}}function ee(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ne(){return{type:"emphasis",children:[]}}function ye(){return{type:"heading",depth:0,children:[]}}function pe(){return{type:"break"}}function be(){return{type:"html",value:""}}function le(){return{type:"image",title:null,url:"",alt:null}}function Re(){return{type:"link",title:null,url:"",children:[]}}function ve(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function ze(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function De(){return{type:"paragraph",children:[]}}function vt(){return{type:"strong",children:[]}}function lt(){return{type:"text",value:""}}function qe(){return{type:"thematicBreak"}}}function jr(e){return{line:e.line,column:e.column,offset:e.offset}}function _0(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?_0(e,r):fv(e,r)}}function fv(e,t){let n;for(n in t)if(F0.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 sf(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+oa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+oa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+oa({start:t.start,end:t.end})+") is still open")}function hv(e){const t=this;t.parser=n;function n(r){return dv(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function mv(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 gv(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
25
|
-
`}]}function bv(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 xv(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yv(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ev(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=yi(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+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(a)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function Cv(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 Tv(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function B0(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),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=r:o.push({type:"text",value:r}),o}function vv(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return B0(e,t);const o={src:yi(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)}function Sv(e,t){const n={src:yi(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 kv(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 Dv(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return B0(e,t);const o={href:yi(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function wv(e,t){const n={href:yi(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 Iv(e,t,n){const r=e.all(t),o=n?Av(n):j0(t),i={},a=[];if(typeof t.checked=="boolean"){const d=r[0];let p;d&&d.type==="element"&&d.tagName==="p"?p=d:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const d=r[s];(o||s!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
|
|
27
|
-
`}),d.type==="element"&&d.tagName==="p"&&!o?a.push(...d.children):a.push(d)}const l=r[r.length-1];l&&(o||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
|
|
28
|
-
`});const u={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,u),e.applyData(t,u)}function Av(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=j0(n[r])}return t}function j0(e){const t=e.spread;return t??e.children.length>1}function Pv(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 a=r[o];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function Rv(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mv(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Ov(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lv(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=fr(t.children[1]),l=Cl(t.children[t.children.length-1]);s&&l&&(a.position={start:s,end:l}),o.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function Nv(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let l=-1;const u=[];for(;++l<s;){const p=t.children[l],h={},f=a?a[l]:void 0;f&&(h.align=f);let m={type:"element",tagName:i,properties:h,children:[]};p&&(m.children=e.all(p),e.patch(p,m),m=e.applyData(p,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 Fv(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const lf=9,uf=32;function _v(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(cf(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(cf(t.slice(o),o>0,!1)),i.join("")}function cf(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===lf||i===uf;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===lf||i===uf;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function Bv(e,t){const n={type:"text",value:_v(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function jv(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const $v={blockquote:mv,break:gv,code:bv,delete:xv,emphasis:yv,footnoteReference:Ev,heading:Cv,html:Tv,imageReference:vv,image:Sv,inlineCode:kv,linkReference:Dv,link:wv,listItem:Iv,list:Pv,paragraph:Rv,root:Mv,strong:Ov,table:Lv,tableCell:Fv,tableRow:Nv,text:Bv,thematicBreak:jv,toml:ns,yaml:ns,definition:ns,footnoteDefinition:ns};function ns(){}const $0=-1,Sl=0,aa=1,Vs=2,td=3,nd=4,rd=5,od=6,H0=7,U0=8,df=typeof self=="object"?self:globalThis,Hv=(e,t)=>{const n=(o,i)=>(e.set(i,o),o),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case Sl:case $0:return n(a,o);case aa:{const s=n([],o);for(const l of a)s.push(r(l));return s}case Vs:{const s=n({},o);for(const[l,u]of a)s[r(l)]=r(u);return s}case td:return n(new Date(a),o);case nd:{const{source:s,flags:l}=a;return n(new RegExp(s,l),o)}case rd:{const s=n(new Map,o);for(const[l,u]of a)s.set(r(l),r(u));return s}case od:{const s=n(new Set,o);for(const l of a)s.add(r(l));return s}case H0:{const{name:s,message:l}=a;return n(new df[s](l),o)}case U0:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:s}=new Uint8Array(a);return n(new DataView(s),a)}}return n(new df[i](a),o)};return r},pf=e=>Hv(new Map,e)(0),Uo="",{toString:Uv}={},{keys:zv}=Object,Bi=e=>{const t=typeof e;if(t!=="object"||!e)return[Sl,t];const n=Uv.call(e).slice(8,-1);switch(n){case"Array":return[aa,Uo];case"Object":return[Vs,Uo];case"Date":return[td,Uo];case"RegExp":return[nd,Uo];case"Map":return[rd,Uo];case"Set":return[od,Uo];case"DataView":return[aa,n]}return n.includes("Array")?[aa,n]:n.includes("Error")?[H0,n]:[Vs,n]},rs=([e,t])=>e===Sl&&(t==="function"||t==="symbol"),Vv=(e,t,n,r)=>{const o=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},i=a=>{if(n.has(a))return n.get(a);let[s,l]=Bi(a);switch(s){case Sl:{let d=a;switch(l){case"bigint":s=U0,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);d=null;break;case"undefined":return o([$0],a)}return o([s,d],a)}case aa:{if(l){let h=a;return l==="DataView"?h=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(a)),o([l,[...h]],a)}const d=[],p=o([s,d],a);for(const h of a)d.push(i(h));return p}case Vs:{if(l)switch(l){case"BigInt":return o([l,a.toString()],a);case"Boolean":case"Number":case"String":return o([l,a.valueOf()],a)}if(t&&"toJSON"in a)return i(a.toJSON());const d=[],p=o([s,d],a);for(const h of zv(a))(e||!rs(Bi(a[h])))&&d.push([i(h),i(a[h])]);return p}case td:return o([s,a.toISOString()],a);case nd:{const{source:d,flags:p}=a;return o([s,{source:d,flags:p}],a)}case rd:{const d=[],p=o([s,d],a);for(const[h,f]of a)(e||!(rs(Bi(h))||rs(Bi(f))))&&d.push([i(h),i(f)]);return p}case od:{const d=[],p=o([s,d],a);for(const h of a)(e||!rs(Bi(h)))&&d.push(i(h));return p}}const{message:u}=a;return o([s,{name:l,message:u}],a)};return i},ff=(e,{json:t,lossy:n}={})=>{const r=[];return Vv(!(t||n),!!t,new Map,r)(e),r},Co=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?pf(ff(e,t)):structuredClone(e):(e,t)=>pf(ff(e,t));function Wv(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 qv(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Yv(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Wv,r=e.options.footnoteBackLabel||qv,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=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),p=String(u.identifier).toUpperCase(),h=yi(p.toLowerCase());let f=0;const m=[],b=e.footnoteCounts.get(p);for(;b!==void 0&&++f<=b;){m.length>0&&m.push({type:"text",value:" "});let E=typeof n=="string"?n:n(l,f);typeof E=="string"&&(E={type:"text",value:E}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,f),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const x=d[d.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const E=x.children[x.children.length-1];E&&E.type==="text"?E.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...m)}else d.push(...m);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(d,!0)};e.patch(u,y),s.push(y)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Co(a),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 kl=(function(e){if(e==null)return Xv;if(typeof e=="function")return Dl(e);if(typeof e=="object")return Array.isArray(e)?Kv(e):Gv(e);if(typeof e=="string")return Qv(e);throw new Error("Expected function, string, or object as test")});function Kv(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=kl(e[n]);return Dl(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function Gv(e){const t=e;return Dl(n);function n(r){const o=r;let i;for(i in e)if(o[i]!==t[i])return!1;return!0}}function Qv(e){return Dl(t);function t(n){return n&&n.type===e}}function Dl(e){return t;function t(n,r,o){return!!(Zv(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function Xv(){return!0}function Zv(e){return e!==null&&typeof e=="object"&&"type"in e}const z0=[],Jv=!0,Ws=!1,sa="skip";function V0(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=kl(o),a=r?-1:1;s(e,void 0,[])();function s(l,u,d){const p=l&&typeof l=="object"?l:{};if(typeof p.type=="string"){const f=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=z0,m,b,x;if((!t||i(l,u,d[d.length-1]||void 0))&&(f=eS(n(l,d)),f[0]===Ws))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==sa)for(b=(r?y.children.length:-1)+a,x=d.concat(y);b>-1&&b<y.children.length;){const E=y.children[b];if(m=s(E,b,x)(),m[0]===Ws)return m;b=typeof m[1]=="number"?m[1]:b+a}}return f}}}function eS(e){return Array.isArray(e)?e:typeof e=="number"?[Jv,e]:e==null?z0:[e]}function bn(e,t,n,r){let o,i,a;typeof t=="function"&&typeof n!="function"?(i=void 0,a=t,o=n):(i=t,a=n,o=r),V0(e,i,s,o);function s(l,u){const d=u[u.length-1],p=d?d.children.indexOf(l):void 0;return a(l,p,d)}}const ac={}.hasOwnProperty,tS={};function nS(e,t){const n=t||tS,r=new Map,o=new Map,i=new Map,a={...$v,...n.handlers},s={all:u,applyData:oS,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:l,options:n,patch:rS,wrap:aS};return bn(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const p=d.type==="definition"?r:o,h=String(d.identifier).toUpperCase();p.has(h)||p.set(h,d)}}),s;function l(d,p){const h=d.type,f=s.handlers[h];if(ac.call(s.handlers,h)&&f)return f(s,d,p);if(s.options.passThrough&&s.options.passThrough.includes(h)){if("children"in d){const{children:b,...x}=d,y=Co(x);return y.children=s.all(d),y}return Co(d)}return(s.options.unknownHandler||iS)(s,d,p)}function u(d){const p=[];if("children"in d){const h=d.children;let f=-1;for(;++f<h.length;){const m=s.one(h[f],d);if(m){if(f&&h[f-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=hf(m.value)),!Array.isArray(m)&&m.type==="element")){const b=m.children[0];b&&b.type==="text"&&(b.value=hf(b.value))}Array.isArray(m)?p.push(...m):p.push(m)}}}return p}}function rS(e,t){e.position&&(t.position=qE(e))}function oS(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&i&&Object.assign(n.properties,Co(i)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function iS(e,t){const n=t.data||{},r="value"in t&&!(ac.call(n,"hProperties")||ac.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 aS(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 hf(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function mf(e,t){const n=nS(e,t),r=n.one(e,void 0),o=Yv(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
|
|
34
|
-
`},o),i}function sS(e,t){return e&&"run"in e?async function(n,r){const o=mf(n,{file:r,...t});await e.run(o,r)}:function(n,r){return mf(n,{file:r,...e||t})}}function gf(e){if(e)throw e}var du,bf;function lS(){if(bf)return du;bf=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]"},i=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),p=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!p)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},a=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 du=function l(){var u,d,p,h,f,m,b=arguments[0],x=1,y=arguments.length,E=!1;for(typeof b=="boolean"&&(E=b,b=arguments[1]||{},x=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});x<y;++x)if(u=arguments[x],u!=null)for(d in u)p=s(b,d),h=s(u,d),b!==h&&(E&&h&&(i(h)||(f=o(h)))?(f?(f=!1,m=p&&o(p)?p:[]):m=p&&i(p)?p:{},a(b,{name:d,newValue:l(E,m,h)})):typeof h<"u"&&a(b,{name:d,newValue:h}));return b},du}var uS=lS();const pu=Zn(uS);function sc(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function cS(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...o);function s(l,...u){const d=e[++i];let p=-1;if(l){a(l);return}for(;++p<o.length;)(u[p]===null||u[p]===void 0)&&(u[p]=o[p]);o=u,d?dS(d,s)(...u):a(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 dS(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(o);try{l=e.apply(this,a)}catch(u){const d=u;if(s&&n)throw d;return o(d)}s||(l&&l.then&&typeof l.then=="function"?l.then(i,o):l instanceof Error?o(l):i(l))}function o(a,...s){n||(n=!0,t(a,...s))}function i(a){o(null,a)}}const ir={basename:pS,dirname:fS,extname:hS,join:mS,sep:"/"};function pS(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ha(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else a<0&&(i=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(r=o):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function fS(e){if(Ha(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 hS(e){Ha(e);let t=e.length,n=-1,r=0,o=-1,i=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function mS(...e){let t=-1,n;for(;++t<e.length;)Ha(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":gS(n)}function gS(e){Ha(e);const t=e.codePointAt(0)===47;let n=bS(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function bS(e,t){let n="",r=0,o=-1,i=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(o===a-1||i===1))if(o!==a-1&&i===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=a,i=0;continue}}else if(n.length>0){n="",r=0,o=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,i=0}else s===46&&i>-1?i++:i=-1}return n}function Ha(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const xS={cwd:yS};function yS(){return"/"}function lc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ES(e){if(typeof e=="string")e=new URL(e);else if(!lc(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 CS(e)}function CS(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 fu=["history","path","basename","stem","extname","dirname"];class W0{constructor(t){let n;t?lc(t)?n={path:t}:typeof t=="string"||TS(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":xS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<fu.length;){const i=fu[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)fu.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?ir.basename(this.path):void 0}set basename(t){mu(t,"basename"),hu(t,"basename"),this.path=ir.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ir.dirname(this.path):void 0}set dirname(t){xf(this.basename,"dirname"),this.path=ir.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ir.extname(this.path):void 0}set extname(t){if(hu(t,"extname"),xf(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=ir.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){lc(t)&&(t=ES(t)),mu(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ir.basename(this.path,this.extname):void 0}set stem(t){mu(t,"stem"),hu(t,"stem"),this.path=ir.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 on(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 hu(e,t){if(e&&e.includes(ir.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ir.sep+"`")}function mu(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function xf(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function TS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vS=(function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};return Object.setPrototypeOf(i,r),i}),SS={}.hasOwnProperty;class id extends vS{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=cS()}copy(){const t=new id;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(pu(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(xu("data",this.frozen),this.namespace[t]=n,this):SS.call(this.namespace,t)&&this.namespace[t]||void 0:t?(xu("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=os(t),r=this.parser||this.Parser;return gu("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),gu("process",this.parser||this.Parser),bu("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,a){const s=os(t),l=r.parse(s);r.run(l,s,function(d,p,h){if(d||!p||!h)return u(d);const f=p,m=r.stringify(f,h);wS(m)?h.value=m:h.result=m,u(d,h)});function u(d,p){d||!p?a(d):i?i(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),gu("processSync",this.parser||this.Parser),bu("processSync",this.compiler||this.Compiler),this.process(t,o),Ef("processSync","process",n),r;function o(i,a){n=!0,gf(i),r=a}}run(t,n,r){yf(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,s){const l=os(n);o.run(t,l,u);function u(d,p,h){const f=p||t;d?s(d):a?a(f):r(void 0,f,h)}}}runSync(t,n){let r=!1,o;return this.run(t,n,i),Ef("runSync","run",r),o;function i(a,s){gf(a),o=s,r=!0}}stringify(t,n){this.freeze();const r=os(n),o=this.compiler||this.Compiler;return bu("stringify",o),yf(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(xu("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...p]=u;l(d,p)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(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=pu(!0,o.settings,u.settings))}function s(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const p=u[d];i(p)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,d){let p=-1,h=-1;for(;++p<r.length;)if(r[p][0]===u){h=p;break}if(h===-1)r.push([u,...d]);else if(d.length>0){let[f,...m]=d;const b=r[h][1];sc(b)&&sc(f)&&(f=pu(!0,b,f)),r[h]=[u,f,...m]}}}}const kS=new id().freeze();function gu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function bu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function xu(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 yf(e){if(!sc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ef(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function os(e){return DS(e)?e:new W0(e)}function DS(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function wS(e){return typeof e=="string"||IS(e)}function IS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const AS="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Cf=[],Tf={allowDangerousHtml:!0},PS=/^(https?|ircs?|mailto|xmpp)$/i,RS=[{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 MS(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,s=e.rehypePlugins||Cf,l=e.remarkPlugins||Cf,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Tf}:Tf,d=e.skipHtml,p=e.unwrapDisallowed,h=e.urlTransform||OS,f=kS().use(hv).use(l).use(sS,u).use(s),m=new W0;typeof r=="string"&&(m.value=r);for(const E of RS)Object.hasOwn(e,E.from)&&(""+E.from+(E.to?"use `"+E.to+"` instead":"remove it")+AS+E.id,void 0);const b=f.parse(m);let x=f.runSync(b,m);return o&&(x={type:"element",tagName:"div",properties:{className:o},children:x.type==="root"?x.children:[x]}),bn(x,y),XE(x,{Fragment:c.Fragment,components:i,ignoreInvalidStyle:!0,jsx:c.jsx,jsxs:c.jsxs,passKeys:!0,passNode:!0});function y(E,C,k){if(E.type==="raw"&&k&&typeof C=="number")return d?k.children.splice(C,1):k.children[C]={type:"text",value:E.value},C;if(E.type==="element"){let v;for(v in lu)if(Object.hasOwn(lu,v)&&Object.hasOwn(E.properties,v)){const S=E.properties[v],N=lu[v];(N===null||N.includes(E.tagName))&&(E.properties[v]=h(String(S||""),v,E))}}if(E.type==="element"){let v=t?!t.includes(E.tagName):a?a.includes(E.tagName):!1;if(!v&&n&&typeof C=="number"&&(v=!n(E,C,k)),v&&k&&typeof C=="number")return p&&E.children?k.children.splice(C,1,...E.children):k.children.splice(C,1),C}}}function OS(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||PS.test(e.slice(0,t))?e:""}function uc(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 LS(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function NS(e,t,n){const o=kl((n||{}).ignore||[]),i=FS(t);let a=-1;for(;++a<i.length;)V0(e,"text",s);function s(u,d){let p=-1,h;for(;++p<d.length;){const f=d[p],m=h?h.children:void 0;if(o(f,m?m.indexOf(f):void 0,h))return;h=f}if(h)return l(u,d)}function l(u,d){const p=d[d.length-1],h=i[a][0],f=i[a][1];let m=0;const x=p.children.indexOf(u);let y=!1,E=[];h.lastIndex=0;let C=h.exec(u.value);for(;C;){const k=C.index,v={index:C.index,input:C.input,stack:[...d,u]};let S=f(...C,v);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?h.lastIndex=k+1:(m!==k&&E.push({type:"text",value:u.value.slice(m,k)}),Array.isArray(S)?E.push(...S):S&&E.push(S),m=k+C[0].length,y=!0),!h.global)break;C=h.exec(u.value)}return y?(m<u.value.length&&E.push({type:"text",value:u.value.slice(m)}),p.children.splice(x,1,...E)):E=[u],x+E.length}}function FS(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([_S(o[0]),BS(o[1])])}return t}function _S(e){return typeof e=="string"?new RegExp(LS(e),"g"):e}function BS(e){return typeof e=="function"?e:function(){return e}}const yu="phrasing",Eu=["autolink","link","image","label"];function jS(){return{transforms:[qS],enter:{literalAutolink:HS,literalAutolinkEmail:Cu,literalAutolinkHttp:Cu,literalAutolinkWww:Cu},exit:{literalAutolink:WS,literalAutolinkEmail:VS,literalAutolinkHttp:US,literalAutolinkWww:zS}}}function $S(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:yu,notInConstruct:Eu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:yu,notInConstruct:Eu},{character:":",before:"[ps]",after:"\\/",inConstruct:yu,notInConstruct:Eu}]}}function HS(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Cu(e){this.config.enter.autolinkProtocol.call(this,e)}function US(e){this.config.exit.autolinkProtocol.call(this,e)}function zS(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 VS(e){this.config.exit.autolinkEmail.call(this,e)}function WS(e){this.exit(e)}function qS(e){NS(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,YS],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,KS]],{ignore:["link","linkReference"]})}function YS(e,t,n,r,o){let i="";if(!q0(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!GS(n)))return!1;const a=QS(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function KS(e,t,n,r){return!q0(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function GS(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 QS(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=uc(e,"(");let i=uc(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function q0(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Eo(n)||Tl(n))&&(!t||n!==47)}Y0.peek=i3;function XS(){this.buffer()}function ZS(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function JS(){this.buffer()}function e3(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function t3(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Xn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function n3(e){this.exit(e)}function r3(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Xn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function o3(e){this.exit(e)}function i3(){return"["}function Y0(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),a(),i+=o.move("]"),i}function a3(){return{enter:{gfmFootnoteCallString:XS,gfmFootnoteCall:ZS,gfmFootnoteDefinitionLabelString:JS,gfmFootnoteDefinition:e3},exit:{gfmFootnoteCallString:t3,gfmFootnoteCall:n3,gfmFootnoteDefinitionLabelString:r3,gfmFootnoteDefinition:o3}}}function s3(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Y0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,i,a){const s=i.createTracker(a);let l=s.move("[^");const u=i.enter("footnoteDefinition"),d=i.enter("label");return l+=s.move(i.safe(i.associationId(r),{before:l,after:"]"})),d(),l+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),l+=s.move((t?`
|
|
35
|
-
`:" ")+i.indentLines(i.containerFlow(r,s.current()),t?K0:l3))),u(),l}}function l3(e,t,n){return t===0?e:K0(e,t,n)}function K0(e,t,n){return(n?"":" ")+e}const u3=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];G0.peek=h3;function c3(){return{canContainEols:["delete"],enter:{strikethrough:p3},exit:{strikethrough:f3}}}function d3(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:u3}],handlers:{delete:G0}}}function p3(e){this.enter({type:"delete",children:[]},e)}function f3(e){this.exit(e)}function G0(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function h3(){return"~"}function m3(e){return e.length}function g3(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||m3,i=[],a=[],s=[],l=[];let u=0,d=-1;for(;++d<e.length;){const b=[],x=[];let y=-1;for(e[d].length>u&&(u=e[d].length);++y<e[d].length;){const E=b3(e[d][y]);if(n.alignDelimiters!==!1){const C=o(E);x[y]=C,(l[y]===void 0||C>l[y])&&(l[y]=C)}b.push(E)}a[d]=b,s[d]=x}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<u;)i[p]=vf(r[p]);else{const b=vf(r);for(;++p<u;)i[p]=b}p=-1;const h=[],f=[];for(;++p<u;){const b=i[p];let x="",y="";b===99?(x=":",y=":"):b===108?x=":":b===114&&(y=":");let E=n.alignDelimiters===!1?1:Math.max(1,l[p]-x.length-y.length);const C=x+"-".repeat(E)+y;n.alignDelimiters!==!1&&(E=x.length+E+y.length,E>l[p]&&(l[p]=E),f[p]=E),h[p]=C}a.splice(1,0,h),s.splice(1,0,f),d=-1;const m=[];for(;++d<a.length;){const b=a[d],x=s[d];p=-1;const y=[];for(;++p<u;){const E=b[p]||"";let C="",k="";if(n.alignDelimiters!==!1){const v=l[p]-(x[p]||0),S=i[p];S===114?C=" ".repeat(v):S===99?v%2?(C=" ".repeat(v/2+.5),k=" ".repeat(v/2-.5)):(C=" ".repeat(v/2),k=C):k=" ".repeat(v)}n.delimiterStart!==!1&&!p&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&E==="")&&(n.delimiterStart!==!1||p)&&y.push(" "),n.alignDelimiters!==!1&&y.push(C),y.push(E),n.alignDelimiters!==!1&&y.push(k),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||p!==u-1)&&y.push("|")}m.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return m.join(`
|
|
36
|
-
`)}function b3(e){return e==null?"":String(e)}function vf(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 Sf={}.hasOwnProperty;function wl(e,t){const n=t||{};function r(o,...i){let a=r.invalid;const s=r.handlers;if(o&&Sf.call(o,e)){const l=String(o[e]);a=Sf.call(s,l)?s[l]:r.unknown}if(a)return a.call(this,o,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function x3(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),y3);return o(),a}function y3(e,t,n){return">"+(n?"":" ")+e}function E3(e,t){return kf(e,t.inConstruct,!0)&&!kf(e,t.notInConstruct,!1)}function kf(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 Df(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
37
|
-
`&&E3(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
38
|
-
`}function C3(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}function T3(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 v3(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 S3(e,t,n,r){const o=v3(n),i=e.value||"",a=o==="`"?"GraveAccent":"Tilde";if(T3(e,n)){const p=n.enter("codeIndented"),h=n.indentLines(i,k3);return p(),h}const s=n.createTracker(r),l=o.repeat(Math.max(C3(i,o)+1,3)),u=n.enter("codeFenced");let d=s.move(l);if(e.lang){const p=n.enter(`codeFencedLang${a}`);d+=s.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...s.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${a}`);d+=s.move(" "),d+=s.move(n.safe(e.meta,{before:d,after:`
|
|
39
|
-
`,encode:["`"],...s.current()})),p()}return d+=s.move(`
|
|
40
|
-
`),i&&(d+=s.move(i+`
|
|
41
|
-
`)),d+=s.move(l),u(),d}function k3(e,t,n){return(n?"":" ")+e}function ad(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 D3(e,t,n,r){const o=ad(n),i=o==='"'?"Quote":"Apostrophe",a=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${i}`),u+=l.move(" "+o),u+=l.move(n.safe(e.title,{before:u,after:o,...l.current()})),u+=l.move(o),s()),a(),u}function w3(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 Sa(e){return"&#x"+e.toString(16).toUpperCase()+";"}function qs(e,t,n){const r=ai(e),o=ai(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}}Q0.peek=I3;function Q0(e,t,n,r){const o=w3(n),i=n.enter("emphasis"),a=n.createTracker(r),s=a.move(o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const u=l.charCodeAt(0),d=qs(r.before.charCodeAt(r.before.length-1),u,o);d.inside&&(l=Sa(u)+l.slice(1));const p=l.charCodeAt(l.length-1),h=qs(r.after.charCodeAt(0),p,o);h.inside&&(l=l.slice(0,-1)+Sa(p));const f=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},s+l+f}function I3(e,t,n){return n.options.emphasis||"*"}function A3(e,t){let n=!1;return bn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ws}),!!((!e.depth||e.depth<3)&&Zc(e)&&(t.options.setext||n))}function P3(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(A3(e,n)){const d=n.enter("headingSetext"),p=n.enter("phrasing"),h=n.containerPhrasing(e,{...i.current(),before:`
|
|
43
|
-
`,after:`
|
|
44
|
-
`});return p(),d(),h+`
|
|
45
|
-
`+(o===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
|
|
46
|
-
`))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
47
|
-
`,...i.current()});return/^[\t ]/.test(u)&&(u=Sa(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),l(),s(),u}X0.peek=R3;function X0(e){return e.value||""}function R3(){return"<"}Z0.peek=M3;function Z0(e,t,n,r){const o=ad(n),i=o==='"'?"Quote":"Apostrophe",a=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${i}`),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(")"),a(),u}function M3(){return"!"}J0.peek=O3;function J0(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=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+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=d,i(),o==="full"||!u||u!==p?l+=s.move(p+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function O3(){return"!"}eg.peek=L3;function eg(e,t,n){let r=e.value||"",o="`",i=-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+" ");++i<n.unsafe.length;){const a=n.unsafe[i],s=n.compilePattern(a);let l;if(a.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 L3(){return"`"}function tg(e,t){const n=Zc(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))}ng.peek=N3;function ng(e,t,n,r){const o=ad(n),i=o==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(tg(e,n)){const d=n.stack;n.stack=[],s=n.enter("autolink");let p=a.move("<");return p+=a.move(n.containerPhrasing(e,{before:p,after:">",...a.current()})),p+=a.move(">"),s(),n.stack=d,p}s=n.enter("link"),l=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=a.move(" "+o),u+=a.move(n.safe(e.title,{before:u,after:o,...a.current()})),u+=a.move(o),l()),u+=a.move(")"),s(),u}function N3(e,t,n){return tg(e,n)?"<":"["}rg.peek=F3;function rg(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=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+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=d,i(),o==="full"||!u||u!==p?l+=s.move(p+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function F3(){return"["}function sd(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 _3(e){const t=sd(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 B3(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 og(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 j3(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?B3(n):sd(n);const s=e.ordered?a==="."?")":".":_3(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),og(n)===a&&d){let p=-1;for(;++p<e.children.length;){const h=e.children[p];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),u}function $3(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 H3(e,t,n,r){const o=$3(n);let i=n.bulletCurrent||sd(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),d);return l(),u;function d(p,h,f){return h?(f?"":" ".repeat(a))+p:(f?i:i+" ".repeat(a-i.length))+p}}function U3(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a}const z3=kl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function V3(e,t,n,r){return(e.children.some(function(a){return z3(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function W3(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ig.peek=q3;function ig(e,t,n,r){const o=W3(n),i=n.enter("strong"),a=n.createTracker(r),s=a.move(o+o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const u=l.charCodeAt(0),d=qs(r.before.charCodeAt(r.before.length-1),u,o);d.inside&&(l=Sa(u)+l.slice(1));const p=l.charCodeAt(l.length-1),h=qs(r.after.charCodeAt(0),p,o);h.inside&&(l=l.slice(0,-1)+Sa(p));const f=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},s+l+f}function q3(e,t,n){return n.options.strong||"*"}function Y3(e,t,n,r){return n.safe(e.value,r)}function K3(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 G3(e,t,n){const r=(og(n)+(n.options.ruleSpaces?" ":"")).repeat(K3(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ag={blockquote:x3,break:Df,code:S3,definition:D3,emphasis:Q0,hardBreak:Df,heading:P3,html:X0,image:Z0,imageReference:J0,inlineCode:eg,link:ng,linkReference:rg,list:j3,listItem:H3,paragraph:U3,root:V3,strong:ig,text:Y3,thematicBreak:G3};function Q3(){return{enter:{table:X3,tableData:wf,tableHeader:wf,tableRow:J3},exit:{codeText:ek,table:Z3,tableData:Tu,tableHeader:Tu,tableRow:Tu}}}function X3(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 Z3(e){this.exit(e),this.data.inTable=void 0}function J3(e){this.enter({type:"tableRow",children:[]},e)}function Tu(e){this.exit(e)}function wf(e){this.enter({type:"tableCell",children:[]},e)}function ek(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,tk));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function tk(e,t){return t==="|"?t:e}function nk(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=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:a,tableCell:l,tableRow:s}};function a(f,m,b,x){return u(d(f,b,x),f.align)}function s(f,m,b,x){const y=p(f,b,x),E=u([y]);return E.slice(0,E.indexOf(`
|
|
49
|
-
`))}function l(f,m,b,x){const y=b.enter("tableCell"),E=b.enter("phrasing"),C=b.containerPhrasing(f,{...x,before:i,after:i});return E(),y(),C}function u(f,m){return g3(f,{align:m,alignDelimiters:r,padding:n,stringLength:o})}function d(f,m,b){const x=f.children;let y=-1;const E=[],C=m.enter("table");for(;++y<x.length;)E[y]=p(x[y],m,b);return C(),E}function p(f,m,b){const x=f.children;let y=-1;const E=[],C=m.enter("tableRow");for(;++y<x.length;)E[y]=l(x[y],f,m,b);return C(),E}function h(f,m,b){let x=ag.inlineCode(f,m,b);return b.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function rk(){return{exit:{taskListCheckValueChecked:If,taskListCheckValueUnchecked:If,paragraph:ik}}}function ok(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ak}}}function If(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ik(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 i=-1,a;for(;++i<o.length;){const s=o[i];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function ak(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=ag.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(d){return d+a}}function sk(){return[jS(),a3(),c3(),Q3(),rk()]}function lk(e){return{extensions:[$S(),s3(e),d3(),nk(e),ok()]}}const uk={tokenize:mk,partial:!0},sg={tokenize:gk,partial:!0},lg={tokenize:bk,partial:!0},ug={tokenize:xk,partial:!0},ck={tokenize:yk,partial:!0},cg={name:"wwwAutolink",tokenize:fk,previous:pg},dg={name:"protocolAutolink",tokenize:hk,previous:fg},Or={name:"emailAutolink",tokenize:pk,previous:hg},hr={};function dk(){return{text:hr}}let ro=48;for(;ro<123;)hr[ro]=Or,ro++,ro===58?ro=65:ro===91&&(ro=97);hr[43]=Or;hr[45]=Or;hr[46]=Or;hr[95]=Or;hr[72]=[Or,dg];hr[104]=[Or,dg];hr[87]=[Or,cg];hr[119]=[Or,cg];function pk(e,t,n){const r=this;let o,i;return a;function a(p){return!cc(p)||!hg.call(r,r.previous)||ld(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(p))}function s(p){return cc(p)?(e.consume(p),s):p===64?(e.consume(p),l):n(p)}function l(p){return p===46?e.check(ck,d,u)(p):p===45||p===95||nn(p)?(i=!0,e.consume(p),l):d(p)}function u(p){return e.consume(p),o=!0,l}function d(p){return i&&o&&ln(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function fk(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!pg.call(r,r.previous)||ld(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(uk,e.attempt(sg,e.attempt(lg,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function hk(e,t,n){const r=this;let o="",i=!1;return a;function a(p){return(p===72||p===104)&&fg.call(r,r.previous)&&!ld(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(p),e.consume(p),s):n(p)}function s(p){if(ln(p)&&o.length<5)return o+=String.fromCodePoint(p),e.consume(p),s;if(p===58){const h=o.toLowerCase();if(h==="http"||h==="https")return e.consume(p),l}return n(p)}function l(p){return p===47?(e.consume(p),i?u:(i=!0,l)):n(p)}function u(p){return p===null||zs(p)||Ct(p)||Eo(p)||Tl(p)?n(p):e.attempt(sg,e.attempt(lg,d),n)(p)}function d(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function mk(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function gk(e,t,n){let r,o,i;return a;function a(u){return u===46||u===95?e.check(ug,l,s)(u):u===null||Ct(u)||Eo(u)||u!==45&&Tl(u)?l(u):(i=!0,e.consume(u),a)}function s(u){return u===95?r=!0:(o=r,r=void 0),e.consume(u),a}function l(u){return o||r||!i?n(u):t(u)}}function bk(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(ug,t,i)(a):a===null||Ct(a)||Eo(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&r++,e.consume(a),o}}function xk(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),i):s===93?(e.consume(s),o):s===60||s===null||Ct(s)||Eo(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||Ct(s)||Eo(s)?t(s):r(s)}function i(s){return ln(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):ln(s)?(e.consume(s),a):n(s)}}function yk(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return nn(i)?n(i):t(i)}}function pg(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ct(e)}function fg(e){return!ln(e)}function hg(e){return!(e===47||cc(e))}function cc(e){return e===43||e===45||e===46||e===95||nn(e)}function ld(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 Ek={tokenize:Ik,partial:!0};function Ck(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:kk,continuation:{tokenize:Dk},exit:wk}},text:{91:{name:"gfmFootnoteCall",tokenize:Sk},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Tk,resolveTo:vk}}}}function Tk(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const l=r.events[o][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const u=Xn(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function vk(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 i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function Sk(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return s;function s(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),l}function l(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(p){if(i>999||p===93&&!a||p===null||p===91||Ct(p))return n(p);if(p===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return o.includes(Xn(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return Ct(p)||(a=!0),i++,e.consume(p),p===92?d:u}function d(p){return p===91||p===92||p===93?(e.consume(p),i++,u):u(p)}}function kk(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=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(a>999||m===93&&!s||m===null||m===91||Ct(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return i=Xn(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Ct(m)||(s=!0),a++,e.consume(m),m===92?p:d}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,d):d(m)}function h(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),o.includes(i)||o.push(i),ut(e,f,"gfmFootnoteDefinitionWhitespace")):n(m)}function f(m){return t(m)}}function Dk(e,t,n){return e.check($a,t,e.attempt(Ek,t,n))}function wk(e){e.exit("gfmFootnoteDefinition")}function Ik(e,t,n){const r=this;return ut(e,o,"gfmFootnoteDefinitionIndent",5);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function Ak(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let u=l;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[l][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[l][1].end)},p={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[l][1].start)},h=[["enter",d,s],["enter",a[u][1],s],["exit",a[u][1],s],["enter",p,s]],f=s.parser.constructs.insideSpan.null;f&&kn(h,h.length,0,vl(f,a.slice(u+1,l),s)),kn(h,h.length,0,[["exit",p,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",d,s]]),kn(a,u-1,l-u+3,h),l=u+h.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function i(a,s,l){const u=this.previous,d=this.events;let p=0;return h;function h(m){return u===126&&d[d.length-1][1].type!=="characterEscape"?l(m):(a.enter("strikethroughSequenceTemporary"),f(m))}function f(m){const b=ai(u);if(m===126)return p>1?l(m):(a.consume(m),p++,f);if(p<2&&!n)return l(m);const x=a.exit("strikethroughSequenceTemporary"),y=ai(m);return x._open=!y||y===2&&!!b,x._close=!b||b===2&&!!y,s(m)}}}class Pk{constructor(){this.map=[]}add(t,n,r){Rk(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const i of o)t.push(i);o=r.pop()}this.map.length=0}}function Rk(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 Mk(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 i=r.length-1;r[i]=r[i]==="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 Ok(){return{flow:{null:{name:"table",tokenize:Lk,resolveAll:Nk}}}}function Lk(e,t,n){const r=this;let o=0,i=0,a;return s;function s(R){let F=r.events.length-1;for(;F>-1;){const I=r.events[F][1].type;if(I==="lineEnding"||I==="linePrefix")F--;else break}const T=F>-1?r.events[F][1].type:null,L=T==="tableHead"||T==="tableRow"?S:l;return L===S&&r.parser.lazy[r.now().line]?n(R):L(R)}function l(R){return e.enter("tableHead"),e.enter("tableRow"),u(R)}function u(R){return R===124||(a=!0,i+=1),d(R)}function d(R){return R===null?n(R):Ue(R)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),f):n(R):at(R)?ut(e,d,"whitespace")(R):(i+=1,a&&(a=!1,o+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),p(R)))}function p(R){return R===null||R===124||Ct(R)?(e.exit("data"),d(R)):(e.consume(R),R===92?h:p)}function h(R){return R===92||R===124?(e.consume(R),p):p(R)}function f(R){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(R):(e.enter("tableDelimiterRow"),a=!1,at(R)?ut(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):m(R))}function m(R){return R===45||R===58?x(R):R===124?(a=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),b):v(R)}function b(R){return at(R)?ut(e,x,"whitespace")(R):x(R)}function x(R){return R===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),y):R===45?(i+=1,y(R)):R===null||Ue(R)?k(R):v(R)}function y(R){return R===45?(e.enter("tableDelimiterFiller"),E(R)):v(R)}function E(R){return R===45?(e.consume(R),E):R===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(R))}function C(R){return at(R)?ut(e,k,"whitespace")(R):k(R)}function k(R){return R===124?m(R):R===null||Ue(R)?!a||o!==i?v(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(R)):v(R)}function v(R){return n(R)}function S(R){return e.enter("tableRow"),N(R)}function N(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),N):R===null||Ue(R)?(e.exit("tableRow"),t(R)):at(R)?ut(e,N,"whitespace")(R):(e.enter("data"),O(R))}function O(R){return R===null||R===124||Ct(R)?(e.exit("data"),N(R)):(e.consume(R),R===92?B:O)}function B(R){return R===92||R===124?(e.consume(R),O):O(R)}}function Nk(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,u,d,p;const h=new Pk;for(;++n<e.length;){const f=e[n],m=f[1];f[0]==="enter"?m.type==="tableHead"?(s=!1,l!==0&&(Af(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,p=void 0,i=[0,0,0,0],a=[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,a[2]===0&&(i[1]!==0&&(a[0]=a[1],p=is(h,t,i,o,void 0,p),i=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],p=is(h,t,i,o,void 0,p)),i=a,a=[i[1],n,0,0])):m.type==="tableHead"?(s=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,i[1]!==0?(a[0]=a[1],p=is(h,t,i,o,n,p)):a[1]!==0&&(p=is(h,t,a,o,n,p)),o=0):o&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&Af(h,t,l,u,d),h.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=Mk(t.events,n))}return e}function is(e,t,n,r,o,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},qo(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=qo(t.events,n[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const u=qo(t.events,n[2]),d=qo(t.events,n[3]),p={type:s,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const h=t.events[n[2]],f=t.events[n[3]];if(h[1].end=Object.assign({},f[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",p,t]])}return o!==void 0&&(i.end=Object.assign({},qo(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function Af(e,t,n,r,o){const i=[],a=qo(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function qo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Fk={name:"tasklistCheck",tokenize:Bk};function _k(){return{text:{91:Fk}}}function Bk(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"),i)}function i(l){return Ct(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return Ue(l)?t(l):at(l)?e.check({tokenize:jk},t,n)(l):n(l)}}function jk(e,t,n){return ut(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function $k(e){return k0([dk(),Ck(),Ak(e),Ok(),_k()])}const Hk={};function Uk(e){const t=this,n=e||Hk,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push($k(n)),i.push(sk()),a.push(lk(n))}const Pf=/[#.]/g;function zk(e,t){const n=e||"",r={};let o=0,i,a;for(;o<n.length;){Pf.lastIndex=o;const s=Pf.exec(n),l=n.slice(o,s?s.index:n.length);l&&(i?i==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:a=l,o+=l.length),s&&(i=s[0],o++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function mg(e,t,n){const r=n?Yk(n):void 0;function o(i,a,...s){let l;if(i==null){l={type:"root",children:[]};const u=a;s.unshift(u)}else{l=zk(i,t);const u=l.tagName.toLowerCase(),d=r?r.get(u):void 0;if(l.tagName=d||u,Vk(a))s.unshift(a);else for(const[p,h]of Object.entries(a))Wk(e,l.properties,p,h)}for(const u of s)dc(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return o}function Vk(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 i=o;for(const a of i)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Wk(e,t,n,r){const o=ja(e,n);let i;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;i=r}else typeof r=="boolean"?i=r:typeof r=="string"?o.spaceSeparated?i=nc(r):o.commaSeparated?i=Ju(r):o.commaOrSpaceSeparated?i=nc(Ju(r).join(" ")):i=Rf(o,o.property,r):Array.isArray(r)?i=[...r]:i=o.property==="style"?qk(r):String(r);if(Array.isArray(i)){const a=[];for(const s of i)a.push(Rf(o,o.property,s));i=a}o.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[o.property]=i}}function dc(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)dc(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?dc(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Rf(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Ta(n)===Ta(t)))return!0}return n}function qk(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Yk(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Kk=["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"],Gk=mg(xi,"div"),Qk=mg(Zr,"g",Kk);function Xk(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(i){if(typeof i=="number"&&i>-1&&i<=t.length){let a=0;for(;;){let s=n[a];if(s===void 0){const l=Mf(t,n[a-1]);s=l===-1?t.length+1:l+1,n[a]=s}if(s>i)return{line:a+1,column:i-(a>0?n[a-1]:0)+1,offset:i};a++}}}function o(i){if(i&&typeof i.line=="number"&&typeof i.column=="number"&&!Number.isNaN(i.line)&&!Number.isNaN(i.column)){for(;n.length<i.line;){const s=n[n.length-1],l=Mf(t,s),u=l===-1?t.length+1:l+1;if(s===u)break;n.push(u)}const a=(i.line>1?n[i.line-2]:0)+i.column-1;if(a<n[i.line-1])return a}}}function Mf(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 po={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/"},gg={}.hasOwnProperty,Zk=Object.prototype;function Jk(e,t){const n=t||{};return ud({file:n.file||void 0,location:!1,schema:n.space==="svg"?Zr:xi,verbose:n.verbose||!1},e)}function ud(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Es(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:bg(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const i=String(e.file),a=Xk(i),s=a.toPoint(0),l=a.toPoint(i.length);n.position={start:s,end:l}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Es(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Es(e,r,n),n}default:return n=e6(e,t),n}}function bg(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=ud(e,t[n]);r.push(o)}return r}function e6(e,t){const n=e.schema;e.schema=t.namespaceURI===po.svg?Zr:xi;let r=-1;const o={};for(;++r<t.attrs.length;){const s=t.attrs[r],l=(s.prefix?s.prefix+":":"")+s.name;gg.call(Zk,l)||(o[l]=s.value)}const a=(e.schema.space==="svg"?Qk:Gk)(t.tagName,o,bg(e,t.childNodes));if(Es(e,t,a),a.tagName==="template"){const s=t,l=s.sourceCodeLocation,u=l&&l.startTag&&Ko(l.startTag),d=l&&l.endTag&&Ko(l.endTag),p=ud(e,s.content);u&&d&&e.file&&(p.position={start:u.end,end:d.start}),a.content=p}return e.schema=n,a}function Es(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=t6(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function t6(e,t,n){const r=Ko(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 i={};let a;if(n.attrs)for(a in n.attrs)gg.call(n.attrs,a)&&(i[ja(e.schema,a).property]=Ko(n.attrs[a]));n.startTag;const s=Ko(n.startTag),l=n.endTag?Ko(n.endTag):void 0,u={opening:s};l&&(u.closing=l),u.properties=i,t.data={position:u}}}return r}function Ko(e){const t=Of({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Of({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Of(e){return e.line&&e.column?e:void 0}class Ua{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ua.prototype.property={};Ua.prototype.normal={};Ua.prototype.space=null;function xg(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 Ua(n,r,t)}function pc(e){return e.toLowerCase()}class Wn{constructor(t,n){this.property=t,this.attribute=n}}Wn.prototype.space=null;Wn.prototype.boolean=!1;Wn.prototype.booleanish=!1;Wn.prototype.overloadedBoolean=!1;Wn.prototype.number=!1;Wn.prototype.commaSeparated=!1;Wn.prototype.spaceSeparated=!1;Wn.prototype.commaOrSpaceSeparated=!1;Wn.prototype.mustUseProperty=!1;Wn.prototype.defined=!1;let n6=0;const Ke=Ao(),Ht=Ao(),yg=Ao(),Ie=Ao(),kt=Ao(),ei=Ao(),En=Ao();function Ao(){return 2**++n6}const fc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ke,booleanish:Ht,commaOrSpaceSeparated:En,commaSeparated:ei,number:Ie,overloadedBoolean:yg,spaceSeparated:kt},Symbol.toStringTag,{value:"Module"})),vu=Object.keys(fc);class cd extends Wn{constructor(t,n,r,o){let i=-1;if(super(t,n),Lf(this,"space",o),typeof r=="number")for(;++i<vu.length;){const a=vu[i];Lf(this,vu[i],(r&fc[a])===fc[a])}}}cd.prototype.defined=!0;function Lf(e,t,n){n&&(e[t]=n)}const r6={}.hasOwnProperty;function Ei(e){const t={},n={};let r;for(r in e.properties)if(r6.call(e.properties,r)){const o=e.properties[r],i=new cd(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[pc(r)]=r,n[pc(i.attribute)]=r}return new Ua(t,n,e.space)}const Eg=Ei({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}}),Cg=Ei({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Tg(e,t){return t in e?e[t]:t}function vg(e,t){return Tg(e,t.toLowerCase())}const Sg=Ei({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:vg,properties:{xmlns:null,xmlnsXLink:null}}),kg=Ei({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ht,ariaAutoComplete:null,ariaBusy:Ht,ariaChecked:Ht,ariaColCount:Ie,ariaColIndex:Ie,ariaColSpan:Ie,ariaControls:kt,ariaCurrent:null,ariaDescribedBy:kt,ariaDetails:null,ariaDisabled:Ht,ariaDropEffect:kt,ariaErrorMessage:null,ariaExpanded:Ht,ariaFlowTo:kt,ariaGrabbed:Ht,ariaHasPopup:null,ariaHidden:Ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:kt,ariaLevel:Ie,ariaLive:null,ariaModal:Ht,ariaMultiLine:Ht,ariaMultiSelectable:Ht,ariaOrientation:null,ariaOwns:kt,ariaPlaceholder:null,ariaPosInSet:Ie,ariaPressed:Ht,ariaReadOnly:Ht,ariaRelevant:null,ariaRequired:Ht,ariaRoleDescription:kt,ariaRowCount:Ie,ariaRowIndex:Ie,ariaRowSpan:Ie,ariaSelected:Ht,ariaSetSize:Ie,ariaSort:null,ariaValueMax:Ie,ariaValueMin:Ie,ariaValueNow:Ie,ariaValueText:null,role:null}}),o6=Ei({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:vg,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ei,acceptCharset:kt,accessKey:kt,action:null,allow:null,allowFullScreen:Ke,allowPaymentRequest:Ke,allowUserMedia:Ke,alt:null,as:null,async:Ke,autoCapitalize:null,autoComplete:kt,autoFocus:Ke,autoPlay:Ke,blocking:kt,capture:null,charSet:null,checked:Ke,cite:null,className:kt,cols:Ie,colSpan:null,content:null,contentEditable:Ht,controls:Ke,controlsList:kt,coords:Ie|ei,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ke,defer:Ke,dir:null,dirName:null,disabled:Ke,download:yg,draggable:Ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ke,formTarget:null,headers:kt,height:Ie,hidden:Ke,high:Ie,href:null,hrefLang:null,htmlFor:kt,httpEquiv:kt,id:null,imageSizes:null,imageSrcSet:null,inert:Ke,inputMode:null,integrity:null,is:null,isMap:Ke,itemId:null,itemProp:kt,itemRef:kt,itemScope:Ke,itemType:kt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ke,low:Ie,manifest:null,max:null,maxLength:Ie,media:null,method:null,min:null,minLength:Ie,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:Ie,pattern:null,ping:kt,placeholder:null,playsInline:Ke,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ke,referrerPolicy:null,rel:kt,required:Ke,reversed:Ke,rows:Ie,rowSpan:Ie,sandbox:kt,scope:null,scoped:Ke,seamless:Ke,selected:Ke,shadowRootClonable:Ke,shadowRootDelegatesFocus:Ke,shadowRootMode:null,shape:null,size:Ie,sizes:null,slot:null,span:Ie,spellCheck:Ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ie,step:null,style:null,tabIndex:Ie,target:null,title:null,translate:null,type:null,typeMustMatch:Ke,useMap:null,value:Ht,width:Ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:kt,axis:null,background:null,bgColor:null,border:Ie,borderColor:null,bottomMargin:Ie,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:Ie,leftMargin:Ie,link:null,longDesc:null,lowSrc:null,marginHeight:Ie,marginWidth:Ie,noResize:Ke,noHref:Ke,noShade:Ke,noWrap:Ke,object:null,profile:null,prompt:null,rev:null,rightMargin:Ie,rules:null,scheme:null,scrolling:Ht,standby:null,summary:null,text:null,topMargin:Ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ke,disableRemotePlayback:Ke,prefix:null,property:null,results:Ie,security:null,unselectable:null}}),i6=Ei({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:Tg,properties:{about:En,accentHeight:Ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ie,amplitude:Ie,arabicForm:null,ascent:Ie,attributeName:null,attributeType:null,azimuth:Ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ie,by:null,calcMode:null,capHeight:Ie,className:kt,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:Ie,diffuseConstant:Ie,direction:null,display:null,dur:null,divisor:Ie,dominantBaseline:null,download:Ke,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ie,enableBackground:null,end:null,event:null,exponent:Ie,externalResourcesRequired:null,fill:null,fillOpacity:Ie,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:ei,g2:ei,glyphName:ei,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ie,horizOriginX:Ie,horizOriginY:Ie,id:null,ideographic:Ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ie,k:Ie,k1:Ie,k2:Ie,k3:Ie,k4:Ie,kernelMatrix:En,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ie,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:Ie,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:Ie,overlineThickness:Ie,paintOrder:null,panose1:null,path:null,pathLength:Ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:kt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ie,pointsAtY:Ie,pointsAtZ:Ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:En,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:En,rev:En,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:En,requiredFeatures:En,requiredFonts:En,requiredFormats:En,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:Ie,specularExponent:Ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ie,strikethroughThickness:Ie,string:null,stroke:null,strokeDashArray:En,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ie,strokeOpacity:Ie,strokeWidth:null,style:null,surfaceScale:Ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:En,tabIndex:Ie,tableValues:null,target:null,targetX:Ie,targetY:Ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:En,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ie,underlineThickness:Ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ie,values:null,vAlphabetic:Ie,vMathematical:Ie,vectorEffect:null,vHanging:Ie,vIdeographic:Ie,version:null,vertAdvY:Ie,vertOriginX:Ie,vertOriginY:Ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),a6=/^data[-\w.:]+$/i,Nf=/-[a-z]/g,s6=/[A-Z]/g;function l6(e,t){const n=pc(t);let r=t,o=Wn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&a6.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Nf,c6);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Nf.test(i)){let a=i.replace(s6,u6);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=cd}return new o(r,t)}function u6(e){return"-"+e.toLowerCase()}function c6(e){return e.charAt(1).toUpperCase()}const d6=xg([Cg,Eg,Sg,kg,o6],"html"),Dg=xg([Cg,Eg,Sg,kg,i6],"svg"),p6={},f6={}.hasOwnProperty,wg=wl("type",{handlers:{root:m6,element:E6,text:x6,comment:y6,doctype:b6}});function h6(e,t){const r=(t||p6).space;return wg(e,r==="svg"?Dg:d6)}function m6(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=dd(e.children,n,t),Ci(e,n),n}function g6(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=dd(e.children,n,t),Ci(e,n),n}function b6(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ci(e,t),t}function x6(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ci(e,t),t}function y6(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ci(e,t),t}function E6(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Dg);const o=[];let i;if(e.properties){for(i in e.properties)if(i!=="children"&&f6.call(e.properties,i)){const l=C6(r,i,e.properties[i]);l&&o.push(l)}}const a=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:po[a],childNodes:[],parentNode:null};return s.childNodes=dd(e.children,s,r),Ci(e,s),e.tagName==="template"&&e.content&&(s.content=g6(e.content,r)),s}function C6(e,t,n){const r=l6(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?yl(n):El(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const i=o.name.indexOf(":");i<0?o.prefix="":(o.name=o.name.slice(i+1),o.prefix=r.attribute.slice(0,i)),o.namespace=po[r.space]}return o}function dd(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const i=wg(e[r],n);i.parentNode=t,o.push(i)}return o}function Ci(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"],T6=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]),Ot="�";var $;(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"})($||($={}));const pn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ag(e){return e>=55296&&e<=57343}function v6(e){return e>=56320&&e<=57343}function S6(e,t){return(e-55296)*1024+9216+t}function Pg(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Rg(e){return e>=64976&&e<=65007||T6.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 k6=65536;class D6{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=k6,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:i}=this,a=o+n,s=i+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,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(v6(n))return this.pos++,this._addGap(),S6(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,$.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,$.EOF;const r=this.html.charCodeAt(n);return r===$.CARRIAGE_RETURN?$.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,$.EOF;let t=this.html.charCodeAt(this.pos);return t===$.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,$.LINE_FEED):t===$.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Ag(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===$.LINE_FEED||t===$.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Pg(t)?this._err(fe.controlCharacterInInputStream):Rg(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 nt;(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"})(nt||(nt={}));function Mg(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 w6=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୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢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;怳Ādpuct;戏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ǣጓ\0y;䐎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Ā;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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Ā;elƀ;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\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»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ↄⅪ←ٖ↛ǰ↉\0proø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;䅓Ācrir;榿;쀀𝔬ͯ\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\0m;櫳;櫽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))),I6=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 A6(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=I6.get(e))!==null&&t!==void 0?t:e}var Gt;(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"})(Gt||(Gt={}));const P6=32;var Wr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Wr||(Wr={}));function hc(e){return e>=Gt.ZERO&&e<=Gt.NINE}function R6(e){return e>=Gt.UPPER_A&&e<=Gt.UPPER_F||e>=Gt.LOWER_A&&e<=Gt.LOWER_F}function M6(e){return e>=Gt.UPPER_A&&e<=Gt.UPPER_Z||e>=Gt.LOWER_A&&e<=Gt.LOWER_Z||hc(e)}function O6(e){return e===Gt.EQUALS||M6(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 kr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(kr||(kr={}));class L6{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=kr.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)===Gt.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)|P6)===Gt.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 i=r-n;this.result=this.result*Math.pow(o,i)+Number.parseInt(t.substr(n,i),o),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(hc(o)||R6(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(hc(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===Gt.SEMI)this.consumed+=1;else if(this.decodeMode===kr.Strict)return 0;return this.emitCodePoint(A6(this.result),this.consumed),this.errors&&(t!==Gt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],i=(o&Wr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=N6(r,o,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===kr.Attribute&&(i===0||O6(a))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],i=(o&Wr.VALUE_LENGTH)>>14,i!==0){if(a===Gt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==kr.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]&Wr.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]&~Wr.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!==kr.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 N6(e,t,n,r){const o=(t&Wr.BRANCH_LENGTH)>>7,i=t&Wr.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){const l=r-i;return l<0||l>=o?-1:e[n+l]-1}let a=n,s=a+o-1;for(;a<=s;){const l=a+s>>>1,u=e[l];if(u<r)a=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 mo;(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"})(mo||(mo={}));var Fn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Fn||(Fn={}));var oe;(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"})(oe||(oe={}));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 F6=new Map([[oe.A,g.A],[oe.ADDRESS,g.ADDRESS],[oe.ANNOTATION_XML,g.ANNOTATION_XML],[oe.APPLET,g.APPLET],[oe.AREA,g.AREA],[oe.ARTICLE,g.ARTICLE],[oe.ASIDE,g.ASIDE],[oe.B,g.B],[oe.BASE,g.BASE],[oe.BASEFONT,g.BASEFONT],[oe.BGSOUND,g.BGSOUND],[oe.BIG,g.BIG],[oe.BLOCKQUOTE,g.BLOCKQUOTE],[oe.BODY,g.BODY],[oe.BR,g.BR],[oe.BUTTON,g.BUTTON],[oe.CAPTION,g.CAPTION],[oe.CENTER,g.CENTER],[oe.CODE,g.CODE],[oe.COL,g.COL],[oe.COLGROUP,g.COLGROUP],[oe.DD,g.DD],[oe.DESC,g.DESC],[oe.DETAILS,g.DETAILS],[oe.DIALOG,g.DIALOG],[oe.DIR,g.DIR],[oe.DIV,g.DIV],[oe.DL,g.DL],[oe.DT,g.DT],[oe.EM,g.EM],[oe.EMBED,g.EMBED],[oe.FIELDSET,g.FIELDSET],[oe.FIGCAPTION,g.FIGCAPTION],[oe.FIGURE,g.FIGURE],[oe.FONT,g.FONT],[oe.FOOTER,g.FOOTER],[oe.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[oe.FORM,g.FORM],[oe.FRAME,g.FRAME],[oe.FRAMESET,g.FRAMESET],[oe.H1,g.H1],[oe.H2,g.H2],[oe.H3,g.H3],[oe.H4,g.H4],[oe.H5,g.H5],[oe.H6,g.H6],[oe.HEAD,g.HEAD],[oe.HEADER,g.HEADER],[oe.HGROUP,g.HGROUP],[oe.HR,g.HR],[oe.HTML,g.HTML],[oe.I,g.I],[oe.IMG,g.IMG],[oe.IMAGE,g.IMAGE],[oe.INPUT,g.INPUT],[oe.IFRAME,g.IFRAME],[oe.KEYGEN,g.KEYGEN],[oe.LABEL,g.LABEL],[oe.LI,g.LI],[oe.LINK,g.LINK],[oe.LISTING,g.LISTING],[oe.MAIN,g.MAIN],[oe.MALIGNMARK,g.MALIGNMARK],[oe.MARQUEE,g.MARQUEE],[oe.MATH,g.MATH],[oe.MENU,g.MENU],[oe.META,g.META],[oe.MGLYPH,g.MGLYPH],[oe.MI,g.MI],[oe.MO,g.MO],[oe.MN,g.MN],[oe.MS,g.MS],[oe.MTEXT,g.MTEXT],[oe.NAV,g.NAV],[oe.NOBR,g.NOBR],[oe.NOFRAMES,g.NOFRAMES],[oe.NOEMBED,g.NOEMBED],[oe.NOSCRIPT,g.NOSCRIPT],[oe.OBJECT,g.OBJECT],[oe.OL,g.OL],[oe.OPTGROUP,g.OPTGROUP],[oe.OPTION,g.OPTION],[oe.P,g.P],[oe.PARAM,g.PARAM],[oe.PLAINTEXT,g.PLAINTEXT],[oe.PRE,g.PRE],[oe.RB,g.RB],[oe.RP,g.RP],[oe.RT,g.RT],[oe.RTC,g.RTC],[oe.RUBY,g.RUBY],[oe.S,g.S],[oe.SCRIPT,g.SCRIPT],[oe.SEARCH,g.SEARCH],[oe.SECTION,g.SECTION],[oe.SELECT,g.SELECT],[oe.SOURCE,g.SOURCE],[oe.SMALL,g.SMALL],[oe.SPAN,g.SPAN],[oe.STRIKE,g.STRIKE],[oe.STRONG,g.STRONG],[oe.STYLE,g.STYLE],[oe.SUB,g.SUB],[oe.SUMMARY,g.SUMMARY],[oe.SUP,g.SUP],[oe.TABLE,g.TABLE],[oe.TBODY,g.TBODY],[oe.TEMPLATE,g.TEMPLATE],[oe.TEXTAREA,g.TEXTAREA],[oe.TFOOT,g.TFOOT],[oe.TD,g.TD],[oe.TH,g.TH],[oe.THEAD,g.THEAD],[oe.TITLE,g.TITLE],[oe.TR,g.TR],[oe.TRACK,g.TRACK],[oe.TT,g.TT],[oe.U,g.U],[oe.UL,g.UL],[oe.SVG,g.SVG],[oe.VAR,g.VAR],[oe.WBR,g.WBR],[oe.XMP,g.XMP]]);function Ti(e){var t;return(t=F6.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const Se=g,_6={[Ee.HTML]:new Set([Se.ADDRESS,Se.APPLET,Se.AREA,Se.ARTICLE,Se.ASIDE,Se.BASE,Se.BASEFONT,Se.BGSOUND,Se.BLOCKQUOTE,Se.BODY,Se.BR,Se.BUTTON,Se.CAPTION,Se.CENTER,Se.COL,Se.COLGROUP,Se.DD,Se.DETAILS,Se.DIR,Se.DIV,Se.DL,Se.DT,Se.EMBED,Se.FIELDSET,Se.FIGCAPTION,Se.FIGURE,Se.FOOTER,Se.FORM,Se.FRAME,Se.FRAMESET,Se.H1,Se.H2,Se.H3,Se.H4,Se.H5,Se.H6,Se.HEAD,Se.HEADER,Se.HGROUP,Se.HR,Se.HTML,Se.IFRAME,Se.IMG,Se.INPUT,Se.LI,Se.LINK,Se.LISTING,Se.MAIN,Se.MARQUEE,Se.MENU,Se.META,Se.NAV,Se.NOEMBED,Se.NOFRAMES,Se.NOSCRIPT,Se.OBJECT,Se.OL,Se.P,Se.PARAM,Se.PLAINTEXT,Se.PRE,Se.SCRIPT,Se.SECTION,Se.SELECT,Se.SOURCE,Se.STYLE,Se.SUMMARY,Se.TABLE,Se.TBODY,Se.TD,Se.TEMPLATE,Se.TEXTAREA,Se.TFOOT,Se.TH,Se.THEAD,Se.TITLE,Se.TR,Se.TRACK,Se.UL,Se.WBR,Se.XMP]),[Ee.MATHML]:new Set([Se.MI,Se.MO,Se.MN,Se.MS,Se.MTEXT,Se.ANNOTATION_XML]),[Ee.SVG]:new Set([Se.TITLE,Se.FOREIGN_OBJECT,Se.DESC]),[Ee.XLINK]:new Set,[Ee.XML]:new Set,[Ee.XMLNS]:new Set},mc=new Set([Se.H1,Se.H2,Se.H3,Se.H4,Se.H5,Se.H6]);oe.STYLE,oe.SCRIPT,oe.XMP,oe.IFRAME,oe.NOEMBED,oe.NOFRAMES,oe.PLAINTEXT;var z;(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"})(z||(z={}));const Bt={DATA:z.DATA,RCDATA:z.RCDATA,RAWTEXT:z.RAWTEXT,SCRIPT_DATA:z.SCRIPT_DATA,PLAINTEXT:z.PLAINTEXT,CDATA_SECTION:z.CDATA_SECTION};function B6(e){return e>=$.DIGIT_0&&e<=$.DIGIT_9}function ta(e){return e>=$.LATIN_CAPITAL_A&&e<=$.LATIN_CAPITAL_Z}function j6(e){return e>=$.LATIN_SMALL_A&&e<=$.LATIN_SMALL_Z}function Hr(e){return j6(e)||ta(e)}function Ff(e){return Hr(e)||B6(e)}function as(e){return e+32}function Og(e){return e===$.SPACE||e===$.LINE_FEED||e===$.TABULATION||e===$.FORM_FEED}function _f(e){return Og(e)||e===$.SOLIDUS||e===$.GREATER_THAN_SIGN}function $6(e){return e===$.NULL?fe.nullCharacterReference:e>1114111?fe.characterReferenceOutsideUnicodeRange:Ag(e)?fe.surrogateCharacterReference:Rg(e)?fe.noncharacterCharacterReference:Pg(e)||e===$.CARRIAGE_RETURN?fe.controlCharacterReference:null}class H6{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=z.DATA,this.returnState=z.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new D6(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new L6(w6,(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=$6(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:nt.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:nt.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:nt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:nt.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(Mg(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=Ti(t.tagName),t.type===nt.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 nt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case nt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case nt.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:nt.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=Og(t)?nt.WHITESPACE_CHARACTER:t===$.NULL?nt.NULL_CHARACTER:nt.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(nt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=z.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?kr.Attribute:kr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===z.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===z.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===z.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case z.DATA:{this._stateData(t);break}case z.RCDATA:{this._stateRcdata(t);break}case z.RAWTEXT:{this._stateRawtext(t);break}case z.SCRIPT_DATA:{this._stateScriptData(t);break}case z.PLAINTEXT:{this._statePlaintext(t);break}case z.TAG_OPEN:{this._stateTagOpen(t);break}case z.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case z.TAG_NAME:{this._stateTagName(t);break}case z.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case z.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case z.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case z.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case z.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case z.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case z.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case z.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case z.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case z.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case z.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case z.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case z.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case z.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case z.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case z.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case z.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case z.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case z.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case z.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case z.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case z.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case z.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case z.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case z.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case z.BOGUS_COMMENT:{this._stateBogusComment(t);break}case z.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case z.COMMENT_START:{this._stateCommentStart(t);break}case z.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case z.COMMENT:{this._stateComment(t);break}case z.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case z.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case z.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case z.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case z.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case z.COMMENT_END:{this._stateCommentEnd(t);break}case z.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case z.DOCTYPE:{this._stateDoctype(t);break}case z.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case z.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case z.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case z.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case z.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case z.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case z.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case z.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case z.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case z.CDATA_SECTION:{this._stateCdataSection(t);break}case z.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case z.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case z.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case z.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case $.LESS_THAN_SIGN:{this.state=z.TAG_OPEN;break}case $.AMPERSAND:{this._startCharacterReference();break}case $.NULL:{this._err(fe.unexpectedNullCharacter),this._emitCodePoint(t);break}case $.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case $.AMPERSAND:{this._startCharacterReference();break}case $.LESS_THAN_SIGN:{this.state=z.RCDATA_LESS_THAN_SIGN;break}case $.NULL:{this._err(fe.unexpectedNullCharacter),this._emitChars(Ot);break}case $.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case $.LESS_THAN_SIGN:{this.state=z.RAWTEXT_LESS_THAN_SIGN;break}case $.NULL:{this._err(fe.unexpectedNullCharacter),this._emitChars(Ot);break}case $.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case $.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_LESS_THAN_SIGN;break}case $.NULL:{this._err(fe.unexpectedNullCharacter),this._emitChars(Ot);break}case $.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case $.NULL:{this._err(fe.unexpectedNullCharacter),this._emitChars(Ot);break}case $.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Hr(t))this._createStartTagToken(),this.state=z.TAG_NAME,this._stateTagName(t);else switch(t){case $.EXCLAMATION_MARK:{this.state=z.MARKUP_DECLARATION_OPEN;break}case $.SOLIDUS:{this.state=z.END_TAG_OPEN;break}case $.QUESTION_MARK:{this._err(fe.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=z.BOGUS_COMMENT,this._stateBogusComment(t);break}case $.EOF:{this._err(fe.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(fe.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=z.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Hr(t))this._createEndTagToken(),this.state=z.TAG_NAME,this._stateTagName(t);else switch(t){case $.GREATER_THAN_SIGN:{this._err(fe.missingEndTagName),this.state=z.DATA;break}case $.EOF:{this._err(fe.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(fe.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=z.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:{this.state=z.BEFORE_ATTRIBUTE_NAME;break}case $.SOLIDUS:{this.state=z.SELF_CLOSING_START_TAG;break}case $.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentTagToken();break}case $.NULL:{this._err(fe.unexpectedNullCharacter),n.tagName+=Ot;break}case $.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(ta(t)?as(t):t)}}_stateRcdataLessThanSign(t){t===$.SOLIDUS?this.state=z.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=z.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Hr(t)?(this.state=z.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=z.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 $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=z.BEFORE_ATTRIBUTE_NAME,!1;case $.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=z.SELF_CLOSING_START_TAG,!1;case $.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=z.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=z.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===$.SOLIDUS?this.state=z.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=z.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Hr(t)?(this.state=z.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=z.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=z.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case $.SOLIDUS:{this.state=z.SCRIPT_DATA_END_TAG_OPEN;break}case $.EXCLAMATION_MARK:{this.state=z.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=z.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Hr(t)?(this.state=z.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===$.HYPHEN_MINUS?(this.state=z.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===$.HYPHEN_MINUS?(this.state=z.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case $.HYPHEN_MINUS:{this.state=z.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case $.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case $.NULL:{this._err(fe.unexpectedNullCharacter),this._emitChars(Ot);break}case $.EOF:{this._err(fe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case $.HYPHEN_MINUS:{this.state=z.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case $.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case $.NULL:{this._err(fe.unexpectedNullCharacter),this.state=z.SCRIPT_DATA_ESCAPED,this._emitChars(Ot);break}case $.EOF:{this._err(fe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=z.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case $.HYPHEN_MINUS:{this._emitChars("-");break}case $.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case $.GREATER_THAN_SIGN:{this.state=z.SCRIPT_DATA,this._emitChars(">");break}case $.NULL:{this._err(fe.unexpectedNullCharacter),this.state=z.SCRIPT_DATA_ESCAPED,this._emitChars(Ot);break}case $.EOF:{this._err(fe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=z.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===$.SOLIDUS?this.state=z.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Hr(t)?(this._emitChars("<"),this.state=z.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Hr(t)?(this.state=z.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(pn.SCRIPT,!1)&&_f(this.preprocessor.peek(pn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<pn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case $.HYPHEN_MINUS:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case $.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case $.NULL:{this._err(fe.unexpectedNullCharacter),this._emitChars(Ot);break}case $.EOF:{this._err(fe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case $.HYPHEN_MINUS:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case $.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case $.NULL:{this._err(fe.unexpectedNullCharacter),this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ot);break}case $.EOF:{this._err(fe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case $.HYPHEN_MINUS:{this._emitChars("-");break}case $.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case $.GREATER_THAN_SIGN:{this.state=z.SCRIPT_DATA,this._emitChars(">");break}case $.NULL:{this._err(fe.unexpectedNullCharacter),this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ot);break}case $.EOF:{this._err(fe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===$.SOLIDUS?(this.state=z.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(pn.SCRIPT,!1)&&_f(this.preprocessor.peek(pn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<pn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=z.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:break;case $.SOLIDUS:case $.GREATER_THAN_SIGN:case $.EOF:{this.state=z.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case $.EQUALS_SIGN:{this._err(fe.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=z.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=z.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:case $.SOLIDUS:case $.GREATER_THAN_SIGN:case $.EOF:{this._leaveAttrName(),this.state=z.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case $.EQUALS_SIGN:{this._leaveAttrName(),this.state=z.BEFORE_ATTRIBUTE_VALUE;break}case $.QUOTATION_MARK:case $.APOSTROPHE:case $.LESS_THAN_SIGN:{this._err(fe.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case $.NULL:{this._err(fe.unexpectedNullCharacter),this.currentAttr.name+=Ot;break}default:this.currentAttr.name+=String.fromCodePoint(ta(t)?as(t):t)}}_stateAfterAttributeName(t){switch(t){case $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:break;case $.SOLIDUS:{this.state=z.SELF_CLOSING_START_TAG;break}case $.EQUALS_SIGN:{this.state=z.BEFORE_ATTRIBUTE_VALUE;break}case $.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentTagToken();break}case $.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=z.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:break;case $.QUOTATION_MARK:{this.state=z.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case $.APOSTROPHE:{this.state=z.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case $.GREATER_THAN_SIGN:{this._err(fe.missingAttributeValue),this.state=z.DATA,this.emitCurrentTagToken();break}default:this.state=z.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case $.QUOTATION_MARK:{this.state=z.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case $.AMPERSAND:{this._startCharacterReference();break}case $.NULL:{this._err(fe.unexpectedNullCharacter),this.currentAttr.value+=Ot;break}case $.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case $.APOSTROPHE:{this.state=z.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case $.AMPERSAND:{this._startCharacterReference();break}case $.NULL:{this._err(fe.unexpectedNullCharacter),this.currentAttr.value+=Ot;break}case $.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:{this._leaveAttrValue(),this.state=z.BEFORE_ATTRIBUTE_NAME;break}case $.AMPERSAND:{this._startCharacterReference();break}case $.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=z.DATA,this.emitCurrentTagToken();break}case $.NULL:{this._err(fe.unexpectedNullCharacter),this.currentAttr.value+=Ot;break}case $.QUOTATION_MARK:case $.APOSTROPHE:case $.LESS_THAN_SIGN:case $.EQUALS_SIGN:case $.GRAVE_ACCENT:{this._err(fe.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case $.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:{this._leaveAttrValue(),this.state=z.BEFORE_ATTRIBUTE_NAME;break}case $.SOLIDUS:{this._leaveAttrValue(),this.state=z.SELF_CLOSING_START_TAG;break}case $.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=z.DATA,this.emitCurrentTagToken();break}case $.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:this._err(fe.missingWhitespaceBetweenAttributes),this.state=z.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case $.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=z.DATA,this.emitCurrentTagToken();break}case $.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:this._err(fe.unexpectedSolidusInTag),this.state=z.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case $.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentComment(n);break}case $.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case $.NULL:{this._err(fe.unexpectedNullCharacter),n.data+=Ot;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(pn.DASH_DASH,!0)?(this._createCommentToken(pn.DASH_DASH.length+1),this.state=z.COMMENT_START):this._consumeSequenceIfMatch(pn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(pn.DOCTYPE.length+1),this.state=z.DOCTYPE):this._consumeSequenceIfMatch(pn.CDATA_START,!0)?this.inForeignNode?this.state=z.CDATA_SECTION:(this._err(fe.cdataInHtmlContent),this._createCommentToken(pn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=z.BOGUS_COMMENT):this._ensureHibernation()||(this._err(fe.incorrectlyOpenedComment),this._createCommentToken(2),this.state=z.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case $.HYPHEN_MINUS:{this.state=z.COMMENT_START_DASH;break}case $.GREATER_THAN_SIGN:{this._err(fe.abruptClosingOfEmptyComment),this.state=z.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=z.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case $.HYPHEN_MINUS:{this.state=z.COMMENT_END;break}case $.GREATER_THAN_SIGN:{this._err(fe.abruptClosingOfEmptyComment),this.state=z.DATA,this.emitCurrentComment(n);break}case $.EOF:{this._err(fe.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=z.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case $.HYPHEN_MINUS:{this.state=z.COMMENT_END_DASH;break}case $.LESS_THAN_SIGN:{n.data+="<",this.state=z.COMMENT_LESS_THAN_SIGN;break}case $.NULL:{this._err(fe.unexpectedNullCharacter),n.data+=Ot;break}case $.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 $.EXCLAMATION_MARK:{n.data+="!",this.state=z.COMMENT_LESS_THAN_SIGN_BANG;break}case $.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=z.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===$.HYPHEN_MINUS?this.state=z.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=z.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===$.HYPHEN_MINUS?this.state=z.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=z.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==$.GREATER_THAN_SIGN&&t!==$.EOF&&this._err(fe.nestedComment),this.state=z.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case $.HYPHEN_MINUS:{this.state=z.COMMENT_END;break}case $.EOF:{this._err(fe.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=z.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case $.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentComment(n);break}case $.EXCLAMATION_MARK:{this.state=z.COMMENT_END_BANG;break}case $.HYPHEN_MINUS:{n.data+="-";break}case $.EOF:{this._err(fe.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=z.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case $.HYPHEN_MINUS:{n.data+="--!",this.state=z.COMMENT_END_DASH;break}case $.GREATER_THAN_SIGN:{this._err(fe.incorrectlyClosedComment),this.state=z.DATA,this.emitCurrentComment(n);break}case $.EOF:{this._err(fe.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=z.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:{this.state=z.BEFORE_DOCTYPE_NAME;break}case $.GREATER_THAN_SIGN:{this.state=z.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case $.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=z.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(ta(t))this._createDoctypeToken(String.fromCharCode(as(t))),this.state=z.DOCTYPE_NAME;else switch(t){case $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:break;case $.NULL:{this._err(fe.unexpectedNullCharacter),this._createDoctypeToken(Ot),this.state=z.DOCTYPE_NAME;break}case $.GREATER_THAN_SIGN:{this._err(fe.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case $.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=z.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:{this.state=z.AFTER_DOCTYPE_NAME;break}case $.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentDoctype(n);break}case $.NULL:{this._err(fe.unexpectedNullCharacter),n.name+=Ot;break}case $.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(ta(t)?as(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:break;case $.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentDoctype(n);break}case $.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(pn.PUBLIC,!1)?this.state=z.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(pn.SYSTEM,!1)?this.state=z.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(fe.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:{this.state=z.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case $.QUOTATION_MARK:{this._err(fe.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case $.APOSTROPHE:{this._err(fe.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case $.GREATER_THAN_SIGN:{this._err(fe.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=z.DATA,this.emitCurrentDoctype(n);break}case $.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:break;case $.QUOTATION_MARK:{n.publicId="",this.state=z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case $.APOSTROPHE:{n.publicId="",this.state=z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case $.GREATER_THAN_SIGN:{this._err(fe.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=z.DATA,this.emitCurrentDoctype(n);break}case $.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case $.QUOTATION_MARK:{this.state=z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case $.NULL:{this._err(fe.unexpectedNullCharacter),n.publicId+=Ot;break}case $.GREATER_THAN_SIGN:{this._err(fe.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case $.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 $.APOSTROPHE:{this.state=z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case $.NULL:{this._err(fe.unexpectedNullCharacter),n.publicId+=Ot;break}case $.GREATER_THAN_SIGN:{this._err(fe.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case $.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 $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:{this.state=z.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case $.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentDoctype(n);break}case $.QUOTATION_MARK:{this._err(fe.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case $.APOSTROPHE:{this._err(fe.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case $.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:break;case $.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=z.DATA;break}case $.QUOTATION_MARK:{n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case $.APOSTROPHE:{n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case $.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:{this.state=z.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case $.QUOTATION_MARK:{this._err(fe.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case $.APOSTROPHE:{this._err(fe.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case $.GREATER_THAN_SIGN:{this._err(fe.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.DATA,this.emitCurrentDoctype(n);break}case $.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:break;case $.QUOTATION_MARK:{n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case $.APOSTROPHE:{n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case $.GREATER_THAN_SIGN:{this._err(fe.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.DATA,this.emitCurrentDoctype(n);break}case $.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case $.QUOTATION_MARK:{this.state=z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case $.NULL:{this._err(fe.unexpectedNullCharacter),n.systemId+=Ot;break}case $.GREATER_THAN_SIGN:{this._err(fe.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case $.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 $.APOSTROPHE:{this.state=z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case $.NULL:{this._err(fe.unexpectedNullCharacter),n.systemId+=Ot;break}case $.GREATER_THAN_SIGN:{this._err(fe.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case $.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 $.SPACE:case $.LINE_FEED:case $.TABULATION:case $.FORM_FEED:break;case $.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=z.DATA;break}case $.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case $.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=z.DATA;break}case $.NULL:{this._err(fe.unexpectedNullCharacter);break}case $.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case $.RIGHT_SQUARE_BRACKET:{this.state=z.CDATA_SECTION_BRACKET;break}case $.EOF:{this._err(fe.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===$.RIGHT_SQUARE_BRACKET?this.state=z.CDATA_SECTION_END:(this._emitChars("]"),this.state=z.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case $.GREATER_THAN_SIGN:{this.state=z.DATA;break}case $.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=z.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($.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ff(this.preprocessor.peek(1))?z.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ff(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===$.SEMICOLON&&this._err(fe.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Lg=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Bf=new Set([...Lg,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Ys=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),U6=new Set([...Ys,g.OL,g.UL]),z6=new Set([...Ys,g.BUTTON]),jf=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),$f=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),V6=new Set([g.TR,g.TEMPLATE,g.HTML]),W6=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),q6=new Set([g.TABLE,g.TEMPLATE,g.HTML]),Y6=new Set([g.TD,g.TH]);class K6{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(mc,Ee.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Y6,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(q6,Ee.HTML)}clearBackToTableBodyContext(){this.clearBackTo(W6,Ee.HTML)}clearBackToTableRowContext(){this.clearBackTo(V6,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($f.has(o))return!1;break}case Ee.MATHML:{if(jf.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ys)}hasInListItemScope(t){return this.hasInDynamicScope(t,U6)}hasInButtonScope(t){return this.hasInDynamicScope(t,z6)}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(mc.has(n))return!0;if(Ys.has(n))return!1;break}case Ee.SVG:{if($f.has(n))return!1;break}case Ee.MATHML:{if(jf.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&&Lg.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Bf.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Bf.has(this.currentTagId);)this.pop()}}const Su=3;var ar;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(ar||(ar={}));const Hf={type:ar.Marker};class G6{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,i=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let s=0;s<this.entries.length;s++){const l=this.entries[s];if(l.type===ar.Marker)break;const{element:u}=l;if(this.treeAdapter.getTagName(u)===i&&this.treeAdapter.getNamespaceURI(u)===a){const d=this.treeAdapter.getAttrList(u);d.length===o&&r.push({idx:s,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Su)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Su)return;const o=new Map(n.map(a=>[a.name,a.value]));let i=0;for(let a=0;a<r.length;a++){const s=r[a];s.attrs.every(l=>o.get(l.name)===l.value)&&(i+=1,i>=Su&&this.entries.splice(s.idx,1))}}insertMarker(){this.entries.unshift(Hf)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:ar.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:ar.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(Hf);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===ar.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===ar.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===ar.Element&&n.element===t)}}const Ur={createDocument(){return{nodeName:"#document",mode:Fn.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(i=>i.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const i={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ur.appendChild(e,i)}},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(Ur.isTextNode(n)){n.value+=t;return}}Ur.appendChild(e,Ur.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ur.isTextNode(r)?r.value+=t:Ur.insertBefore(e,Ur.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}}},Ng="html",Q6="about:legacy-compat",X6="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Fg=["+//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//"],Z6=[...Fg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],J6=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),_g=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],eD=[..._g,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Uf(e,t){return t.some(n=>e.startsWith(n))}function tD(e){return e.name===Ng&&e.publicId===null&&(e.systemId===null||e.systemId===Q6)}function nD(e){if(e.name!==Ng)return Fn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===X6)return Fn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),J6.has(n))return Fn.QUIRKS;let r=t===null?Z6:Fg;if(Uf(n,r))return Fn.QUIRKS;if(r=t===null?_g:eD,Uf(n,r))return Fn.LIMITED_QUIRKS}return Fn.NO_QUIRKS}const zf={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},rD="definitionurl",oD="definitionURL",iD=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])),aD=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}]]),sD=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])),lD=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 uD(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===mo.COLOR||r===mo.SIZE||r===mo.FACE)||lD.has(t)}function Bg(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===rD){e.attrs[t].name=oD;break}}function jg(e){for(let t=0;t<e.attrs.length;t++){const n=iD.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function pd(e){for(let t=0;t<e.attrs.length;t++){const n=aD.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 cD(e){const t=sD.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ti(e.tagName))}function dD(e,t){return t===Ee.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function pD(e,t,n){if(t===Ee.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===mo.ENCODING){const o=n[r].value.toLowerCase();return o===zf.TEXT_HTML||o===zf.APPLICATION_XML}}return t===Ee.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function fD(e,t,n,r){return(!r||r===Ee.HTML)&&pD(e,t,n)||(!r||r===Ee.MATHML)&&dD(e,t)}const hD="hidden",mD=8,gD=3;var G;(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"})(G||(G={}));const bD={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},$g=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Vf={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ur,onParseError:null};class Wf{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=G.INITIAL,this.originalInsertionMode=G.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={...Vf,...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 H6(this.options,this),this.activeFormattingElements=new G6(this.treeAdapter),this.fragmentContextID=r?Ti(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new K6(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={...Vf,...n};t??(t=r.treeAdapter.createElement(oe.TEMPLATE,Ee.HTML,[]));const o=r.treeAdapter.createElement("documentmock",Ee.HTML,[]),i=new this(r,o,t);return i.fragmentContextID===g.TEMPLATE&&i.tmplInsertionModeStack.unshift(G.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}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 i=(o=t.location)!==null&&o!==void 0?o:bD,a={code:n,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:r?i.startLine:i.endLine,endCol:r?i.startCol:i.endCol,endOffset:r?i.startOffset:i.endOffset};this.onParseError(a)}onItemPush(t,n,r){var o,i;(i=(o=this.treeAdapter).onItemPush)===null||i===void 0||i.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 i,a;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,a=this.fragmentContextID):{current:i,currentTagId:a}=this.openElements,this._setContextModes(i,a)}}_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=G.TEXT}switchToPlaintextParsing(){this.insertionMode=G.TEXT,this.originalInsertionMode=G.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)===oe.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 a=this.treeAdapter.getChildNodes(this.document).find(s=>this.treeAdapter.isDocumentTypeNode(s));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??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(oe.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),i=r?o.lastIndexOf(r):o.length,a=o[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:l,endCol:u,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:l,endCol:u,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,o=this.treeAdapter.getTagName(t),i=n.type===nt.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,i)}}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)===oe.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 nt.CHARACTER:{this.onCharacter(t);break}case nt.NULL_CHARACTER:{this.onNullCharacter(t);break}case nt.COMMENT:{this.onComment(t);break}case nt.DOCTYPE:{this.onDoctype(t);break}case nt.START_TAG:{this._processStartTag(t);break}case nt.END_TAG:{this.onEndTag(t);break}case nt.EOF:{this.onEof(t);break}case nt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return fD(t,o,i,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===ar.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const i=this.activeFormattingElements.entries[o];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=G.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=G.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=G.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=G.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=G.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=G.IN_TABLE;return}case g.BODY:{this.insertionMode=G.IN_BODY;return}case g.FRAMESET:{this.insertionMode=G.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?G.AFTER_HEAD:G.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=G.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=G.IN_HEAD;return}break}}this.insertionMode=G.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=G.IN_SELECT_IN_TABLE;return}}this.insertionMode=G.IN_SELECT}_isElementCausesFosterParenting(t){return $g.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 _6[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Yw(this,t);return}switch(this.insertionMode){case G.INITIAL:{ji(this,t);break}case G.BEFORE_HTML:{la(this,t);break}case G.BEFORE_HEAD:{ua(this,t);break}case G.IN_HEAD:{ca(this,t);break}case G.IN_HEAD_NO_SCRIPT:{da(this,t);break}case G.AFTER_HEAD:{pa(this,t);break}case G.IN_BODY:case G.IN_CAPTION:case G.IN_CELL:case G.IN_TEMPLATE:{Ug(this,t);break}case G.TEXT:case G.IN_SELECT:case G.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case G.IN_TABLE:case G.IN_TABLE_BODY:case G.IN_ROW:{ku(this,t);break}case G.IN_TABLE_TEXT:{Kg(this,t);break}case G.IN_COLUMN_GROUP:{Ks(this,t);break}case G.AFTER_BODY:{Gs(this,t);break}case G.AFTER_AFTER_BODY:{Cs(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){qw(this,t);return}switch(this.insertionMode){case G.INITIAL:{ji(this,t);break}case G.BEFORE_HTML:{la(this,t);break}case G.BEFORE_HEAD:{ua(this,t);break}case G.IN_HEAD:{ca(this,t);break}case G.IN_HEAD_NO_SCRIPT:{da(this,t);break}case G.AFTER_HEAD:{pa(this,t);break}case G.TEXT:{this._insertCharacters(t);break}case G.IN_TABLE:case G.IN_TABLE_BODY:case G.IN_ROW:{ku(this,t);break}case G.IN_COLUMN_GROUP:{Ks(this,t);break}case G.AFTER_BODY:{Gs(this,t);break}case G.AFTER_AFTER_BODY:{Cs(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){gc(this,t);return}switch(this.insertionMode){case G.INITIAL:case G.BEFORE_HTML:case G.BEFORE_HEAD:case G.IN_HEAD:case G.IN_HEAD_NO_SCRIPT:case G.AFTER_HEAD:case G.IN_BODY:case G.IN_TABLE:case G.IN_CAPTION:case G.IN_COLUMN_GROUP:case G.IN_TABLE_BODY:case G.IN_ROW:case G.IN_CELL:case G.IN_SELECT:case G.IN_SELECT_IN_TABLE:case G.IN_TEMPLATE:case G.IN_FRAMESET:case G.AFTER_FRAMESET:{gc(this,t);break}case G.IN_TABLE_TEXT:{$i(this,t);break}case G.AFTER_BODY:{SD(this,t);break}case G.AFTER_AFTER_BODY:case G.AFTER_AFTER_FRAMESET:{kD(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case G.INITIAL:{DD(this,t);break}case G.BEFORE_HEAD:case G.IN_HEAD:case G.IN_HEAD_NO_SCRIPT:case G.AFTER_HEAD:{this._err(t,fe.misplacedDoctype);break}case G.IN_TABLE_TEXT:{$i(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)?Kw(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case G.INITIAL:{ji(this,t);break}case G.BEFORE_HTML:{wD(this,t);break}case G.BEFORE_HEAD:{AD(this,t);break}case G.IN_HEAD:{er(this,t);break}case G.IN_HEAD_NO_SCRIPT:{MD(this,t);break}case G.AFTER_HEAD:{LD(this,t);break}case G.IN_BODY:{an(this,t);break}case G.IN_TABLE:{si(this,t);break}case G.IN_TABLE_TEXT:{$i(this,t);break}case G.IN_CAPTION:{Pw(this,t);break}case G.IN_COLUMN_GROUP:{md(this,t);break}case G.IN_TABLE_BODY:{Pl(this,t);break}case G.IN_ROW:{Rl(this,t);break}case G.IN_CELL:{Ow(this,t);break}case G.IN_SELECT:{Xg(this,t);break}case G.IN_SELECT_IN_TABLE:{Nw(this,t);break}case G.IN_TEMPLATE:{_w(this,t);break}case G.AFTER_BODY:{jw(this,t);break}case G.IN_FRAMESET:{$w(this,t);break}case G.AFTER_FRAMESET:{Uw(this,t);break}case G.AFTER_AFTER_BODY:{Vw(this,t);break}case G.AFTER_AFTER_FRAMESET:{Ww(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Gw(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case G.INITIAL:{ji(this,t);break}case G.BEFORE_HTML:{ID(this,t);break}case G.BEFORE_HEAD:{PD(this,t);break}case G.IN_HEAD:{RD(this,t);break}case G.IN_HEAD_NO_SCRIPT:{OD(this,t);break}case G.AFTER_HEAD:{ND(this,t);break}case G.IN_BODY:{Al(this,t);break}case G.TEXT:{Ew(this,t);break}case G.IN_TABLE:{ka(this,t);break}case G.IN_TABLE_TEXT:{$i(this,t);break}case G.IN_CAPTION:{Rw(this,t);break}case G.IN_COLUMN_GROUP:{Mw(this,t);break}case G.IN_TABLE_BODY:{bc(this,t);break}case G.IN_ROW:{Qg(this,t);break}case G.IN_CELL:{Lw(this,t);break}case G.IN_SELECT:{Zg(this,t);break}case G.IN_SELECT_IN_TABLE:{Fw(this,t);break}case G.IN_TEMPLATE:{Bw(this,t);break}case G.AFTER_BODY:{e1(this,t);break}case G.IN_FRAMESET:{Hw(this,t);break}case G.AFTER_FRAMESET:{zw(this,t);break}case G.AFTER_AFTER_BODY:{Cs(this,t);break}}}onEof(t){switch(this.insertionMode){case G.INITIAL:{ji(this,t);break}case G.BEFORE_HTML:{la(this,t);break}case G.BEFORE_HEAD:{ua(this,t);break}case G.IN_HEAD:{ca(this,t);break}case G.IN_HEAD_NO_SCRIPT:{da(this,t);break}case G.AFTER_HEAD:{pa(this,t);break}case G.IN_BODY:case G.IN_TABLE:case G.IN_CAPTION:case G.IN_COLUMN_GROUP:case G.IN_TABLE_BODY:case G.IN_ROW:case G.IN_CELL:case G.IN_SELECT:case G.IN_SELECT_IN_TABLE:{qg(this,t);break}case G.TEXT:{Cw(this,t);break}case G.IN_TABLE_TEXT:{$i(this,t);break}case G.IN_TEMPLATE:{Jg(this,t);break}case G.AFTER_BODY:case G.IN_FRAMESET:case G.AFTER_FRAMESET:case G.AFTER_AFTER_BODY:case G.AFTER_AFTER_FRAMESET:{hd(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===$.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 G.IN_HEAD:case G.IN_HEAD_NO_SCRIPT:case G.AFTER_HEAD:case G.TEXT:case G.IN_COLUMN_GROUP:case G.IN_SELECT:case G.IN_SELECT_IN_TABLE:case G.IN_FRAMESET:case G.AFTER_FRAMESET:{this._insertCharacters(t);break}case G.IN_BODY:case G.IN_CAPTION:case G.IN_CELL:case G.IN_TEMPLATE:case G.AFTER_BODY:case G.AFTER_AFTER_BODY:case G.AFTER_AFTER_FRAMESET:{Hg(this,t);break}case G.IN_TABLE:case G.IN_TABLE_BODY:case G.IN_ROW:{ku(this,t);break}case G.IN_TABLE_TEXT:{Yg(this,t);break}}}}function xD(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):Wg(e,t),n}function yD(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 ED(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let i=0,a=o;a!==n;i++,a=o){o=e.openElements.getCommonAncestor(a);const s=e.activeFormattingElements.getElementEntry(a),l=s&&i>=gD;!s||l?(l&&e.activeFormattingElements.removeEntry(s),e.openElements.remove(a)):(a=CD(e,s),r===t&&(e.activeFormattingElements.bookmark=s),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function CD(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 TD(e,t,n){const r=e.treeAdapter.getTagName(t),o=Ti(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);o===g.TEMPLATE&&i===Ee.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function vD(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,i=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i,o.tagID)}function fd(e,t){for(let n=0;n<mD;n++){const r=xD(e,t);if(!r)break;const o=yD(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const i=ED(e,o,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(i),a&&TD(e,a,i),vD(e,o,r)}}function gc(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function SD(e,t){e._appendCommentNode(t,e.openElements.items[0])}function kD(e,t){e._appendCommentNode(t,e.document)}function hd(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 i=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(i);a&&!a.endTag&&e._setEndLocation(i,t)}}}}function DD(e,t){e._setDocumentType(t);const n=t.forceQuirks?Fn.QUIRKS:nD(t);tD(t)||e._err(t,fe.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=G.BEFORE_HTML}function ji(e,t){e._err(t,fe.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Fn.QUIRKS),e.insertionMode=G.BEFORE_HTML,e._processToken(t)}function wD(e,t){t.tagID===g.HTML?(e._insertElement(t,Ee.HTML),e.insertionMode=G.BEFORE_HEAD):la(e,t)}function ID(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&la(e,t)}function la(e,t){e._insertFakeRootElement(),e.insertionMode=G.BEFORE_HEAD,e._processToken(t)}function AD(e,t){switch(t.tagID){case g.HTML:{an(e,t);break}case g.HEAD:{e._insertElement(t,Ee.HTML),e.headElement=e.openElements.current,e.insertionMode=G.IN_HEAD;break}default:ua(e,t)}}function PD(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?ua(e,t):e._err(t,fe.endTagWithoutMatchingOpenElement)}function ua(e,t){e._insertFakeElement(oe.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=G.IN_HEAD,e._processToken(t)}function er(e,t){switch(t.tagID){case g.HTML:{an(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=G.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=G.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(G.IN_TEMPLATE);break}case g.HEAD:{e._err(t,fe.misplacedStartTagForHeadElement);break}default:ca(e,t)}}function RD(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=G.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{ca(e,t);break}case g.TEMPLATE:{Po(e,t);break}default:e._err(t,fe.endTagWithoutMatchingOpenElement)}}function Po(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 ca(e,t){e.openElements.pop(),e.insertionMode=G.AFTER_HEAD,e._processToken(t)}function MD(e,t){switch(t.tagID){case g.HTML:{an(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{er(e,t);break}case g.NOSCRIPT:{e._err(t,fe.nestedNoscriptInHead);break}default:da(e,t)}}function OD(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=G.IN_HEAD;break}case g.BR:{da(e,t);break}default:e._err(t,fe.endTagWithoutMatchingOpenElement)}}function da(e,t){const n=t.type===nt.EOF?fe.openElementsLeftAfterEof:fe.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=G.IN_HEAD,e._processToken(t)}function LD(e,t){switch(t.tagID){case g.HTML:{an(e,t);break}case g.BODY:{e._insertElement(t,Ee.HTML),e.framesetOk=!1,e.insertionMode=G.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,Ee.HTML),e.insertionMode=G.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),er(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,fe.misplacedStartTagForHeadElement);break}default:pa(e,t)}}function ND(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{pa(e,t);break}case g.TEMPLATE:{Po(e,t);break}default:e._err(t,fe.endTagWithoutMatchingOpenElement)}}function pa(e,t){e._insertFakeElement(oe.BODY,g.BODY),e.insertionMode=G.IN_BODY,Il(e,t)}function Il(e,t){switch(t.type){case nt.CHARACTER:{Ug(e,t);break}case nt.WHITESPACE_CHARACTER:{Hg(e,t);break}case nt.COMMENT:{gc(e,t);break}case nt.START_TAG:{an(e,t);break}case nt.END_TAG:{Al(e,t);break}case nt.EOF:{qg(e,t);break}}}function Hg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Ug(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function FD(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function _D(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function BD(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Ee.HTML),e.insertionMode=G.IN_FRAMESET)}function jD(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML)}function $D(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&mc.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Ee.HTML)}function HD(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function UD(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 zD(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 VD(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),e.tokenizer.state=Bt.PLAINTEXT}function WD(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 qD(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(oe.A);n&&(fd(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 YD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function KD(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(fd(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function GD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function QD(e,t){e.treeAdapter.getDocumentMode(e.document)!==Fn.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),e.framesetOk=!1,e.insertionMode=G.IN_TABLE}function zg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Ee.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Vg(e){const t=Mg(e,mo.TYPE);return t!=null&&t.toLowerCase()===hD}function XD(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Ee.HTML),Vg(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function ZD(e,t){e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0}function JD(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,Ee.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ew(e,t){t.tagName=oe.IMG,t.tagID=g.IMG,zg(e,t)}function tw(e,t){e._insertElement(t,Ee.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Bt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=G.TEXT}function nw(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Bt.RAWTEXT)}function rw(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Bt.RAWTEXT)}function qf(e,t){e._switchToTextParsing(t,Bt.RAWTEXT)}function ow(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===G.IN_TABLE||e.insertionMode===G.IN_CAPTION||e.insertionMode===G.IN_TABLE_BODY||e.insertionMode===G.IN_ROW||e.insertionMode===G.IN_CELL?G.IN_SELECT_IN_TABLE:G.IN_SELECT}function iw(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML)}function aw(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Ee.HTML)}function sw(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,Ee.HTML)}function lw(e,t){e._reconstructActiveFormattingElements(),Bg(t),pd(t),t.selfClosing?e._appendElement(t,Ee.MATHML):e._insertElement(t,Ee.MATHML),t.ackSelfClosing=!0}function uw(e,t){e._reconstructActiveFormattingElements(),jg(t),pd(t),t.selfClosing?e._appendElement(t,Ee.SVG):e._insertElement(t,Ee.SVG),t.ackSelfClosing=!0}function Yf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML)}function an(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:{YD(e,t);break}case g.A:{qD(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{$D(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:{jD(e,t);break}case g.LI:case g.DD:case g.DT:{zD(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{zg(e,t);break}case g.HR:{JD(e,t);break}case g.RB:case g.RTC:{aw(e,t);break}case g.RT:case g.RP:{sw(e,t);break}case g.PRE:case g.LISTING:{HD(e,t);break}case g.XMP:{nw(e,t);break}case g.SVG:{uw(e,t);break}case g.HTML:{FD(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:{er(e,t);break}case g.BODY:{_D(e,t);break}case g.FORM:{UD(e,t);break}case g.NOBR:{KD(e,t);break}case g.MATH:{lw(e,t);break}case g.TABLE:{QD(e,t);break}case g.INPUT:{XD(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{ZD(e,t);break}case g.IMAGE:{ew(e,t);break}case g.BUTTON:{WD(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{GD(e,t);break}case g.IFRAME:{rw(e,t);break}case g.SELECT:{ow(e,t);break}case g.OPTION:case g.OPTGROUP:{iw(e,t);break}case g.NOEMBED:case g.NOFRAMES:{qf(e,t);break}case g.FRAMESET:{BD(e,t);break}case g.TEXTAREA:{tw(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?qf(e,t):Yf(e,t);break}case g.PLAINTEXT:{VD(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:Yf(e,t)}}function cw(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=G.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function dw(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=G.AFTER_BODY,e1(e,t))}function pw(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function fw(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 hw(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(oe.P,g.P),e._closePElement()}function mw(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function gw(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function bw(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function xw(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function yw(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(oe.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function Wg(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const i=e.openElements.items[o],a=e.openElements.tagIDs[o];if(r===a&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(i,a))break}}function Al(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:{fd(e,t);break}case g.P:{hw(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:{pw(e,t);break}case g.LI:{mw(e);break}case g.DD:case g.DT:{gw(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{bw(e);break}case g.BR:{yw(e);break}case g.BODY:{cw(e,t);break}case g.HTML:{dw(e,t);break}case g.FORM:{fw(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{xw(e,t);break}case g.TEMPLATE:{Po(e,t);break}default:Wg(e,t)}}function qg(e,t){e.tmplInsertionModeStack.length>0?Jg(e,t):hd(e,t)}function Ew(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 Cw(e,t){e._err(t,fe.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function ku(e,t){if(e.openElements.currentTagId!==void 0&&$g.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=G.IN_TABLE_TEXT,t.type){case nt.CHARACTER:{Kg(e,t);break}case nt.WHITESPACE_CHARACTER:{Yg(e,t);break}}else za(e,t)}function Tw(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Ee.HTML),e.insertionMode=G.IN_CAPTION}function vw(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Ee.HTML),e.insertionMode=G.IN_COLUMN_GROUP}function Sw(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(oe.COLGROUP,g.COLGROUP),e.insertionMode=G.IN_COLUMN_GROUP,md(e,t)}function kw(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Ee.HTML),e.insertionMode=G.IN_TABLE_BODY}function Dw(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(oe.TBODY,g.TBODY),e.insertionMode=G.IN_TABLE_BODY,Pl(e,t)}function ww(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Iw(e,t){Vg(t)?e._appendElement(t,Ee.HTML):za(e,t),t.ackSelfClosing=!0}function Aw(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,Ee.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function si(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{Dw(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{er(e,t);break}case g.COL:{Sw(e,t);break}case g.FORM:{Aw(e,t);break}case g.TABLE:{ww(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{kw(e,t);break}case g.INPUT:{Iw(e,t);break}case g.CAPTION:{Tw(e,t);break}case g.COLGROUP:{vw(e,t);break}default:za(e,t)}}function ka(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{Po(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:za(e,t)}}function za(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Il(e,t),e.fosterParentingEnabled=n}function Yg(e,t){e.pendingCharacterTokens.push(t)}function Kg(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function $i(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)za(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Gg=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function Pw(e,t){const n=t.tagID;Gg.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=G.IN_TABLE,si(e,t)):an(e,t)}function Rw(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=G.IN_TABLE,n===g.TABLE&&ka(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:Al(e,t)}}function md(e,t){switch(t.tagID){case g.HTML:{an(e,t);break}case g.COL:{e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{er(e,t);break}default:Ks(e,t)}}function Mw(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=G.IN_TABLE);break}case g.TEMPLATE:{Po(e,t);break}case g.COL:break;default:Ks(e,t)}}function Ks(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=G.IN_TABLE,e._processToken(t))}function Pl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,Ee.HTML),e.insertionMode=G.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(oe.TR,g.TR),e.insertionMode=G.IN_ROW,Rl(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=G.IN_TABLE,si(e,t));break}default:si(e,t)}}function bc(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=G.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE,ka(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:ka(e,t)}}function Rl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,Ee.HTML),e.insertionMode=G.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=G.IN_TABLE_BODY,Pl(e,t));break}default:si(e,t)}}function Qg(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE_BODY,bc(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=G.IN_TABLE_BODY,bc(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:ka(e,t)}}function Ow(e,t){const n=t.tagID;Gg.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),Rl(e,t)):an(e,t)}function Lw(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=G.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Qg(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Al(e,t)}}function Xg(e,t){switch(t.tagID){case g.HTML:{an(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:{er(e,t);break}}}function Zg(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:{Po(e,t);break}}}function Nw(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)):Xg(e,t)}function Fw(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)):Zg(e,t)}function _w(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:{er(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=G.IN_TABLE,e.insertionMode=G.IN_TABLE,si(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=G.IN_COLUMN_GROUP,e.insertionMode=G.IN_COLUMN_GROUP,md(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=G.IN_TABLE_BODY,e.insertionMode=G.IN_TABLE_BODY,Pl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=G.IN_ROW,e.insertionMode=G.IN_ROW,Rl(e,t);break}default:e.tmplInsertionModeStack[0]=G.IN_BODY,e.insertionMode=G.IN_BODY,an(e,t)}}function Bw(e,t){t.tagID===g.TEMPLATE&&Po(e,t)}function Jg(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):hd(e,t)}function jw(e,t){t.tagID===g.HTML?an(e,t):Gs(e,t)}function e1(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=G.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 Gs(e,t)}function Gs(e,t){e.insertionMode=G.IN_BODY,Il(e,t)}function $w(e,t){switch(t.tagID){case g.HTML:{an(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:{er(e,t);break}}}function Hw(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=G.AFTER_FRAMESET))}function Uw(e,t){switch(t.tagID){case g.HTML:{an(e,t);break}case g.NOFRAMES:{er(e,t);break}}}function zw(e,t){t.tagID===g.HTML&&(e.insertionMode=G.AFTER_AFTER_FRAMESET)}function Vw(e,t){t.tagID===g.HTML?an(e,t):Cs(e,t)}function Cs(e,t){e.insertionMode=G.IN_BODY,Il(e,t)}function Ww(e,t){switch(t.tagID){case g.HTML:{an(e,t);break}case g.NOFRAMES:{er(e,t);break}}}function qw(e,t){t.chars=Ot,e._insertCharacters(t)}function Yw(e,t){e._insertCharacters(t),e.framesetOk=!1}function t1(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 Kw(e,t){if(uD(t))t1(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===Ee.MATHML?Bg(t):r===Ee.SVG&&(cD(t),jg(t)),pd(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Gw(e,t){if(t.tagID===g.P||t.tagID===g.BR){t1(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}}}oe.AREA,oe.BASE,oe.BASEFONT,oe.BGSOUND,oe.BR,oe.COL,oe.EMBED,oe.FRAME,oe.HR,oe.IMG,oe.INPUT,oe.KEYGEN,oe.LINK,oe.META,oe.PARAM,oe.SOURCE,oe.TRACK,oe.WBR;const Qw=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Xw=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Kf={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function n1(e,t){const n=sI(e),r=wl("type",{handlers:{root:Zw,element:Jw,text:eI,comment:o1,doctype:tI,raw:rI},unknown:oI}),o={parser:n?new Wf(Kf):Wf.getFragmentParser(void 0,Kf),handle(s){r(s,o)},stitches:!1,options:t||{}};r(e,o),vi(o,fr());const i=n?o.parser.document:o.parser.getFragment(),a=Jk(i,{file:o.options.file});return o.stitches&&bn(a,"comment",function(s,l,u){const d=s;if(d.value.stitch&&u&&l!==void 0){const p=u.children;return p[l]=d.value.stitch,l}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function r1(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Zw(e,t){r1(e.children,t)}function Jw(e,t){iI(e,t),r1(e.children,t),aI(e,t)}function eI(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:nt.CHARACTER,chars:e.value,location:Va(e)};vi(t,fr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function tI(e,t){const n={type:nt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Va(e)};vi(t,fr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function nI(e,t){t.stitches=!0;const n=lI(e);if("children"in e&&"children"in n){const r=n1({type:"root",children:e.children},t.options);n.children=r.children}o1({type:"comment",value:{stitch:n}},t)}function o1(e,t){const n=e.value,r={type:nt.COMMENT,data:n,location:Va(e)};vi(t,fr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function rI(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,i1(t,fr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Qw,"<$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 oI(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))nI(n,t);else{let r="";throw Xw.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 vi(e,t){i1(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 i1(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 iI(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Bt.PLAINTEXT)return;vi(t,fr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:po.html;o===po.html&&n==="svg"&&(o=po.svg);const i=h6({...e,children:[]},{space:o===po.svg?"svg":"html"}),a={type:nt.START_TAG,tagName:n,tagID:Ti(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:Va(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function aI(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Ig.includes(n)||t.parser.tokenizer.state===Bt.PLAINTEXT)return;vi(t,Cl(e));const r={type:nt.END_TAG,tagName:n,tagID:Ti(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Va(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 sI(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Va(e){const t=fr(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 lI(e){return"children"in e?Co({...e,children:[]}):Co(e)}function uI(e){return function(t,n){return n1(t,{...e,file:n})}}const cI=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/i,dI=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)(\/.*)?\]/i,pI=({legacyTitle:e=!1,tagName:t="div"}={})=>n=>{bn(n,"blockquote",(r,o,i)=>{let a="",s="",l=!0,u=r.children.map(d=>{if(l&&d.type==="paragraph"){const p=d.children[0],h=p.type==="text"?p.value:"",f=e?dI:cI,m=h.match(f);if(m&&(l=!1,a=m[1].toLocaleLowerCase(),s=e&&m[2]||a.toLocaleUpperCase(),h.includes(`
|
|
51
|
-
`)&&(d.children[0]={type:"text",value:h.replace(f,"").replace(/^\n+/,"")}),!h.includes(`
|
|
52
|
-
`))){const b=[];d.children.forEach((x,y)=>{y!=0&&(y==1&&x.type==="break"||b.push(x))}),d.children=[...b]}}return d});a&&(r.data={hName:t,hProperties:{class:`markdown-alert markdown-alert-${a}`,dir:"auto"}},u.unshift({type:"paragraph",children:[fI(a),{type:"text",value:s.replace(/^\//,"")}],data:{hProperties:{class:"markdown-alert-title",dir:"auto"}}})),r.children=[...u]})};function fI(e){let t=hI[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 hI={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 mI(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 a1(e){if(!e)return null;var t=e;return t.dataset.code&&t.classList.contains("copied")?t:t.parentElement?a1(t.parentElement):null}function gI(e){var t=n=>{var r=a1(n.target);r&&(r.classList.add("active"),mI(r.dataset.code,function(){setTimeout(()=>{r.classList.remove("active")},2e3)}))};q.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 bI=["prefixCls","className","source","style","disableCopy","skipHtml","onScroll","onMouseOver","pluginsFilter","rehypeRewrite","wrapperElement","warpperElement","urlTransform"],xI=e=>e;const yI=q.forwardRef((e,t)=>{var{prefixCls:n="wmde-markdown wmde-markdown-color",className:r,source:o,style:i,disableCopy:a=!1,skipHtml:s=!0,onScroll:l,onMouseOver:u,pluginsFilter:d,wrapperElement:p={},warpperElement:h={},urlTransform:f}=e,m=$e(e,bI),b=q.useRef(null);q.useImperativeHandle(t,()=>U({},e,{mdp:b}),[b,e]);var x=(n||"")+" "+(r||"");gI(b);var y=[...m.rehypePlugins||[]],E={allowElement:(v,S,N)=>m.allowElement?m.allowElement(v,S,N):/^[A-Za-z0-9]+$/.test(v.tagName)};s||y.push(uI);var C=[pI,...m.remarkPlugins||[],Uk],k=U({},h,p);return c.jsx("div",U({ref:b,onScroll:l,onMouseOver:u},k,{className:x,style:i,children:c.jsx(MS,U({},E,m,{skipHtml:!s,urlTransform:f||xI,rehypePlugins:d?d("rehype",y):y,remarkPlugins:d?d("remark",C):C,children:o||""}))}))});var Ts={},xc={};function EI(e,t){for(var n=t,r=0;r<e.length;r++){var o=r===e.length-1,i=e.charAt(r),a=n[i]||(n[i]={chars:{}});o&&(a.self=e),n=a.chars}}function Gf(e){if(e.length===0)return Ts;for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];EI(o,t)}return t}function CI(e){if(e.length===0)return xc;for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];t[o]=!0}return t}var ss={},Qf={type:"String",optional:!0};function TI(e){var t={type:"NoArgument",optional:!1};function n(a){if(t.type&&t.type!==a&&t.type!=="NoArgument")throw new Error('Conflicting pseudo-class argument type: "'.concat(t.type,'" vs "').concat(a,'".'));t.type=a}for(var r=0,o=e;r<o.length;r++){var i=o[r];i==="NoArgument"&&(t.optional=!0),i==="Formula"&&n("Formula"),i==="FormulaOfSelector"&&(n("Formula"),t.ofSelector=!0),i==="String"&&n("String"),i==="Selector"&&n("Selector")}return t}function vI(e){for(var t={},n=0,r=Object.keys(e);n<r.length;n++){var o=r[n],i=e[o];if(i)for(var a=0,s=i;a<s.length;a++){var l=s[a];(t[l]||(t[l]=[])).push(o)}}return t}function Xf(e){for(var t=vI(e),n={},r=0,o=Object.keys(t);r<o.length;r++){var i=o[r],a=t[i];a&&(n[i]=TI(a))}return n}var li=function(){return li=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},li.apply(this,arguments)},SI={},yc={wildcard:!0};function kI(e){return e?typeof e=="boolean"?yc:e:SI}function DI(e,t){return function(n,r){return t(e(n),e(r))}}function wI(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 Zf(e,t){return function(n,r){return r===!0?e:t(n===!0?e:n,r)}}function zo(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=li({},t),o=0,i=Object.entries(n);o<i.length;o++){var a=i[o],s=a[0],l=a[1];if(s!=="latest"){var u=e[s];r[s]=u(t[s],l)}}return r}}function Tr(e,t){return t!==void 0?t:e}function ls(e,t){return t?e?e.concat(t):t:e}function Jf(e,t){if(!t)return e;if(!e)return t;for(var n=li({},e),r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],a=i[0],s=i[1];if(!s){delete n[a];continue}var l=e[a];if(!l){n[a]=s;continue}n[a]=l.concat(s)}return n}var go=wI(zo({baseSyntax:Tr,modules:ls,tag:Zf(yc,zo({wildcard:Tr})),ids:Tr,classNames:Tr,namespace:Zf(yc,zo({wildcard:Tr})),combinators:ls,attributes:zo({operators:ls,caseSensitivityModifiers:ls,unknownCaseSensitivityModifiers:Tr}),pseudoClasses:zo({unknown:Tr,definitions:Jf}),pseudoElements:zo({unknown:Tr,notation:Tr,definitions:DI(function(e){return Array.isArray(e)?{NoArgument:e}:e},Jf)})})),s1={tag:{},ids:!0,classNames:!0,combinators:[],pseudoElements:{unknown:"reject",notation:"singleColon",definitions:["first-letter","first-line"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["link","visited","active"]}}},l1=go(s1,{tag:{wildcard:!0},combinators:[">","+"],attributes:{unknownCaseSensitivityModifiers:"reject",operators:["=","~=","|="]},pseudoElements:{definitions:["before","after"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["hover","focus","first-child"],String:["lang"]}}}),Ec=go(l1,{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"]}}}),u1=go(Ec,{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"]}}}),Qs={"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"]}}}},c1=li(li({},u1),{modules:Object.entries(Qs).filter(function(e){var t=e[1].latest;return t}).map(function(e){var t=e[0];return t})}),II=go(c1,{pseudoElements:{unknown:"accept"},pseudoClasses:{unknown:"accept"},attributes:{unknownCaseSensitivityModifiers:"accept"}}),Cc={css1:s1,css2:l1,css3:Ec,"selectors-3":Ec,"selectors-4":u1,latest:c1,progressive:II};function AI(){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],i=Cc[o];if(i.pseudoClasses&&typeof i.pseudoClasses=="object"){var a=i.pseudoClasses.definitions;if(a)for(var s=0,l=Object.entries(a);s<l.length;s++)for(var u=l[s],d=u[1],p=0,h=d;p<h.length;p++){var f=h[p];e.pseudoClasses[f]||(e.pseudoClasses[f]=[]),e.pseudoClasses[f].includes(o)||e.pseudoClasses[f].push(o)}}if(i.pseudoElements&&typeof i.pseudoElements=="object"){var a=i.pseudoElements.definitions;if(a)if(Array.isArray(a))for(var m=0,b=a;m<b.length;m++){var x=b[m];e.pseudoElements[x]||(e.pseudoElements[x]=[]),e.pseudoElements[x].includes(o)||e.pseudoElements[x].push(o)}else for(var y=0,E=Object.values(a);y<E.length;y++)for(var d=E[y],C=0,k=d;C<k.length;C++){var v=k[C];e.pseudoElements[v]||(e.pseudoElements[v]=[]),e.pseudoElements[v].includes(o)||e.pseudoElements[v].push(o)}}}for(var S=0,N=Object.entries(Qs);S<N.length;S++){var O=N[S],B=O[0],R=O[1];if(R.pseudoClasses&&typeof R.pseudoClasses=="object"){var a=R.pseudoClasses.definitions;if(a)for(var F=0,T=Object.values(a);F<T.length;F++)for(var d=T[F],L=0,I=d;L<I.length;L++){var A=I[L];e.pseudoClasses[A]||(e.pseudoClasses[A]=[]),e.pseudoClasses[A].includes(B)||e.pseudoClasses[A].push(B)}}if(R.pseudoElements&&typeof R.pseudoElements=="object"){var a=R.pseudoElements.definitions;if(a)if(Array.isArray(a))for(var M=0,W=a;M<W.length;M++){var H=W[M];e.pseudoElements[H]||(e.pseudoElements[H]=[]),e.pseudoElements[H].includes(B)||e.pseudoElements[H].push(B)}else for(var j=0,w=Object.values(a);j<w.length;j++)for(var d=w[j],V=0,J=d;V<J.length;V++){var _=J[V];e.pseudoElements[_]||(e.pseudoElements[_]=[]),e.pseudoElements[_].includes(B)||e.pseudoElements[_].push(B)}}}return e}var eh=AI();function Hi(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="-"||e==="_"||e==="\\"||e>=" "}function th(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="-"||e==="_"||e>=" "}function Ui(e){return e>="a"&&e<="f"||e>="A"&&e<="F"||e>="0"&&e<="9"}var PI={" ":!0," ":!0,"\n":!0,"\r":!0,"\f":!0},RI={'"':!0,"'":!0},Du={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0},MI=6,wu="css-selector-parser parse error: ";function OI(e){e===void 0&&(e={});var t=e.syntax,n=t===void 0?"latest":t,r=e.substitutes,o=e.strict,i=o===void 0?!0:o,a=e.modules,s=typeof n=="object"?n:Cc[n];if(s.baseSyntax&&(s=go(Cc[s.baseSyntax],s)),s.modules&&s.modules.length>0)for(var l=0,u=s.modules;l<u.length;l++){var d=u[l],p=Qs[d];p&&(s=go(p,s))}if(a&&a.length>0)for(var h=0,f=a;h<f.length;h++){var m=f[h],p=Qs[m];p&&(s=go(p,s))}var b=s.tag?[!0,!!kI(s.tag).wildcard]:[!1,!1],x=b[0],y=b[1],E=!!s.ids,C=!!s.classNames,k=!!s.namespace,v=s.namespace&&(s.namespace===!0||s.namespace.wildcard===!0);if(k&&!x)throw new Error("".concat(wu,"Namespaces cannot be enabled while tags are disabled."));var S=!!r,N=s.combinators?Gf(s.combinators):Ts,O=s.attributes?[!0,s.attributes.operators?Gf(s.attributes.operators):Ts,s.attributes.caseSensitivityModifiers?CI(s.attributes.caseSensitivityModifiers):xc,s.attributes.unknownCaseSensitivityModifiers==="accept"]:[!1,Ts,xc,!1],B=O[0],R=O[1],F=O[2],T=O[3],L=T||Object.keys(F).length>0,I=s.pseudoClasses?[!0,s.pseudoClasses.definitions?Xf(s.pseudoClasses.definitions):ss,s.pseudoClasses.unknown==="accept"]:[!1,ss,!1],A=I[0],M=I[1],W=I[2],H=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?Xf(Array.isArray(s.pseudoElements.definitions)?{NoArgument:s.pseudoElements.definitions}:s.pseudoElements.definitions):ss,s.pseudoElements.unknown==="accept"]:[!1,!1,!1,ss,!1],j=H[0],w=H[1],V=H[2],J=H[3],_=H[4],de="",Z=de.length,Y=0,te="",X=function(se){return te===se},re=function(){return X("*")||Hi(te)},Q=function(se){Y=se,te=de.charAt(Y)},K=function(){Y++,te=de.charAt(Y)},ae=function(){var se=te;return Y++,te=de.charAt(Y),se};function ee(se){var xe=Math.min(Z-1,Y),Te=new Error("".concat(wu).concat(se," Pos: ").concat(xe,"."));throw Te.position=xe,Te.name="ParserError",Te}function ne(se,xe){if(!se)return ee(xe)}var ye=function(){ne(Y<Z,"Unexpected end of input.")},pe=function(){return Y>=Z},be=function(se){ne(Y<Z,'Expected "'.concat(se,'" but end of input reached.')),ne(te===se,'Expected "'.concat(se,'" but "').concat(te,'" found.')),Y++,te=de.charAt(Y)};function le(se){var xe=Re(se,Y);if(xe)return Y+=xe.length,te=de.charAt(Y),xe}function Re(se,xe){var Te=de.charAt(xe),Be=se[Te];if(Be){var We=Re(Be.chars,xe+1);if(We)return We;if(Be.self)return Be.self}}function ve(){for(var se=ae(),xe=1;Ui(te)&&xe<MI;)se+=ae(),xe++;return lt(),String.fromCharCode(parseInt(se,16))}function ze(se){var xe="";for(be(se);Y<Z;){if(X(se))return K(),xe;X("\\")?(K(),X(se)?(xe+=se,K()):te===`
|
|
53
|
-
`||te==="\f"?K():te==="\r"?(K(),X(`
|
|
54
|
-
`)&&K()):Ui(te)?xe+=ve():(xe+=te,K())):(xe+=te,K())}return xe}function De(){if(!Hi(te))return null;for(var se="";X("-");)se+=te,K();for(se==="-"&&!th(te)&&!X("\\")&&ee("Identifiers cannot consist of a single hyphen."),i&&se.length>=2&&ee("Identifiers cannot start with two hyphens with strict mode on."),Du[te]&&ee("Identifiers cannot start with hyphens followed by digits.");Y<Z;)if(th(te))se+=ae();else if(X("\\"))K(),ye(),Ui(te)?se+=ve():se+=ae();else break;return se}function vt(){for(var se="";Y<Z&&!X(")");)if(X("\\")){if(K(),pe()&&!i)return(se+"\\").trim();ye(),Ui(te)?se+=ve():se+=ae()}else se+=ae();return se.trim()}function lt(){if(te===" "||te===" "||te==="\f"||te===`
|
|
55
|
-
`){K();return}te==="\r"&&K(),te===`
|
|
56
|
-
`&&K()}function qe(){for(;PI[te];)K()}function ue(se){se===void 0&&(se=!1),qe();for(var xe=[ft(se)];X(",");)K(),qe(),xe.push(ft(se));return{type:"Selector",rules:xe}}function Ce(){be("["),qe();var se;if(X("|")){ne(k,"Namespaces are not enabled."),K();var xe=De();ne(xe,"Expected attribute name."),se={type:"Attribute",name:xe,namespace:{type:"NoNamespace"}}}else if(X("*")){ne(k,"Namespaces are not enabled."),ne(v,"Wildcard namespace is not enabled."),K(),be("|");var Te=De();ne(Te,"Expected attribute name."),se={type:"Attribute",name:Te,namespace:{type:"WildcardNamespace"}}}else{var Be=De();if(ne(Be,"Expected attribute name."),se={type:"Attribute",name:Be},X("|")){var We=Y;if(K(),Hi(te)){ne(k,"Namespaces are not enabled.");var It=De();ne(It,"Expected attribute name."),se={type:"Attribute",name:It,namespace:{type:"NamespaceName",name:Be}}}else Q(We)}}if(ne(se.name,"Expected attribute name."),qe(),pe()&&!i)return se;if(X("]"))K();else{if(se.operator=le(R),ne(se.operator,"Expected a valid attribute selector operator."),qe(),ye(),RI[te])se.value={type:"String",value:ze(te)};else if(S&&X("$")){K();var Lt=De();ne(Lt,"Expected substitute name."),se.value={type:"Substitution",name:Lt}}else{var yt=De();ne(yt,"Expected attribute value."),se.value={type:"String",value:yt}}if(qe(),pe()&&!i)return se;if(!X("]")){var zt=De();if(ne(zt,"Expected end of attribute selector."),se.caseSensitivityModifier=zt,ne(L,"Attribute case sensitivity modifiers are not enabled."),ne(T||F[se.caseSensitivityModifier],"Unknown attribute case sensitivity modifier."),qe(),pe()&&!i)return se}be("]")}return se}function Oe(){for(var se="";Du[te];)se+=ae();return ne(se!=="","Formula parse error."),parseInt(se)}var He=function(){return X("-")||X("+")||Du[te]};function je(){if(X("e")||X("o")){var se=De();if(se==="even")return qe(),[2,0];if(se==="odd")return qe(),[2,1]}var xe=null,Te=1;if(X("-")&&(K(),Te=-1),He()&&(X("+")&&K(),xe=Oe(),!X("\\")&&!X("n")))return[0,xe*Te];xe===null&&(xe=1),xe*=Te;var Be;if(X("\\")?(K(),Ui(te)?Be=ve():Be=ae()):Be=ae(),ne(Be==="n",'Formula parse error: expected "n".'),qe(),X("+")||X("-")){var We=X("+")?1:-1;return K(),qe(),[xe,We*Oe()]}else return[xe,0]}function Le(se,xe,Te){var Be;if(X("(")){if(K(),qe(),S&&X("$")){K();var We=De();ne(We,"Expected substitute name."),Be={type:"Substitution",name:We}}else if(Te.type==="String")Be={type:"String",value:vt()},ne(Be.value,"Expected ".concat(xe," argument value."));else if(Te.type==="Selector")Be=ue(!0);else if(Te.type==="Formula"){var It=je(),Lt=It[0],yt=It[1];if(Be={type:"Formula",a:Lt,b:yt},Te.ofSelector&&(qe(),X("o")||X("\\"))){var zt=De();ne(zt==="of","Formula of selector parse error."),qe(),Be={type:"FormulaOfSelector",a:Lt,b:yt,selector:ft()}}}else return ee("Invalid ".concat(xe," signature."));if(qe(),pe()&&!i)return Be;be(")")}else ne(Te.optional,"Argument is required for ".concat(xe,' "').concat(se,'".'));return Be}function Je(){if(X("*"))return ne(y,"Wildcard tag name is not enabled."),K(),{type:"WildcardTag"};if(Hi(te)){ne(x,"Tag names are not enabled.");var se=De();return ne(se,"Expected tag name."),{type:"TagName",name:se}}else return ee("Expected tag name.")}function gt(){if(X("*")){var se=Y;if(K(),!X("|")||(K(),!re()))return Q(se),Je();ne(k,"Namespaces are not enabled."),ne(v,"Wildcard namespace is not enabled.");var xe=Je();return xe.namespace={type:"WildcardNamespace"},xe}else if(X("|")){ne(k,"Namespaces are not enabled."),K();var xe=Je();return xe.namespace={type:"NoNamespace"},xe}else if(Hi(te)){var Te=De();if(ne(Te,"Expected tag name."),!X("|"))return ne(x,"Tag names are not enabled."),{type:"TagName",name:Te};var se=Y;if(K(),!re())return Q(se),{type:"TagName",name:Te};ne(k,"Namespaces are not enabled.");var xe=Je();return xe.namespace={type:"NamespaceName",name:Te},xe}else return ee("Expected tag name.")}function ft(se){var xe,Te;se===void 0&&(se=!1);var Be={type:"Rule",items:[]};if(se){var We=le(N);We&&(Be.combinator=We,qe())}for(;Y<Z;)if(re())ne(Be.items.length===0,"Unexpected tag/namespace start."),Be.items.push(gt());else if(X("|")){var It=Y;if(K(),re())ne(Be.items.length===0,"Unexpected tag/namespace start."),Q(It),Be.items.push(gt());else{Q(It);break}}else if(X(".")){ne(C,"Class names are not enabled."),K();var Lt=De();ne(Lt,"Expected class name."),Be.items.push({type:"ClassName",name:Lt})}else if(X("#")){ne(E,"IDs are not enabled."),K();var yt=De();ne(yt,"Expected ID name."),Be.items.push({type:"Id",name:yt})}else if(X("["))ne(B,"Attributes are not enabled."),Be.items.push(Ce());else if(X(":")){var zt=!1,An=!1;K(),X(":")&&(ne(j,"Pseudo elements are not enabled."),ne(V,"Pseudo elements double colon notation is not enabled."),zt=!0,K());var At=De();if(ne(zt||At,"Expected pseudo-class name."),ne(!zt||At,"Expected pseudo-element name."),ne(At,"Expected pseudo-class name."),!(!zt||_||Object.prototype.hasOwnProperty.call(J,At))){var en=eh.pseudoElements[At],yr='Unknown pseudo-element "'.concat(At,'"');en&&en.length>0&&(yr+=". It is defined in: ".concat(en.join(", "))),ee(yr+".")}if(An=j&&(zt||!zt&&w&&Object.prototype.hasOwnProperty.call(J,At)),An){var Pn=(xe=J[At])!==null&&xe!==void 0?xe:_&&Qf,to={type:"PseudoElement",name:At},Kn=Le(At,"pseudo-element",Pn);Kn&&(ne(Kn.type!=="Formula"&&Kn.type!=="FormulaOfSelector","Pseudo-elements cannot have formula argument."),to.argument=Kn),Be.items.push(to)}else{ne(A,"Pseudo-classes are not enabled.");var Pn=(Te=M[At])!==null&&Te!==void 0?Te:W&&Qf;if(!Pn){var en=eh.pseudoClasses[At],yr='Unknown pseudo-class: "'.concat(At,'"');en&&en.length>0&&(yr+=". It is defined in: ".concat(en.join(", "))),ee(yr+".")}var Kn=Le(At,"pseudo-class",Pn),Er={type:"PseudoClass",name:At};Kn&&(Er.argument=Kn),Be.items.push(Er)}}else break;if(Be.items.length===0)return pe()?ee("Expected rule but end of input reached."):ee('Expected rule but "'.concat(te,'" found.'));if(qe(),!pe()&&!X(",")&&!X(")")){var We=le(N);qe(),Be.nestedRule=ft(),Be.nestedRule.combinator=We}return Be}return function(se){if(typeof se!="string")throw new Error("".concat(wu,"Expected string input."));return de=se,Z=de.length,Y=0,te=de.charAt(0),ue()}}const LI=OI({syntax:"selectors-4"});function NI(e){if(typeof e!="string")throw new TypeError("Expected `string` as selector, not `"+e+"`");return LI(e)}const d1="֑-߿יִ-﷽ﹰ-ﻼ",p1="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",FI=new RegExp("^[^"+p1+"]*["+d1+"]"),_I=new RegExp("^[^"+d1+"]*["+p1+"]");function BI(e){const t=String(e||"");return FI.test(t)?"rtl":_I.test(t)?"ltr":"neutral"}function f1(e){return"children"in e?h1(e):"value"in e?e.value:""}function jI(e){return e.type==="text"?e.value:"children"in e?h1(e):""}function h1(e){let t=-1;const n=[];for(;++t<e.children.length;)n[t]=jI(e.children[t]);return n.join("")}function $I(e,t){const n=e.schema,r=e.language,o=e.direction,i=e.editableOrEditingHost;let a;if(t.type==="element"){const u=t.properties.xmlLang||t.properties.lang,d=t.properties.type||"text",p=nh(t);u!=null&&(e.language=String(u)),n&&n.space==="html"?(t.properties.contentEditable==="true"&&(e.editableOrEditingHost=!0),t.tagName==="svg"&&(e.schema=Zr),p==="rtl"?a=p:p==="ltr"||p!=="auto"&&t.tagName==="html"||p!=="auto"&&t.tagName==="input"&&d==="tel"?a="ltr":(p==="auto"||t.tagName==="bdi")&&(t.tagName==="textarea"?a=Iu(f1(t)):t.tagName==="input"&&(d==="email"||d==="search"||d==="tel"||d==="text")?a=t.properties.value?Iu(String(t.properties.value)):"ltr":bn(t,l)),a&&(e.direction=a)):e.editableOrEditingHost&&(e.editableOrEditingHost=!1)}return s;function s(){e.schema=n,e.language=r,e.direction=o,e.editableOrEditingHost=i}function l(u){if(u.type==="text")return a=Iu(u.value),a?Ws:void 0;if(u!==t&&u.type==="element"&&(u.tagName==="bdi"||u.tagName==="script"||u.tagName==="style"||u.tagName==="textare"||nh(u)))return sa}}function Iu(e){const t=BI(e);return t==="neutral"?void 0:t}function nh(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 HI(e,t,n){const r=ja(n,e.name),o=t.properties[r.property];let i=UI(o,r);if(!e.value)return i!==void 0;e.value.type;let a=e.value.value;if(e.caseSensitivityModifier==="i"&&(a=a.toLowerCase(),i&&(i=i.toLowerCase())),i!==void 0)switch(e.operator){case"=":return a===i;case"$=":return a===i.slice(-a.length);case"*=":return i.includes(a);case"^=":return a===i.slice(0,a.length);case"|=":return a===i||a===i.slice(0,a.length)&&i.charAt(a.length)==="-";case"~=":return a===i||nc(i).includes(a)}return!1}function UI(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?yl:El)(e)}else return String(e)}const zI=[];function VI(e,t){return(t.properties.className||zI).includes(e.name)}function WI(e,t){return t.properties.id===e.name}function qI(e,t){return e.name===t.tagName}function YI(e,t){return function(n,r){let o=rh(n,"tag");const i=rh(r??"*","range"),a=[];let s=-1;for(;++s<i.length;){const l=i[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];a.push(o[u])}else d.push(o[u]);o=d}return t?a:void 0}}const KI=YI(function(e,t){const n=e.split("-"),r=t.split("-");let o=0,i=0;if(r[i]!=="*"&&n[o]!==r[i])return!1;for(o++,i++;i<r.length;){if(r[i]==="*"){i++;continue}if(!n[o])return!1;if(n[o]===r[i]){o++,i++;continue}if(n[o].length===1)return!1;o++}return!0},!0);function rh(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 GI={}.hasOwnProperty;function To(e,t){const n=e.type==="element"&&GI.call(e.properties,t)&&e.properties[t];return n!=null&&n!==!1}const QI=new Set([9,10,12,13,32]),oh=48,XI=57;function ZI(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,n=0,r=i(),o=a();if(t<e.length&&e.charAt(t)==="n"&&(t++,n=r*(o??1),s(),t<e.length?(r=i(),s(),o=a()):r=o=0),o===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[n,r*o];function i(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function a(){const l=t;let u=0;for(;t<e.length&&e.charCodeAt(t)>=oh&&e.charCodeAt(t)<=XI;)u=u*10+(e.charCodeAt(t)-oh),t++;return t===l?null:u}function s(){for(;t<e.length&&QI.has(e.charCodeAt(t));)t++}}var Au,ih;function JI(){return ih||(ih=1,Au={trueFunc:function(){return!0},falseFunc:function(){return!1}}),Au}var eA=JI();const ah=Zn(eA);function tA(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return ah.falseFunc;if(t===-1)return i=>i<=n;if(t===0)return i=>i===n;if(t===1)return n<0?ah.trueFunc:i=>i>=n;const r=Math.abs(t),o=(n%r+r)%r;return t>1?i=>i>=n&&i%r===o:i=>i<=n&&i%r===o}function sh(e){return tA(ZI(e))}const nA=sh.default||sh,rA=wl("name",{handlers:{"any-link":oA,blank:iA,checked:aA,dir:sA,disabled:m1,empty:lA,enabled:uA,"first-child":cA,"first-of-type":dA,has:pA,is:g1,lang:hA,"last-child":mA,"last-of-type":gA,not:bA,"nth-child":xA,"nth-last-child":yA,"nth-last-of-type":EA,"nth-of-type":CA,"only-child":TA,"only-of-type":vA,optional:SA,"read-only":kA,"read-write":b1,required:x1,root:DA,scope:wA},invalid:fA,unknown:IA});function oA(e,t){return(t.tagName==="a"||t.tagName==="area"||t.tagName==="link")&&To(t,"href")}function mr(e,t){if(e.shallow)throw new Error("Cannot use `:"+t.name+"` without parent")}function iA(e,t){return!y1(t,n);function n(r){return r.type==="element"||r.type==="text"&&!Yc(r)}}function aA(e,t){return t.tagName==="input"||t.tagName==="menuitem"?!!((t.properties.type==="checkbox"||t.properties.type==="radio")&&To(t,"checked")):t.tagName==="option"?To(t,"selected"):!1}function sA(e,t,n,r,o){return e.argument,e.argument.type,o.direction===e.argument.value}function m1(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")&&To(t,"disabled")}function lA(e,t){return!y1(t,n);function n(r){return r.type==="element"||r.type==="text"}}function uA(e,t){return!m1(e,t)}function cA(e,t,n,r,o){return mr(o,e),o.elementIndex===0}function dA(e,t,n,r,o){return mr(o,e),o.typeIndex===0}function Ml(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=nA(n.a+"n+"+n.b),e._cachedFn=t}return t}function pA(e,t,n,r,o){e.argument,e.argument.type;const i={...o,found:!1,one:!0,results:[],rootQuery:e.argument,scopeElements:[t],shallow:!1};return gd(i,{type:"root",children:t.children}),i.results.length>0}function fA(){}function g1(e,t,n,r,o){e.argument,e.argument.type;const i={...o,found:!1,one:!0,results:[],rootQuery:e.argument,scopeElements:[t],shallow:!1};return gd(i,t),i.results[0]===t}function hA(e,t,n,r,o){return e.argument,e.argument.type,o.language!==""&&o.language!==void 0&&KI(o.language,Ju(e.argument.value)).length>0}function mA(e,t,n,r,o){return mr(o,e),!!(o.elementCount&&o.elementIndex===o.elementCount-1)}function gA(e,t,n,r,o){return mr(o,e),typeof o.typeIndex=="number"&&typeof o.typeCount=="number"&&o.typeIndex===o.typeCount-1}function bA(e,t,n,r,o){return!g1(e,t,n,r,o)}function xA(e,t,n,r,o){const i=Ml(e);return mr(o,e),typeof o.elementIndex=="number"&&i(o.elementIndex)}function yA(e,t,n,r,o){const i=Ml(e);return mr(o,e),!!(typeof o.elementCount=="number"&&typeof o.elementIndex=="number"&&i(o.elementCount-o.elementIndex-1))}function EA(e,t,n,r,o){const i=Ml(e);return mr(o,e),typeof o.typeCount=="number"&&typeof o.typeIndex=="number"&&i(o.typeCount-1-o.typeIndex)}function CA(e,t,n,r,o){const i=Ml(e);return mr(o,e),typeof o.typeIndex=="number"&&i(o.typeIndex)}function TA(e,t,n,r,o){return mr(o,e),o.elementCount===1}function vA(e,t,n,r,o){return mr(o,e),o.typeCount===1}function SA(e,t){return!x1(e,t)}function kA(e,t,n,r,o){return!b1(e,t,n,r,o)}function b1(e,t,n,r,o){return t.tagName==="input"||t.tagName==="textarea"?!To(t,"readOnly")&&!To(t,"disabled"):!!o.editableOrEditingHost}function x1(e,t){return(t.tagName==="input"||t.tagName==="textarea"||t.tagName==="select")&&To(t,"required")}function DA(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 wA(e,t,n,r,o){return o.scopeElements.includes(t)}function y1(e,t){const n=e.children;let r=-1;for(;++r<n.length;)if(t(n[r]))return!0;return!1}function IA(e){const t=e;throw new Error("Unknown pseudo-selector `"+t.name+"`")}function AA(e,t,n,r,o){for(const i of e.items)if(i.type==="Attribute"){if(!HI(i,t,o.schema))return!1}else if(i.type==="Id"){if(!WI(i,t))return!1}else if(i.type==="ClassName"){if(!VI(i,t))return!1}else if(i.type==="PseudoClass"){if(!rA(i,t,n,r,o))return!1}else{if(i.type==="PseudoElement")throw new Error("Invalid selector: `::"+i.name+"`");if(i.type==="TagName"&&!qI(i,t))return!1}return!0}const PA=[];function gd(e,t){t&&E1(e,[],t,void 0,void 0,t)}function Pu(e,t,n){const r=e[t];r?r.push(n):e[t]=[n]}function RA(e,t,n,r){const o=vs(t.descendant,t.directChild);let i,a=-1;const s={count:0,types:new Map},l={count:0,types:new Map};for(;++a<n.children.length;)lh(s,n.children[a]);for(a=-1;++a<n.children.length;){const u=n.children[a],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 p=vs(o,i),h=E1(e,p,n.children[a],a,n,r);i=vs(h.generalSibling,h.adjacentSibling)}if(e.one&&e.found)break;lh(l,n.children[a])}}function MA(e,t,n,r,o){const i={adjacentSibling:void 0,descendant:void 0,directChild:void 0,generalSibling:void 0};let a=-1;for(;++a<t.length;){const s=t[a];if(e.one&&e.found)break;if(e.shallow&&s.nestedRule)throw new Error("Expected selector without nesting");if(AA(s,n,r,o,e)){const l=s.nestedRule;if(l){const u=l.combinator==="+"?"adjacentSibling":l.combinator==="~"?"generalSibling":l.combinator===">"?"directChild":"descendant";Pu(i,u,l)}else e.found=!0,e.results.includes(n)||e.results.push(n)}s.combinator===void 0?Pu(i,"descendant",s):s.combinator==="~"&&Pu(i,"generalSibling",s)}return i}function vs(e,t){return e&&t&&e.length>0&&t.length>0?[...e,...t]:e&&e.length>0?e:t&&t.length>0?t:PA}function lh(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 E1(e,t,n,r,o,i){let a={adjacentSibling:void 0,descendant:void 0,directChild:void 0,generalSibling:void 0};const s=$I(e,n);if(n.type==="element"){let l=e.rootQuery.rules;o&&o!==i&&(l=e.rootQuery.rules.filter(u=>u.combinator===void 0||u.combinator===">"&&o===i)),a=MA(e,vs(t,l),n,r,o)}return"children"in n&&!e.shallow&&!(e.one&&e.found)&&RA(e,a,n,i),s(),a}function OA(e,t,n){const r=LA(e,t);return gd(r,t||void 0),r.results}function LA(e,t,n){return{direction:"ltr",editableOrEditingHost:!1,elementCount:void 0,elementIndex:void 0,found:!1,language:void 0,one:!1,results:[],rootQuery:NI(e),schema:xi,scopeElements:t?t.type==="root"?t.children:[t]:[],shallow:!1,typeIndex:void 0,typeCount:void 0}}const C1=(e=[],t="")=>(e.forEach(n=>{n.type==="text"?t+=n.value:n.type==="element"&&n.children&&Array.isArray(n.children)&&(t+=C1(n.children))}),t),NA=e=>{const{selector:t,rewrite:n}=e||{};return r=>{if(!(!n||typeof n!="function")){if(t&&typeof t=="string"){const o=OA(t,r);o&&o.length>0&&bn(r,o,(i,a,s)=>{n(i,a,s)});return}bn(r,(o,i,a)=>{n(o,i,a)})}}},FA=(e="")=>(e.match(/([^?=&]+)(=([^&]*))/g)||[]).reduce((t,n)=>(t[n.slice(0,n.indexOf("="))]=n.slice(n.indexOf("=")+1),t),{}),_A=(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]}},T1=(e=[],t,n,r)=>{let o=t;for(;o<e.length;)if(o++,n){const i=e[o];if(i&&i.value&&i.value.replace(/(\n|\s)/g,"")!==""||e[o]&&e[o].type==="element")return i.tagName===n?i:void 0}else{const i=e[o];if(!i||i.type==="element"||i.type==="text"&&i.value.replace(/(\n|\s)/g,"")!=="")return;if(i.type&&/^(comment|raw)$/ig.test(i.type))return i.value&&!/^rehype:/.test(i.value.replace(/^(\s+)?<!--(.*?)-->/,"$2")||"")?void 0:r?T1(e,o,"pre",r)?void 0:(i.value=(i.value||"").replace(/^(\n|\s)+/,""),i):(i.value=(i.value||"").replace(/^(\n|\s)+/,""),i)}},uh=({value:e=""})=>{const t=FA(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},ch=(e,t,n)=>n==="string"?{...e,"data-config":JSON.stringify({...t,rehyp:!0})}:n==="attr"?{...e,...t}:{...e,"data-config":{...t,rehyp:!0}},BA=(e={})=>{const{properties:t="data",codeBlockParames:n=!0}=e;return r=>{bn(r,"element",(o,i,a)=>{if(n&&o.tagName==="pre"&&o&&Array.isArray(o.children)&&a&&Array.isArray(a.children)&&a.children.length>1){const s=o.children[0];if(s&&s.tagName==="code"&&typeof i=="number"){const l=_A(a.children,i);if(l){const u=uh(l);Object.keys(u).length>0&&(o.properties={...o.properties,"data-type":"rehyp"},s.properties=ch(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)&&a&&Array.isArray(a.children)&&typeof i=="number"){const s=T1(a.children,i,"",n);if(s){const l=uh(s);Object.keys(l).length>0&&(o.properties=ch(o.properties,l,t))}}})}};var jA=function(t){return n=>{bn(n,r=>{r.type==="element"&&r.tagName==="code"&&r.data&&r.data.meta&&(r.properties=U({},r.properties,{"data-meta":String(r.data.meta)}))})}},$A=function(t){return n=>{bn(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 HA=/[\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,UA=Object.hasOwnProperty;class zA{constructor(){this.occurrences,this.reset()}slug(t,n){const r=this;let o=VA(t,n===!0);const i=o;for(;UA.call(r.occurrences,o);)r.occurrences[i]++,o=i+"-"+r.occurrences[i];return r.occurrences[o]=0,o}reset(){this.occurrences=Object.create(null)}}function VA(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(HA,"").replace(/ /g,"-"))}function v1(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 WA={},dh=new zA;function qA(e){const n=(e||WA).prefix||"";return function(r){dh.reset(),bn(r,"element",function(o){v1(o)&&!o.properties.id&&(o.properties.id=n+dh.slug(f1(o)))})}}const S1=(function(e){if(e==null)return GA;if(typeof e=="string")return KA(e);if(typeof e=="object")return YA(e);if(typeof e=="function")return bd(e);throw new Error("Expected function, string, or array as `test`")});function YA(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=S1(e[n]);return bd(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function KA(e){return bd(t);function t(n){return n.tagName===e}}function bd(e){return t;function t(n,r,o){return!!(QA(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function GA(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function QA(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const ph={type:"element",tagName:"span",properties:{className:["icon","icon-link"]},children:[]},XA={};function ZA(e){const t=e||XA;let n=t.properties;const r=t.headingProperties,o=t.behavior||"prepend",i=t.content,a=t.group,s=S1(t.test);let l;return o==="after"||o==="before"?l=d:o==="wrap"?l=p:(l=u,n||(n={ariaHidden:"true",tabIndex:-1})),function(h){bn(h,"element",function(f,m,b){if(v1(f)&&f.properties.id&&s(f,m,b))return Object.assign(f.properties,us(r,f)),l(f,m,b)})};function u(h){const f=fh(i||ph,h);return h.children[o==="prepend"?"unshift":"push"](Ru(h,us(n,h),f)),[sa]}function d(h,f,m){if(typeof f!="number"||!m)return;const b=fh(i||ph,h),x=Ru(h,us(n,h),b);let y=o==="before"?[x,h]:[h,x];if(a){const E=k1(a,h);E&&!Array.isArray(E)&&E.type==="element"&&(E.children=y,y=[E])}return m.children.splice(f,1,...y),[sa,f+y.length]}function p(h){let f=h.children,m=[];return typeof i=="function"?(f=[],m=i(h)):i&&(m=xd(i)),h.children=[Ru(h,us(n,h),Array.isArray(m)?[...f,...m]:[...f,m])],[sa]}}function xd(e){return Co(e)}function Ru(e,t,n){return{type:"element",tagName:"a",properties:{...t,href:"#"+e.properties.id},children:n}}function fh(e,t){const n=k1(e,t);return Array.isArray(n)?n:[n]}function k1(e,t){return typeof e=="function"?e(t):xd(e)}function us(e,t){return typeof e=="function"?e(t):e?xd(e):{}}const JA=(e={})=>{const{openDelimiter:t="rehype:ignore:start",closeDelimiter:n="rehype:ignore:end"}=e;return r=>{bn(r,(o,i,a)=>{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 e4={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 t4(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 n4=(e,t)=>(n,r,o)=>{if(n.type==="element"&&o&&o.type==="root"&&/h(1|2|3|4|5|6)/.test(n.tagName)){var i=n.children&&n.children[0];i&&i.properties&&i.properties.ariaHidden==="true"&&(i.properties=U({class:"anchor"},i.properties),i.children=[e4])}if(n.type==="element"&&n.tagName==="pre"&&!e){var a=C1(n.children);n.children.push(t4(a))}t&&t(n,r===null?void 0:r,o===null?void 0:o)},r4=[qA,ZA,JA];const D1=q.forwardRef((e,t)=>{var n,r=[jA,$A,...r4,[NA,{rewrite:n4((n=e.disableCopy)!=null?n:!1,e.rehypeRewrite)}],[BA,{properties:"attr"}],...e.rehypePlugins||[]];return c.jsx(yI,U({},e,{rehypePlugins:r,ref:t}))});function o4(e,t){return U({},e,t)}var Si=q.createContext({markdown:""});function w1(e,t){return e===void 0&&(e=[]),t===void 0&&(t={}),e.forEach(n=>{n.children&&Array.isArray(n.children)?t=U({},t,w1(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 i=w1(t||[]),a=[];if(e.altKey&&a.push("alt"),e.shiftKey&&a.push("shift"),e.metaKey&&a.push("cmd"),e.ctrlKey&&a.push("ctrl"),a.length>0&&!/(control|alt|meta|shift)/.test(e.key.toLocaleLowerCase())&&a.push(e.key.toLocaleLowerCase()),/escape/.test(e.key.toLocaleLowerCase())&&a.push("escape"),!(a.length<1)){var s=!!i[a.join("+")],l=s?i[a.join("+")]:void 0;if(Object.keys(i).forEach(u=>{var d=u.split("+").every(p=>/ctrlcmd/.test(p)?a.includes("ctrl")||a.includes("cmd"):a.includes(p));d&&(l=i[u])}),l&&n){e.stopPropagation(),e.preventDefault(),n.executeCommand(l,r,o,a);return}}}var Mu;function hh(e){if(e.nodeName!=="TEXTAREA")return!1;if(typeof Mu>"u"){var t=document.createElement("textarea");t.value="1",Mu=!!t.firstChild}return Mu}function ti(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,i=e.selectionEnd;if(typeof e.setRangeText=="function")e.setRangeText(t);else{var a=document.createRange(),s=document.createTextNode(t);if(hh(e)){var l=e.firstChild;if(!l)e.appendChild(s);else{for(var u=0,d=null,p=null;l&&(d===null||p===null);){var h=l.nodeValue.length;o>=u&&o<=u+h&&a.setStart(d=l,o-u),i>=u&&i<=u+h&&a.setEnd(p=l,i-u),u+=h,l=l.nextSibling}o!==i&&a.deleteContents()}}if(hh(e)&&a.commonAncestorContainer.nodeName==="#text")a.insertNode(s);else{var f=e.value;e.value=f.slice(0,o)+t+f.slice(i)}}e.setSelectionRange(o+t.length,o+t.length);var m=document.createEvent("UIEvent");m.initEvent("input",!0,!1),e.dispatchEvent(m)}}function cn(e){var{text:t,selection:n,prefix:r,suffix:o=r}=e,i=n;if(t&&t.length&&n.start===n.end&&(i=i4(t,n.start)),i.start>=r.length&&i.end<=t.length-o.length){var a=t.slice(i.start-r.length,i.end+o.length);if(a.startsWith(r)&&a.endsWith(o))return{start:i.start-r.length,end:i.end+o.length}}return i}function fa(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 A1(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 P1(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 i4(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,i=t;i-1>-1;i--)if(n(e[i-1])){r=i;break}for(var a=t;a<e.length;a++)if(n(e[a])){o=a;break}return{start:r,end:o}}function Xt(e){var{api:t,selectedText:n,selection:r,prefix:o,suffix:i=o}=e;n.length>=o.length+i.length&&n.startsWith(o)&&n.endsWith(i)?(t.replaceSelection(n.slice(o.length,i.length?-i.length:void 0)),t.setSelectionRange({start:r.start-o.length,end:r.end-o.length})):(t.replaceSelection(""+o+n+i),t.setSelectionRange({start:r.start+o.length,end:r.end+o.length}))}function yd(e,t){var n=e.split(/\n/),r=0,o=n.map((i,a)=>{if(typeof t=="string")return i.startsWith(t)?(r-=t.length,i.slice(t.length)):(r+=t.length,t+i);if(typeof t=="function"){if(i.startsWith(t(i,a)))return r-=t(i,a).length,i.slice(t(i,a).length);var s=t(i,a);return r+=s.length,t(i,a)+i}throw Error("insertion is expected to be either a string or a function")}).join(`
|
|
59
|
-
`);return{modifiedText:o,insertionLength:r}}var a4={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=cn({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},R1={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=cn({text:e.text,selection:e.selection,prefix:"```\n",suffix:"\n```"}),r=t.setSelectionRange(n),o="\n```\n",i="\n```\n";r.selectedText.length>=o.length+i.length-2&&r.selectedText.startsWith(o)&&r.selectedText.endsWith(i)?(o="```\n",i="\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)&&(i="\n```"));var a=cn({text:e.text,selection:e.selection,prefix:o,suffix:i}),s=t.setSelectionRange(a);Xt({api:t,selectedText:s.selectedText,selection:e.selection,prefix:o,suffix:i})}},s4={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=cn({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}else R1.execute(e,t)}},l4={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=cn({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix})}},Ss={keyCommand:"divider"},u4={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 c4(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var d4=(e,t)=>{var n=U({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=U({},(c4(r),r));return o.parent=n,U({},o)})),n},p4={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=cn({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)?Xt({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}),Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}))}},f4={name:"image",keyCommand:"image",shortcuts:"ctrlcmd+k",prefix:"",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=cn({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")?Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(n=cn({text:e.text,selection:e.selection,prefix:"![",suffix:"]()"}),r=t.setSelectionRange(n),r.selectedText.length===0?Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:""}):Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"![",suffix:"]()"}))}},h4={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=cn({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},m4={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=cn({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=cn({text:e.text,selection:e.selection,prefix:"[](",suffix:")"}),r=t.setSelectionRange(n),Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"[](",suffix:")"})):r.selectedText.length===0?Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"[title",suffix:"](url)"}):Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix})}},Ed=(e,t,n)=>{var r=cn({text:e.text,selection:e.selection,prefix:e.command.prefix}),o=t.setSelectionRange(r),i=A1(o.text,o.selection.start),a=Array(i+1).join(`
|
|
66
|
-
`),s=P1(o.text,o.selection.end),l=Array(s+1).join(`
|
|
67
|
-
`),{modifiedText:u,insertionLength:d}=yd(o.selectedText,n);if(d<0){var p=o.selection.start,h=o.selection.end;o.selection.start>0&&e.text.slice(o.selection.start-1,o.selection.start)===`
|
|
68
|
-
`&&(p-=1),o.selection.end<e.text.length-1&&e.text.slice(o.selection.end,o.selection.end+1)===`
|
|
69
|
-
`&&(h+=1),t.setSelectionRange({start:p,end:h}),t.replaceSelection(""+u),t.setSelectionRange({start:p,end:p+u.length})}else{t.replaceSelection(""+a+u+l);var f=o.selection.start+i,m=f+u.length;t.setSelectionRange({start:f,end:m})}},g4={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)=>{Ed(e,t,"- ")}},b4={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)=>{Ed(e,t,(n,r)=>r+1+". ")}},x4={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)=>{Ed(e,t,(n,r)=>"- [ ] ")}},y4={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"})}},E4={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"})}},C4={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"})}},T4={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=cn({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n),o=A1(r.text,r.selection.start),i=Array(o+1).join(`
|
|
70
|
-
`),a=P1(r.text,r.selection.end),s=Array(a+1).join(`
|
|
71
|
-
`),l=yd(r.selectedText,e.command.prefix);t.replaceSelection(""+i+l.modifiedText+s);var u=r.selection.start+o,d=u+l.modifiedText.length;t.setSelectionRange({start:u,end:d})}},v4={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=cn({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},M1={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)=>{ki({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},S4=M1;function ki(e){var{state:t,api:n,prefix:r,suffix:o=r}=e,i=fa({text:t.text,selection:t.selection}),a=n.setSelectionRange(i);Xt({api:n,selectedText:a.selectedText,selection:t.selection,prefix:r,suffix:o})}U({},M1,{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 k4={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)=>{ki({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},D4=k4,w4={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)=>{ki({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},I4=w4,A4={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)=>{ki({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},P4=A4,R4={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)=>{ki({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},M4=R4,O4={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)=>{ki({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},L4=O4,N4={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=cn({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)?Xt({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}),Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}))}},F4={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")}},_4=()=>[a4,h4,v4,p4,d4([S4,D4,I4,P4,M4,L4],{name:"title",groupName:"title",buttonProps:{"aria-label":"Insert title",title:"Insert title"}}),Ss,m4,T4,s4,R1,l4,f4,N4,Ss,g4,b4,x4,Ss,F4],B4=()=>[E4,C4,y4,Ss,u4];function Xs(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 Cd{constructor(t){this.textArea=void 0,this.textArea=t}replaceSelection(t){return ti(this.textArea,t),Xs(this.textArea)}setSelectionRange(t){return this.textArea.focus(),this.textArea.selectionStart=t.start,this.textArea.selectionEnd=t.end,Xs(this.textArea)}}class Td{constructor(t){this.textArea=void 0,this.textApi=void 0,this.textArea=t,this.textApi=new Cd(t)}getState(){return this.textArea?Xs(this.textArea):!1}executeCommand(t,n,r,o){t.execute&&t.execute(U({command:t},Xs(this.textArea)),this.textApi,n,r,o)}}function ks(e){e.stopPropagation(),e.preventDefault()}function mh(e,t){ks(e);var n=e.target,r=new Cd(n),o={start:n.selectionStart,end:n.selectionEnd};if(o=fa({text:n.value,selection:o}),!(t<0&&o.start<=0||t>0&&o.end>=n.value.length)){var i=n.value.slice(o.start,o.end);if(t<0){var a=fa({text:n.value,selection:{start:o.start-1,end:o.start-1}}),s=n.value.slice(a.start,a.end);r.setSelectionRange({start:a.start,end:o.end}),ti(n,i+`
|
|
79
|
-
`+s),r.setSelectionRange({start:a.start,end:a.start+i.length})}else{var l=fa({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}),ti(n,u+`
|
|
80
|
-
`+i),r.setSelectionRange({start:l.end-i.length,end:l.end})}}}function j4(e,t,n){t===void 0&&(t=2),n===void 0&&(n=!1);var r=e.target,o=r.value.substr(0,r.selectionStart),i=o.split(`
|
|
81
|
-
`),a=i[i.length-1],s=new Cd(r);if(!n&&e.code&&e.code.toLowerCase()==="tab"){ks(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
|
-
`),p=[];d.forEach((N,O)=>{N!==u[O]&&p.push(N)});var h=p.join(`
|
|
84
|
-
`),f=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=yd(h,e.shiftKey?"":l),x=b.modifiedText;e.shiftKey&&(x=x.split(`
|
|
85
|
-
`).map(N=>N.replace(new RegExp("^"+l),"")).join(`
|
|
86
|
-
`)),s.replaceSelection(x);var y=e.shiftKey?-t:t,E=e.shiftKey?-p.length*t:p.length*t;s.setSelectionRange({start:m+y,end:m+f.length+E})}else return ti(r,l)}else if(e.keyCode===13&&e.code.toLowerCase()==="enter"&&(/^(-|\*)\s/.test(a)||/^\d+.\s/.test(a))&&!e.shiftKey){ks(e);var C=`
|
|
87
|
-
- `;return a.startsWith("*")&&(C=`
|
|
88
|
-
* `),(a.startsWith("- [ ]")||a.startsWith("- [X]")||a.startsWith("- [x]"))&&(C=`
|
|
89
|
-
- [ ] `),/^\d+.\s/.test(a)&&(C=`
|
|
90
|
-
`+(parseInt(a)+1)+". "),ti(r,C)}else if(e.code&&e.code.toLowerCase()==="keyd"&&e.ctrlKey){ks(e);var k={start:r.selectionStart,end:r.selectionEnd},v=k;k=fa({text:r.value,selection:k});var S=r.value.slice(k.start,k.end);s.setSelectionRange({start:k.end,end:k.end}),ti(r,`
|
|
91
|
-
`+S),s.setSelectionRange({start:v.start,end:v.end})}else e.code&&e.code.toLowerCase()==="arrowup"&&e.altKey?mh(e,-1):e.code&&e.code.toLowerCase()==="arrowdown"&&e.altKey&&mh(e,1)}var $4=["prefixCls","onChange"],H4=["markdown","commands","fullscreen","preview","highlightEnable","extraCommands","tabSize","defaultTabEnable","autoFocusEnd","textareaWarp","dispatch"];function U4(e){var{prefixCls:t,onChange:n}=e,r=$e(e,$4),o=q.useContext(Si),{markdown:i,commands:a,fullscreen:s,preview:l,highlightEnable:u,extraCommands:d,tabSize:p,defaultTabEnable:h,autoFocusEnd:f,textareaWarp:m,dispatch:b}=o;$e(o,H4);var x=q.useRef(null),y=q.useRef(),E=q.useRef({fullscreen:s,preview:l});q.useEffect(()=>{E.current={fullscreen:s,preview:l,highlightEnable:u}},[s,l,u]),q.useEffect(()=>{if(x.current&&b){var k=new Td(x.current);y.current=k,b({textarea:x.current,commandOrchestrator:k})}},[]),q.useEffect(()=>{if(f&&x.current&&m){x.current.focus();var k=x.current.value.length;x.current.setSelectionRange(k,k),setTimeout(()=>{m&&(m.scrollTop=m.scrollHeight),x.current&&(x.current.scrollTop=x.current.scrollHeight)},0)}},[m]);var C=k=>{j4(k,p,h),I1(k,[...a||[],...d||[]],y.current,b,E.current)};return q.useEffect(()=>(x.current&&x.current.addEventListener("keydown",C),()=>{x.current&&x.current.removeEventListener("keydown",C)}),[]),c.jsx("textarea",U({autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1},r,{ref:x,className:t+"-text-input "+(r.className?r.className:""),value:i,onChange:k=>{b&&b({markdown:k.target.value}),n&&n(k)}}))}var z4=["prefixCls","className","onScroll","renderTextarea"];function V4(e){var t=e||{},{prefixCls:n,className:r,onScroll:o,renderTextarea:i}=t,a=$e(t,z4),{markdown:s,scrollTop:l,commands:u,extraCommands:d,dispatch:p}=q.useContext(Si),h=q.useRef(null),f=q.useRef(),m=q.createRef();q.useEffect(()=>{var x={};m.current&&(x.textareaWarp=m.current||void 0,m.current.scrollTop=l||0),p&&p(U({},x))},[]),q.useEffect(()=>{if(h.current&&p){var x=new Td(h.current);f.current=x,p({textarea:h.current,commandOrchestrator:x})}},[]);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:i?q.cloneElement(i(U({},a,{value:s,autoComplete:"off",autoCorrect:"off",spellCheck:"false",autoCapitalize:"off",className:n+"-text-input",style:{WebkitTextFillColor:"inherit",overflow:"auto"}}),{dispatch:p,onChange:a.onChange,shortcuts:I1,useContext:{commands:u,extraCommands:d,commandOrchestrator:f.current}}),{ref:h}):c.jsx(q.Fragment,{children:c.jsx(U4,U({prefixCls:n},a,{style:b}))})})})}function W4(e){var{prefixCls:t,groupName:n,commands:r,children:o}=e||{},{barPopup:i={}}=q.useContext(Si);return q.useMemo(()=>c.jsx("div",{className:t+"-toolbar-child "+(n&&i[n]?"active":""),onClick:a=>a.stopPropagation(),children:Array.isArray(r)?c.jsx(O1,U({commands:r},e,{isChild:!0})):o}),[r,i,n,t])}function gh(e){var{prefixCls:t,overflow:n}=e,{fullscreen:r,preview:o,barPopup:i={},components:a,commandOrchestrator:s,dispatch:l}=q.useContext(Si),u=q.useRef("");function d(p,h){if(l){var f={barPopup:U({},i)};p.keyCommand==="preview"&&(f.preview=p.value),p.keyCommand==="fullscreen"&&(f.fullscreen=!r),e.commands&&p.keyCommand==="group"?e.commands.forEach(m=>{h===m.groupName?f.barPopup[h]=!0:m.keyCommand&&(f.barPopup[m.groupName]=!1)}):(h||p.parent)&&Object.keys(f.barPopup||{}).forEach(m=>{f.barPopup[m]=!1}),Object.keys(f).length&&l(U({},f)),s&&s.executeCommand(p)}}return q.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((p,h)=>{if(p.keyCommand==="divider")return c.jsx("li",U({},p.liProps,{className:t+"-toolbar-divider"}),h);if(!p.keyCommand)return c.jsx(q.Fragment,{},h);var f=r&&p.keyCommand==="fullscreen"||p.keyCommand==="preview"&&o===p.value,m=p.children&&typeof p.children=="function"?p.children({getState:()=>s.getState(),textApi:s?s.textApi:void 0,close:()=>d({},p.groupName),execute:()=>d({execute:p.execute}),dispatch:l}):void 0,b=i&&o&&o==="preview"&&!/(preview|fullscreen)/.test(p.keyCommand),x=a?.toolbar||p.render,y=x&&typeof x=="function"?x(p,!!b,d,h):null;return c.jsxs("li",U({},p.liProps,{className:f?"active":"",children:[y&&q.isValidElement(y)&&y,!y&&!p.buttonProps&&p.icon,!y&&p.buttonProps&&q.createElement("button",U({type:"button",key:h,disabled:b,"data-name":p.name},p.buttonProps,{onClick:E=>{E.stopPropagation(),d(p,p.groupName)}}),p.icon),p.children&&c.jsx(W4,{overflow:n,groupName:p.groupName,prefixCls:t,children:m,commands:Array.isArray(p.children)?p.children:void 0})]}),h)})})}function O1(e){e===void 0&&(e={});var{prefixCls:t,isChild:n,className:r}=e,{commands:o,extraCommands:i}=q.useContext(Si);return c.jsxs("div",{className:t+"-toolbar "+r,children:[c.jsx(gh,U({},e,{commands:e.commands||o||[]})),!n&&c.jsx(gh,U({},e,{commands:i||[]}))]})}function bh(e){var{hideToolbar:t,toolbarBottom:n,placement:r,overflow:o,prefixCls:i}=e;if(t||r==="bottom"&&!n||r==="top"&&n)return null;var a=n?"bottom":"";return c.jsx(O1,{prefixCls:i,overflow:o,className:a})}var q4=e=>{var{prefixCls:t,onChange:n}=e||{},r=q.useRef(null),o=q.useRef(),i=q.useRef(e.height);q.useEffect(()=>{i.current!==e.height&&(i.current=e.height)},[e.height]);function a(d){if(o.current){var p,h=d.clientY||((p=d.changedTouches[0])==null?void 0:p.clientY),f=o.current.height+h-o.current.dragY;f>=e.minHeight&&f<=e.maxHeight&&n&&n(o.current.height+(h-o.current.dragY))}}function s(){var d,p;o.current=void 0,document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s),(d=r.current)==null||d.removeEventListener("touchmove",a),(p=r.current)==null||p.removeEventListener("touchend",s)}function l(d){var p,h,f;d.preventDefault();var m=d.clientY||((p=d.changedTouches[0])==null?void 0:p.clientY);o.current={height:i.current,dragY:m},document.addEventListener("mousemove",a),document.addEventListener("mouseup",s),(h=r.current)==null||h.addEventListener("touchmove",a,{passive:!1}),(f=r.current)==null||f.addEventListener("touchend",s,{passive:!1})}q.useEffect(()=>{if(document){var d,p;(d=r.current)==null||d.addEventListener("touchstart",l,{passive:!1}),(p=r.current)==null||p.addEventListener("mousedown",l)}return()=>{if(document){var h;(h=r.current)==null||h.removeEventListener("touchstart",l),document.removeEventListener("mousemove",a)}}},[]);var u=q.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})},Y4=["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 K4(e){return e===void 0&&(e={}),Object.keys(e).forEach(t=>{e[t]=!1}),e}var G4=q.forwardRef((e,t)=>{var n=e||{},{prefixCls:r="w-md-editor",className:o,value:i,commands:a=_4(),commandsFilter:s,direction:l,extraCommands:u=B4(),height:d=200,enableScroll:p=!0,visibleDragbar:h=typeof e.visiableDragbar=="boolean"?e.visiableDragbar:!0,highlightEnable:f=!0,preview:m="live",fullscreen:b=!1,overflow:x=!0,previewOptions:y={},textareaProps:E,maxHeight:C=1200,minHeight:k=100,autoFocus:v,autoFocusEnd:S=!1,tabSize:N=2,defaultTabEnable:O=!1,onChange:B,onStatistics:R,onHeightChange:F,hideToolbar:T,toolbarBottom:L=!1,components:I,renderTextarea:A}=n,M=$e(n,Y4),W=a.map(be=>s?s(be,!1):be).filter(Boolean),H=u.map(be=>s?s(be,!0):be).filter(Boolean),[j,w]=q.useReducer(o4,{markdown:i,preview:m,components:I,height:d,minHeight:k,highlightEnable:f,tabSize:N,defaultTabEnable:O,scrollTop:0,scrollTopPreview:0,commands:W,extraCommands:H,fullscreen:b,barPopup:{}}),V=q.useRef(null),J=q.useRef(null),_=q.useRef(p);q.useImperativeHandle(t,()=>U({},j,{container:V.current,dispatch:w})),q.useMemo(()=>_.current=p,[p]),q.useEffect(()=>{var be={};V.current&&(be.container=V.current||void 0),be.markdown=i||"",be.barPopup={},w&&w(U({},j,be))},[]);var de=[o,"wmde-markdown-var",l?r+"-"+l:null,r,j.preview?r+"-show-"+j.preview:null,j.fullscreen?r+"-fullscreen":null].filter(Boolean).join(" ").trim();q.useMemo(()=>i!==j.markdown&&w({markdown:i||""}),[i,j.markdown]),q.useMemo(()=>m!==j.preview&&w({preview:m}),[m]),q.useMemo(()=>N!==j.tabSize&&w({tabSize:N}),[N]),q.useMemo(()=>f!==j.highlightEnable&&w({highlightEnable:f}),[f]),q.useMemo(()=>v!==j.autoFocus&&w({autoFocus:v}),[v]),q.useMemo(()=>S!==j.autoFocusEnd&&w({autoFocusEnd:S}),[S]),q.useMemo(()=>b!==j.fullscreen&&w({fullscreen:b}),[b]),q.useMemo(()=>d!==j.height&&w({height:d}),[d]),q.useMemo(()=>d!==j.height&&F&&F(j.height,d,j),[d,F,j]),q.useMemo(()=>a!==j.commands&&w({commands:W}),[e.commands]),q.useMemo(()=>u!==j.extraCommands&&w({extraCommands:H}),[e.extraCommands]);var Z=q.useRef(),Y=q.useRef("preview"),te=q.useRef(!1);q.useMemo(()=>{Z.current=j.textareaWarp,j.textareaWarp&&(j.textareaWarp.addEventListener("mouseover",()=>{Y.current="text"}),j.textareaWarp.addEventListener("mouseleave",()=>{Y.current="preview"}))},[j.textareaWarp]);var X=(be,le)=>{if(_.current){var Re=Z.current,ve=J.current?J.current:void 0;if(te.current||(Y.current=le,te.current=!0),Re&&ve){var ze=(Re.scrollHeight-Re.offsetHeight)/(ve.scrollHeight-ve.offsetHeight);be.target===Re&&Y.current==="text"&&(ve.scrollTop=Re.scrollTop/ze),be.target===ve&&Y.current==="preview"&&(Re.scrollTop=ve.scrollTop*ze);var De=0;Y.current==="text"?De=Re.scrollTop||0:Y.current==="preview"&&(De=ve.scrollTop||0),w({scrollTop:De})}}},re=r+"-preview "+(y.className||""),Q=be=>X(be,"preview"),K=q.useMemo(()=>c.jsx("div",{ref:J,className:re,children:c.jsx(D1,U({},y,{onScroll:Q,source:j.markdown||""}))}),[re,y,j.markdown]),ae=I?.preview&&I?.preview(j.markdown||"",j,w);ae&&q.isValidElement(ae)&&(K=c.jsx("div",{className:re,ref:J,onScroll:Q,children:ae}));var ee=U({},M.style,{height:j.height||"100%"}),ne=()=>w({barPopup:U({},K4(j.barPopup))}),ye=be=>w({height:be}),pe=be=>{if(B&&B(be.target.value,be,j),E&&E.onChange&&E.onChange(be),j.textarea&&j.textarea instanceof HTMLTextAreaElement&&R){var le=new Td(j.textarea),Re=le.getState()||{};R(U({},Re,{lineCount:be.target.value.split(`
|
|
92
|
-
`).length,length:be.target.value.length}))}};return c.jsx(Si.Provider,{value:U({},j,{dispatch:w}),children:c.jsxs("div",U({ref:V,className:de},M,{onClick:ne,style:ee,children:[c.jsx(bh,{hideToolbar:T,toolbarBottom:L,prefixCls:r,overflow:x,placement:"top"}),c.jsxs("div",{className:r+"-content",children:[/(edit|live)/.test(j.preview||"")&&c.jsx(V4,U({className:r+"-input",prefixCls:r,autoFocus:v},E,{onChange:pe,renderTextarea:I?.textarea||A,onScroll:be=>X(be,"text")})),/(live|preview)/.test(j.preview||"")&&K]}),h&&!j.fullscreen&&c.jsx(q4,{prefixCls:r,height:j.height,maxHeight:C,minHeight:k,onChange:ye}),c.jsx(bh,{hideToolbar:T,toolbarBottom:L,prefixCls:r,overflow:x,placement:"bottom"})]}))})}),L1=G4;L1.Markdown=D1;const Ou={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"}]}}},Q4={...Ou,patterns:[...Ou.patterns,{include:"#docvar"}],repository:{...Ou.repository,docvar:{patterns:[{match:"\\<\\<[^(\\>\\>)]*\\>\\>",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"markup.italic.markdown"}]}}},X4={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"}]}}},Z4="github-light";let Lu;function J4(){return Lu||(Lu=(async()=>{const[{createHighlighterCore:e},{createOnigurumaEngine:t},{default:n},{default:r},{default:o},{default:i}]=await Promise.all([Promise.resolve().then(()=>require("./core-7-3Jcsb0.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:[i],langs:[n,r,o,{name:"malloy",scopeName:"source.malloy",embeddedLangs:["sql"],...Q4},{name:"malloysql",scopeName:"source.malloy-sql",embeddedLangs:["sql"],...X4}]})})()),Lu}async function Zs(e,t){return(await J4()).codeToHtml(e,{lang:t,theme:Z4})}function Qt(e){const{server:t}=st.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 i=new Error(o.response.data.message||o.message);throw i.status=o.response.status,i.data=o.response.data,i}}throw r}},retry:!1,throwOnError:!1};return Mr.useQuery(n,st.globalQueryClient)}function ur(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 i=new Error(o.response.data.message||o.message);throw i.status=o.response.status,i.data=o.response.data,i}}throw r}},retry:!1,throwOnError:!1};return Mr.useMutation(t,st.globalQueryClient)}const Tt=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 i=r[o];i==="environments"?n.environmentName=decodeURI(r[o+1])||void 0:i==="packages"?n.packageName=decodeURI(r[o+1])||void 0:i==="connections"?n.connectionName=decodeURI(r[o+1])||void 0:i==="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},Wa=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 vd({sourceAndPaths:e,selectedSourceIndex:t,existingQuery:n,onQueryChange:r,onSourceChange:o,resourceUri:i}){return q.useEffect(()=>{o&&o(t)},[t,o]),c.jsx(Wc,{children:c.jsxs(dt.Stack,{spacing:2,component:"section",children:[c.jsx(N1,{sourceAndPath:e[t],existingQuery:n,onChange:a=>{r&&r(a)},resourceUri:i}),c.jsx(dt.Box,{height:"5px"})]})})}function Ds(){return{query:void 0,malloyQuery:void 0,malloyResult:void 0}}function e5({sourceAndPath:e,onChange:t,existingQuery:n,explorerComponents:r,QueryBuilder:o,resourceUri:i}){const[a,s]=q.useState(n||Ds()),[l,u]=q.useState(void 0);q.useEffect(()=>{n&&s(n)},[n]);const[d,p]=q.useState([]),{MalloyExplorerProvider:h,QueryPanel:f,ResizableCollapsiblePanel:m,ResultPanel:b,SourcePanel:x}=r;q.useEffect(()=>{t&&t(a)},[t,a]);const{environmentName:y,packageName:E,versionId:C}=Tt(i),{apiClients:k}=st.useServer(),v=ur({mutationFn:()=>{const B=typeof a?.malloyQuery=="string"?a.malloyQuery:new o.ASTQuery({source:e.sourceInfo,query:a?.malloyQuery}).toMalloy();return u({executionState:"running",query:a?.malloyQuery,queryResolutionStartMillis:Date.now(),onCancel:()=>{v.reset(),u(void 0)},response:{result:{}}}),s({...a,query:B}),k.models.executeQueryModel(y,E,e.modelPath,{query:B,sourceName:void 0,queryName:void 0,versionId:C})},onSuccess:B=>{if(B){const R=JSON.parse(B.data.result);s({...a,malloyResult:R}),u(F=>F?{...F,executionState:"finished",response:{result:R}}:void 0)}},onError:B=>{u(void 0),console.error("Query execution error:",B)}}),[S,N]=q.useState(e.sourceInfo.name);q.useEffect(()=>{S!==e.sourceInfo.name&&(N(e.sourceInfo.name),s(Ds()),u(void 0))},[e,S]);const O=q.useCallback(B=>{s({...a,malloyQuery:B,malloyResult:void 0})},[a]);return S!==e.sourceInfo.name?c.jsx("div",{children:"Loading..."}):c.jsx(c0,{sx:{border:"1px solid #e0e0e0",borderRadius:"8px",overflow:"hidden"},children:c.jsx(h,{source:e.sourceInfo,query:a?.malloyQuery,topValues:[],onFocusedNestViewPathChange:p,focusedNestViewPath:d,onQueryChange:O,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(x,{onRefresh:()=>s(Ds())})}),c.jsx(m,{isInitiallyExpanded:!0,initialWidth:280,minWidth:280,icon:"filterSliders",title:"Query",children:c.jsx(f,{runQuery:()=>{console.log(`running query with: ${a?.malloyQuery}`);try{v.mutate()}catch(B){console.error("Error running query:",B)}}})}),c.jsx(b,{source:e.sourceInfo,draftQuery:a?.malloyQuery,setDraftQuery:B=>s({...a,malloyQuery:B}),submittedQuery:l,options:{showRawQuery:!0}})]})})},e.sourceInfo.name)}function N1(e){const[t,n]=q.useState(null),[r,o]=q.useState(null),[i,a]=q.useState(!0);return q.useEffect(()=>{let s=!0;return Promise.all([import("@malloydata/malloy-explorer"),import("@malloydata/malloy-query-builder")]).then(([l,u])=>{s&&(n(l),o(u),a(!1))}).catch(l=>{console.error("Failed to load Malloy components:",l),s&&a(!1)}),()=>{s=!1}},[]),i||!t||!r?c.jsx(DE,{children:c.jsx(c0,{children:c.jsx("div",{style:{alignItems:"center",justifyContent:"center",height:"200px",color:"#666"},children:"Loading explorer..."})})}):c.jsx(e5,{...e,explorerComponents:t,QueryBuilder:r,resourceUri:e.resourceUri})}function Zt({text:e,size:t=20,color:n="primary",thickness:r=3.6,centered:o=!0,spacing:i=2,textVariant:a="body2"}){const s=c.jsxs(P.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:i},children:[c.jsx(P.CircularProgress,{size:t,color:n,thickness:r}),e&&c.jsx(P.Typography,{variant:a,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 t5=q.lazy(()=>Promise.resolve().then(()=>Sj));function Di({result:e,maxHeight:t,maxResultSize:n=0}){const r=q.useRef(null),[o,i]=q.useState(t),[a,s]=q.useState(!1);if(!e)return null;if(n>0&&e.length>n&&!a)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(Dn.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(Zt,{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(q.Suspense,{fallback:u,children:c.jsx(t5,{result:e,height:d,onSizeChange:i})})})}function n5({cell:e,sourceAndPaths:t,resourceUri:n,onQueryChange:r,onSourceChange:o}){const i={query:e.value,malloyResult:e.result?JSON.parse(e.result):void 0,malloyQuery:e.queryInfo?JSON.parse(e.queryInfo):void 0},a=t.findIndex(s=>s.sourceInfo.name===e.sourceName);return c.jsx(vd,{resourceUri:n,sourceAndPaths:t,selectedSourceIndex:a>=0?a:0,existingQuery:i,onQueryChange:r,onSourceChange:o})}function r5({cell:e,editingMalloy:t,editingMarkdown:n,sourceAndPaths:r,resourceUri:o,onCellChange:i,onClose:a,onEdit:s,onDelete:l,addButtonCallback:u}){const[d,p]=q.useState(e.value),[h,f]=q.useState(!1),[m,b]=q.useState(!1),[x,y]=q.useState(),[E]=q.useState(),[C,k]=q.useState(Ds()),[v,S]=q.useState(!1),[N,O]=q.useState(e.sourceName?r.findIndex(V=>V.sourceInfo.name===e.sourceName):0);q.useEffect(()=>{e.isMarkdown||Zs(e.value,"malloy").then(V=>{y(V)})},[e]),q.useEffect(()=>{document.documentElement.setAttribute("data-color-mode","light")});const[B,R]=q.useState(!1),F=()=>{l(),R(!1)},T=r.length===0,L=q.useCallback(()=>{const V=r[N],J=V?.modelPath||e.modelPath||"",_=V?.sourceInfo.name||e.sourceName||"";i({...e,value:e.isMarkdown?d:C.query,result:C.malloyResult?JSON.stringify(C.malloyResult):void 0,queryInfo:C.malloyQuery?JSON.stringify(C.malloyQuery):void 0,sourceName:_,modelPath:J})},[e,d,C,i,N,r]),I=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"})})})}),A=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:F,color:"error",children:"Delete"})]})]}),M=()=>{L(),a()},W=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(ts,{})})}):c.jsx(P.Tooltip,{title:"Edit",children:c.jsx(P.IconButton,{size:"small",onClick:s,children:c.jsx(jp,{})})}),!n&&I]}):c.jsxs(c.Fragment,{children:[!t&&c.jsx(P.Tooltip,{title:h?"Hide Code":"View Code",children:c.jsx(P.IconButton,{size:"small",onClick:()=>{f(!h)},children:c.jsx(d0,{})})}),!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(qc,{})})}),t&&c.jsx(P.Tooltip,{title:"Save",children:c.jsx(P.IconButton,{size:"small",onClick:M,children:c.jsx(ts,{})})}),!t&&c.jsx(P.Tooltip,{title:"Edit",children:c.jsx(P.IconButton,{size:"small",onClick:s,children:c.jsx(jp,{})})}),!t&&I]}),H=t||n,j=n?c.jsx(P.Tooltip,{title:"Save",children:c.jsx(P.IconButton,{size:"small",onClick:M,children:c.jsx(ts,{})})}):t?c.jsx(P.Tooltip,{title:"Save",children:c.jsx(P.IconButton,{size:"small",onClick:M,children:c.jsx(ts,{})})}):null,w=v&&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:!H&&c.jsxs(c.Fragment,{children:[u(!0),u(!1),W]})||j});return c.jsxs(Us,{sx:{position:"relative",marginTop:"5px",marginBottom:"5px",borderWidth:"1.5px",backgroundColor:"#fff",minHeight:"50px"},onMouseEnter:()=>S(!0),onMouseLeave:()=>{S(!1)},children:[w,e.isMarkdown?c.jsx(c.Fragment,{children:n?c.jsx(L1,{value:d,preview:"edit",autoFocus:!0,onChange:V=>{p(V),i({...e,value:V})},onBlur:()=>{L(),v||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(Bs,{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:x}})})}),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(n5,{sourceAndPaths:r,resourceUri:o,onQueryChange:V=>{k(V)},onSourceChange:V=>{O(V)},cell:e})),!t&&e.result&&c.jsx(Us,{variant:"outlined",sx:{borderRadius:0},children:c.jsx(Di,{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&&A]})}const F1=q.createContext(void 0);function o5({children:e,workbookStorage:t}){const n=q.useMemo(()=>({workbookStorage:t}),[t]);return c.jsx(F1.Provider,{value:n,children:e})}function Sd(){const e=q.useContext(F1);if(!e)throw new Error("useWorkbookStorage must be used within a WorkbookStorageProvider");return e}const Kr=tt(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"})),i5=tt(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 Jt({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 a5({initialSelectedModels:e,onModelChange:t,resourceUri:n}){const{environmentName:r,packageName:o,versionId:i}=Tt(n),{apiClients:a}=st.useServer(),{data:s,isLoading:l,isSuccess:u,isError:d,error:p}=Qt({queryKey:["models",r,o,i],queryFn:()=>a.models.listModels(r,o,i)}),[h,f]=q.useState(e||[]),[m,b]=q.useState(null);q.useEffect(()=>{f(e||[])},[e]);const x=C=>{const k=h.filter(v=>v!==C);f(k),t(k)},y=C=>{const k=[...h,C];f(k),t(k),b(null)};let E=[];return u&&s?.data&&(E=s.data.filter(C=>!h.includes(C.path)).map(C=>C.path)),d?c.jsx(Jt,{error:p,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(C=>c.jsx(P.Chip,{label:C,onDelete:()=>x(C),deleteIcon:c.jsx(Kr,{}),sx:{marginBottom:"5px"}},C)),c.jsx(P.Button,{size:"small",startIcon:c.jsx(i5,{}),onClick:C=>b(C.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(C=>c.jsx(P.MenuItem,{onClick:()=>y(C),children:c.jsx(P.Typography,{variant:"body2",children:C})},C))]})]})}function _1(){const e=Xx.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 s5({workbookPath:e,resourceUri:t}){const n=_1(),{server:r,getAccessToken:o}=st.useServer(),{apiClients:i}=st.useServer(),{workbookStorage:a}=Sd(),{environmentName:s,packageName:l}=Tt(t),[u,d]=q.useState(void 0),[p,h]=q.useState(void 0);if(!a)throw new Error("Workbook storage be provided via WorkbookStorageProvider");const[f,m]=q.useState(),[b,x]=q.useState(),[y,E]=q.useState(),[C,k]=q.useState([]),[v,S]=q.useState(null),[N,O]=q.useState(null),B=!!v,R=()=>{S(null),O(null)},F=(V,J)=>{f&&(m(f.insertCell(J,{isMarkdown:V,value:""})),V?E(J):x(J),R(),console.log("handleAddCell",V,J))},[T,L]=q.useState(!1),I=()=>{L(!0)},A=async()=>{e&&a&&await a.deleteWorkbook(e).then(()=>{h(void 0),d(void 0)}).catch(V=>{h(`Error deleting workbook: ${V.message}`),d(void 0)}),L(!1),n(`/${s}/${l}`)},M=()=>{L(!1)},W=q.useCallback(async()=>{if(!f){console.log("No workbook data ref");return}try{m(await f.saveWorkbook()),h(void 0),d("Workbook saved")}catch(V){h(`Error saving workbook: ${V.message}`),d(void 0)}},[f]);if(q.useEffect(()=>{if(!f)return;(async()=>{const J=new Map(C.map(({modelPath:Z,sourceInfos:Y})=>[Z,Y])),_=[],de=[];for(const Z of f.getModels())J.has(Z)?_.push({modelPath:Z,sourceInfos:J.get(Z)}):(console.log("Fetching model from Publisher",Z),de.push(i.models.getModel(s,l,Z,void 0).then(Y=>({modelPath:Z,sourceInfos:Y.data.sourceInfos.map(te=>JSON.parse(te))}))));if(de.length>0){const Z=await Promise.all(de);k([..._,...Z])}else k(_)})()},[o,f,l,s,r]),q.useEffect(()=>{e&&Zo.loadWorkbook(a,e).then(V=>{m(V)})},[e,a]),!f)return c.jsx("div",{children:"Loading..."});const H=V=>{const J=[];for(const _ of V)for(const de of _.sourceInfos)J.push({modelPath:_.modelPath,sourceInfo:de});return J},j=(V,J)=>c.jsx(P.Button,{size:"small",startIcon:c.jsx(Vc,{}),onClick:()=>F(V,J),variant:"contained",sx:{backgroundColor:"#fff",color:_=>_.palette.mode==="dark"?_.palette.grey[100]:_.palette.grey[700],boxShadow:"none","&:hover":{backgroundColor:_=>_.palette.mode==="dark"?_.palette.grey[500]:_.palette.grey[300],boxShadow:"none"}},children:V?"Markdown":"Explore"}),w=c.jsxs(P.Box,{sx:{display:"flex",gap:1,justifyContent:"center",flex:2},children:[j(!1,f.getCells().length),j(!0,f.getCells().length)]});return c.jsxs(Us,{variant:"outlined",children:[c.jsxs(u0,{children:[c.jsx(P.Box,{sx:{mb:2},children:c.jsx(P.Box,{sx:{minHeight:"24px"},children:p?c.jsx(P.Typography,{color:"error",variant:"body2",children:p}):u?c.jsx(P.Typography,{color:"success",variant:"body2",children:u}):c.jsx("span",{children:" "})})}),c.jsxs($o,{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[c.jsxs($o,{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($o,{sx:{display:"flex",flexDirection:"row",gap:1},children:[c.jsx(P.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:c.jsx(l5,{workbookData:f})}),c.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:[c.jsx(P.Button,{color:"error",onClick:I,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:A,color:"error",autoFocus:!0,size:"small",children:"Delete"})]})]})]})]})]}),c.jsx(P.Divider,{}),c.jsxs($o,{sx:{display:"flex",flexDirection:"row",width:"100%",mt:2},children:[c.jsx(P.Box,{sx:{flex:1},children:c.jsx(a5,{initialSelectedModels:f.getModels(),onModelChange:V=>{m(f.setModels(V)),W()},resourceUri:t})}),c.jsx(P.Box,{sx:{flex:1}})]})]}),c.jsx(Wc,{children:c.jsxs($o,{children:[f.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."})]}),f.getCells().map((V,J)=>c.jsx(q.Fragment,{children:c.jsx(r5,{cell:V,resourceUri:t,addButtonCallback:_=>j(_,J),sourceAndPaths:H(C),editingMarkdown:y===J,editingMalloy:b===J,onDelete:()=>{m(f.deleteCell(J)),W()},onCellChange:_=>{m(f.setCell(J,_))},onEdit:()=>{V.isMarkdown?E(J):x(J)},onClose:()=>{V.isMarkdown?E(void 0):x(void 0),W()}},`${J}-${V.isMarkdown}-${e.workspace}-${e.path}`)},`${J}-${f.getCells().length}`)),w,c.jsxs(P.Menu,{anchorEl:v,open:B,onClose:R,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[c.jsx(P.MenuItem,{onClick:()=>F(!0,N??0),children:"Add Markdown"}),c.jsx(P.MenuItem,{onClick:()=>F(!1,N??0),children:"Add Malloy"})]}),c.jsx($o,{sx:{flexDirection:"row",justifyContent:"flex-end",p:1}})]})})]})}function l5({workbookData:e}){const[t,n]=q.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 B1({onWorkbookClick:e}){const{workbookStorage:t}=Sd(),[n,r]=q.useState([]),[o,i]=q.useState(void 0);return q.useEffect(()=>{t&&t.listWorkspaces(!1).then(a=>{const s=[];Promise.all(a.map(async l=>{await t.listWorkbooks(l).then(u=>{s.push(...u)}).catch(u=>{i(`Error listing workbooks: ${u.message}`)})})).then(()=>{r(s),i(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(a=>c.jsx(P.ListItem,{onClick:s=>e(a,s),sx:{cursor:"pointer","&:hover":{backgroundColor:"action.hover"}},children:c.jsx(P.ListItemText,{primary:a.path})},a.path))]})})]})}const xh="Local";class u5{async listWorkspaces(t){return Promise.resolve([{name:xh,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:xh})}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 c5({onWorkbookSelect:e}){const{workbookStorage:t}=Sd(),[n,r]=q.useState(""),[o,i]=q.useState(""),[a,s]=q.useState([]),[l,u]=q.useState(null),[d,p]=q.useState(!1),[h,f]=q.useState(!1),m=!!l,b=S=>{u(S.currentTarget)},x=()=>{u(null)},y=()=>{f(!1)},E=()=>{p(!1),r(""),i("")};q.useEffect(()=>{t&&(console.log("fetching workspaces"),t.listWorkspaces(!0).then(S=>{s(S),S.length===1&&i(S[0].name)}).catch(S=>{console.error("Error fetching workspaces:",S),s([])}))},[t]);const C=(S,N)=>{f(!1),e(S,N)},k=S=>{p(!1),e({path:n,workspace:o},S),r(""),i("")},v=a.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:x,MenuListProps:{"aria-labelledby":"basic-button",sx:{py:.5}},children:[c.jsxs(P.MenuItem,{onClick:()=>{p(!0),x()},sx:{py:1,px:2},disabled:v,children:[c.jsx(P.ListItemIcon,{children:c.jsx(Dn.Add,{fontSize:"small"})}),c.jsxs(P.ListItemText,{children:[c.jsx(P.Typography,{variant:"body2",fontWeight:500,children:"New Workbook"}),v?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:()=>{f(!0),x()},sx:{py:1,px:2},children:[c.jsx(P.ListItemIcon,{children:c.jsx(Dn.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:[a.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:S=>i(S.target.value),children:a.map(S=>c.jsx(P.MenuItem,{value:S.name,children:c.jsxs(P.Box,{children:[c.jsx(P.Typography,{variant:"body2",fontWeight:500,children:S.name}),c.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:S.description})]})},S.name))})]}):a.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: ",a[0].name]}),c.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:a[0].description})]}):null,c.jsx(P.FormControl,{fullWidth:!0,children:c.jsx(P.TextField,{label:"Workbook Name",value:n,onChange:S=>r(S.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:S=>k(S),variant:"contained",disabled:!n.trim()||a.length>1&&!o,size:"small",children:"Create Workbook"})]})]})})]}),c.jsxs(P.Dialog,{open:h,onClose:y,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(B1,{onWorkbookClick:C})})]})]})}function d5({resourceUri:e}){const{environmentName:t}=Tt(e),{apiClients:n}=st.useServer(),[r,o]=q.useState(!1),i=90,{data:a,isSuccess:s,isError:l,error:u}=Qt({queryKey:["about",t],queryFn:()=>n.environments.getEnvironment(t,!1)}),d=a?.data?.readme||"",p=d.split(/\s+/),h=p.length>i,f=p.slice(0,i).join(" ");return c.jsxs(c.Fragment,{children:[!s&&!l&&c.jsx(Zt,{text:"Fetching About..."}),s&&d&&c.jsx(Qr,{children:c.jsxs(Xr,{children:[c.jsx(wo,{children:"Readme"}),c.jsxs(P.Box,{sx:{mt:1,fontSize:"0.875rem",lineHeight:1.6},children:[c.jsx(Bs,{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:f}),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(Jt,{error:u,context:`${t} > About`})]})}const j1=ce.oneOfType([ce.func,ce.object]);function yh(e){try{return e.matches(":focus-visible")}catch{}return!1}const Eh={};function $1(e,t){const n=D.useRef(Eh);return n.current===Eh&&(n.current=e(t)),n}class Js{static create(){return new Js}static use(){const t=$1(Js.create).current,[n,r]=D.useState(!1);return t.shouldMount=n,t.setShouldMount=r,D.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=f5(),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 p5(){return Js.use()}function f5(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function Tc(e,t){return Tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Tc(e,t)}function kd(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Tc(e,t)}function h5(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function m5(e,t){e.classList?e.classList.add(t):h5(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Ch(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function g5(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Ch(e.className,t):e.setAttribute("class",Ch(e.className&&e.className.baseVal||"",t))}const Th={disabled:!1},el=q.createContext(null);var H1=function(t){return t.scrollTop},na="unmounted",lo="exited",uo="entering",Yo="entered",vc="exiting",qn=(function(e){kd(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?s?(l=lo,i.appearStatus=uo):l=Yo:r.unmountOnExit||r.mountOnEnter?l=na:l=lo,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===na?{status:lo}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==uo&&a!==Yo&&(i=uo):(a===uo||a===Yo)&&(i=vc)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===uo){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Zi.findDOMNode(this);a&&H1(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===lo&&this.setState({status:na})},n.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[Zi.findDOMNode(this),s],u=l[0],d=l[1],p=this.getTimeouts(),h=s?p.appear:p.enter;if(!o&&!a||Th.disabled){this.safeSetState({status:Yo},function(){i.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:uo},function(){i.props.onEntering(u,d),i.onTransitionEnd(h,function(){i.safeSetState({status:Yo},function(){i.props.onEntered(u,d)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Zi.findDOMNode(this);if(!i||Th.disabled){this.safeSetState({status:lo},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:vc},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:lo},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:Zi.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,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===na)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=$e(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return q.createElement(el.Provider,{value:null},typeof a=="function"?a(o,s):q.cloneElement(q.Children.only(a),s))},t})(q.Component);qn.contextType=el;qn.propTypes={};function Vo(){}qn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Vo,onEntering:Vo,onEntered:Vo,onExit:Vo,onExiting:Vo,onExited:Vo};qn.UNMOUNTED=na;qn.EXITED=lo;qn.ENTERING=uo;qn.ENTERED=Yo;qn.EXITING=vc;var b5=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return m5(t,r)})},Nu=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return g5(t,r)})},Dd=(function(e){kd(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=e.call.apply(e,[this].concat(i))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(s,l){var u=r.resolveArguments(s,l),d=u[0],p=u[1];r.removeClasses(d,"exit"),r.addClass(d,p?"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],p=u[1],h=p?"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],p=u[1],h=p?"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+"-":"",p=u?""+d+s:l[s],h=u?p+"-active":l[s+"Active"],f=u?p+"-done":l[s+"Done"];return{baseClassName:p,activeClassName:h,doneClassName:f}},r}var n=t.prototype;return n.addClass=function(o,i,a){var s=this.getClassNames(i)[a+"ClassName"],l=this.getClassNames("enter"),u=l.doneClassName;i==="appear"&&a==="done"&&u&&(s+=" "+u),a==="active"&&o&&H1(o),s&&(this.appliedClasses[i][a]=s,b5(o,s))},n.removeClasses=function(o,i){var a=this.appliedClasses[i],s=a.base,l=a.active,u=a.done;this.appliedClasses[i]={},s&&Nu(o,s),l&&Nu(o,l),u&&Nu(o,u)},n.render=function(){var o=this.props;o.classNames;var i=$e(o,["classNames"]);return q.createElement(qn,U({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(q.Component);Dd.defaultProps={classNames:""};Dd.propTypes={};function x5(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wd(e,t){var n=function(i){return t&&q.isValidElement(i)?t(i):i},r=Object.create(null);return e&&q.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function y5(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 i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var a,s={};for(var l in t){if(r[l])for(a=0;a<r[l].length;a++){var u=r[l][a];s[r[l][a]]=n(u)}s[l]=n(l)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}function fo(e,t,n){return n[t]!=null?n[t]:e.props[t]}function E5(e,t){return wd(e.children,function(n){return q.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:fo(n,"appear",e),enter:fo(n,"enter",e),exit:fo(n,"exit",e)})})}function C5(e,t,n){var r=wd(e.children),o=y5(t,r);return Object.keys(o).forEach(function(i){var a=o[i];if(q.isValidElement(a)){var s=i in t,l=i in r,u=t[i],d=q.isValidElement(u)&&!u.props.in;l&&(!s||d)?o[i]=q.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:fo(a,"exit",e),enter:fo(a,"enter",e)}):!l&&s&&!d?o[i]=q.cloneElement(a,{in:!1}):l&&s&&q.isValidElement(u)&&(o[i]=q.cloneElement(a,{onExited:n.bind(null,a),in:u.props.in,exit:fo(a,"exit",e),enter:fo(a,"enter",e)}))}}),o}var T5=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},v5={component:"div",childFactory:function(t){return t}},qa=(function(e){kd(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=i.handleExited.bind(x5(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}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,i){var a=i.children,s=i.handleExited,l=i.firstRender;return{children:l?E5(o,s):C5(o,a,s),firstRender:!1}},n.handleExited=function(o,i){var a=wd(this.props.children);o.key in a||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(s){var l=U({},s.children);return delete l[o.key],{children:l}}))},n.render=function(){var o=this.props,i=o.component,a=o.childFactory,s=$e(o,["component","childFactory"]),l=this.state.contextValue,u=T5(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,i===null?q.createElement(el.Provider,{value:l},u):q.createElement(el.Provider,{value:l},q.createElement(i,s,u))},t})(q.Component);qa.propTypes={};qa.defaultProps=v5;const S5=[];function k5(e){D.useEffect(e,S5)}class Id{static create(){return new Id}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 Ol(){const e=$1(Id.create).current;return k5(e.disposeEffect),e}function D5(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:u}=e,[d,p]=D.useState(!1),h=Pe(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),f={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},m=Pe(n.child,d&&n.childLeaving,r&&n.childPulsate);return!s&&!d&&p(!0),D.useEffect(()=>{if(!s&&l!=null){const b=setTimeout(l,u);return()=>{clearTimeout(b)}}},[l,s,u]),c.jsx("span",{className:h,style:f,children:c.jsx("span",{className:m})})}const On=Me("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Sc=550,w5=80,I5=dt.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
|
-
`,A5=dt.keyframes`
|
|
103
|
-
0% {
|
|
104
|
-
opacity: 1;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
100% {
|
|
108
|
-
opacity: 0;
|
|
109
|
-
}
|
|
110
|
-
`,P5=dt.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
|
-
`,R5=ie("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),M5=ie(D5,{name:"MuiTouchRipple",slot:"Ripple"})`
|
|
123
|
-
opacity: 0;
|
|
124
|
-
position: absolute;
|
|
125
|
-
|
|
126
|
-
&.${On.rippleVisible} {
|
|
127
|
-
opacity: 0.3;
|
|
128
|
-
transform: scale(1);
|
|
129
|
-
animation-name: ${I5};
|
|
130
|
-
animation-duration: ${Sc}ms;
|
|
131
|
-
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
&.${On.ripplePulsate} {
|
|
135
|
-
animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
& .${On.child} {
|
|
139
|
-
opacity: 1;
|
|
140
|
-
display: block;
|
|
141
|
-
width: 100%;
|
|
142
|
-
height: 100%;
|
|
143
|
-
border-radius: 50%;
|
|
144
|
-
background-color: currentColor;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
& .${On.childLeaving} {
|
|
148
|
-
opacity: 0;
|
|
149
|
-
animation-name: ${A5};
|
|
150
|
-
animation-duration: ${Sc}ms;
|
|
151
|
-
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
& .${On.childPulsate} {
|
|
155
|
-
position: absolute;
|
|
156
|
-
/* @noflip */
|
|
157
|
-
left: 0px;
|
|
158
|
-
top: 0;
|
|
159
|
-
animation-name: ${P5};
|
|
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
|
-
`,O5=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a,...s}=r,[l,u]=D.useState([]),d=D.useRef(0),p=D.useRef(null);D.useEffect(()=>{p.current&&(p.current(),p.current=null)},[l]);const h=D.useRef(!1),f=Ol(),m=D.useRef(null),b=D.useRef(null),x=D.useCallback(k=>{const{pulsate:v,rippleX:S,rippleY:N,rippleSize:O,cb:B}=k;u(R=>[...R,c.jsx(M5,{classes:{ripple:Pe(i.ripple,On.ripple),rippleVisible:Pe(i.rippleVisible,On.rippleVisible),ripplePulsate:Pe(i.ripplePulsate,On.ripplePulsate),child:Pe(i.child,On.child),childLeaving:Pe(i.childLeaving,On.childLeaving),childPulsate:Pe(i.childPulsate,On.childPulsate)},timeout:Sc,pulsate:v,rippleX:S,rippleY:N,rippleSize:O},d.current)]),d.current+=1,p.current=B},[i]),y=D.useCallback((k={},v={},S=()=>{})=>{const{pulsate:N=!1,center:O=o||v.pulsate,fakeElement:B=!1}=v;if(k?.type==="mousedown"&&h.current){h.current=!1;return}k?.type==="touchstart"&&(h.current=!0);const R=B?null:b.current,F=R?R.getBoundingClientRect():{width:0,height:0,left:0,top:0};let T,L,I;if(O||k===void 0||k.clientX===0&&k.clientY===0||!k.clientX&&!k.touches)T=Math.round(F.width/2),L=Math.round(F.height/2);else{const{clientX:A,clientY:M}=k.touches&&k.touches.length>0?k.touches[0]:k;T=Math.round(A-F.left),L=Math.round(M-F.top)}if(O)I=Math.sqrt((2*F.width**2+F.height**2)/3),I%2===0&&(I+=1);else{const A=Math.max(Math.abs((R?R.clientWidth:0)-T),T)*2+2,M=Math.max(Math.abs((R?R.clientHeight:0)-L),L)*2+2;I=Math.sqrt(A**2+M**2)}k?.touches?m.current===null&&(m.current=()=>{x({pulsate:N,rippleX:T,rippleY:L,rippleSize:I,cb:S})},f.start(w5,()=>{m.current&&(m.current(),m.current=null)})):x({pulsate:N,rippleX:T,rippleY:L,rippleSize:I,cb:S})},[o,x,f]),E=D.useCallback(()=>{y({},{pulsate:!0})},[y]),C=D.useCallback((k,v)=>{if(f.clear(),k?.type==="touchend"&&m.current){m.current(),m.current=null,f.start(0,()=>{C(k,v)});return}m.current=null,u(S=>S.length>0?S.slice(1):S),p.current=v},[f]);return D.useImperativeHandle(n,()=>({pulsate:E,start:y,stop:C}),[E,y,C]),c.jsx(R5,{className:Pe(On.root,i.root,a),ref:b,...s,children:c.jsx(qa,{component:null,exit:!0,children:l})})});function L5(e){return _e("MuiButtonBase",e)}const N5=Me("MuiButtonBase",["root","disabled","focusVisible"]),F5=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=Fe({root:["root",t&&"disabled",n&&"focusVisible"]},L5,o);return n&&r&&(a.root+=` ${r}`),a},_5=ie("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"},[`&.${N5.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),vo=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:u=!1,disableRipple:d=!1,disableTouchRipple:p=!1,focusRipple:h=!1,focusVisibleClassName:f,LinkComponent:m="a",onBlur:b,onClick:x,onContextMenu:y,onDragLeave:E,onFocus:C,onFocusVisible:k,onKeyDown:v,onKeyUp:S,onMouseDown:N,onMouseLeave:O,onMouseUp:B,onTouchEnd:R,onTouchMove:F,onTouchStart:T,tabIndex:L=0,TouchRippleProps:I,touchRippleRef:A,type:M,...W}=r,H=D.useRef(null),j=p5(),w=ot(j.ref,A),[V,J]=D.useState(!1);u&&V&&J(!1),D.useImperativeHandle(o,()=>({focusVisible:()=>{J(!0),H.current.focus()}}),[]);const _=j.shouldMount&&!d&&!u;D.useEffect(()=>{V&&h&&!d&&j.pulsate()},[d,h,V,j]);const de=vr(j,"start",N,p),Z=vr(j,"stop",y,p),Y=vr(j,"stop",E,p),te=vr(j,"stop",B,p),X=vr(j,"stop",De=>{V&&De.preventDefault(),O&&O(De)},p),re=vr(j,"start",T,p),Q=vr(j,"stop",R,p),K=vr(j,"stop",F,p),ae=vr(j,"stop",De=>{yh(De.target)||J(!1),b&&b(De)},!1),ee=Ae(De=>{H.current||(H.current=De.currentTarget),yh(De.target)&&(J(!0),k&&k(De)),C&&C(De)}),ne=()=>{const De=H.current;return l&&l!=="button"&&!(De.tagName==="A"&&De.href)},ye=Ae(De=>{h&&!De.repeat&&V&&De.key===" "&&j.stop(De,()=>{j.start(De)}),De.target===De.currentTarget&&ne()&&De.key===" "&&De.preventDefault(),v&&v(De),De.target===De.currentTarget&&ne()&&De.key==="Enter"&&!u&&(De.preventDefault(),x&&x(De))}),pe=Ae(De=>{h&&De.key===" "&&V&&!De.defaultPrevented&&j.stop(De,()=>{j.pulsate(De)}),S&&S(De),x&&De.target===De.currentTarget&&ne()&&De.key===" "&&!De.defaultPrevented&&x(De)});let be=l;be==="button"&&(W.href||W.to)&&(be=m);const le={};be==="button"?(le.type=M===void 0?"button":M,le.disabled=u):(!W.href&&!W.to&&(le.role="button"),u&&(le["aria-disabled"]=u));const Re=ot(n,H),ve={...r,centerRipple:i,component:l,disabled:u,disableRipple:d,disableTouchRipple:p,focusRipple:h,tabIndex:L,focusVisible:V},ze=F5(ve);return c.jsxs(_5,{as:be,className:Pe(ze.root,s),ownerState:ve,onBlur:ae,onClick:x,onContextMenu:Z,onFocus:ee,onKeyDown:ye,onKeyUp:pe,onMouseDown:de,onMouseLeave:X,onMouseUp:te,onDragLeave:Y,onTouchEnd:Q,onTouchMove:K,onTouchStart:re,ref:Re,tabIndex:u?-1:L,type:M,...le,...W,children:[a,_?c.jsx(O5,{ref:w,center:i,...I}):null]})});function vr(e,t,n,r=!1){return Ae(o=>(n&&n(o),r||e[t](o),!0))}function B5(e){return typeof e.main=="string"}function j5(e,t=[]){if(!B5(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function un(e=[]){return([,t])=>t&&j5(t,e)}function $5(e){return _e("MuiCircularProgress",e)}Me("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const $r=44,kc=dt.keyframes`
|
|
166
|
-
0% {
|
|
167
|
-
transform: rotate(0deg);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
100% {
|
|
171
|
-
transform: rotate(360deg);
|
|
172
|
-
}
|
|
173
|
-
`,Dc=dt.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
|
-
`,H5=typeof kc!="string"?dt.css`
|
|
189
|
-
animation: ${kc} 1.4s linear infinite;
|
|
190
|
-
`:null,U5=typeof Dc!="string"?dt.css`
|
|
191
|
-
animation: ${Dc} 1.4s ease-in-out infinite;
|
|
192
|
-
`:null,z5=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${ke(r)}`],svg:["svg"],circle:["circle",`circle${ke(n)}`,o&&"circleDisableShrink"]};return Fe(i,$5,t)},V5=ie("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ke(n.color)}`]]}})(et(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:H5||{animation:`${kc} 1.4s linear infinite`}},...Object.entries(e.palette).filter(un()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),W5=ie("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),q5=ie("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${ke(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:U5||{animation:`${Dc} 1.4s ease-in-out infinite`}}]}))),Ad=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:a=!1,size:s=40,style:l,thickness:u=3.6,value:d=0,variant:p="indeterminate",...h}=r,f={...r,color:i,disableShrink:a,size:s,thickness:u,value:d,variant:p},m=z5(f),b={},x={},y={};if(p==="determinate"){const E=2*Math.PI*(($r-u)/2);b.strokeDasharray=E.toFixed(3),y["aria-valuenow"]=Math.round(d),b.strokeDashoffset=`${((100-d)/100*E).toFixed(3)}px`,x.transform="rotate(-90deg)"}return c.jsx(V5,{className:Pe(m.root,o),style:{width:s,height:s,...x,...l},ownerState:f,ref:n,role:"progressbar",...y,...h,children:c.jsx(W5,{className:m.svg,ownerState:f,viewBox:`${$r/2} ${$r/2} ${$r} ${$r}`,children:c.jsx(q5,{className:m.circle,style:b,ownerState:f,cx:$r,cy:$r,r:($r-u)/2,fill:"none",strokeWidth:u})})})});function Y5(e){return _e("MuiButton",e)}const oo=Me("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"]),K5=D.createContext({}),G5=D.createContext(void 0),Q5=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,loading:a,loadingPosition:s,classes:l}=e,u={root:["root",a&&"loading",i,`${i}${ke(t)}`,`size${ke(o)}`,`${i}Size${ke(o)}`,`color${ke(t)}`,n&&"disableElevation",r&&"fullWidth",a&&`loadingPosition${ke(s)}`],startIcon:["icon","startIcon",`iconSize${ke(o)}`],endIcon:["icon","endIcon",`iconSize${ke(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},d=Fe(u,Y5,l);return{...l,...d}},U1=[{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}}}],X5=ie(vo,{shouldForwardProp:e=>dn(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ke(n.color)}`],t[`size${ke(n.size)}`],t[`${n.variant}Size${ke(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"},[`&.${oo.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]},[`&.${oo.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${oo.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)",[`&.${oo.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(un()).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"},[`&.${oo.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${oo.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}),[`&.${oo.loading}`]:{color:"transparent"}}}]}})),Z5=ie("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${ke(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}},...U1]})),J5=ie("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${ke(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}},...U1]})),eP=ie("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}}]})),vh=ie("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Dt=D.forwardRef(function(t,n){const r=D.useContext(K5),o=D.useContext(G5),i=Ca(r,t),a=Xe({props:i,name:"MuiButton"}),{children:s,color:l="primary",component:u="button",className:d,disabled:p=!1,disableElevation:h=!1,disableFocusRipple:f=!1,endIcon:m,focusVisibleClassName:b,fullWidth:x=!1,id:y,loading:E=null,loadingIndicator:C,loadingPosition:k="center",size:v="medium",startIcon:S,type:N,variant:O="text",...B}=a,R=Jn(y),F=C??c.jsx(Ad,{"aria-labelledby":R,color:"inherit",size:16}),T={...a,color:l,component:u,disabled:p,disableElevation:h,disableFocusRipple:f,fullWidth:x,loading:E,loadingIndicator:F,loadingPosition:k,size:v,type:N,variant:O},L=Q5(T),I=(S||E&&k==="start")&&c.jsx(Z5,{className:L.startIcon,ownerState:T,children:S||c.jsx(vh,{className:L.loadingIconPlaceholder,ownerState:T})}),A=(m||E&&k==="end")&&c.jsx(J5,{className:L.endIcon,ownerState:T,children:m||c.jsx(vh,{className:L.loadingIconPlaceholder,ownerState:T})}),M=o||"",W=typeof E=="boolean"?c.jsx("span",{className:L.loadingWrapper,style:{display:"contents"},children:E&&c.jsx(eP,{className:L.loadingIndicator,ownerState:T,children:F})}):null;return c.jsxs(X5,{ownerState:T,className:Pe(r.className,L.root,d,M),component:u,disabled:p||E,focusRipple:!f,focusVisibleClassName:Pe(L.focusVisible,b),ref:n,type:N,id:E?R:y,...B,classes:L,children:[I,k!=="end"&&W,s,k==="end"&&W,A]})});function ui(e){return typeof e=="string"}function cs(e){return parseInt(e,10)||0}const tP={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function nP(e){for(const t in e)return!1;return!0}function Sh(e){return nP(e)||e.outerHeightStyle===0&&!e.overflowing}const rP=D.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:i=1,style:a,value:s,...l}=t,{current:u}=D.useRef(s!=null),d=D.useRef(null),p=ot(n,d),h=D.useRef(null),f=D.useRef(null),m=D.useCallback(()=>{const C=d.current,k=f.current;if(!C||!k)return;const S=Ar(C).getComputedStyle(C);if(S.width==="0px")return{outerHeightStyle:0,overflowing:!1};k.style.width=S.width,k.value=C.value||t.placeholder||"x",k.value.slice(-1)===`
|
|
193
|
-
`&&(k.value+=" ");const N=S.boxSizing,O=cs(S.paddingBottom)+cs(S.paddingTop),B=cs(S.borderBottomWidth)+cs(S.borderTopWidth),R=k.scrollHeight;k.value="x";const F=k.scrollHeight;let T=R;i&&(T=Math.max(Number(i)*F,T)),o&&(T=Math.min(Number(o)*F,T)),T=Math.max(T,F);const L=T+(N==="border-box"?O+B:0),I=Math.abs(T-R)<=1;return{outerHeightStyle:L,overflowing:I}},[o,i,t.placeholder]),b=Ae(()=>{const C=d.current,k=m();if(!C||!k||Sh(k))return!1;const v=k.outerHeightStyle;return h.current!=null&&h.current!==v}),x=D.useCallback(()=>{const C=d.current,k=m();if(!C||!k||Sh(k))return;const v=k.outerHeightStyle;h.current!==v&&(h.current=v,C.style.height=`${v}px`),C.style.overflow=k.overflowing?"hidden":""},[m]),y=D.useRef(-1);Wt(()=>{const C=s0(x),k=d?.current;if(!k)return;const v=Ar(k);v.addEventListener("resize",C);let S;return typeof ResizeObserver<"u"&&(S=new ResizeObserver(()=>{b()&&(S.unobserve(k),cancelAnimationFrame(y.current),x(),y.current=requestAnimationFrame(()=>{S.observe(k)}))}),S.observe(k)),()=>{C.clear(),cancelAnimationFrame(y.current),v.removeEventListener("resize",C),S&&S.disconnect()}},[m,x,b]),Wt(()=>{x()});const E=C=>{u||x();const k=C.target,v=k.value.length,S=k.value.endsWith(`
|
|
194
|
-
`),N=k.selectionStart===v;S&&N&&k.setSelectionRange(v,v),r&&r(C)};return c.jsxs(D.Fragment,{children:[c.jsx("textarea",{value:s,onChange:E,ref:p,rows:i,style:a,...l}),c.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:f,tabIndex:-1,style:{...tP.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function wi({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 Ll=D.createContext(void 0);function Yn(){return D.useContext(Ll)}function kh(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function tl(e,t=!1){return e&&(kh(e.value)&&e.value!==""||t&&kh(e.defaultValue)&&e.defaultValue!=="")}function oP(e){return e.startAdornment}function iP(e){return _e("MuiInputBase",e)}const Cn=Me("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var Dh;const Nl=(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${ke(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Fl=(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]},aP=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:u,multiline:d,readOnly:p,size:h,startAdornment:f,type:m}=e,b={root:["root",`color${ke(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",h&&h!=="medium"&&`size${ke(h)}`,d&&"multiline",f&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",p&&"readOnly"],input:["input",r&&"disabled",m==="search"&&"inputTypeSearch",d&&"inputMultiline",h==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",p&&"readOnly"]};return Fe(b,iP,t)},_l=ie("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Nl})(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",[`&.${Cn.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%"}}]}))),Bl=ie("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Fl})(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] + .${Cn.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},[`&.${Cn.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.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:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),wh=xE({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),Pd=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:a,className:s,color:l,components:u={},componentsProps:d={},defaultValue:p,disabled:h,disableInjectingGlobalStyles:f,endAdornment:m,error:b,fullWidth:x=!1,id:y,inputComponent:E="input",inputProps:C={},inputRef:k,margin:v,maxRows:S,minRows:N,multiline:O=!1,name:B,onBlur:R,onChange:F,onClick:T,onFocus:L,onKeyDown:I,onKeyUp:A,placeholder:M,readOnly:W,renderSuffix:H,rows:j,size:w,slotProps:V={},slots:J={},startAdornment:_,type:de="text",value:Z,...Y}=r,te=C.value!=null?C.value:Z,{current:X}=D.useRef(te!=null),re=D.useRef(),Q=D.useCallback(Le=>{},[]),K=ot(re,k,C.ref,Q),[ae,ee]=D.useState(!1),ne=Yn(),ye=wi({props:r,muiFormControl:ne,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ye.focused=ne?ne.focused:ae,D.useEffect(()=>{!ne&&h&&ae&&(ee(!1),R&&R())},[ne,h,ae,R]);const pe=ne&&ne.onFilled,be=ne&&ne.onEmpty,le=D.useCallback(Le=>{tl(Le)?pe&&pe():be&&be()},[pe,be]);Wt(()=>{X&&le({value:te})},[te,le,X]);const Re=Le=>{L&&L(Le),C.onFocus&&C.onFocus(Le),ne&&ne.onFocus?ne.onFocus(Le):ee(!0)},ve=Le=>{R&&R(Le),C.onBlur&&C.onBlur(Le),ne&&ne.onBlur?ne.onBlur(Le):ee(!1)},ze=(Le,...Je)=>{if(!X){const gt=Le.target||re.current;if(gt==null)throw new Error(wr(1));le({value:gt.value})}C.onChange&&C.onChange(Le,...Je),F&&F(Le,...Je)};D.useEffect(()=>{le(re.current)},[]);const De=Le=>{re.current&&Le.currentTarget===Le.target&&re.current.focus(),T&&T(Le)};let vt=E,lt=C;O&&vt==="input"&&(j?lt={type:void 0,minRows:j,maxRows:j,...lt}:lt={type:void 0,maxRows:S,minRows:N,...lt},vt=rP);const qe=Le=>{le(Le.animationName==="mui-auto-fill-cancel"?re.current:{value:"x"})};D.useEffect(()=>{ne&&ne.setAdornedStart(!!_)},[ne,_]);const ue={...r,color:ye.color||"primary",disabled:ye.disabled,endAdornment:m,error:ye.error,focused:ye.focused,formControl:ne,fullWidth:x,hiddenLabel:ye.hiddenLabel,multiline:O,size:ye.size,startAdornment:_,type:de},Ce=aP(ue),Oe=J.root||u.Root||_l,He=V.root||d.root||{},je=J.input||u.Input||Bl;return lt={...lt,...V.input??d.input},c.jsxs(D.Fragment,{children:[!f&&typeof wh=="function"&&(Dh||(Dh=c.jsx(wh,{}))),c.jsxs(Oe,{...He,ref:n,onClick:De,...Y,...!ui(Oe)&&{ownerState:{...ue,...He.ownerState}},className:Pe(Ce.root,He.className,s,W&&"MuiInputBase-readOnly"),children:[_,c.jsx(Ll.Provider,{value:null,children:c.jsx(je,{"aria-invalid":ye.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:p,disabled:ye.disabled,id:y,onAnimationStart:qe,name:B,placeholder:M,readOnly:W,required:ye.required,rows:j,value:te,onKeyDown:I,onKeyUp:A,type:de,...lt,...!ui(je)&&{as:vt,ownerState:{...ue,...lt.ownerState}},ref:K,className:Pe(Ce.input,lt.className,W&&"MuiInputBase-readOnly"),onBlur:ve,onChange:ze,onFocus:Re})}),m,H?H({...ye,startAdornment:_}):null]})]})});function sP(e){return _e("MuiInput",e)}const zr={...Cn,...Me("MuiInput",["root","underline","input"])},lP=e=>{const{classes:t,disableUnderline:n}=e,o=Fe({root:["root",!n&&"underline"],input:["input"]},sP,t);return{...t,...o}},uP=ie(_l,{shouldForwardProp:e=>dn(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Nl(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"},[`&.${zr.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${zr.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(.${zr.disabled}, .${zr.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${zr.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(un()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),cP=ie(Bl,{name:"MuiInput",slot:"Input",overridesResolver:Fl})({}),Rd=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,inputComponent:l="input",multiline:u=!1,slotProps:d,slots:p={},type:h="text",...f}=r,m=lP(r),x={root:{ownerState:{disableUnderline:o}}},y=d??a?rn(d??a,x):x,E=p.root??i.Root??uP,C=p.input??i.Input??cP;return c.jsx(Pd,{slots:{root:E,input:C},slotProps:y,fullWidth:s,inputComponent:l,multiline:u,ref:n,type:h,...f,classes:m})});Rd.muiName="Input";function dP(e){return _e("MuiFilledInput",e)}const Tn={...Cn,...Me("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},pP=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:a,multiline:s}=e,l={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",i==="small"&&`size${ke(i)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},u=Fe(l,dP,t);return{...t,...u}},fP=ie(_l,{shouldForwardProp:e=>dn(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Nl(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)",i=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}},[`&.${Tn.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Tn.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:a})=>!a.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"},[`&.${Tn.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Tn.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(.${Tn.disabled}, .${Tn.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Tn.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(un()).map(([a])=>({props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[a]?.main}`}}})),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:s})=>a.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),hP=ie(Bl,{name:"MuiFilledInput",slot:"Input",overridesResolver:Fl})(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}}]}))),Md=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,hiddenLabel:l,inputComponent:u="input",multiline:d=!1,slotProps:p,slots:h={},type:f="text",...m}=r,b={...r,disableUnderline:o,fullWidth:s,inputComponent:u,multiline:d,type:f},x=pP(r),y={root:{ownerState:b},input:{ownerState:b}},E=p??a?rn(y,p??a):y,C=h.root??i.Root??fP,k=h.input??i.Input??hP;return c.jsx(Pd,{slots:{root:C,input:k},slotProps:E,fullWidth:s,inputComponent:u,multiline:d,ref:n,type:f,...m,classes:x})});Md.muiName="Input";var Ih;const mP=ie("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:dn})({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%"}),gP=ie("legend",{name:"MuiNotchedOutlined",shouldForwardProp:dn})(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 bP(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,s=o!=null&&o!=="",l={...e,notched:i,withLabel:s};return c.jsx(mP,{"aria-hidden":!0,className:r,ownerState:l,...a,children:c.jsx(gP,{ownerState:l,children:s?c.jsx("span",{children:o}):Ih||(Ih=c.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}function xP(e){return _e("MuiOutlinedInput",e)}const Mn={...Cn,...Me("MuiOutlinedInput",["root","notchedOutline","input"])};function z1(e,t,n){return e===void 0||ui(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function _n(e,t,n){return typeof e=="function"?e(t,n):e}function sn(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 Ah(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 V1(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const f=Pe(n?.className,i,o?.className,r?.className),m={...n?.style,...o?.style,...r?.style},b={...n,...o,...r};return f.length>0&&(b.className=f),Object.keys(m).length>0&&(b.style=m),{props:b,internalRef:void 0}}const a=sn({...o,...r}),s=Ah(r),l=Ah(o),u=t(a),d=Pe(u?.className,n?.className,i,o?.className,r?.className),p={...u?.style,...n?.style,...o?.style,...r?.style},h={...u,...n,...l,...s};return d.length>0&&(h.className=d),Object.keys(p).length>0&&(h.style=p),{props:h,internalRef:u.ref}}function ct(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:u,slots:d={[e]:void 0},slotProps:p={[e]:void 0},...h}=i,f=d[e]||r,m=_n(p[e],o),{props:{component:b,...x},internalRef:y}=V1({className:n,...l,externalForwardedProps:e==="root"?h:void 0,externalSlotProps:m}),E=ot(y,m?.ref,t.ref),C=e==="root"?b||u:b,k=z1(f,{...e==="root"&&!u&&!d[e]&&a,...e!=="root"&&!d[e]&&a,...x,...C&&!s&&{as:C},...C&&s&&{component:C},ref:E},o);return[f,k]}const yP=e=>{const{classes:t}=e,r=Fe({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},xP,t);return{...t,...r}},EP=ie(_l,{shouldForwardProp:e=>dn(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Nl})(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 .${Mn.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Mn.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Mn.focused} .${Mn.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(un()).map(([n])=>({props:{color:n},style:{[`&.${Mn.focused} .${Mn.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Mn.error} .${Mn.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Mn.disabled} .${Mn.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"}}]}})),CP=ie(bP,{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}})),TP=ie(Bl,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Fl})(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}}]}))),Od=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiOutlinedInput"}),{components:o={},fullWidth:i=!1,inputComponent:a="input",label:s,multiline:l=!1,notched:u,slots:d={},slotProps:p={},type:h="text",...f}=r,m=yP(r),b=Yn(),x=wi({props:r,muiFormControl:b,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),y={...r,color:x.color||"primary",disabled:x.disabled,error:x.error,focused:x.focused,formControl:b,fullWidth:i,hiddenLabel:x.hiddenLabel,multiline:l,size:x.size,type:h},E=d.root??o.Root??EP,C=d.input??o.Input??TP,[k,v]=ct("notchedOutline",{elementType:CP,className:m.notchedOutline,shouldForwardComponentProp:!0,ownerState:y,externalForwardedProps:{slots:d,slotProps:p},additionalProps:{label:s!=null&&s!==""&&x.required?c.jsxs(D.Fragment,{children:[s," ","*"]}):s}});return c.jsx(Pd,{slots:{root:E,input:C},slotProps:p,renderSuffix:S=>c.jsx(k,{...v,notched:typeof u<"u"?u:!!(S.startAdornment||S.filled||S.focused)}),fullWidth:i,inputComponent:a,multiline:l,ref:n,type:h,...f,classes:{...m,notchedOutline:null}})});Od.muiName="Input";function vP(e){return _e("MuiFormLabel",e)}const ha=Me("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),SP=e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e,l={root:["root",`color${ke(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]};return Fe(l,vP,t)},kP=ie("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(un()).map(([t])=>({props:{color:t},style:{[`&.${ha.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${ha.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${ha.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),DP=ie("span",{name:"MuiFormLabel",slot:"Asterisk"})(et(({theme:e})=>({[`&.${ha.error}`]:{color:(e.vars||e).palette.error.main}}))),wP=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiFormLabel"}),{children:o,className:i,color:a,component:s="label",disabled:l,error:u,filled:d,focused:p,required:h,...f}=r,m=Yn(),b=wi({props:r,muiFormControl:m,states:["color","required","focused","disabled","error","filled"]}),x={...r,color:b.color||"primary",component:s,disabled:b.disabled,error:b.error,filled:b.filled,focused:b.focused,required:b.required},y=SP(x);return c.jsxs(kP,{as:s,ownerState:x,className:Pe(y.root,i),ref:n,...f,children:[o,b.required&&c.jsxs(DP,{ownerState:x,"aria-hidden":!0,className:y.asterisk,children:[" ","*"]})]})});function IP(e){return _e("MuiInputLabel",e)}Me("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const AP=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,l={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="medium"&&`size${ke(r)}`,a],asterisk:[s&&"asterisk"]},u=Fe(l,IP,t);return{...t,...u}},PP=ie(wP,{shouldForwardProp:e=>dn(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${ha.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)"}}]}))),nl=D.forwardRef(function(t,n){const r=Xe({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,margin:i,shrink:a,variant:s,className:l,...u}=r,d=Yn();let p=a;typeof p>"u"&&d&&(p=d.filled||d.focused||d.adornedStart);const h=wi({props:r,muiFormControl:d,states:["size","variant","required","focused"]}),f={...r,disableAnimation:o,formControl:d,shrink:p,size:h.size,variant:h.variant,required:h.required,focused:h.focused},m=AP(f);return c.jsx(PP,{"data-shrink":p,ref:n,className:Pe(m.root,l),...u,ownerState:f,classes:m})});function RP(e){return _e("MuiFormControl",e)}Me("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const MP=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${ke(n)}`,r&&"fullWidth"]};return Fe(o,RP,t)},OP=ie("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${ke(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%"}}]}),rl=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,error:u=!1,focused:d,fullWidth:p=!1,hiddenLabel:h=!1,margin:f="none",required:m=!1,size:b="medium",variant:x="outlined",...y}=r,E={...r,color:a,component:s,disabled:l,error:u,fullWidth:p,hiddenLabel:h,margin:f,required:m,size:b,variant:x},C=MP(E),[k,v]=D.useState(()=>{let A=!1;return o&&D.Children.forEach(o,M=>{if(!bs(M,["Input","Select"]))return;const W=bs(M,["Select"])?M.props.input:M;W&&oP(W.props)&&(A=!0)}),A}),[S,N]=D.useState(()=>{let A=!1;return o&&D.Children.forEach(o,M=>{bs(M,["Input","Select"])&&(tl(M.props,!0)||tl(M.props.inputProps,!0))&&(A=!0)}),A}),[O,B]=D.useState(!1);l&&O&&B(!1);const R=d!==void 0&&!l?d:O;let F;D.useRef(!1);const T=D.useCallback(()=>{N(!0)},[]),L=D.useCallback(()=>{N(!1)},[]),I=D.useMemo(()=>({adornedStart:k,setAdornedStart:v,color:a,disabled:l,error:u,filled:S,focused:R,fullWidth:p,hiddenLabel:h,size:b,onBlur:()=>{B(!1)},onFocus:()=>{B(!0)},onEmpty:L,onFilled:T,registerEffect:F,required:m,variant:x}),[k,a,l,u,S,R,p,h,F,L,T,m,b,x]);return c.jsx(Ll.Provider,{value:I,children:c.jsx(OP,{as:s,ownerState:E,className:Pe(C.root,i),ref:n,...y,children:o})})});function LP(e){return _e("MuiFormHelperText",e)}const Ph=Me("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Rh;const NP=e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e,u={root:["root",o&&"disabled",i&&"error",r&&`size${ke(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return Fe(u,LP,t)},FP=ie("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${ke(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,[`&.${Ph.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Ph.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}}]}))),W1=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiFormHelperText"}),{children:o,className:i,component:a="p",disabled:s,error:l,filled:u,focused:d,margin:p,required:h,variant:f,...m}=r,b=Yn(),x=wi({props:r,muiFormControl:b,states:["variant","size","disabled","error","filled","focused","required"]}),y={...r,component:a,contained:x.variant==="filled"||x.variant==="outlined",variant:x.variant,size:x.size,disabled:x.disabled,error:x.error,filled:x.filled,focused:x.focused,required:x.required};delete y.ownerState;const E=NP(y);return c.jsx(FP,{as:a,className:Pe(E.root,i),ref:n,...m,ownerState:y,children:o===" "?Rh||(Rh=c.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):o})});function Ii(e){return parseInt(D.version,10)>=19?e?.props?.ref||null:e?.ref||null}function rt(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:_n(n,r),{props:s,internalRef:l}=V1({...i,externalSlotProps:a}),u=ot(l,a?.ref,e.additionalProps?.ref);return z1(t,{...s,ref:u},r)}const bo=D.createContext({});function _P(e){return _e("MuiList",e)}Me("MuiList",["root","padding","dense","subheader"]);const BP=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Fe({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},_P,t)},jP=ie("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}}]}),q1=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:u,...d}=r,p=D.useMemo(()=>({dense:s}),[s]),h={...r,component:a,dense:s,disablePadding:l},f=BP(h);return c.jsx(bo.Provider,{value:p,children:c.jsxs(jP,{as:a,className:Pe(f.root,i),ref:n,ownerState:h,...d,children:[u,o]})})});function Y1(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function Fu(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Mh(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function K1(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 zi(e,t,n,r,o,i){let a=!1,s=o(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!K1(s,i)||l)s=o(e,s,n);else return s.focus(),!0}return!1}const $P=D.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:u=!1,onKeyDown:d,variant:p="selectedMenu",...h}=t,f=D.useRef(null),m=D.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Wt(()=>{o&&f.current.focus()},[o]),D.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(C,{direction:k})=>{const v=!f.current.style.width;if(C.clientHeight<f.current.clientHeight&&v){const S=`${Y1(Ar(C))}px`;f.current.style[k==="rtl"?"paddingLeft":"paddingRight"]=S,f.current.style.width=`calc(100% + ${S})`}return f.current}}),[]);const b=C=>{const k=f.current,v=C.key;if(C.ctrlKey||C.metaKey||C.altKey){d&&d(C);return}const N=Ut(k).activeElement;if(v==="ArrowDown")C.preventDefault(),zi(k,N,u,l,Fu);else if(v==="ArrowUp")C.preventDefault(),zi(k,N,u,l,Mh);else if(v==="Home")C.preventDefault(),zi(k,null,u,l,Fu);else if(v==="End")C.preventDefault(),zi(k,null,u,l,Mh);else if(v.length===1){const O=m.current,B=v.toLowerCase(),R=performance.now();O.keys.length>0&&(R-O.lastTime>500?(O.keys=[],O.repeating=!0,O.previousKeyMatched=!0):O.repeating&&B!==O.keys[0]&&(O.repeating=!1)),O.lastTime=R,O.keys.push(B);const F=N&&!O.repeating&&K1(N,O);O.previousKeyMatched&&(F||zi(k,N,!1,l,Fu,O))?C.preventDefault():O.previousKeyMatched=!1}d&&d(C)},x=ot(f,n);let y=-1;D.Children.forEach(a,(C,k)=>{if(!D.isValidElement(C)){y===k&&(y+=1,y>=a.length&&(y=-1));return}C.props.disabled||(p==="selectedMenu"&&C.props.selected||y===-1)&&(y=k),y===k&&(C.props.disabled||C.props.muiSkipListHighlight||C.type.muiSkipListHighlight)&&(y+=1,y>=a.length&&(y=-1))});const E=D.Children.map(a,(C,k)=>{if(k===y){const v={};return i&&(v.autoFocus=!0),C.props.tabIndex===void 0&&p==="selectedMenu"&&(v.tabIndex=0),D.cloneElement(C,v)}return C});return c.jsx(q1,{role:"menu",ref:x,className:s,onKeyDown:b,tabIndex:o?0:-1,...h,children:E})}),G1=e=>e.scrollTop;function ci(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}}function wc(e){return`scale(${e}, ${e**2})`}const HP={entering:{opacity:1,transform:wc(1)},entered:{opacity:1,transform:"none"}},_u=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Da=D.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:a,in:s,onEnter:l,onEntered:u,onEntering:d,onExit:p,onExited:h,onExiting:f,style:m,timeout:b="auto",TransitionComponent:x=qn,...y}=t,E=Ol(),C=D.useRef(),k=Gr(),v=D.useRef(null),S=ot(v,Ii(i),n),N=A=>M=>{if(A){const W=v.current;M===void 0?A(W):A(W,M)}},O=N(d),B=N((A,M)=>{G1(A);const{duration:W,delay:H,easing:j}=ci({style:m,timeout:b,easing:a},{mode:"enter"});let w;b==="auto"?(w=k.transitions.getAutoHeightDuration(A.clientHeight),C.current=w):w=W,A.style.transition=[k.transitions.create("opacity",{duration:w,delay:H}),k.transitions.create("transform",{duration:_u?w:w*.666,delay:H,easing:j})].join(","),l&&l(A,M)}),R=N(u),F=N(f),T=N(A=>{const{duration:M,delay:W,easing:H}=ci({style:m,timeout:b,easing:a},{mode:"exit"});let j;b==="auto"?(j=k.transitions.getAutoHeightDuration(A.clientHeight),C.current=j):j=M,A.style.transition=[k.transitions.create("opacity",{duration:j,delay:W}),k.transitions.create("transform",{duration:_u?j:j*.666,delay:_u?W:W||j*.333,easing:H})].join(","),A.style.opacity=0,A.style.transform=wc(.75),p&&p(A)}),L=N(h),I=A=>{b==="auto"&&E.start(C.current||0,A),r&&r(v.current,A)};return c.jsx(x,{appear:o,in:s,nodeRef:v,onEnter:B,onEntered:R,onEntering:O,onExit:T,onExited:L,onExiting:F,addEndListener:I,timeout:b==="auto"?null:b,...y,children:(A,{ownerState:M,...W})=>D.cloneElement(i,{style:{opacity:0,transform:wc(.75),visibility:A==="exited"&&!s?"hidden":void 0,...HP[A],...m,...i.props.style},ref:S,...W})})});Da&&(Da.muiSupportAuto=!0);function UP(e){const t=Ut(e);return t.body===e?Ar(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function ma(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Oh(e){return parseInt(Ar(e).getComputedStyle(e).paddingRight,10)||0}function zP(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 Lh(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,a=>{const s=!i.includes(a),l=!zP(a);s&&l&&ma(a,o)})}function Bu(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function VP(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(UP(r)){const a=Y1(Ar(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Oh(r)+a}px`;const s=Ut(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${Oh(l)+a}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=Ut(r).body;else{const a=r.parentElement,s=Ar(r);i=a?.nodeName==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:a,property:s})=>{i?a.style.setProperty(s,i):a.style.removeProperty(s)})}}function WP(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class qP{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&&ma(t.modalRef,!1);const o=WP(n);Lh(n,t.mount,t.modalRef,o,!0);const i=Bu(this.containers,a=>a.container===n);return i!==-1?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=Bu(this.containers,i=>i.modals.includes(t)),o=this.containers[r];o.restore||(o.restore=VP(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=Bu(this.containers,a=>a.modals.includes(t)),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&ma(t.modalRef,n),Lh(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const a=i.modals[i.modals.length-1];a.modalRef&&ma(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const YP=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function KP(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 GP(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 QP(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||GP(e))}function XP(e){const t=[],n=[];return Array.from(e.querySelectorAll(YP)).forEach((r,o)=>{const i=KP(r);i===-1||!QP(r)||(i===0?t.push(r):n.push({documentOrder:o,tabIndex:i,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 ZP(){return!0}function Q1(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=XP,isEnabled:a=ZP,open:s}=e,l=D.useRef(!1),u=D.useRef(null),d=D.useRef(null),p=D.useRef(null),h=D.useRef(null),f=D.useRef(!1),m=D.useRef(null),b=ot(Ii(t),m),x=D.useRef(null);D.useEffect(()=>{!s||!m.current||(f.current=!n)},[n,s]),D.useEffect(()=>{if(!s||!m.current)return;const C=Ut(m.current);return m.current.contains(C.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),f.current&&m.current.focus()),()=>{o||(p.current&&p.current.focus&&(l.current=!0,p.current.focus()),p.current=null)}},[s]),D.useEffect(()=>{if(!s||!m.current)return;const C=Ut(m.current),k=N=>{x.current=N,!(r||!a()||N.key!=="Tab")&&C.activeElement===m.current&&N.shiftKey&&(l.current=!0,d.current&&d.current.focus())},v=()=>{const N=m.current;if(N===null)return;if(!C.hasFocus()||!a()||l.current){l.current=!1;return}if(N.contains(C.activeElement)||r&&C.activeElement!==u.current&&C.activeElement!==d.current)return;if(C.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!f.current)return;let O=[];if((C.activeElement===u.current||C.activeElement===d.current)&&(O=i(m.current)),O.length>0){const B=!!(x.current?.shiftKey&&x.current?.key==="Tab"),R=O[0],F=O[O.length-1];typeof R!="string"&&typeof F!="string"&&(B?F.focus():R.focus())}else N.focus()};C.addEventListener("focusin",v),C.addEventListener("keydown",k,!0);const S=setInterval(()=>{C.activeElement&&C.activeElement.tagName==="BODY"&&v()},50);return()=>{clearInterval(S),C.removeEventListener("focusin",v),C.removeEventListener("keydown",k,!0)}},[n,r,o,a,s,i]);const y=C=>{p.current===null&&(p.current=C.relatedTarget),f.current=!0,h.current=C.target;const k=t.props.onFocus;k&&k(C)},E=C=>{p.current===null&&(p.current=C.relatedTarget),f.current=!0};return c.jsxs(D.Fragment,{children:[c.jsx("div",{tabIndex:s?0:-1,onFocus:E,ref:u,"data-testid":"sentinelStart"}),D.cloneElement(t,{ref:b,onFocus:y}),c.jsx("div",{tabIndex:s?0:-1,onFocus:E,ref:d,"data-testid":"sentinelEnd"})]})}function JP(e){return typeof e=="function"?e():e}const X1=D.forwardRef(function(t,n){const{children:r,container:o,disablePortal:i=!1}=t,[a,s]=D.useState(null),l=ot(D.isValidElement(r)?Ii(r):null,n);if(Wt(()=>{i||s(JP(o)||document.body)},[o,i]),Wt(()=>{if(a&&!i)return Xu(n,a),()=>{Xu(n,null)}},[n,a,i]),i){if(D.isValidElement(r)){const u={ref:l};return D.cloneElement(r,u)}return r}return a&&Zx.createPortal(r,a)}),eR={entering:{opacity:1},entered:{opacity:1}},So=D.forwardRef(function(t,n){const r=Gr(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:u,onEnter:d,onEntered:p,onEntering:h,onExit:f,onExited:m,onExiting:b,style:x,timeout:y=o,TransitionComponent:E=qn,...C}=t,k=D.useRef(null),v=ot(k,Ii(s),n),S=I=>A=>{if(I){const M=k.current;A===void 0?I(M):I(M,A)}},N=S(h),O=S((I,A)=>{G1(I);const M=ci({style:x,timeout:y,easing:l},{mode:"enter"});I.style.webkitTransition=r.transitions.create("opacity",M),I.style.transition=r.transitions.create("opacity",M),d&&d(I,A)}),B=S(p),R=S(b),F=S(I=>{const A=ci({style:x,timeout:y,easing:l},{mode:"exit"});I.style.webkitTransition=r.transitions.create("opacity",A),I.style.transition=r.transitions.create("opacity",A),f&&f(I)}),T=S(m),L=I=>{i&&i(k.current,I)};return c.jsx(E,{appear:a,in:u,nodeRef:k,onEnter:O,onEntered:B,onEntering:N,onExit:F,onExited:T,onExiting:R,addEndListener:L,timeout:y,...C,children:(I,{ownerState:A,...M})=>D.cloneElement(s,{style:{opacity:0,visibility:I==="exited"&&!u?"hidden":void 0,...eR[I],...x,...s.props.style},ref:v,...M})})});function tR(e){return _e("MuiBackdrop",e)}Me("MuiBackdrop",["root","invisible"]);const nR=e=>{const{classes:t,invisible:n}=e;return Fe({root:["root",n&&"invisible"]},tR,t)},rR=ie("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"}}]}),Z1=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiBackdrop"}),{children:o,className:i,component:a="div",invisible:s=!1,open:l,components:u={},componentsProps:d={},slotProps:p={},slots:h={},TransitionComponent:f,transitionDuration:m,...b}=r,x={...r,component:a,invisible:s},y=nR(x),E={transition:f,root:u.Root,...h},C={...d,...p},k={component:a,slots:E,slotProps:C},[v,S]=ct("root",{elementType:rR,externalForwardedProps:k,className:Pe(y.root,i),ownerState:x}),[N,O]=ct("transition",{elementType:So,externalForwardedProps:k,ownerState:x});return c.jsx(N,{in:l,timeout:m,...b,...O,children:c.jsx(v,{"aria-hidden":!0,...S,classes:y,ref:n,children:o})})});function oR(e){return typeof e=="function"?e():e}function iR(e){return e?e.props.hasOwnProperty("in"):!1}const Nh=()=>{},ds=new qP;function aR(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:s,onClose:l,open:u,rootRef:d}=e,p=D.useRef({}),h=D.useRef(null),f=D.useRef(null),m=ot(f,d),[b,x]=D.useState(!u),y=iR(s);let E=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(E=!1);const C=()=>Ut(h.current),k=()=>(p.current.modalRef=f.current,p.current.mount=h.current,p.current),v=()=>{ds.mount(k(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},S=Ae(()=>{const A=oR(t)||C().body;ds.add(k(),A),f.current&&v()}),N=()=>ds.isTopModal(k()),O=Ae(A=>{h.current=A,A&&(u&&N()?v():f.current&&ma(f.current,E))}),B=D.useCallback(()=>{ds.remove(k(),E)},[E]);D.useEffect(()=>()=>{B()},[B]),D.useEffect(()=>{u?S():(!y||!o)&&B()},[u,B,y,o,S]);const R=A=>M=>{A.onKeyDown?.(M),!(M.key!=="Escape"||M.which===229||!N())&&(n||(M.stopPropagation(),l&&l(M,"escapeKeyDown")))},F=A=>M=>{A.onClick?.(M),M.target===M.currentTarget&&l&&l(M,"backdropClick")};return{getRootProps:(A={})=>{const M=sn(e);delete M.onTransitionEnter,delete M.onTransitionExited;const W={...M,...A};return{role:"presentation",...W,onKeyDown:R(W),ref:m}},getBackdropProps:(A={})=>{const M=A;return{"aria-hidden":!0,...M,onClick:F(M),open:u}},getTransitionProps:()=>{const A=()=>{x(!1),i&&i()},M=()=>{x(!0),a&&a(),o&&B()};return{onEnter:mp(A,s?.props.onEnter??Nh),onExited:mp(M,s?.props.onExited??Nh)}},rootRef:m,portalRef:O,isTopModal:N,exited:b,hasTransition:y}}function sR(e){return _e("MuiModal",e)}Me("MuiModal",["root","hidden","backdrop"]);const lR=e=>{const{open:t,exited:n,classes:r}=e;return Fe({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},sR,r)},uR=ie("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"}}]}))),cR=ie(Z1,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),J1=D.forwardRef(function(t,n){const r=Xe({name:"MuiModal",props:t}),{BackdropComponent:o=cR,BackdropProps:i,classes:a,className:s,closeAfterTransition:l=!1,children:u,container:d,component:p,components:h={},componentsProps:f={},disableAutoFocus:m=!1,disableEnforceFocus:b=!1,disableEscapeKeyDown:x=!1,disablePortal:y=!1,disableRestoreFocus:E=!1,disableScrollLock:C=!1,hideBackdrop:k=!1,keepMounted:v=!1,onClose:S,onTransitionEnter:N,onTransitionExited:O,open:B,slotProps:R={},slots:F={},theme:T,...L}=r,I={...r,closeAfterTransition:l,disableAutoFocus:m,disableEnforceFocus:b,disableEscapeKeyDown:x,disablePortal:y,disableRestoreFocus:E,disableScrollLock:C,hideBackdrop:k,keepMounted:v},{getRootProps:A,getBackdropProps:M,getTransitionProps:W,portalRef:H,isTopModal:j,exited:w,hasTransition:V}=aR({...I,rootRef:n}),J={...I,exited:w},_=lR(J),de={};if(u.props.tabIndex===void 0&&(de.tabIndex="-1"),V){const{onEnter:Q,onExited:K}=W();de.onEnter=Q,de.onExited=K}const Z={slots:{root:h.Root,backdrop:h.Backdrop,...F},slotProps:{...f,...R}},[Y,te]=ct("root",{ref:n,elementType:uR,externalForwardedProps:{...Z,...L,component:p},getSlotProps:A,ownerState:J,className:Pe(s,_?.root,!J.open&&J.exited&&_?.hidden)}),[X,re]=ct("backdrop",{ref:i?.ref,elementType:o,externalForwardedProps:Z,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:Q=>M({...Q,onClick:K=>{Q?.onClick&&Q.onClick(K)}}),className:Pe(i?.className,_?.backdrop),ownerState:J});return!v&&!B&&(!V||w)?null:c.jsx(X1,{ref:H,container:d,disablePortal:y,children:c.jsxs(Y,{...te,children:[!k&&o?c.jsx(X,{...re}):null,c.jsx(Q1,{disableEnforceFocus:b,disableAutoFocus:m,disableRestoreFocus:E,isEnabled:j,open:B,children:D.cloneElement(u,de)})]})})});function dR(e){return _e("MuiPaper",e)}Me("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 pR=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Fe(i,dR,o)},fR=ie("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)"}}]}))),Ro=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiPaper"}),o=Gr(),{className:i,component:a="div",elevation:s=1,square:l=!1,variant:u="elevation",...d}=r,p={...r,component:a,elevation:s,square:l,variant:u},h=pR(p);return c.jsx(fR,{as:a,ownerState:p,className:Pe(h.root,i),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(${$s("#fff",Gu(s))}, ${$s("#fff",Gu(s))})`}},...d.style}})});function hR(e){return _e("MuiPopover",e)}Me("MuiPopover",["root","paper"]);function Fh(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function _h(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function Bh(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function ps(e){return typeof e=="function"?e():e}const mR=e=>{const{classes:t}=e;return Fe({root:["root"],paper:["paper"]},hR,t)},gR=ie(J1,{name:"MuiPopover",slot:"Root"})({}),eb=ie(Ro,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),bR=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiPopover"}),{action:o,anchorEl:i,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:u,className:d,container:p,elevation:h=8,marginThreshold:f=16,open:m,PaperProps:b={},slots:x={},slotProps:y={},transformOrigin:E={vertical:"top",horizontal:"left"},TransitionComponent:C,transitionDuration:k="auto",TransitionProps:v={},disableScrollLock:S=!1,...N}=r,O=D.useRef(),B={...r,anchorOrigin:a,anchorReference:l,elevation:h,marginThreshold:f,transformOrigin:E,TransitionComponent:C,transitionDuration:k,TransitionProps:v},R=mR(B),F=D.useCallback(()=>{if(l==="anchorPosition")return s;const Q=ps(i),ae=(Q&&Q.nodeType===1?Q:Ut(O.current).body).getBoundingClientRect();return{top:ae.top+Fh(ae,a.vertical),left:ae.left+_h(ae,a.horizontal)}},[i,a.horizontal,a.vertical,s,l]),T=D.useCallback(Q=>({vertical:Fh(Q,E.vertical),horizontal:_h(Q,E.horizontal)}),[E.horizontal,E.vertical]),L=D.useCallback(Q=>{const K={width:Q.offsetWidth,height:Q.offsetHeight},ae=T(K);if(l==="none")return{top:null,left:null,transformOrigin:Bh(ae)};const ee=F();let ne=ee.top-ae.vertical,ye=ee.left-ae.horizontal;const pe=ne+K.height,be=ye+K.width,le=Ar(ps(i)),Re=le.innerHeight-f,ve=le.innerWidth-f;if(f!==null&&ne<f){const ze=ne-f;ne-=ze,ae.vertical+=ze}else if(f!==null&&pe>Re){const ze=pe-Re;ne-=ze,ae.vertical+=ze}if(f!==null&&ye<f){const ze=ye-f;ye-=ze,ae.horizontal+=ze}else if(be>ve){const ze=be-ve;ye-=ze,ae.horizontal+=ze}return{top:`${Math.round(ne)}px`,left:`${Math.round(ye)}px`,transformOrigin:Bh(ae)}},[i,l,F,T,f]),[I,A]=D.useState(m),M=D.useCallback(()=>{const Q=O.current;if(!Q)return;const K=L(Q);K.top!==null&&Q.style.setProperty("top",K.top),K.left!==null&&(Q.style.left=K.left),Q.style.transformOrigin=K.transformOrigin,A(!0)},[L]);D.useEffect(()=>(S&&window.addEventListener("scroll",M),()=>window.removeEventListener("scroll",M)),[i,S,M]);const W=()=>{M()},H=()=>{A(!1)};D.useEffect(()=>{m&&M()}),D.useImperativeHandle(o,()=>m?{updatePosition:()=>{M()}}:null,[m,M]),D.useEffect(()=>{if(!m)return;const Q=s0(()=>{M()}),K=Ar(ps(i));return K.addEventListener("resize",Q),()=>{Q.clear(),K.removeEventListener("resize",Q)}},[i,m,M]);let j=k;const w={slots:{transition:C,...x},slotProps:{transition:v,paper:b,...y}},[V,J]=ct("transition",{elementType:Da,externalForwardedProps:w,ownerState:B,getSlotProps:Q=>({...Q,onEntering:(K,ae)=>{Q.onEntering?.(K,ae),W()},onExited:K=>{Q.onExited?.(K),H()}}),additionalProps:{appear:!0,in:m}});k==="auto"&&!V.muiSupportAuto&&(j=void 0);const _=p||(i?Ut(ps(i)).body:void 0),[de,{slots:Z,slotProps:Y,...te}]=ct("root",{ref:n,elementType:gR,externalForwardedProps:{...w,...N},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:x.backdrop},slotProps:{backdrop:l0(typeof y.backdrop=="function"?y.backdrop(B):y.backdrop,{invisible:!0})},container:_,open:m},ownerState:B,className:Pe(R.root,d)}),[X,re]=ct("paper",{ref:O,className:R.paper,elementType:eb,externalForwardedProps:w,shouldForwardComponentProp:!0,additionalProps:{elevation:h,style:I?void 0:{opacity:0}},ownerState:B});return c.jsx(de,{...te,...!ui(de)&&{slots:Z,slotProps:Y,disableScrollLock:S},children:c.jsx(V,{...J,timeout:j,children:c.jsx(X,{...re,children:u})})})});function xR(e){return _e("MuiMenu",e)}Me("MuiMenu",["root","paper","list"]);const yR={vertical:"top",horizontal:"right"},ER={vertical:"top",horizontal:"left"},CR=e=>{const{classes:t}=e;return Fe({root:["root"],paper:["paper"],list:["list"]},xR,t)},TR=ie(bR,{shouldForwardProp:e=>dn(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),vR=ie(eb,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),SR=ie($P,{name:"MuiMenu",slot:"List"})({outline:0}),kR=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:i,className:a,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:u,open:d,PaperProps:p={},PopoverClasses:h,transitionDuration:f="auto",TransitionProps:{onEntering:m,...b}={},variant:x="selectedMenu",slots:y={},slotProps:E={},...C}=r,k=Vn(),v={...r,autoFocus:o,disableAutoFocusItem:s,MenuListProps:l,onEntering:m,PaperProps:p,transitionDuration:f,TransitionProps:b,variant:x},S=CR(v),N=o&&!s&&d,O=D.useRef(null),B=(j,w)=>{O.current&&O.current.adjustStyleForScrollbar(j,{direction:k?"rtl":"ltr"}),m&&m(j,w)},R=j=>{j.key==="Tab"&&(j.preventDefault(),u&&u(j,"tabKeyDown"))};let F=-1;D.Children.map(i,(j,w)=>{D.isValidElement(j)&&(j.props.disabled||(x==="selectedMenu"&&j.props.selected||F===-1)&&(F=w))});const T={slots:y,slotProps:{list:l,transition:b,paper:p,...E}},L=rt({elementType:y.root,externalSlotProps:E.root,ownerState:v,className:[S.root,a]}),[I,A]=ct("paper",{className:S.paper,elementType:vR,externalForwardedProps:T,shouldForwardComponentProp:!0,ownerState:v}),[M,W]=ct("list",{className:Pe(S.list,l.className),elementType:SR,shouldForwardComponentProp:!0,externalForwardedProps:T,getSlotProps:j=>({...j,onKeyDown:w=>{R(w),j.onKeyDown?.(w)}}),ownerState:v}),H=typeof T.slotProps.transition=="function"?T.slotProps.transition(v):T.slotProps.transition;return c.jsx(TR,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:k?"right":"left"},transformOrigin:k?yR:ER,slots:{root:y.root,paper:I,backdrop:y.backdrop,...y.transition&&{transition:y.transition}},slotProps:{root:L,paper:A,backdrop:typeof E.backdrop=="function"?E.backdrop(v):E.backdrop,transition:{...H,onEntering:(...j)=>{B(...j),H?.onEntering?.(...j)}}},open:d,ref:n,transitionDuration:f,ownerState:v,...C,classes:h,children:c.jsx(M,{actions:O,autoFocus:o&&(F===-1||s),autoFocusItem:N,variant:x,...W,children:i})})});function DR(e){return _e("MuiNativeSelect",e)}const Ld=Me("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),wR=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${ke(n)}`,i&&"iconOpen",r&&"disabled"]};return Fe(s,DR,t)},tb=ie("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Ld.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}}}]})),IR=ie(tb,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:dn,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Ld.multiple}`]:t.multiple}]}})({}),nb=ie("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Ld.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}}]})),AR=ie(nb,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ke(n.variant)}`],n.open&&t.iconOpen]}})({}),PR=D.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:a,inputRef:s,variant:l="standard",...u}=t,d={...t,disabled:o,variant:l,error:i},p=wR(d);return c.jsxs(D.Fragment,{children:[c.jsx(IR,{ownerState:d,className:Pe(p.select,r),disabled:o,ref:s||n,...u}),t.multiple?null:c.jsx(AR,{as:a,ownerState:d,className:p.icon})]})});function rb(e){return _e("MuiSelect",e)}const Vi=Me("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var jh;const RR=ie(tb,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Vi.select}`]:t.select},{[`&.${Vi.select}`]:t[n.variant]},{[`&.${Vi.error}`]:t.error},{[`&.${Vi.multiple}`]:t.multiple}]}})({[`&.${Vi.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),MR=ie(nb,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ke(n.variant)}`],n.open&&t.iconOpen]}})({}),OR=ie("input",{shouldForwardProp:e=>a0(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function $h(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function LR(e){return e==null||typeof e=="string"&&!e.trim()}const NR=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${ke(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Fe(s,rb,t)},FR=D.forwardRef(function(t,n){const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:a,children:s,className:l,defaultOpen:u,defaultValue:d,disabled:p,displayEmpty:h,error:f=!1,IconComponent:m,inputRef:b,labelId:x,MenuProps:y={},multiple:E,name:C,onBlur:k,onChange:v,onClose:S,onFocus:N,onOpen:O,open:B,readOnly:R,renderValue:F,required:T,SelectDisplayProps:L={},tabIndex:I,type:A,value:M,variant:W="standard",...H}=t,[j,w]=Sn({controlled:M,default:d,name:"Select"}),[V,J]=Sn({controlled:B,default:u,name:"Select"}),_=D.useRef(null),de=D.useRef(null),[Z,Y]=D.useState(null),{current:te}=D.useRef(B!=null),[X,re]=D.useState(),Q=ot(n,b),K=D.useCallback(se=>{de.current=se,se&&Y(se)},[]),ae=Z?.parentNode;D.useImperativeHandle(Q,()=>({focus:()=>{de.current.focus()},node:_.current,value:j}),[j]),D.useEffect(()=>{u&&V&&Z&&!te&&(re(a?null:ae.clientWidth),de.current.focus())},[Z,a]),D.useEffect(()=>{i&&de.current.focus()},[i]),D.useEffect(()=>{if(!x)return;const se=Ut(de.current).getElementById(x);if(se){const xe=()=>{getSelection().isCollapsed&&de.current.focus()};return se.addEventListener("click",xe),()=>{se.removeEventListener("click",xe)}}},[x]);const ee=(se,xe)=>{se?O&&O(xe):S&&S(xe),te||(re(a?null:ae.clientWidth),J(se))},ne=se=>{se.button===0&&(se.preventDefault(),de.current.focus(),ee(!0,se))},ye=se=>{ee(!1,se)},pe=D.Children.toArray(s),be=se=>{const xe=pe.find(Te=>Te.props.value===se.target.value);xe!==void 0&&(w(xe.props.value),v&&v(se,xe))},le=se=>xe=>{let Te;if(xe.currentTarget.hasAttribute("tabindex")){if(E){Te=Array.isArray(j)?j.slice():[];const Be=j.indexOf(se.props.value);Be===-1?Te.push(se.props.value):Te.splice(Be,1)}else Te=se.props.value;if(se.props.onClick&&se.props.onClick(xe),j!==Te&&(w(Te),v)){const Be=xe.nativeEvent||xe,We=new Be.constructor(Be.type,Be);Object.defineProperty(We,"target",{writable:!0,value:{value:Te,name:C}}),v(We,se)}E||ee(!1,xe)}},Re=se=>{R||[" ","ArrowUp","ArrowDown","Enter"].includes(se.key)&&(se.preventDefault(),ee(!0,se))},ve=Z!==null&&V,ze=se=>{!ve&&k&&(Object.defineProperty(se,"target",{writable:!0,value:{value:j,name:C}}),k(se))};delete H["aria-invalid"];let De,vt;const lt=[];let qe=!1;(tl({value:j})||h)&&(F?De=F(j):qe=!0);const ue=pe.map(se=>{if(!D.isValidElement(se))return null;let xe;if(E){if(!Array.isArray(j))throw new Error(wr(2));xe=j.some(Te=>$h(Te,se.props.value)),xe&&qe&<.push(se.props.children)}else xe=$h(j,se.props.value),xe&&qe&&(vt=se.props.children);return D.cloneElement(se,{"aria-selected":xe?"true":"false",onClick:le(se),onKeyUp:Te=>{Te.key===" "&&Te.preventDefault(),se.props.onKeyUp&&se.props.onKeyUp(Te)},role:"option",selected:xe,value:void 0,"data-value":se.props.value})});qe&&(E?lt.length===0?De=null:De=lt.reduce((se,xe,Te)=>(se.push(xe),Te<lt.length-1&&se.push(", "),se),[]):De=vt);let Ce=X;!a&&te&&Z&&(Ce=ae.clientWidth);let Oe;typeof I<"u"?Oe=I:Oe=p?null:0;const He=L.id||(C?`mui-component-select-${C}`:void 0),je={...t,variant:W,value:j,open:ve,error:f},Le=NR(je),Je={...y.PaperProps,...typeof y.slotProps?.paper=="function"?y.slotProps.paper(je):y.slotProps?.paper},gt={...y.MenuListProps,...typeof y.slotProps?.list=="function"?y.slotProps.list(je):y.slotProps?.list},ft=Jn();return c.jsxs(D.Fragment,{children:[c.jsx(RR,{as:"div",ref:K,tabIndex:Oe,role:"combobox","aria-controls":ve?ft:void 0,"aria-disabled":p?"true":void 0,"aria-expanded":ve?"true":"false","aria-haspopup":"listbox","aria-label":o,"aria-labelledby":[x,He].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":T?"true":void 0,"aria-invalid":f?"true":void 0,onKeyDown:Re,onMouseDown:p||R?null:ne,onBlur:ze,onFocus:N,...L,ownerState:je,className:Pe(L.className,Le.select,l),id:He,children:LR(De)?jh||(jh=c.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):De}),c.jsx(OR,{"aria-invalid":f,value:Array.isArray(j)?j.join(","):j,name:C,ref:_,"aria-hidden":!0,onChange:be,tabIndex:-1,disabled:p,className:Le.nativeInput,autoFocus:i,required:T,...H,ownerState:je}),c.jsx(MR,{as:m,className:Le.icon,ownerState:je}),c.jsx(kR,{id:`menu-${C||""}`,anchorEl:ae,open:ve,onClose:ye,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...y,slotProps:{...y.slotProps,list:{"aria-labelledby":x,role:"listbox","aria-multiselectable":E?"true":void 0,disableListWrap:!0,id:ft,...gt},paper:{...Je,style:{minWidth:Ce,...Je!=null?Je.style:null}}},children:ue})]})}),ob=tt(c.jsx("path",{d:"M7 10l5 5 5-5z"})),_R=e=>{const{classes:t}=e,r=Fe({root:["root"]},rb,t);return{...t,...r}},Nd={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>dn(e)&&e!=="variant"},BR=ie(Rd,Nd)(""),jR=ie(Od,Nd)(""),$R=ie(Md,Nd)(""),ol=D.forwardRef(function(t,n){const r=Xe({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:u=!1,IconComponent:d=ob,id:p,input:h,inputProps:f,label:m,labelId:b,MenuProps:x,multiple:y=!1,native:E=!1,onClose:C,onOpen:k,open:v,renderValue:S,SelectDisplayProps:N,variant:O="outlined",...B}=r,R=E?PR:FR,F=Yn(),T=wi({props:r,muiFormControl:F,states:["variant","error"]}),L=T.variant||O,I={...r,variant:L,classes:a},A=_R(I),{root:M,...W}=A,H=h||{standard:c.jsx(BR,{ownerState:I}),outlined:c.jsx(jR,{label:m,ownerState:I}),filled:c.jsx($R,{ownerState:I})}[L],j=ot(n,Ii(H));return c.jsx(D.Fragment,{children:D.cloneElement(H,{inputComponent:R,inputProps:{children:i,error:T.error,IconComponent:d,variant:L,type:void 0,multiple:y,...E?{id:p}:{autoWidth:o,defaultOpen:l,displayEmpty:u,labelId:b,MenuProps:x,onClose:C,onOpen:k,open:v,renderValue:S,SelectDisplayProps:{id:p,...N}},...f,classes:f?rn(W,f.classes):W,...h?h.props.inputProps:{}},...(y&&E||u)&&L==="outlined"?{notched:!0}:{},ref:j,className:Pe(H.props.className,s,A.root),...!h&&{variant:L},...B})})});ol.muiName="Select";function HR(e){return _e("MuiTextField",e)}Me("MuiTextField",["root"]);const UR={standard:Rd,filled:Md,outlined:Od},zR=e=>{const{classes:t}=e;return Fe({root:["root"]},HR,t)},VR=ie(rl,{name:"MuiTextField",slot:"Root"})({}),Qe=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:a,className:s,color:l="primary",defaultValue:u,disabled:d=!1,error:p=!1,FormHelperTextProps:h,fullWidth:f=!1,helperText:m,id:b,InputLabelProps:x,inputProps:y,InputProps:E,inputRef:C,label:k,maxRows:v,minRows:S,multiline:N=!1,name:O,onBlur:B,onChange:R,onFocus:F,placeholder:T,required:L=!1,rows:I,select:A=!1,SelectProps:M,slots:W={},slotProps:H={},type:j,value:w,variant:V="outlined",...J}=r,_={...r,autoFocus:i,color:l,disabled:d,error:p,fullWidth:f,multiline:N,required:L,select:A,variant:V},de=zR(_),Z=Jn(b),Y=m&&Z?`${Z}-helper-text`:void 0,te=k&&Z?`${Z}-label`:void 0,X=UR[V],re={slots:W,slotProps:{input:E,inputLabel:x,htmlInput:y,formHelperText:h,select:M,...H}},Q={},K=re.slotProps.inputLabel;V==="outlined"&&(K&&typeof K.shrink<"u"&&(Q.notched=K.shrink),Q.label=k),A&&((!M||!M.native)&&(Q.id=void 0),Q["aria-describedby"]=void 0);const[ae,ee]=ct("root",{elementType:VR,shouldForwardComponentProp:!0,externalForwardedProps:{...re,...J},ownerState:_,className:Pe(de.root,s),ref:n,additionalProps:{disabled:d,error:p,fullWidth:f,required:L,color:l,variant:V}}),[ne,ye]=ct("input",{elementType:X,externalForwardedProps:re,additionalProps:Q,ownerState:_}),[pe,be]=ct("inputLabel",{elementType:nl,externalForwardedProps:re,ownerState:_}),[le,Re]=ct("htmlInput",{elementType:"input",externalForwardedProps:re,ownerState:_}),[ve,ze]=ct("formHelperText",{elementType:W1,externalForwardedProps:re,ownerState:_}),[De,vt]=ct("select",{elementType:ol,externalForwardedProps:re,ownerState:_}),lt=c.jsx(ne,{"aria-describedby":Y,autoComplete:o,autoFocus:i,defaultValue:u,fullWidth:f,multiline:N,name:O,rows:I,maxRows:v,minRows:S,type:j,value:w,id:Z,inputRef:C,onBlur:B,onChange:R,onFocus:F,placeholder:T,inputProps:Re,slots:{input:W.htmlInput?le:void 0},...ye});return c.jsxs(ae,{...ee,children:[k!=null&&k!==""&&c.jsx(pe,{htmlFor:Z,id:te,...be,children:k}),A?c.jsx(De,{"aria-describedby":Y,id:Z,labelId:te,value:w,input:lt,...vt,children:a}):lt,m&&c.jsx(ve,{id:Y,...ze,children:m})]})});function WR(e){return _e("MuiDialog",e)}const ga=Me("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),ib=D.createContext({}),qR=ie(Z1,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),YR=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${ke(n)}`],paper:["paper",`paperScroll${ke(n)}`,`paperWidth${ke(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return Fe(a,WR,t)},KR=ie(J1,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),GR=ie("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${ke(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"}}}]}),QR=ie(Ro,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${ke(n.scroll)}`],t[`paperWidth${ke(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)`,[`&.${ga.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}`,[`&.${ga.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,[`&.${ga.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),gr=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiDialog"}),o=Gr(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":s,"aria-modal":l=!0,BackdropComponent:u,BackdropProps:d,children:p,className:h,disableEscapeKeyDown:f=!1,fullScreen:m=!1,fullWidth:b=!1,maxWidth:x="sm",onClick:y,onClose:E,open:C,PaperComponent:k=Ro,PaperProps:v={},scroll:S="paper",slots:N={},slotProps:O={},TransitionComponent:B=So,transitionDuration:R=i,TransitionProps:F,...T}=r,L={...r,disableEscapeKeyDown:f,fullScreen:m,fullWidth:b,maxWidth:x,scroll:S},I=YR(L),A=D.useRef(),M=ee=>{A.current=ee.target===ee.currentTarget},W=ee=>{y&&y(ee),A.current&&(A.current=null,E&&E(ee,"backdropClick"))},H=Jn(s),j=D.useMemo(()=>({titleId:H}),[H]),w={transition:B,...N},V={transition:F,paper:v,backdrop:d,...O},J={slots:w,slotProps:V},[_,de]=ct("root",{elementType:KR,shouldForwardComponentProp:!0,externalForwardedProps:J,ownerState:L,className:Pe(I.root,h),ref:n}),[Z,Y]=ct("backdrop",{elementType:qR,shouldForwardComponentProp:!0,externalForwardedProps:J,ownerState:L}),[te,X]=ct("paper",{elementType:QR,shouldForwardComponentProp:!0,externalForwardedProps:J,ownerState:L,className:Pe(I.paper,v.className)}),[re,Q]=ct("container",{elementType:GR,externalForwardedProps:J,ownerState:L,className:I.container}),[K,ae]=ct("transition",{elementType:So,externalForwardedProps:J,ownerState:L,additionalProps:{appear:!0,in:C,timeout:R,role:"presentation"}});return c.jsx(_,{closeAfterTransition:!0,slots:{backdrop:Z},slotProps:{backdrop:{transitionDuration:R,as:u,...Y}},disableEscapeKeyDown:f,onClose:E,open:C,onClick:W,...de,...T,children:c.jsx(K,{...ae,children:c.jsx(re,{onMouseDown:M,...Q,children:c.jsx(te,{as:k,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":H,"aria-modal":l,...X,children:c.jsx(ib.Provider,{value:j,children:p})})})})})});function XR(e){return _e("MuiDialogActions",e)}Me("MuiDialogActions",["root","spacing"]);const ZR=e=>{const{classes:t,disableSpacing:n}=e;return Fe({root:["root",!n&&"spacing"]},XR,t)},JR=ie("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}}}]}),br=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1,...a}=r,s={...r,disableSpacing:i},l=ZR(s);return c.jsx(JR,{className:Pe(l.root,o),ownerState:s,ref:n,...a})});function e8(e){return _e("MuiDialogContent",e)}Me("MuiDialogContent",["root","dividers"]);function t8(e){return _e("MuiDialogTitle",e)}const n8=Me("MuiDialogTitle",["root"]),r8=e=>{const{classes:t,dividers:n}=e;return Fe({root:["root",n&&"dividers"]},e8,t)},o8=ie("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:{[`.${n8.root} + &`]:{paddingTop:0}}}]}))),xr=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiDialogContent"}),{className:o,dividers:i=!1,...a}=r,s={...r,dividers:i},l=r8(s);return c.jsx(o8,{className:Pe(l.root,o),ownerState:s,ref:n,...a})});function i8(e){return _e("MuiTypography",e)}Me("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const a8={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},s8=yE(),l8=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e,s={root:["root",i,e.align!=="inherit"&&`align${ke(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Fe(s,i8,a)},u8=ie("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${ke(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(un()).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${ke(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}}]}))),Hh={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},xt=D.forwardRef(function(t,n){const{color:r,...o}=Xe({props:t,name:"MuiTypography"}),i=!a8[r],a=s8({...o,...i&&{color:r}}),{align:s="inherit",className:l,component:u,gutterBottom:d=!1,noWrap:p=!1,paragraph:h=!1,variant:f="body1",variantMapping:m=Hh,...b}=a,x={...a,align:s,color:r,className:l,component:u,gutterBottom:d,noWrap:p,paragraph:h,variant:f,variantMapping:m},y=u||(h?"p":m[f]||Hh[f])||"span",E=l8(x);return c.jsx(u8,{as:y,ref:n,className:Pe(E.root,l),...b,ownerState:x,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...b.style}})});function c8(e){return _e("MuiDialogContentText",e)}Me("MuiDialogContentText",["root"]);const d8=e=>{const{classes:t}=e,r=Fe({root:["root"]},c8,t);return{...t,...r}},p8=ie(xt,{shouldForwardProp:e=>dn(e)||e==="classes",name:"MuiDialogContentText",slot:"Root"})({}),Ai=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiDialogContentText"}),{children:o,className:i,...a}=r,s=d8(a);return c.jsx(p8,{component:"p",variant:"body1",color:"textSecondary",ref:n,ownerState:a,className:Pe(s.root,i),...r,classes:s})}),f8=e=>{const{classes:t}=e;return Fe({root:["root"]},t8,t)},h8=ie(xt,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),Lr=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiDialogTitle"}),{className:o,id:i,...a}=r,s=r,l=f8(s),{titleId:u=i}=D.useContext(ib);return c.jsx(h8,{component:"h2",className:Pe(l.root,o),ownerState:s,ref:n,variant:"h6",id:i??u,...a})});function m8({resourceUri:e}){const[t,n]=q.useState(!1),{apiClients:r}=st.useServer(),o=Mr.useQueryClient(),[i,a]=q.useState(""),s=()=>{n(!0)},l=()=>{n(!1)},{environmentName:u}=Tt(e),d=ur({async mutationFn(h){return r.packages.createPackage(u,{name:h.name,description:h.description,location:h.location})},onSuccess(){l(),a("Package created successfully"),o.invalidateQueries({queryKey:["packages",u]})},onError(h){a(h instanceof Error?h.message:"An unknown error occurred")}}),p=h=>{h.preventDefault();const f=new FormData(h.currentTarget),m=f.get("name")?.toString(),b=f.get("description")?.toString(),x=f.get("location")?.toString();d.mutate({name:m,description:b,location:x})};return c.jsxs(q.Fragment,{children:[c.jsx(Dt,{onClick:s,variant:"contained",color:"primary",startIcon:c.jsx(Dn.Add,{}),sx:{color:"white"},children:"Add Package"}),c.jsxs(gr,{open:t,onClose:l,children:[c.jsx(Lr,{children:"Create New Package"}),c.jsxs(xr,{children:[c.jsxs(Ai,{children:["Create a new malloy package to start exploring your data.",c.jsx("br",{}),c.jsx("br",{}),"The location can be a GitHub/S3/GCP URL containing a package (Zipped or unzipped), or an absolute path to a directory that the publisher server has access to.",c.jsx("br",{}),c.jsx("br",{}),"Make sure to conform the"," ",c.jsx("a",{href:"https://github.com/malloydata/publisher/blob/main/README.md#architecture-overview",target:"_blank",rel:"noopener noreferrer",children:"Malloy Package Format"}),"."]}),c.jsxs("form",{onSubmit:p,id:"package-form",children:[c.jsx(Qe,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Package Name",type:"text",fullWidth:!0,variant:"standard"}),c.jsx(Qe,{id:"description",name:"description",label:"Description",multiline:!0,fullWidth:!0,rows:4,variant:"standard"}),c.jsx(Qe,{id:"location",name:"location",label:"Location",type:"text",placeholder:"E.g. s3://my-bucket/my-package.zip",fullWidth:!0,variant:"standard"})]})]}),c.jsxs(br,{children:[c.jsx(Dt,{disabled:d.isPending,onClick:l,children:"Cancel"}),c.jsx(Dt,{type:"submit",form:"package-form",loading:d.isPending,children:"Save Changes"})]})]}),c.jsx(P.Snackbar,{open:i!=="",autoHideDuration:6e3,onClose:()=>a(""),message:i})]})}function g8(e){return _e("MuiIconButton",e)}const Uh=Me("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),b8=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i,loading:a}=e,s={root:["root",a&&"loading",n&&"disabled",r!=="default"&&`color${ke(r)}`,o&&`edge${ke(o)}`,`size${ke(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Fe(s,g8,t)},x8=ie(vo,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${ke(n.color)}`],n.edge&&t[`edge${ke(n.edge)}`],t[`size${ke(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(un()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(un()).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)}}],[`&.${Uh.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Uh.loading}`]:{color:"transparent"}}))),y8=ie("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"}}]})),wn=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:s="default",disabled:l=!1,disableFocusRipple:u=!1,size:d="medium",id:p,loading:h=null,loadingIndicator:f,...m}=r,b=Jn(p),x=f??c.jsx(Ad,{"aria-labelledby":b,color:"inherit",size:16}),y={...r,edge:o,color:s,disabled:l,disableFocusRipple:u,loading:h,loadingIndicator:x,size:d},E=b8(y);return c.jsxs(x8,{id:h?b:p,className:Pe(E.root,a),centerRipple:!0,focusRipple:!u,disabled:l||h,ref:n,...m,ownerState:y,children:[typeof h=="boolean"&&c.jsx("span",{className:E.loadingWrapper,style:{display:"contents"},children:c.jsx(y8,{className:E.loadingIndicator,ownerState:y,children:h&&x})}),i]})});function E8({resourceUri:e,onCloseDialog:t}){const[n,r]=q.useState(!1),{apiClients:o}=st.useServer(),i=Mr.useQueryClient(),[a,s]=q.useState(""),l=()=>{r(!0)},u=()=>{r(!1),t()},{environmentName:d,packageName:p}=Tt(e),h=ur({mutationFn:()=>o.packages.deletePackage(d,p),onSuccess(){u(),i.invalidateQueries({queryKey:["packages"]}),s("Package deleted successfully")},onError(f){s(f instanceof Error?f.message:"An unknown error occurred")}});return c.jsxs(q.Fragment,{children:[c.jsxs(P.MenuItem,{onClick:l,children:[c.jsx(P.ListItemIcon,{children:c.jsx(Dn.Delete,{fontSize:"small"})}),c.jsx(P.ListItemText,{children:"Delete"})]}),c.jsxs(gr,{onClose:u,"aria-labelledby":"customized-dialog-title",open:n,children:[c.jsx(Lr,{sx:{m:0,p:2},id:"customized-dialog-title",children:"Delete Package"}),c.jsx(wn,{"aria-label":"close",onClick:u,sx:f=>({position:"absolute",right:8,top:8,color:f.palette.grey[500]}),children:c.jsx(Kr,{})}),c.jsx(xr,{dividers:!0,children:c.jsxs(xt,{gutterBottom:!0,children:['Are you sure you want to delete "',p,'"? This action cannot be undone.']})}),c.jsxs(br,{children:[c.jsx(Dt,{variant:"outlined",onClick:u,style:{borderColor:"#14b3cb",color:"#14b3cb"},children:"Cancel"}),c.jsx(Dt,{variant:"contained",autoFocus:!0,onClick:()=>h.mutate(),color:"error",loading:h.isPending,children:"Delete"})]}),c.jsx(P.Snackbar,{open:a!=="",autoHideDuration:6e3,onClose:()=>s(""),message:a})]})]})}function C8({package:e,resourceUri:t,onCloseDialog:n}){const[r,o]=q.useState(!1),{apiClients:i}=st.useServer(),a=Mr.useQueryClient(),[s,l]=q.useState(""),u=()=>{o(!0)},d=()=>{o(!1),n()},{packageName:p,environmentName:h}=Tt(t),f=ur({async mutationFn(b){return i.packages.updatePackage(h,p,{name:p,description:b.description})},onSuccess(){d(),l("Package updated successfully"),a.invalidateQueries({queryKey:["packages",h]})},onError(b){l(b instanceof Error?b.message:"An unknown error occurred")}}),m=b=>{b.preventDefault();const y=new FormData(b.currentTarget).get("description")?.toString();f.mutate({description:y})};return c.jsxs(q.Fragment,{children:[c.jsxs(P.MenuItem,{onClick:u,children:[c.jsx(P.ListItemIcon,{children:c.jsx(Dn.Edit,{fontSize:"small"})}),c.jsx(P.ListItemText,{children:"Edit"})]}),c.jsxs(gr,{open:r,onClose:d,children:[c.jsx(Lr,{children:"Edit Package"}),c.jsxs(xr,{children:[c.jsxs(Ai,{children:['Update the details for "',e.name,'".']}),c.jsxs("form",{onSubmit:m,id:"package-form",children:[c.jsx(Qe,{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(Qe,{id:"description",name:"description",label:"Description",multiline:!0,fullWidth:!0,rows:4,defaultValue:e.description,variant:"standard"})]})]}),c.jsxs(br,{children:[c.jsx(Dt,{disabled:f.isPending,onClick:d,children:"Cancel"}),c.jsx(Dt,{type:"submit",form:"package-form",loading:f.isPending,children:"Save Changes"})]})]}),c.jsx(P.Snackbar,{open:s!=="",autoHideDuration:6e3,onClose:()=>l(""),message:s})]})}const T8=({package:e,resourceUri:t})=>{const{mutable:n}=st.useServer(),[r,o]=q.useState(null),i=!!r,a=l=>{o(l.currentTarget)},s=()=>{o(null)};return c.jsx(c.Fragment,{children:n&&c.jsxs(c.Fragment,{children:[c.jsx(P.IconButton,{"aria-label":`Package actions for ${e.name}`,onClick:l=>{l.stopPropagation(),a(l)},"aria-controls":i?"package-menu":void 0,"aria-haspopup":"true","aria-expanded":i?"true":void 0,children:c.jsx(Dn.MoreVert,{fontSize:"small"})}),c.jsxs(P.Menu,{id:"package-menu","aria-haspopup":"true","aria-expanded":i?"true":void 0,open:i,anchorEl:r,onClose:s,disableRestoreFocus:!0,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},onClick:l=>{l.stopPropagation()},children:[c.jsx(C8,{package:e,resourceUri:t,onCloseDialog:s}),c.jsx(E8,{resourceUri:t,onCloseDialog:s})]})]})})};function ab({onSelectPackage:e,resourceUri:t}){const{apiClients:n}=st.useServer(),{environmentName:r}=Tt(t),{data:o,isSuccess:i,isError:a,error:s}=Qt({queryKey:["packages",r],queryFn:()=>n.packages.listPackages(r)});return c.jsxs(c.Fragment,{children:[!i&&!a&&c.jsx(Zt,{text:"Fetching Packages..."}),i&&c.jsx(P.Grid,{container:!0,spacing:3,columns:12,children:o.data.sort((l,u)=>l.name.localeCompare(u.name)).map(l=>{const u=Wa({environmentName:r,packageName:l.name});return c.jsx(P.Grid,{size:{xs:12,sm:12,md:12,lg:4},children:c.jsx(Qr,{sx:{cursor:"pointer",transition:"all 0.2s ease-in-out",paddingTop:"8px","&:hover":{boxShadow:"0 2px 6px rgba(0, 0, 0, 0.08)",transform:"translateY(-1px)"}},onClick:d=>{e(l.name,d)},children:c.jsxs(Xr,{children:[c.jsxs(P.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",sx:{marginBottom:"8px"},children:[c.jsx(P.Typography,{variant:"overline",sx:{fontSize:"12px",fontWeight:"600",color:"primary.main",textTransform:"uppercase",letterSpacing:"0.5px"},children:l.name}),c.jsx(T8,{package:l,resourceUri:u})]}),c.jsx(P.Divider,{sx:{mb:2}}),c.jsx(P.Box,{sx:{maxHeight:"120px",overflowY:"auto",mt:2},children:c.jsx(P.Typography,{variant:"body2",children:l.description})})]})})},l.name)})}),a&&c.jsx(Jt,{error:s,context:`${r} > Packages`})]})}function v8({onSelectPackage:e,resourceUri:t}){const{mutable:n}=st.useServer(),{environmentName:r}=Tt(t);return q.useEffect(()=>{window.scrollTo({top:0,behavior:"auto"})},[]),c.jsx(c.Fragment,{children:c.jsxs(wE,{children:[c.jsxs(P.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,children:[c.jsxs(P.Typography,{variant:"h6",children:[r," packages"]}),n&&c.jsx(m8,{resourceUri:t})]}),c.jsxs(P.Grid,{container:!0,spacing:3,columns:12,children:[c.jsx(P.Grid,{size:{xs:12,md:12},children:c.jsx(ab,{onSelectPackage:e,resourceUri:t})}),c.jsx(P.Grid,{size:{xs:12,md:12},children:c.jsx(d5,{resourceUri:t})})]})]})})}const S8=e=>{const t=D.useRef({});return D.useEffect(()=>{t.current=e}),t.current};function zh({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 Vh(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function k8(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(s,{inputValue:l,getOptionLabel:u})=>{let d=a?l.trim():l;n&&(d=d.toLowerCase()),t&&(d=Vh(d));const p=d?s.filter(h=>{let f=(i||u)(h);return n&&(f=f.toLowerCase()),t&&(f=Vh(f)),o==="start"?f.startsWith(d):f.includes(d)}):s;return typeof r=="number"?p.slice(0,r):p}}const D8=k8(),Wh=5,w8=e=>e.current!==null&&e.current.parentElement?.contains(document.activeElement),I8=[];function qh(e,t,n,r){if(t||e==null||r)return"";const o=n(e);return typeof o=="string"?o:""}function A8(e){const{unstable_isActiveElementInListbox:t=w8,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:l=!1,componentName:u="useAutocomplete",defaultValue:d=e.multiple?I8:null,disableClearable:p=!1,disableCloseOnSelect:h=!1,disabled:f,disabledItemsFocusable:m=!1,disableListWrap:b=!1,filterOptions:x=D8,filterSelectedOptions:y=!1,freeSolo:E=!1,getOptionDisabled:C,getOptionKey:k,getOptionLabel:v=ge=>ge.label??ge,groupBy:S,handleHomeEndKeys:N=!e.freeSolo,id:O,includeInputInList:B=!1,inputValue:R,isOptionEqualToValue:F=(ge,me)=>ge===me,multiple:T=!1,onChange:L,onClose:I,onHighlightChange:A,onInputChange:M,onOpen:W,open:H,openOnFocus:j=!1,options:w,readOnly:V=!1,renderValue:J,selectOnFocus:_=!e.freeSolo,value:de}=e,Z=Jn(O);let Y=v;Y=ge=>{const me=v(ge);return typeof me!="string"?String(me):me};const te=D.useRef(!1),X=D.useRef(!0),re=D.useRef(null),Q=D.useRef(null),[K,ae]=D.useState(null),[ee,ne]=D.useState(-1),ye=o?0:-1,pe=D.useRef(ye),be=D.useRef(qh(d??de,T,Y)).current,[le,Re]=Sn({controlled:de,default:d,name:u}),[ve,ze]=Sn({controlled:R,default:be,name:u,state:"inputValue"}),[De,vt]=D.useState(!1),lt=D.useCallback((ge,me,Ne)=>{if(!(T?le.length<me.length:me!==null)&&!s)return;const Ye=qh(me,T,Y,J);ve!==Ye&&(ze(Ye),M&&M(ge,Ye,Ne))},[Y,ve,T,M,ze,s,le,J]),[qe,ue]=Sn({controlled:H,default:!1,name:u,state:"open"}),[Ce,Oe]=D.useState(!0),He=!T&&le!=null&&ve===Y(le),je=qe&&!V,Le=je?x(w.filter(ge=>!(y&&(T?le:[le]).some(me=>me!==null&&F(ge,me)))),{inputValue:He&&Ce?"":ve,getOptionLabel:Y}):[],Je=S8({filteredOptions:Le,value:le,inputValue:ve});D.useEffect(()=>{const ge=le!==Je.value;De&&!ge||E&&!ge||lt(null,le,"reset")},[le,lt,De,Je.value,E]);const gt=qe&&Le.length>0&&!V,ft=Ae(ge=>{if(ge===-1)re.current.focus();else{const me=J?"data-item-index":"data-tag-index";K.querySelector(`[${me}="${ge}"]`).focus()}});D.useEffect(()=>{T&&ee>le.length-1&&(ne(-1),ft(-1))},[le,T,ee,ft]);function se(ge,me){if(!Q.current||ge<0||ge>=Le.length)return-1;let Ne=ge;for(;;){const Ve=Q.current.querySelector(`[data-option-index="${Ne}"]`),Ye=m?!1:!Ve||Ve.disabled||Ve.getAttribute("aria-disabled")==="true";if(Ve&&Ve.hasAttribute("tabindex")&&!Ye)return Ne;if(me==="next"?Ne=(Ne+1)%Le.length:Ne=(Ne-1+Le.length)%Le.length,Ne===ge)return-1}}const xe=Ae(({event:ge,index:me,reason:Ne})=>{if(pe.current=me,me===-1?re.current.removeAttribute("aria-activedescendant"):re.current.setAttribute("aria-activedescendant",`${Z}-option-${me}`),A&&["mouse","keyboard","touch"].includes(Ne)&&A(ge,me===-1?null:Le[me],Ne),!Q.current)return;const Ve=Q.current.querySelector(`[role="option"].${n}-focused`);Ve&&(Ve.classList.remove(`${n}-focused`),Ve.classList.remove(`${n}-focusVisible`));let Ye=Q.current;if(Q.current.getAttribute("role")!=="listbox"&&(Ye=Q.current.parentElement.querySelector('[role="listbox"]')),!Ye)return;if(me===-1){Ye.scrollTop=0;return}const Yt=Q.current.querySelector(`[data-option-index="${me}"]`);if(Yt&&(Yt.classList.add(`${n}-focused`),Ne==="keyboard"&&Yt.classList.add(`${n}-focusVisible`),Ye.scrollHeight>Ye.clientHeight&&Ne!=="mouse"&&Ne!=="touch")){const _t=Yt,Gn=Ye.clientHeight+Ye.scrollTop,Ja=_t.offsetTop+_t.offsetHeight;Ja>Gn?Ye.scrollTop=Ja-Ye.clientHeight:_t.offsetTop-_t.offsetHeight*(S?1.3:0)<Ye.scrollTop&&(Ye.scrollTop=_t.offsetTop-_t.offsetHeight*(S?1.3:0))}}),Te=Ae(({event:ge,diff:me,direction:Ne="next",reason:Ve})=>{if(!je)return;const Yt=se((()=>{const _t=Le.length-1;if(me==="reset")return ye;if(me==="start")return 0;if(me==="end")return _t;const Gn=pe.current+me;return Gn<0?Gn===-1&&B?-1:b&&pe.current!==-1||Math.abs(me)>1?0:_t:Gn>_t?Gn===_t+1&&B?-1:b||Math.abs(me)>1?_t:0:Gn})(),Ne);if(xe({index:Yt,reason:Ve,event:ge}),r&&me!=="reset")if(Yt===-1)re.current.value=ve;else{const _t=Y(Le[Yt]);re.current.value=_t,_t.toLowerCase().indexOf(ve.toLowerCase())===0&&ve.length>0&&re.current.setSelectionRange(ve.length,_t.length)}}),Be=!zh({array1:Je.filteredOptions,array2:Le,parser:Y}),We=()=>{const ge=(me,Ne)=>{const Ve=me?Y(me):"",Ye=Ne?Y(Ne):"";return Ve===Ye};if(pe.current!==-1&&!zh({array1:Je.filteredOptions,array2:Le,parser:Y})&&Je.inputValue===ve&&(T?le.length===Je.value.length&&Je.value.every((me,Ne)=>Y(le[Ne])===Y(me)):ge(Je.value,le))){const me=Je.filteredOptions[pe.current];if(me)return Le.findIndex(Ne=>Y(Ne)===Y(me))}return-1},It=D.useCallback(()=>{if(!je)return;const ge=We();if(ge!==-1){pe.current=ge;return}const me=T?le[0]:le;if(Le.length===0||me==null){Te({diff:"reset"});return}if(Q.current){if(me!=null){const Ne=Le[pe.current];if(T&&Ne&&le.findIndex(Ye=>F(Ne,Ye))!==-1)return;const Ve=Le.findIndex(Ye=>F(Ye,me));Ve===-1?Te({diff:"reset"}):xe({index:Ve});return}if(pe.current>=Le.length-1){xe({index:Le.length-1});return}xe({index:pe.current})}},[Le.length,T?!1:le,y,Te,xe,je,ve,T]),Lt=Ae(ge=>{Xu(Q,ge),ge&&It()});D.useEffect(()=>{Be&&It()},[It,Be]);const yt=ge=>{qe||(ue(!0),Oe(!0),W&&W(ge))},zt=(ge,me)=>{qe&&(ue(!1),I&&I(ge,me))},An=(ge,me,Ne,Ve)=>{if(T){if(le.length===me.length&&le.every((Ye,Yt)=>Ye===me[Yt]))return}else if(le===me)return;L&&L(ge,me,Ne,Ve),Re(me)},At=D.useRef(!1),en=(ge,me,Ne="selectOption",Ve="options")=>{let Ye=Ne,Yt=me;if(T){Yt=Array.isArray(le)?le.slice():[];const _t=Yt.findIndex(Gn=>F(me,Gn));_t===-1?Yt.push(me):Ve!=="freeSolo"&&(Yt.splice(_t,1),Ye="removeOption")}lt(ge,Yt,Ye),An(ge,Yt,Ye,{option:me}),!h&&(!ge||!ge.ctrlKey&&!ge.metaKey)&&zt(ge,Ye),(a===!0||a==="touch"&&At.current||a==="mouse"&&!At.current)&&re.current.blur()};function yr(ge,me){if(ge===-1)return-1;let Ne=ge;for(;;){if(me==="next"&&Ne===le.length||me==="previous"&&Ne===-1)return-1;const Ve=J?"data-item-index":"data-tag-index",Ye=K.querySelector(`[${Ve}="${Ne}"]`);if(!Ye||!Ye.hasAttribute("tabindex")||Ye.disabled||Ye.getAttribute("aria-disabled")==="true")Ne+=me==="next"?1:-1;else return Ne}}const Pn=(ge,me)=>{if(!T)return;ve===""&&zt(ge,"toggleInput");let Ne=ee;ee===-1?ve===""&&me==="previous"&&(Ne=le.length-1):(Ne+=me==="next"?1:-1,Ne<0&&(Ne=0),Ne===le.length&&(Ne=-1)),Ne=yr(Ne,me),ne(Ne),ft(Ne)},to=ge=>{te.current=!0,ze(""),M&&M(ge,"","clear"),An(ge,T?[]:null,"clear")},Kn=ge=>me=>{if(ge.onKeyDown&&ge.onKeyDown(me),!me.defaultMuiPrevented&&(ee!==-1&&!["ArrowLeft","ArrowRight"].includes(me.key)&&(ne(-1),ft(-1)),me.which!==229))switch(me.key){case"Home":je&&N&&(me.preventDefault(),Te({diff:"start",direction:"next",reason:"keyboard",event:me}));break;case"End":je&&N&&(me.preventDefault(),Te({diff:"end",direction:"previous",reason:"keyboard",event:me}));break;case"PageUp":me.preventDefault(),Te({diff:-Wh,direction:"previous",reason:"keyboard",event:me}),yt(me);break;case"PageDown":me.preventDefault(),Te({diff:Wh,direction:"next",reason:"keyboard",event:me}),yt(me);break;case"ArrowDown":me.preventDefault(),Te({diff:1,direction:"next",reason:"keyboard",event:me}),yt(me);break;case"ArrowUp":me.preventDefault(),Te({diff:-1,direction:"previous",reason:"keyboard",event:me}),yt(me);break;case"ArrowLeft":!T&&J?ft(0):Pn(me,"previous");break;case"ArrowRight":!T&&J?ft(-1):Pn(me,"next");break;case"Enter":if(pe.current!==-1&&je){const Ne=Le[pe.current],Ve=C?C(Ne):!1;if(me.preventDefault(),Ve)return;en(me,Ne,"selectOption"),r&&re.current.setSelectionRange(re.current.value.length,re.current.value.length)}else E&&ve!==""&&He===!1&&(T&&me.preventDefault(),en(me,ve,"createOption","freeSolo"));break;case"Escape":je?(me.preventDefault(),me.stopPropagation(),zt(me,"escape")):l&&(ve!==""||T&&le.length>0||J)&&(me.preventDefault(),me.stopPropagation(),to(me));break;case"Backspace":if(T&&!V&&ve===""&&le.length>0){const Ne=ee===-1?le.length-1:ee,Ve=le.slice();Ve.splice(Ne,1),An(me,Ve,"removeOption",{option:le[Ne]})}!T&&J&&!V&&(Re(null),ft(-1));break;case"Delete":if(T&&!V&&ve===""&&le.length>0&&ee!==-1){const Ne=ee,Ve=le.slice();Ve.splice(Ne,1),An(me,Ve,"removeOption",{option:le[Ne]})}!T&&J&&!V&&(Re(null),ft(-1));break}},Er=ge=>{vt(!0),j&&!te.current&&yt(ge)},Lo=ge=>{if(t(Q)){re.current.focus();return}vt(!1),X.current=!0,te.current=!1,i&&pe.current!==-1&&je?en(ge,Le[pe.current],"blur"):i&&E&&ve!==""?en(ge,ve,"blur","freeSolo"):s&<(ge,le,"blur"),zt(ge,"blur")},Pi=ge=>{const me=ge.target.value;ve!==me&&(ze(me),Oe(!1),M&&M(ge,me,"input")),me===""?!p&&!T&&An(ge,null,"clear"):yt(ge)},Yl=ge=>{const me=Number(ge.currentTarget.getAttribute("data-option-index"));pe.current!==me&&xe({event:ge,index:me,reason:"mouse"})},Kl=ge=>{xe({event:ge,index:Number(ge.currentTarget.getAttribute("data-option-index")),reason:"touch"}),At.current=!0},Gl=ge=>{const me=Number(ge.currentTarget.getAttribute("data-option-index"));en(ge,Le[me],"selectOption"),At.current=!1},Ql=ge=>me=>{const Ne=le.slice();Ne.splice(ge,1),An(me,Ne,"removeOption",{option:le[ge]})},Ri=ge=>{An(ge,null,"removeOption",{option:le})},Vt=ge=>{qe?zt(ge,"toggleInput"):yt(ge)},qt=ge=>{ge.currentTarget.contains(ge.target)&&ge.target.getAttribute("id")!==Z&&ge.preventDefault()},Fr=ge=>{ge.currentTarget.contains(ge.target)&&(re.current.focus(),_&&X.current&&re.current.selectionEnd-re.current.selectionStart===0&&re.current.select(),X.current=!1)},Xl=ge=>{!f&&(ve===""||!qe)&&Vt(ge)};let Mi=E&&ve.length>0;Mi=Mi||(T?le.length>0:le!==null);let Za=Le;return S&&(Za=Le.reduce((ge,me,Ne)=>{const Ve=S(me);return ge.length>0&&ge[ge.length-1].group===Ve?ge[ge.length-1].options.push(me):ge.push({key:Ne,index:Ne,group:Ve,options:[me]}),ge},[])),f&&De&&Lo(),{getRootProps:(ge={})=>({...ge,onKeyDown:Kn(ge),onMouseDown:qt,onClick:Fr}),getInputLabelProps:()=>({id:`${Z}-label`,htmlFor:Z}),getInputProps:()=>({id:Z,value:ve,onBlur:Lo,onFocus:Er,onChange:Pi,onMouseDown:Xl,"aria-activedescendant":je?"":null,"aria-autocomplete":r?"both":"list","aria-controls":gt?`${Z}-listbox`:void 0,"aria-expanded":gt,autoComplete:"off",ref:re,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:f}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:to}),getItemProps:({index:ge=0}={})=>({...T&&{key:ge},...J?{"data-item-index":ge}:{"data-tag-index":ge},tabIndex:-1,...!V&&{onDelete:T?Ql(ge):Ri}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Vt}),getTagProps:({index:ge})=>({key:ge,"data-tag-index":ge,tabIndex:-1,...!V&&{onDelete:Ql(ge)}}),getListboxProps:()=>({role:"listbox",id:`${Z}-listbox`,"aria-labelledby":`${Z}-label`,ref:Lt,onMouseDown:ge=>{ge.preventDefault()}}),getOptionProps:({index:ge,option:me})=>{const Ne=(T?le:[le]).some(Ye=>Ye!=null&&F(me,Ye)),Ve=C?C(me):!1;return{key:k?.(me)??Y(me),tabIndex:-1,role:"option",id:`${Z}-option-${ge}`,onMouseMove:Yl,onClick:Gl,onTouchStart:Kl,"data-option-index":ge,"aria-disabled":Ve,"aria-selected":Ne}},id:Z,inputValue:ve,value:le,dirty:Mi,expanded:je&&K,popupOpen:je,focused:De||ee!==-1,anchorEl:K,setAnchorEl:ae,focusedItem:ee,focusedTag:ee,groupedOptions:Za}}var mn="top",$n="bottom",Hn="right",gn="left",Fd="auto",Ya=[mn,$n,Hn,gn],di="start",wa="end",P8="clippingParents",sb="viewport",Wi="popper",R8="reference",Yh=Ya.reduce(function(e,t){return e.concat([t+"-"+di,t+"-"+wa])},[]),lb=[].concat(Ya,[Fd]).reduce(function(e,t){return e.concat([t,t+"-"+di,t+"-"+wa])},[]),M8="beforeRead",O8="read",L8="afterRead",N8="beforeMain",F8="main",_8="afterMain",B8="beforeWrite",j8="write",$8="afterWrite",H8=[M8,O8,L8,N8,F8,_8,B8,j8,$8];function dr(e){return e?(e.nodeName||"").toLowerCase():null}function In(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ko(e){var t=In(e).Element;return e instanceof t||e instanceof Element}function Bn(e){var t=In(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function _d(e){if(typeof ShadowRoot>"u")return!1;var t=In(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function U8(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!Bn(i)||!dr(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function z8(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],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Bn(o)||!dr(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const V8={name:"applyStyles",enabled:!0,phase:"write",fn:U8,effect:z8,requires:["computeStyles"]};function cr(e){return e.split("-")[0]}var xo=Math.max,il=Math.min,pi=Math.round;function Ic(){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 ub(){return!/^((?!chrome|android).)*safari/i.test(Ic())}function fi(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Bn(e)&&(o=e.offsetWidth>0&&pi(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&pi(r.height)/e.offsetHeight||1);var a=ko(e)?In(e):window,s=a.visualViewport,l=!ub()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/o,d=(r.top+(l&&s?s.offsetTop:0))/i,p=r.width/o,h=r.height/i;return{width:p,height:h,top:d,right:u+p,bottom:d+h,left:u,x:u,y:d}}function Bd(e){var t=fi(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 cb(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&_d(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Pr(e){return In(e).getComputedStyle(e)}function W8(e){return["table","td","th"].indexOf(dr(e))>=0}function eo(e){return((ko(e)?e.ownerDocument:e.document)||window.document).documentElement}function jl(e){return dr(e)==="html"?e:e.assignedSlot||e.parentNode||(_d(e)?e.host:null)||eo(e)}function Kh(e){return!Bn(e)||Pr(e).position==="fixed"?null:e.offsetParent}function q8(e){var t=/firefox/i.test(Ic()),n=/Trident/i.test(Ic());if(n&&Bn(e)){var r=Pr(e);if(r.position==="fixed")return null}var o=jl(e);for(_d(o)&&(o=o.host);Bn(o)&&["html","body"].indexOf(dr(o))<0;){var i=Pr(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function Ka(e){for(var t=In(e),n=Kh(e);n&&W8(n)&&Pr(n).position==="static";)n=Kh(n);return n&&(dr(n)==="html"||dr(n)==="body"&&Pr(n).position==="static")?t:n||q8(e)||t}function jd(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ba(e,t,n){return xo(e,il(t,n))}function Y8(e,t,n){var r=ba(e,t,n);return r>n?n:r}function db(){return{top:0,right:0,bottom:0,left:0}}function pb(e){return Object.assign({},db(),e)}function fb(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var K8=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,pb(typeof t!="number"?t:fb(t,Ya))};function G8(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=cr(n.placement),l=jd(s),u=[gn,Hn].indexOf(s)>=0,d=u?"height":"width";if(!(!i||!a)){var p=K8(o.padding,n),h=Bd(i),f=l==="y"?mn:gn,m=l==="y"?$n:Hn,b=n.rects.reference[d]+n.rects.reference[l]-a[l]-n.rects.popper[d],x=a[l]-n.rects.reference[l],y=Ka(i),E=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,C=b/2-x/2,k=p[f],v=E-h[d]-p[m],S=E/2-h[d]/2+C,N=ba(k,S,v),O=l;n.modifiersData[r]=(t={},t[O]=N,t.centerOffset=N-S,t)}}function Q8(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)||cb(t.elements.popper,o)&&(t.elements.arrow=o))}const X8={name:"arrow",enabled:!0,phase:"main",fn:G8,effect:Q8,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function hi(e){return e.split("-")[1]}var Z8={top:"auto",right:"auto",bottom:"auto",left:"auto"};function J8(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:pi(n*o)/o||0,y:pi(r*o)/o||0}}function Gh(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,p=e.isFixed,h=a.x,f=h===void 0?0:h,m=a.y,b=m===void 0?0:m,x=typeof d=="function"?d({x:f,y:b}):{x:f,y:b};f=x.x,b=x.y;var y=a.hasOwnProperty("x"),E=a.hasOwnProperty("y"),C=gn,k=mn,v=window;if(u){var S=Ka(n),N="clientHeight",O="clientWidth";if(S===In(n)&&(S=eo(n),Pr(S).position!=="static"&&s==="absolute"&&(N="scrollHeight",O="scrollWidth")),S=S,o===mn||(o===gn||o===Hn)&&i===wa){k=$n;var B=p&&S===v&&v.visualViewport?v.visualViewport.height:S[N];b-=B-r.height,b*=l?1:-1}if(o===gn||(o===mn||o===$n)&&i===wa){C=Hn;var R=p&&S===v&&v.visualViewport?v.visualViewport.width:S[O];f-=R-r.width,f*=l?1:-1}}var F=Object.assign({position:s},u&&Z8),T=d===!0?J8({x:f,y:b},In(n)):{x:f,y:b};if(f=T.x,b=T.y,l){var L;return Object.assign({},F,(L={},L[k]=E?"0":"",L[C]=y?"0":"",L.transform=(v.devicePixelRatio||1)<=1?"translate("+f+"px, "+b+"px)":"translate3d("+f+"px, "+b+"px, 0)",L))}return Object.assign({},F,(t={},t[k]=E?b+"px":"",t[C]=y?f+"px":"",t.transform="",t))}function eM(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:cr(t.placement),variation:hi(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,Gh(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Gh(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 tM={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:eM,data:{}};var fs={passive:!0};function nM(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,l=In(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(d){d.addEventListener("scroll",n.update,fs)}),s&&l.addEventListener("resize",n.update,fs),function(){i&&u.forEach(function(d){d.removeEventListener("scroll",n.update,fs)}),s&&l.removeEventListener("resize",n.update,fs)}}const rM={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:nM,data:{}};var oM={left:"right",right:"left",bottom:"top",top:"bottom"};function ws(e){return e.replace(/left|right|bottom|top/g,function(t){return oM[t]})}var iM={start:"end",end:"start"};function Qh(e){return e.replace(/start|end/g,function(t){return iM[t]})}function $d(e){var t=In(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Hd(e){return fi(eo(e)).left+$d(e).scrollLeft}function aM(e,t){var n=In(e),r=eo(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var u=ub();(u||!u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+Hd(e),y:l}}function sM(e){var t,n=eo(e),r=$d(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=xo(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=xo(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Hd(e),l=-r.scrollTop;return Pr(o||n).direction==="rtl"&&(s+=xo(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function Ud(e){var t=Pr(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function hb(e){return["html","body","#document"].indexOf(dr(e))>=0?e.ownerDocument.body:Bn(e)&&Ud(e)?e:hb(jl(e))}function xa(e,t){var n;t===void 0&&(t=[]);var r=hb(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=In(r),a=o?[i].concat(i.visualViewport||[],Ud(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(xa(jl(a)))}function Ac(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function lM(e,t){var n=fi(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 Xh(e,t,n){return t===sb?Ac(aM(e,n)):ko(t)?lM(t,n):Ac(sM(eo(e)))}function uM(e){var t=xa(jl(e)),n=["absolute","fixed"].indexOf(Pr(e).position)>=0,r=n&&Bn(e)?Ka(e):e;return ko(r)?t.filter(function(o){return ko(o)&&cb(o,r)&&dr(o)!=="body"}):[]}function cM(e,t,n,r){var o=t==="clippingParents"?uM(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(l,u){var d=Xh(e,u,r);return l.top=xo(d.top,l.top),l.right=il(d.right,l.right),l.bottom=il(d.bottom,l.bottom),l.left=xo(d.left,l.left),l},Xh(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function mb(e){var t=e.reference,n=e.element,r=e.placement,o=r?cr(r):null,i=r?hi(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case mn:l={x:a,y:t.y-n.height};break;case $n:l={x:a,y:t.y+t.height};break;case Hn:l={x:t.x+t.width,y:s};break;case gn:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=o?jd(o):null;if(u!=null){var d=u==="y"?"height":"width";switch(i){case di:l[u]=l[u]-(t[d]/2-n[d]/2);break;case wa:l[u]=l[u]+(t[d]/2-n[d]/2);break}}return l}function Ia(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,s=n.boundary,l=s===void 0?P8:s,u=n.rootBoundary,d=u===void 0?sb:u,p=n.elementContext,h=p===void 0?Wi:p,f=n.altBoundary,m=f===void 0?!1:f,b=n.padding,x=b===void 0?0:b,y=pb(typeof x!="number"?x:fb(x,Ya)),E=h===Wi?R8:Wi,C=e.rects.popper,k=e.elements[m?E:h],v=cM(ko(k)?k:k.contextElement||eo(e.elements.popper),l,d,a),S=fi(e.elements.reference),N=mb({reference:S,element:C,placement:o}),O=Ac(Object.assign({},C,N)),B=h===Wi?O:S,R={top:v.top-B.top+y.top,bottom:B.bottom-v.bottom+y.bottom,left:v.left-B.left+y.left,right:B.right-v.right+y.right},F=e.modifiersData.offset;if(h===Wi&&F){var T=F[o];Object.keys(R).forEach(function(L){var I=[Hn,$n].indexOf(L)>=0?1:-1,A=[mn,$n].indexOf(L)>=0?"y":"x";R[L]+=T[A]*I})}return R}function dM(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?lb:l,d=hi(r),p=d?s?Yh:Yh.filter(function(m){return hi(m)===d}):Ya,h=p.filter(function(m){return u.indexOf(m)>=0});h.length===0&&(h=p);var f=h.reduce(function(m,b){return m[b]=Ia(e,{placement:b,boundary:o,rootBoundary:i,padding:a})[cr(b)],m},{});return Object.keys(f).sort(function(m,b){return f[m]-f[b]})}function pM(e){if(cr(e)===Fd)return[];var t=ws(e);return[Qh(e),t,Qh(t)]}function fM(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,d=n.boundary,p=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,m=f===void 0?!0:f,b=n.allowedAutoPlacements,x=t.options.placement,y=cr(x),E=y===x,C=l||(E||!m?[ws(x)]:pM(x)),k=[x].concat(C).reduce(function(de,Z){return de.concat(cr(Z)===Fd?dM(t,{placement:Z,boundary:d,rootBoundary:p,padding:u,flipVariations:m,allowedAutoPlacements:b}):Z)},[]),v=t.rects.reference,S=t.rects.popper,N=new Map,O=!0,B=k[0],R=0;R<k.length;R++){var F=k[R],T=cr(F),L=hi(F)===di,I=[mn,$n].indexOf(T)>=0,A=I?"width":"height",M=Ia(t,{placement:F,boundary:d,rootBoundary:p,altBoundary:h,padding:u}),W=I?L?Hn:gn:L?$n:mn;v[A]>S[A]&&(W=ws(W));var H=ws(W),j=[];if(i&&j.push(M[T]<=0),s&&j.push(M[W]<=0,M[H]<=0),j.every(function(de){return de})){B=F,O=!1;break}N.set(F,j)}if(O)for(var w=m?3:1,V=function(Z){var Y=k.find(function(te){var X=N.get(te);if(X)return X.slice(0,Z).every(function(re){return re})});if(Y)return B=Y,"break"},J=w;J>0;J--){var _=V(J);if(_==="break")break}t.placement!==B&&(t.modifiersData[r]._skip=!0,t.placement=B,t.reset=!0)}}const hM={name:"flip",enabled:!0,phase:"main",fn:fM,requiresIfExists:["offset"],data:{_skip:!1}};function Zh(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 Jh(e){return[mn,Hn,$n,gn].some(function(t){return e[t]>=0})}function mM(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Ia(t,{elementContext:"reference"}),s=Ia(t,{altBoundary:!0}),l=Zh(a,r),u=Zh(s,o,i),d=Jh(l),p=Jh(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}const gM={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:mM};function bM(e,t,n){var r=cr(e),o=[gn,mn].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[gn,Hn].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function xM(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=lb.reduce(function(d,p){return d[p]=bM(p,t.rects,i),d},{}),s=a[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]=a}const yM={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:xM};function EM(e){var t=e.state,n=e.name;t.modifiersData[n]=mb({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const CM={name:"popperOffsets",enabled:!0,phase:"read",fn:EM,data:{}};function TM(e){return e==="x"?"y":"x"}function vM(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,d=n.altBoundary,p=n.padding,h=n.tether,f=h===void 0?!0:h,m=n.tetherOffset,b=m===void 0?0:m,x=Ia(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:d}),y=cr(t.placement),E=hi(t.placement),C=!E,k=jd(y),v=TM(k),S=t.modifiersData.popperOffsets,N=t.rects.reference,O=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),F=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(S){if(i){var L,I=k==="y"?mn:gn,A=k==="y"?$n:Hn,M=k==="y"?"height":"width",W=S[k],H=W+x[I],j=W-x[A],w=f?-O[M]/2:0,V=E===di?N[M]:O[M],J=E===di?-O[M]:-N[M],_=t.elements.arrow,de=f&&_?Bd(_):{width:0,height:0},Z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:db(),Y=Z[I],te=Z[A],X=ba(0,N[M],de[M]),re=C?N[M]/2-w-X-Y-R.mainAxis:V-X-Y-R.mainAxis,Q=C?-N[M]/2+w+X+te+R.mainAxis:J+X+te+R.mainAxis,K=t.elements.arrow&&Ka(t.elements.arrow),ae=K?k==="y"?K.clientTop||0:K.clientLeft||0:0,ee=(L=F?.[k])!=null?L:0,ne=W+re-ee-ae,ye=W+Q-ee,pe=ba(f?il(H,ne):H,W,f?xo(j,ye):j);S[k]=pe,T[k]=pe-W}if(s){var be,le=k==="x"?mn:gn,Re=k==="x"?$n:Hn,ve=S[v],ze=v==="y"?"height":"width",De=ve+x[le],vt=ve-x[Re],lt=[mn,gn].indexOf(y)!==-1,qe=(be=F?.[v])!=null?be:0,ue=lt?De:ve-N[ze]-O[ze]-qe+R.altAxis,Ce=lt?ve+N[ze]+O[ze]-qe-R.altAxis:vt,Oe=f&<?Y8(ue,ve,Ce):ba(f?ue:De,ve,f?Ce:vt);S[v]=Oe,T[v]=Oe-ve}t.modifiersData[r]=T}}const SM={name:"preventOverflow",enabled:!0,phase:"main",fn:vM,requiresIfExists:["offset"]};function kM(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function DM(e){return e===In(e)||!Bn(e)?$d(e):kM(e)}function wM(e){var t=e.getBoundingClientRect(),n=pi(t.width)/e.offsetWidth||1,r=pi(t.height)/e.offsetHeight||1;return n!==1||r!==1}function IM(e,t,n){n===void 0&&(n=!1);var r=Bn(t),o=Bn(t)&&wM(t),i=eo(t),a=fi(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((dr(t)!=="body"||Ud(i))&&(s=DM(t)),Bn(t)?(l=fi(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Hd(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function AM(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function PM(e){var t=AM(e);return H8.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function RM(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function MM(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 em={placement:"bottom",modifiers:[],strategy:"absolute"};function tm(){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 OM(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,i=o===void 0?em:o;return function(s,l,u){u===void 0&&(u=i);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},em,i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},p=[],h=!1,f={state:d,setOptions:function(y){var E=typeof y=="function"?y(d.options):y;b(),d.options=Object.assign({},i,d.options,E),d.scrollParents={reference:ko(s)?xa(s):s.contextElement?xa(s.contextElement):[],popper:xa(l)};var C=PM(MM([].concat(r,d.options.modifiers)));return d.orderedModifiers=C.filter(function(k){return k.enabled}),m(),f.update()},forceUpdate:function(){if(!h){var y=d.elements,E=y.reference,C=y.popper;if(tm(E,C)){d.rects={reference:IM(E,Ka(C),d.options.strategy==="fixed"),popper:Bd(C)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(R){return d.modifiersData[R.name]=Object.assign({},R.data)});for(var k=0;k<d.orderedModifiers.length;k++){if(d.reset===!0){d.reset=!1,k=-1;continue}var v=d.orderedModifiers[k],S=v.fn,N=v.options,O=N===void 0?{}:N,B=v.name;typeof S=="function"&&(d=S({state:d,options:O,name:B,instance:f})||d)}}}},update:RM(function(){return new Promise(function(x){f.forceUpdate(),x(d)})}),destroy:function(){b(),h=!0}};if(!tm(s,l))return f;f.setOptions(u).then(function(x){!h&&u.onFirstUpdate&&u.onFirstUpdate(x)});function m(){d.orderedModifiers.forEach(function(x){var y=x.name,E=x.options,C=E===void 0?{}:E,k=x.effect;if(typeof k=="function"){var v=k({state:d,name:y,instance:f,options:C}),S=function(){};p.push(v||S)}})}function b(){p.forEach(function(x){return x()}),p=[]}return f}}var LM=[rM,CM,tM,V8,yM,hM,SM,X8,gM],NM=OM({defaultModifiers:LM});function FM(e){return _e("MuiPopper",e)}Me("MuiPopper",["root"]);function _M(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 Pc(e){return typeof e=="function"?e():e}function BM(e){return e.nodeType!==void 0}const jM=e=>{const{classes:t}=e;return Fe({root:["root"]},FM,t)},$M={},HM=D.forwardRef(function(t,n){const{anchorEl:r,children:o,direction:i,disablePortal:a,modifiers:s,open:l,placement:u,popperOptions:d,popperRef:p,slotProps:h={},slots:f={},TransitionProps:m,ownerState:b,...x}=t,y=D.useRef(null),E=ot(y,n),C=D.useRef(null),k=ot(C,p),v=D.useRef(k);Wt(()=>{v.current=k},[k]),D.useImperativeHandle(p,()=>C.current,[]);const S=_M(u,i),[N,O]=D.useState(S),[B,R]=D.useState(Pc(r));D.useEffect(()=>{C.current&&C.current.forceUpdate()}),D.useEffect(()=>{r&&R(Pc(r))},[r]),Wt(()=>{if(!B||!l)return;const A=H=>{O(H.placement)};let M=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:H})=>{A(H)}}];s!=null&&(M=M.concat(s)),d&&d.modifiers!=null&&(M=M.concat(d.modifiers));const W=NM(B,y.current,{placement:S,...d,modifiers:M});return v.current(W),()=>{W.destroy(),v.current(null)}},[B,a,s,l,d,S]);const F={placement:N};m!==null&&(F.TransitionProps=m);const T=jM(t),L=f.root??"div",I=rt({elementType:L,externalSlotProps:h.root,externalForwardedProps:x,additionalProps:{role:"tooltip",ref:E},ownerState:t,className:T.root});return c.jsx(L,{...I,children:typeof o=="function"?o(F):o})}),UM=D.forwardRef(function(t,n){const{anchorEl:r,children:o,container:i,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:u,open:d,placement:p="bottom",popperOptions:h=$M,popperRef:f,style:m,transition:b=!1,slotProps:x={},slots:y={},...E}=t,[C,k]=D.useState(!0),v=()=>{k(!1)},S=()=>{k(!0)};if(!l&&!d&&(!b||C))return null;let N;if(i)N=i;else if(r){const R=Pc(r);N=R&&BM(R)?Ut(R).body:Ut(null).body}const O=!d&&l&&(!b||C)?"none":void 0,B=b?{in:d,onEnter:v,onExited:S}:void 0;return c.jsx(X1,{disablePortal:s,container:N,children:c.jsx(HM,{anchorEl:r,direction:a,disablePortal:s,modifiers:u,ref:n,open:b?!C:d,placement:p,popperOptions:h,popperRef:f,slotProps:x,slots:y,...E,style:{position:"fixed",top:0,left:0,display:O,...m},TransitionProps:B,children:o})})}),zM=ie(UM,{name:"MuiPopper",slot:"Root"})({}),zd=D.forwardRef(function(t,n){const r=Vn(),o=Xe({props:t,name:"MuiPopper"}),{anchorEl:i,component:a,components:s,componentsProps:l,container:u,disablePortal:d,keepMounted:p,modifiers:h,open:f,placement:m,popperOptions:b,popperRef:x,transition:y,slots:E,slotProps:C,...k}=o,v=E?.root??s?.Root,S={anchorEl:i,container:u,disablePortal:d,keepMounted:p,modifiers:h,open:f,placement:m,popperOptions:b,popperRef:x,transition:y,...k};return c.jsx(zM,{as:a,direction:r?"rtl":"ltr",slots:{root:v},slotProps:C??l,...S,ref:n})});function VM(e){return _e("MuiListSubheader",e)}Me("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const WM=e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:i}=e,a={root:["root",n!=="default"&&`color${ke(n)}`,!r&&"gutters",o&&"inset",!i&&"sticky"]};return Fe(a,VM,t)},qM=ie("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${ke(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}}]}))),Rc=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiListSubheader"}),{className:o,color:i="default",component:a="li",disableGutters:s=!1,disableSticky:l=!1,inset:u=!1,...d}=r,p={...r,color:i,component:a,disableGutters:s,disableSticky:l,inset:u},h=WM(p);return c.jsx(qM,{as:a,className:Pe(h.root,o),ref:n,ownerState:p,...d})});Rc&&(Rc.muiSkipListHighlight=!0);const YM=tt(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 KM(e){return _e("MuiChip",e)}const it=Me("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"]),GM=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e,u={root:["root",l,n&&"disabled",`size${ke(r)}`,`color${ke(o)}`,s&&"clickable",s&&`clickableColor${ke(o)}`,a&&"deletable",a&&`deletableColor${ke(o)}`,`${l}${ke(o)}`],label:["label",`label${ke(r)}`],avatar:["avatar",`avatar${ke(r)}`,`avatarColor${ke(o)}`],icon:["icon",`icon${ke(r)}`,`iconColor${ke(i)}`],deleteIcon:["deleteIcon",`deleteIcon${ke(r)}`,`deleteIconColor${ke(o)}`,`deleteIcon${ke(l)}Color${ke(o)}`]};return Fe(u,KM,t)},QM=ie("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${it.avatar}`]:t.avatar},{[`& .${it.avatar}`]:t[`avatar${ke(s)}`]},{[`& .${it.avatar}`]:t[`avatarColor${ke(r)}`]},{[`& .${it.icon}`]:t.icon},{[`& .${it.icon}`]:t[`icon${ke(s)}`]},{[`& .${it.icon}`]:t[`iconColor${ke(o)}`]},{[`& .${it.deleteIcon}`]:t.deleteIcon},{[`& .${it.deleteIcon}`]:t[`deleteIcon${ke(s)}`]},{[`& .${it.deleteIcon}`]:t[`deleteIconColor${ke(r)}`]},{[`& .${it.deleteIcon}`]:t[`deleteIcon${ke(l)}Color${ke(r)}`]},t.root,t[`size${ke(s)}`],t[`color${ke(r)}`],i&&t.clickable,i&&r!=="default"&&t[`clickableColor${ke(r)})`],a&&t.deletable,a&&r!=="default"&&t[`deletableColor${ke(r)}`],t[l],t[`${l}${ke(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",[`&.${it.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${it.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${it.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${it.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${it.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${it.icon}`]:{marginLeft:5,marginRight:-6},[`& .${it.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,[`& .${it.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${it.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(un(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${it.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:{[`& .${it.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${it.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${it.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(un(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${it.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}`)},[`&.${it.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(un(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${it.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]}`,[`&.${it.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${it.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${it.avatar}`]:{marginLeft:4},[`& .${it.avatarSmall}`]:{marginLeft:2},[`& .${it.icon}`]:{marginLeft:4},[`& .${it.iconSmall}`]:{marginLeft:2},[`& .${it.deleteIcon}`]:{marginRight:5},[`& .${it.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(un()).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)}`,[`&.${it.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${it.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.focusOpacity)},[`& .${it.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),XM=ie("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${ke(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 nm(e){return e.key==="Backspace"||e.key==="Delete"}const gb=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:s="default",component:l,deleteIcon:u,disabled:d=!1,icon:p,label:h,onClick:f,onDelete:m,onKeyDown:b,onKeyUp:x,size:y="medium",variant:E="filled",tabIndex:C,skipFocusWhenDisabled:k=!1,slots:v={},slotProps:S={},...N}=r,O=D.useRef(null),B=ot(O,n),R=Y=>{Y.stopPropagation(),m&&m(Y)},F=Y=>{Y.currentTarget===Y.target&&nm(Y)&&Y.preventDefault(),b&&b(Y)},T=Y=>{Y.currentTarget===Y.target&&m&&nm(Y)&&m(Y),x&&x(Y)},L=a!==!1&&f?!0:a,I=L||m?vo:l||"div",A={...r,component:I,disabled:d,size:y,color:s,iconColor:D.isValidElement(p)&&p.props.color||s,onDelete:!!m,clickable:L,variant:E},M=GM(A),W=I===vo?{component:l||"div",focusVisibleClassName:M.focusVisible,...m&&{disableRipple:!0}}:{};let H=null;m&&(H=u&&D.isValidElement(u)?D.cloneElement(u,{className:Pe(u.props.className,M.deleteIcon),onClick:R}):c.jsx(YM,{className:M.deleteIcon,onClick:R}));let j=null;o&&D.isValidElement(o)&&(j=D.cloneElement(o,{className:Pe(M.avatar,o.props.className)}));let w=null;p&&D.isValidElement(p)&&(w=D.cloneElement(p,{className:Pe(M.icon,p.props.className)}));const V={slots:v,slotProps:S},[J,_]=ct("root",{elementType:QM,externalForwardedProps:{...V,...N},ownerState:A,shouldForwardComponentProp:!0,ref:B,className:Pe(M.root,i),additionalProps:{disabled:L&&d?!0:void 0,tabIndex:k&&d?-1:C,...W},getSlotProps:Y=>({...Y,onClick:te=>{Y.onClick?.(te),f?.(te)},onKeyDown:te=>{Y.onKeyDown?.(te),F(te)},onKeyUp:te=>{Y.onKeyUp?.(te),T(te)}})}),[de,Z]=ct("label",{elementType:XM,externalForwardedProps:V,ownerState:A,className:M.label});return c.jsxs(J,{as:I,..._,children:[j||w,c.jsx(de,{...Z,children:h}),H]})}),ZM=tt(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 JM(e){return _e("MuiAutocomplete",e)}const Ze=Me("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 rm,om;const eO=e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:u,size:d}=e,p={root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${ke(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(p,JM,t)},tO=ie("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${Ze.tag}`]:t.tag},{[`& .${Ze.tag}`]:t[`tagSize${ke(s)}`]},{[`& .${Ze.inputRoot}`]:t.inputRoot},{[`& .${Ze.input}`]:t.input},{[`& .${Ze.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${Ze.focused} .${Ze.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Ze.clearIndicator}`]:{visibility:"visible"}},[`& .${Ze.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${Ze.inputRoot}`]:{[`.${Ze.hasPopupIcon}&, .${Ze.hasClearIcon}&`]:{paddingRight:30},[`.${Ze.hasPopupIcon}.${Ze.hasClearIcon}&`]:{paddingRight:56},[`& .${Ze.input}`]:{width:0,minWidth:30}},[`& .${zr.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${zr.root}.${Cn.sizeSmall}`]:{[`& .${zr.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Mn.root}`]:{padding:9,[`.${Ze.hasPopupIcon}&, .${Ze.hasClearIcon}&`]:{paddingRight:39},[`.${Ze.hasPopupIcon}.${Ze.hasClearIcon}&`]:{paddingRight:65},[`& .${Ze.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Ze.endAdornment}`]:{right:9}},[`& .${Mn.root}.${Cn.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Ze.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${Tn.root}`]:{paddingTop:19,paddingLeft:8,[`.${Ze.hasPopupIcon}&, .${Ze.hasClearIcon}&`]:{paddingRight:39},[`.${Ze.hasPopupIcon}.${Ze.hasClearIcon}&`]:{paddingRight:65},[`& .${Tn.input}`]:{padding:"7px 4px"},[`& .${Ze.endAdornment}`]:{right:9}},[`& .${Tn.root}.${Cn.sizeSmall}`]:{paddingBottom:1,[`& .${Tn.input}`]:{padding:"2.5px 4px"}},[`& .${Cn.hiddenLabel}`]:{paddingTop:8},[`& .${Tn.root}.${Cn.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Ze.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Tn.root}.${Cn.hiddenLabel}.${Cn.sizeSmall}`]:{[`& .${Ze.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Ze.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${Ze.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${Ze.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${Ze.inputRoot}`]:{flexWrap:"wrap"}}}]}),nO=ie("div",{name:"MuiAutocomplete",slot:"EndAdornment"})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),rO=ie(wn,{name:"MuiAutocomplete",slot:"ClearIndicator"})({marginRight:-2,padding:4,visibility:"hidden"}),oO=ie(wn,{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)"}}]}),iO=ie(zd,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Ze.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"}}]}))),aO=ie(Ro,{name:"MuiAutocomplete",slot:"Paper"})(et(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),sO=ie("div",{name:"MuiAutocomplete",slot:"Loading"})(et(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),lO=ie("div",{name:"MuiAutocomplete",slot:"NoOptions"})(et(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),uO=ie("ul",{name:"MuiAutocomplete",slot:"Listbox"})(et(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Ze.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"},[`&.${Ze.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"},[`&.${Ze.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),[`&.${Ze.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}},[`&.${Ze.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))),cO=ie(Rc,{name:"MuiAutocomplete",slot:"GroupLabel"})(et(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),dO=ie("ul",{name:"MuiAutocomplete",slot:"GroupUl"})({padding:0,[`& .${Ze.option}`]:{paddingLeft:24}}),Mc=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiAutocomplete"}),{autoComplete:o=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:s=!1,ChipProps:l,className:u,clearIcon:d=rm||(rm=c.jsx(ZM,{fontSize:"small"})),clearOnBlur:p=!r.freeSolo,clearOnEscape:h=!1,clearText:f="Clear",closeText:m="Close",componentsProps:b,defaultValue:x=r.multiple?[]:null,disableClearable:y=!1,disableCloseOnSelect:E=!1,disabled:C=!1,disabledItemsFocusable:k=!1,disableListWrap:v=!1,disablePortal:S=!1,filterOptions:N,filterSelectedOptions:O=!1,forcePopupIcon:B="auto",freeSolo:R=!1,fullWidth:F=!1,getLimitTagsText:T=pt=>`+${pt}`,getOptionDisabled:L,getOptionKey:I,getOptionLabel:A,isOptionEqualToValue:M,groupBy:W,handleHomeEndKeys:H=!r.freeSolo,id:j,includeInputInList:w=!1,inputValue:V,limitTags:J=-1,ListboxComponent:_,ListboxProps:de,loading:Z=!1,loadingText:Y="Loading…",multiple:te=!1,noOptionsText:X="No options",onChange:re,onClose:Q,onHighlightChange:K,onInputChange:ae,onOpen:ee,open:ne,openOnFocus:ye=!1,openText:pe="Open",options:be,PaperComponent:le,PopperComponent:Re,popupIcon:ve=om||(om=c.jsx(ob,{})),readOnly:ze=!1,renderGroup:De,renderInput:vt,renderOption:lt,renderTags:qe,renderValue:ue,selectOnFocus:Ce=!r.freeSolo,size:Oe="medium",slots:He={},slotProps:je={},value:Le,...Je}=r,{getRootProps:gt,getInputProps:ft,getInputLabelProps:se,getPopupIndicatorProps:xe,getClearProps:Te,getItemProps:Be,getListboxProps:We,getOptionProps:It,value:Lt,dirty:yt,expanded:zt,id:An,popupOpen:At,focused:en,focusedItem:yr,anchorEl:Pn,setAnchorEl:to,inputValue:Kn,groupedOptions:Er}=A8({...r,componentName:"Autocomplete"}),Lo=!y&&!C&&yt&&!ze,Pi=(!R||B===!0)&&B!==!1,{onMouseDown:Yl}=ft(),{ref:Kl,...Gl}=We(),Ri=A||(pt=>pt.label??pt),Vt={...r,disablePortal:S,expanded:zt,focused:en,fullWidth:F,getOptionLabel:Ri,hasClearIcon:Lo,hasPopupIcon:Pi,inputFocused:yr===-1,popupOpen:At,size:Oe},qt=eO(Vt),Fr={slots:{paper:le,popper:Re,...He},slotProps:{chip:l,listbox:de,...b,...je}},[Xl,Mi]=ct("listbox",{elementType:uO,externalForwardedProps:Fr,ownerState:Vt,className:qt.listbox,additionalProps:Gl,ref:Kl}),[Za,ge]=ct("paper",{elementType:Ro,externalForwardedProps:Fr,ownerState:Vt,className:qt.paper}),[me,Ne]=ct("popper",{elementType:zd,externalForwardedProps:Fr,ownerState:Vt,className:qt.popper,additionalProps:{disablePortal:S,style:{width:Pn?Pn.clientWidth:null},role:"presentation",anchorEl:Pn,open:At}});let Ve;const Ye=pt=>({className:qt.tag,disabled:C,...Be(pt)});if(te?Lt.length>0&&(qe?Ve=qe(Lt,Ye,Vt):ue?Ve=ue(Lt,Ye,Vt):Ve=Lt.map((pt,_r)=>{const{key:Br,...Oi}=Ye({index:_r});return c.jsx(gb,{label:Ri(pt),size:Oe,...Oi,...Fr.slotProps.chip},Br)})):ue&&Lt!=null&&(Ve=ue(Lt,Ye,Vt)),J>-1&&Array.isArray(Ve)){const pt=Ve.length-J;!en&&pt>0&&(Ve=Ve.splice(0,J),Ve.push(c.jsx("span",{className:qt.tag,children:T(pt)},Ve.length)))}const _t=De||(pt=>c.jsxs("li",{children:[c.jsx(cO,{className:qt.groupLabel,ownerState:Vt,component:"div",children:pt.group}),c.jsx(dO,{className:qt.groupUl,ownerState:Vt,children:pt.children})]},pt.key)),Ja=lt||((pt,_r)=>{const{key:Br,...Oi}=pt;return c.jsx("li",{...Oi,children:Ri(_r)},Br)}),cp=(pt,_r)=>{const Br=It({option:pt,index:_r});return Ja({...Br,className:qt.option},pt,{selected:Br["aria-selected"],index:_r,inputValue:Kn},Vt)},dp=Fr.slotProps.clearIndicator,pp=Fr.slotProps.popupIndicator;return c.jsxs(D.Fragment,{children:[c.jsx(tO,{ref:n,className:Pe(qt.root,u),ownerState:Vt,...gt(Je),children:vt({id:An,disabled:C,fullWidth:!0,size:Oe==="small"?"small":void 0,InputLabelProps:se(),InputProps:{ref:to,className:qt.inputRoot,startAdornment:Ve,onMouseDown:pt=>{pt.target===pt.currentTarget&&Yl(pt)},...(Lo||Pi)&&{endAdornment:c.jsxs(nO,{className:qt.endAdornment,ownerState:Vt,children:[Lo?c.jsx(rO,{...Te(),"aria-label":f,title:f,ownerState:Vt,...dp,className:Pe(qt.clearIndicator,dp?.className),children:d}):null,Pi?c.jsx(oO,{...xe(),disabled:C,"aria-label":At?m:pe,title:At?m:pe,ownerState:Vt,...pp,className:Pe(qt.popupIndicator,pp?.className),children:ve}):null]})}},inputProps:{className:qt.input,disabled:C,readOnly:ze,...ft()}})}),Pn?c.jsx(iO,{as:me,...Ne,children:c.jsxs(aO,{as:Za,...ge,children:[Z&&Er.length===0?c.jsx(sO,{className:qt.loading,ownerState:Vt,children:Y}):null,Er.length===0&&!R&&!Z?c.jsx(lO,{className:qt.noOptions,ownerState:Vt,role:"presentation",onMouseDown:pt=>{pt.preventDefault()},children:X}):null,Er.length>0?c.jsx(Xl,{as:_,...Mi,children:Er.map((pt,_r)=>W?_t({key:pt.key,group:pt.group,children:pt.options.map((Br,Oi)=>cp(Br,pt.index+Oi))}):cp(pt,_r))}):null]})}):null]})});function bb(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Ca(t.components[n].defaultProps,r)}function pO({props:e,name:t,defaultTheme:n,themeId:r}){let o=M2(n);return o=o[r]||o,bb({theme:o,name:t,props:e})}function wt({props:e,name:t}){return pO({props:e,name:t,defaultTheme:xl,themeId:gi})}const fO=Me("MuiBox",["root"]),hO=o0(),Pt=dt.createBox({themeId:gi,defaultTheme:hO,defaultClassName:fO.root,generateClassName:zm.generate}),im=Me("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),am=Me("MuiListItemIcon",["root","alignItemsFlexStart"]),sm=Me("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function mO(e){return _e("MuiMenuItem",e)}const qi=Me("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),gO=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},bO=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,l=Fe({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},mO,a);return{...a,...l}},xO=ie(vo,{shouldForwardProp:e=>dn(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:gO})(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"}},[`&.${qi.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${qi.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${qi.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)}},[`&.${qi.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${qi.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${im.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${im.inset}`]:{marginLeft:52},[`& .${sm.root}`]:{marginTop:0,marginBottom:0},[`& .${sm.inset}`]:{paddingLeft:36},[`& .${am.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,[`& .${am.root} svg`]:{fontSize:"1.25rem"}}}]}))),tn=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:u,role:d="menuitem",tabIndex:p,className:h,...f}=r,m=D.useContext(bo),b=D.useMemo(()=>({dense:a||m.dense||!1,disableGutters:l}),[m.dense,a,l]),x=D.useRef(null);Wt(()=>{o&&x.current&&x.current.focus()},[o]);const y={...r,dense:b.dense,divider:s,disableGutters:l},E=bO(r),C=ot(x,n);let k;return r.disabled||(k=p!==void 0?p:-1),c.jsx(bo.Provider,{value:b,children:c.jsx(xO,{ref:C,role:d,tabIndex:k,component:i,focusVisibleClassName:Pe(E.focusVisible,u),className:Pe(E.root,h),...f,ownerState:y,classes:E})})});var Is={exports:{}},yO=Is.exports,lm;function EO(){return lm||(lm=1,(function(e,t){(function(n,r){e.exports=r()})(yO,(function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",s="minute",l="hour",u="day",d="week",p="month",h="quarter",f="year",m="date",b="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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(I){var A=["th","st","nd","rd"],M=I%100;return"["+I+(A[(M-20)%10]||A[M]||A[0])+"]"}},C=function(I,A,M){var W=String(I);return!W||W.length>=A?I:""+Array(A+1-W.length).join(M)+I},k={s:C,z:function(I){var A=-I.utcOffset(),M=Math.abs(A),W=Math.floor(M/60),H=M%60;return(A<=0?"+":"-")+C(W,2,"0")+":"+C(H,2,"0")},m:function I(A,M){if(A.date()<M.date())return-I(M,A);var W=12*(M.year()-A.year())+(M.month()-A.month()),H=A.clone().add(W,p),j=M-H<0,w=A.clone().add(W+(j?-1:1),p);return+(-(W+(M-H)/(j?H-w:w-H))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:p,y:f,w:d,d:u,D:m,h:l,m:s,s:a,ms:i,Q:h}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},v="en",S={};S[v]=E;var N="$isDayjsObject",O=function(I){return I instanceof T||!(!I||!I[N])},B=function I(A,M,W){var H;if(!A)return v;if(typeof A=="string"){var j=A.toLowerCase();S[j]&&(H=j),M&&(S[j]=M,H=j);var w=A.split("-");if(!H&&w.length>1)return I(w[0])}else{var V=A.name;S[V]=A,H=V}return!W&&H&&(v=H),H||!W&&v},R=function(I,A){if(O(I))return I.clone();var M=typeof A=="object"?A:{};return M.date=I,M.args=arguments,new T(M)},F=k;F.l=B,F.i=O,F.w=function(I,A){return R(I,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var T=(function(){function I(M){this.$L=B(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[N]=!0}var A=I.prototype;return A.parse=function(M){this.$d=(function(W){var H=W.date,j=W.utc;if(H===null)return new Date(NaN);if(F.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var w=H.match(x);if(w){var V=w[2]-1||0,J=(w[7]||"0").substring(0,3);return j?new Date(Date.UTC(w[1],V,w[3]||1,w[4]||0,w[5]||0,w[6]||0,J)):new Date(w[1],V,w[3]||1,w[4]||0,w[5]||0,w[6]||0,J)}}return new Date(H)})(M),this.init()},A.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()},A.$utils=function(){return F},A.isValid=function(){return this.$d.toString()!==b},A.isSame=function(M,W){var H=R(M);return this.startOf(W)<=H&&H<=this.endOf(W)},A.isAfter=function(M,W){return R(M)<this.startOf(W)},A.isBefore=function(M,W){return this.endOf(W)<R(M)},A.$g=function(M,W,H){return F.u(M)?this[W]:this.set(H,M)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(M,W){var H=this,j=!!F.u(W)||W,w=F.p(M),V=function(re,Q){var K=F.w(H.$u?Date.UTC(H.$y,Q,re):new Date(H.$y,Q,re),H);return j?K:K.endOf(u)},J=function(re,Q){return F.w(H.toDate()[re].apply(H.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(Q)),H)},_=this.$W,de=this.$M,Z=this.$D,Y="set"+(this.$u?"UTC":"");switch(w){case f:return j?V(1,0):V(31,11);case p:return j?V(1,de):V(0,de+1);case d:var te=this.$locale().weekStart||0,X=(_<te?_+7:_)-te;return V(j?Z-X:Z+(6-X),de);case u:case m:return J(Y+"Hours",0);case l:return J(Y+"Minutes",1);case s:return J(Y+"Seconds",2);case a:return J(Y+"Milliseconds",3);default:return this.clone()}},A.endOf=function(M){return this.startOf(M,!1)},A.$set=function(M,W){var H,j=F.p(M),w="set"+(this.$u?"UTC":""),V=(H={},H[u]=w+"Date",H[m]=w+"Date",H[p]=w+"Month",H[f]=w+"FullYear",H[l]=w+"Hours",H[s]=w+"Minutes",H[a]=w+"Seconds",H[i]=w+"Milliseconds",H)[j],J=j===u?this.$D+(W-this.$W):W;if(j===p||j===f){var _=this.clone().set(m,1);_.$d[V](J),_.init(),this.$d=_.set(m,Math.min(this.$D,_.daysInMonth())).$d}else V&&this.$d[V](J);return this.init(),this},A.set=function(M,W){return this.clone().$set(M,W)},A.get=function(M){return this[F.p(M)]()},A.add=function(M,W){var H,j=this;M=Number(M);var w=F.p(W),V=function(de){var Z=R(j);return F.w(Z.date(Z.date()+Math.round(de*M)),j)};if(w===p)return this.set(p,this.$M+M);if(w===f)return this.set(f,this.$y+M);if(w===u)return V(1);if(w===d)return V(7);var J=(H={},H[s]=r,H[l]=o,H[a]=n,H)[w]||1,_=this.$d.getTime()+M*J;return F.w(_,this)},A.subtract=function(M,W){return this.add(-1*M,W)},A.format=function(M){var W=this,H=this.$locale();if(!this.isValid())return H.invalidDate||b;var j=M||"YYYY-MM-DDTHH:mm:ssZ",w=F.z(this),V=this.$H,J=this.$m,_=this.$M,de=H.weekdays,Z=H.months,Y=H.meridiem,te=function(Q,K,ae,ee){return Q&&(Q[K]||Q(W,j))||ae[K].slice(0,ee)},X=function(Q){return F.s(V%12||12,Q,"0")},re=Y||function(Q,K,ae){var ee=Q<12?"AM":"PM";return ae?ee.toLowerCase():ee};return j.replace(y,(function(Q,K){return K||(function(ae){switch(ae){case"YY":return String(W.$y).slice(-2);case"YYYY":return F.s(W.$y,4,"0");case"M":return _+1;case"MM":return F.s(_+1,2,"0");case"MMM":return te(H.monthsShort,_,Z,3);case"MMMM":return te(Z,_);case"D":return W.$D;case"DD":return F.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return te(H.weekdaysMin,W.$W,de,2);case"ddd":return te(H.weekdaysShort,W.$W,de,3);case"dddd":return de[W.$W];case"H":return String(V);case"HH":return F.s(V,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return re(V,J,!0);case"A":return re(V,J,!1);case"m":return String(J);case"mm":return F.s(J,2,"0");case"s":return String(W.$s);case"ss":return F.s(W.$s,2,"0");case"SSS":return F.s(W.$ms,3,"0");case"Z":return w}return null})(Q)||w.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(M,W,H){var j,w=this,V=F.p(W),J=R(M),_=(J.utcOffset()-this.utcOffset())*r,de=this-J,Z=function(){return F.m(w,J)};switch(V){case f:j=Z()/12;break;case p:j=Z();break;case h:j=Z()/3;break;case d:j=(de-_)/6048e5;break;case u:j=(de-_)/864e5;break;case l:j=de/o;break;case s:j=de/r;break;case a:j=de/n;break;default:j=de}return H?j:F.a(j)},A.daysInMonth=function(){return this.endOf(p).$D},A.$locale=function(){return S[this.$L]},A.locale=function(M,W){if(!M)return this.$L;var H=this.clone(),j=B(M,W,!0);return j&&(H.$L=j),H},A.clone=function(){return F.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},I})(),L=T.prototype;return R.prototype=L,[["$ms",i],["$s",a],["$m",s],["$H",l],["$W",u],["$M",p],["$y",f],["$D",m]].forEach((function(I){L[I[1]]=function(A){return this.$g(A,I[0],I[1])}})),R.extend=function(I,A){return I.$i||(I(A,T,R),I.$i=!0),R},R.locale=B,R.isDayjs=O,R.unix=function(I){return R(1e3*I)},R.en=S[v],R.Ls=S,R.p={},R}))})(Is)),Is.exports}var CO=EO();const Et=Zn(CO);var As={exports:{}},TO=As.exports,um;function vO(){return um||(um=1,(function(e,t){(function(n,r){e.exports=r()})(TO,(function(){var n="week",r="year";return function(o,i,a){var s=i.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=a(this).startOf(r).add(1,r).date(u),p=a(this).endOf(n);if(d.isBefore(p))return 1}var h=a(this).startOf(r).date(u).startOf(n).subtract(1,"millisecond"),f=this.diff(h,n,!0);return f<0?a(this).startOf("week").week():Math.ceil(f)},s.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}}))})(As)),As.exports}var SO=vO();const kO=Zn(SO);var Ps={exports:{}},DO=Ps.exports,cm;function wO(){return cm||(cm=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/,i=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},u=function(x){return(x=+x)+(x>68?1900:2e3)},d=function(x){return function(y){this[x]=+y}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(x){(this.zone||(this.zone={})).offset=(function(y){if(!y||y==="Z")return 0;var E=y.match(/([+-]|\d\d)/g),C=60*E[1]+(+E[2]||0);return C===0?0:E[0]==="+"?-C:C})(x)}],h=function(x){var y=l[x];return y&&(y.indexOf?y:y.s.concat(y.f))},f=function(x,y){var E,C=l.meridiem;if(C){for(var k=1;k<=24;k+=1)if(x.indexOf(C(k,0,y))>-1){E=k>12;break}}else E=x===(y?"pm":"PM");return E},m={A:[s,function(x){this.afternoon=f(x,!1)}],a:[s,function(x){this.afternoon=f(x,!0)}],Q:[o,function(x){this.month=3*(x-1)+1}],S:[o,function(x){this.milliseconds=100*+x}],SS:[i,function(x){this.milliseconds=10*+x}],SSS:[/\d{3}/,function(x){this.milliseconds=+x}],s:[a,d("seconds")],ss:[a,d("seconds")],m:[a,d("minutes")],mm:[a,d("minutes")],H:[a,d("hours")],h:[a,d("hours")],HH:[a,d("hours")],hh:[a,d("hours")],D:[a,d("day")],DD:[i,d("day")],Do:[s,function(x){var y=l.ordinal,E=x.match(/\d+/);if(this.day=E[0],y)for(var C=1;C<=31;C+=1)y(C).replace(/\[|\]/g,"")===x&&(this.day=C)}],w:[a,d("week")],ww:[i,d("week")],M:[a,d("month")],MM:[i,d("month")],MMM:[s,function(x){var y=h("months"),E=(h("monthsShort")||y.map((function(C){return C.slice(0,3)}))).indexOf(x)+1;if(E<1)throw new Error;this.month=E%12||E}],MMMM:[s,function(x){var y=h("months").indexOf(x)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,d("year")],YY:[i,function(x){this.year=u(x)}],YYYY:[/\d{4}/,d("year")],Z:p,ZZ:p};function b(x){var y,E;y=x,E=l&&l.formats;for(var C=(x=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(R,F,T){var L=T&&T.toUpperCase();return F||E[T]||n[T]||E[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(I,A,M){return A||M.slice(1)}))}))).match(r),k=C.length,v=0;v<k;v+=1){var S=C[v],N=m[S],O=N&&N[0],B=N&&N[1];C[v]=B?{regex:O,parser:B}:S.replace(/^\[|\]$/g,"")}return function(R){for(var F={},T=0,L=0;T<k;T+=1){var I=C[T];if(typeof I=="string")L+=I.length;else{var A=I.regex,M=I.parser,W=R.slice(L),H=A.exec(W)[0];M.call(F,H),R=R.replace(H,"")}}return(function(j){var w=j.afternoon;if(w!==void 0){var V=j.hours;w?V<12&&(j.hours+=12):V===12&&(j.hours=0),delete j.afternoon}})(F),F}}return function(x,y,E){E.p.customParseFormat=!0,x&&x.parseTwoDigitYear&&(u=x.parseTwoDigitYear);var C=y.prototype,k=C.parse;C.parse=function(v){var S=v.date,N=v.utc,O=v.args;this.$u=N;var B=O[1];if(typeof B=="string"){var R=O[2]===!0,F=O[3]===!0,T=R||F,L=O[2];F&&(L=O[2]),l=this.$locale(),!R&&L&&(l=E.Ls[L]),this.$d=(function(W,H,j,w){try{if(["x","X"].indexOf(H)>-1)return new Date((H==="X"?1e3:1)*W);var V=b(H)(W),J=V.year,_=V.month,de=V.day,Z=V.hours,Y=V.minutes,te=V.seconds,X=V.milliseconds,re=V.zone,Q=V.week,K=new Date,ae=de||(J||_?1:K.getDate()),ee=J||K.getFullYear(),ne=0;J&&!_||(ne=_>0?_-1:K.getMonth());var ye,pe=Z||0,be=Y||0,le=te||0,Re=X||0;return re?new Date(Date.UTC(ee,ne,ae,pe,be,le,Re+60*re.offset*1e3)):j?new Date(Date.UTC(ee,ne,ae,pe,be,le,Re)):(ye=new Date(ee,ne,ae,pe,be,le,Re),Q&&(ye=w(ye).week(Q).toDate()),ye)}catch{return new Date("")}})(S,B,N,E),this.init(),L&&L!==!0&&(this.$L=this.locale(L).$L),T&&S!=this.format(B)&&(this.$d=new Date("")),l={}}else if(B instanceof Array)for(var I=B.length,A=1;A<=I;A+=1){O[1]=B[A-1];var M=E.apply(this,O);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}A===I&&(this.$d=new Date(""))}else k.call(this,v)}}}))})(Ps)),Ps.exports}var IO=wO();const AO=Zn(IO);var Rs={exports:{}},PO=Rs.exports,dm;function RO(){return dm||(dm=1,(function(e,t){(function(n,r){e.exports=r()})(PO,(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,i){var a=o.prototype,s=a.format;i.en.formats=n,a.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,d=(function(p,h){return p.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(f,m,b){var x=b&&b.toUpperCase();return m||h[b]||n[b]||h[x].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(y,E,C){return E||C.slice(1)}))}))})(l,u===void 0?{}:u);return s.call(this,d)}}}))})(Rs)),Rs.exports}var MO=RO();const OO=Zn(MO);var Ms={exports:{}},LO=Ms.exports,pm;function NO(){return pm||(pm=1,(function(e,t){(function(n,r){e.exports=r()})(LO,(function(){return function(n,r,o){r.prototype.isBetween=function(i,a,s,l){var u=o(i),d=o(a),p=(l=l||"()")[0]==="(",h=l[1]===")";return(p?this.isAfter(u,s):!this.isBefore(u,s))&&(h?this.isBefore(d,s):!this.isAfter(d,s))||(p?this.isBefore(u,s):!this.isAfter(u,s))&&(h?this.isAfter(d,s):!this.isBefore(d,s))}}}))})(Ms)),Ms.exports}var FO=NO();const _O=Zn(FO);var Os={exports:{}},BO=Os.exports,fm;function jO(){return fm||(fm=1,(function(e,t){(function(n,r){e.exports=r()})(BO,(function(){return function(n,r){var o=r.prototype,i=o.format;o.format=function(a){var s=this,l=this.$locale();if(!this.isValid())return i.bind(this)(a);var u=this.$utils(),d=(a||"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(p){switch(p){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(),p==="w"?1:2,"0");case"W":case"WW":return u.s(s.isoWeek(),p==="W"?1:2,"0");case"k":case"kk":return u.s(String(s.$H===0?24:s.$H),p==="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 p}}));return i.bind(this)(d)}}}))})(Os)),Os.exports}var $O=jO();const HO=Zn($O);Et.extend(OO);Et.extend(kO);Et.extend(_O);Et.extend(HO);const UO={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"},zO={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"},ju=["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
|
-
`),hm=["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
|
-
`),VO=(e,t)=>t?(...n)=>e(...n).locale(t):e;class mm{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=UO,this.setLocaleToValue=r=>{const o=this.getCurrentLocaleCode();return o===r.locale()?r:r.locale(o)},this.hasUTCPlugin=()=>typeof Et.utc<"u",this.hasTimezonePlugin=()=>typeof Et.tz<"u",this.isSame=(r,o,i)=>{const a=this.setTimezone(o,this.getTimezone(r));return r.format(i)===a.format(i)},this.cleanTimezone=r=>{switch(r){case"default":return;case"system":return Et.tz.guess();default:return r}},this.createSystemDate=r=>{if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const o=Et.tz.guess();return o!=="UTC"?Et.tz(r,o):Et(r)}return Et(r)},this.createUTCDate=r=>{if(!this.hasUTCPlugin())throw new Error(ju);return Et.utc(r)},this.createTZDate=(r,o)=>{if(!this.hasUTCPlugin())throw new Error(ju);if(!this.hasTimezonePlugin())throw new Error(hm);const i=r!==void 0&&!r.endsWith("Z");return Et(r).tz(this.cleanTimezone(o),i)},this.getLocaleFormats=()=>{const r=Et.Ls,o=this.locale||"en";let i=r[o];return i===void 0&&(i=r.en),i.formats},this.adjustOffset=r=>{if(!this.hasTimezonePlugin())return r;const o=this.getTimezone(r);if(o!=="UTC"){const i=r.tz(this.cleanTimezone(o),!0);if(i.$offset===(r.$offset??0))return r;r.$offset=i.$offset}return r},this.date=(r,o="default")=>{if(r===null)return null;let i;return o==="UTC"?i=this.createUTCDate(r):o==="system"||o==="default"&&!this.hasTimezonePlugin()?i=this.createSystemDate(r):i=this.createTZDate(r,o),this.locale===void 0?i:i.locale(this.locale)},this.getInvalidDate=()=>Et(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(ju);return r.utc()}if(o==="system")return r.local();if(!this.hasTimezonePlugin()){if(o==="default")return r;throw new Error(hm)}return Et.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(),i=a=>a.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(s,l,u)=>l||u.slice(1));return r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(a,s,l)=>{const u=l&&l.toUpperCase();return s||o[l]||i(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,i])=>r>=o&&r<=i,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)),i=this.endOfWeek(this.endOfMonth(r));let a=0,s=o;const l=[];for(;s<i;){const u=Math.floor(a/7);l[u]=l[u]||[],l[u].push(s),s=this.addDays(s,1),a+=1}return l},this.getWeekNumber=r=>r.week(),this.getYearRange=([r,o])=>{const i=this.startOfYear(r),a=this.endOfYear(o),s=[];let l=i;for(;this.isBefore(l,a);)s.push(l),l=this.addYears(l,1);return s},this.dayjs=VO(Et,t),this.locale=t,this.formats=U({},zO,n),Et.extend(AO)}getDayOfWeek(t){return t.day()+1}}function WO(e,t,n,r,o){const[i,a]=D.useState(()=>o&&n?n(e).matches:r?r(e).matches:t);return Wt(()=>{if(!n)return;const s=n(e),l=()=>{a(s.matches)};return l(),s.addEventListener("change",l),()=>{s.removeEventListener("change",l)}},[e,n]),i}const qO={...D},xb=qO.useSyncExternalStore;function YO(e,t,n,r,o){const i=D.useCallback(()=>t,[t]),a=D.useMemo(()=>{if(o&&n)return()=>n(e).matches;if(r!==null){const{matches:d}=r(e);return()=>d}return i},[i,e,r,o,n]),[s,l]=D.useMemo(()=>{if(n===null)return[i,()=>()=>{}];const d=n(e);return[()=>d.matches,p=>(d.addEventListener("change",p),()=>{d.removeEventListener("change",p)})]},[i,n,e]);return xb(l,s,a)}function yb(e={}){const{themeId:t}=e;return function(r,o={}){let i=Jm();i&&t&&(i=i[t]||i);const a=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:s=!1,matchMedia:l=a?window.matchMedia:null,ssrMatchMedia:u=null,noSsr:d=!1}=bb({name:"MuiUseMediaQuery",props:o,theme:i});let p=typeof r=="function"?r(i):r;return p=p.replace(/^@media( ?)/m,""),p.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
|
-
`)),(xb!==void 0?YO:WO)(p,s,l,u,d)}}yb();const Eb=yb({themeId:gi}),KO={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},Yi=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),GO=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let i;if(e!=null)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}},al=(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},ya=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:a,timezone:s})=>{const l=al(a,a.date(void 0,s),e);n&&a.isBefore(o,l)&&(o=l),t&&a.isAfter(r,l)&&(r=l);let u=e,d=e;for(a.isBefore(e,o)&&(u=o,d=null),a.isAfter(e,r)&&(d&&(d=r),u=null);u||d;){if(u&&a.isAfter(u,r)&&(u=null),d&&a.isBefore(d,o)&&(d=null),u){if(!i(u))return u;u=a.addDays(u,1)}if(d){if(!i(d))return d;d=a.addDays(d,-1)}}return null},QO=(e,t)=>t==null||!e.isValid(t)?null:t,Un=(e,t,n)=>t==null||!e.isValid(t)?n:t,XO=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),Vd=(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},Cb=(e,t,n)=>n==="date"?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),ZO=["year","month","day"],gm=e=>ZO.includes(e),Wd=(e,{format:t,views:n},r)=>{if(t!=null)return t;const o=e.formats;return Yi(n,["year"])?o.year:Yi(n,["month"])?o.month:Yi(n,["day"])?o.dayOfMonth:Yi(n,["month","year"])?`${o.month} ${o.year}`:Yi(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},JO=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(r=>e.addDays(n,r))},eL=["hours","minutes","seconds"],tL=e=>eL.includes(e),bm=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),nL=(e,t)=>(n,r)=>e?t.isAfter(n,r):bm(n,t)>bm(r,t),sr={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},rL=e=>Math.max(...e.map(t=>sr[t.type]??1)),Ki=(e,t,n)=>{if(t===sr.year)return e.startOfYear(n);if(t===sr.month)return e.startOfMonth(n);if(t===sr.day)return e.startOfDay(n);let r=n;return t<sr.minutes&&(r=e.setMinutes(r,0)),t<sr.seconds&&(r=e.setSeconds(r,0)),t<sr.milliseconds&&(r=e.setMilliseconds(r,0)),r},oL=({props:e,utils:t,granularity:n,timezone:r,getTodayDate:o})=>{let i=o?o():Ki(t,n,Cb(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,i)&&(i=Ki(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,i)&&(i=Ki(t,n,e.maxDate));const a=nL(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&a(e.minTime,i)&&(i=Ki(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:al(t,i,e.minTime))),e.maxTime!=null&&a(i,e.maxTime)&&(i=Ki(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:al(t,i,e.maxTime))),i},Tb=(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}},iL=e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},$l=(e,t)=>{const n=[],r=e.date(void 0,"default"),o=e.startOfWeek(r),i=e.endOfWeek(r);let a=o;for(;e.isBefore(a,i);)n.push(a),a=e.addDays(a,1);return n.map(s=>e.formatByString(s,t))},vb=(e,t,n,r)=>{switch(n){case"month":return Vd(e,e.date(void 0,t)).map(o=>e.formatByString(o,r));case"weekDay":return $l(e,r);case"meridiem":{const o=e.date(void 0,t);return[e.startOfDay(o),e.endOfDay(o)].map(i=>e.formatByString(i,r))}default:return[]}},xm="s",aL=["0","1","2","3","4","5","6","7","8","9"],sL=e=>{const t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),xm)==="0"?aL:Array.from({length:10}).map((r,o)=>e.formatByString(e.setSeconds(t,o),xm))},Do=(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 i=t.indexOf(r);i>-1&&(n.push(i.toString()),r="")}return n.join("")},qd=(e,t)=>t[0]==="0"?e:e.split("").map(n=>t[Number(n)]).join(""),ym=(e,t)=>{const n=Do(e,t);return n!==" "&&!Number.isNaN(Number(n))},Sb=(e,t)=>{let n=e;for(n=Number(n).toString();n.length<t;)n=`0${n}`;return n},kb=(e,t,n,r,o)=>{if(o.type==="day"&&o.contentType==="digit-with-letter"){const a=e.setDate(n.longestMonth,t);return e.formatByString(a,o.format)}let i=t.toString();return o.hasLeadingZerosInInput&&(i=Sb(i,o.maxLength)),qd(i,r)},lL=(e,t,n,r,o,i,a,s)=>{const l=iL(r),u=r==="Home",d=r==="End",p=n.value===""||u||d,h=()=>{const m=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),b=E=>kb(e,E,m,i,n),x=n.type==="minutes"&&s?.minutesStep?s.minutesStep:1;let y;if(p){if(n.type==="year"&&!d&&!u)return e.formatByString(e.date(void 0,t),n.format);l>0||u?y=m.minimum:y=m.maximum}else y=parseInt(Do(n.value,i),10)+l*x;return y%x!==0&&((l<0||u)&&(y+=x-(x+y)%x),(l>0||d)&&(y-=y%x)),y>m.maximum?b(m.minimum+(y-m.maximum-1)%(m.maximum-m.minimum+1)):y<m.minimum?b(m.maximum-(m.minimum-y-1)%(m.maximum-m.minimum+1)):b(y)},f=()=>{const m=vb(e,t,n.type,n.format);if(m.length===0)return n.value;if(p)return l>0||u?m[0]:m[m.length-1];const y=((m.indexOf(n.value)+l)%m.length+m.length)%m.length;return m[y]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?h():f()},Yd=(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(Do(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&e.contentType==="digit"&&!o&&r.length===1&&(r=`${r}`),t==="input-rtl"&&(r=`${r}`),r},Em=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),uL=(e,t)=>e.formatByString(e.date(void 0,"system"),t).length===4,Db=(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")}},cL=(e,t,n)=>{const r=t.some(l=>l.type==="day"),o=[],i=[];for(let l=0;l<t.length;l+=1){const u=t[l];r&&u.type==="weekDay"||(o.push(u.format),i.push(Yd(u,"non-input",n)))}const a=o.join(" "),s=i.join(" ");return e.parse(s,a)},dL=e=>e.map(t=>`${t.startSeparator}${t.value||t.placeholder}${t.endSeparator}`).join(""),pL=(e,t,n)=>{const o=e.map(i=>{const a=Yd(i,n?"input-rtl":"input-ltr",t);return`${i.startSeparator}${a}${i.endSeparator}`}).join("");return n?`${o}`:o},fL=(e,t,n)=>{const r=e.date(void 0,n),o=e.endOfYear(r),i=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=Vd(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:uL(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):a,longestMonth:s}),weekDay:({format:l,contentType:u})=>{if(u==="digit"){const d=$l(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(i);return Do(e.formatByString(e.endOfDay(r),l),t)!==u.toString()?{minimum:1,maximum:Number(Do(e.formatByString(e.startOfDay(r),l),t))}:{minimum:0,maximum:u}},minutes:()=>({minimum:0,maximum:e.getMinutes(i)}),seconds:()=>({minimum:0,maximum:e.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},hL=(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=$l(e,t.format),i=e.formatByString(n,t.format),a=o.indexOf(i),l=o.indexOf(t.value)-a;return e.addDays(n,l)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{const o=e.getHours(n)<12,i=e.getHours(r);return o&&i>=12?e.addHours(r,-12):!o&&i<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}},Cm={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},Tm=(e,t,n,r,o)=>[...n].sort((i,a)=>Cm[i.type]-Cm[a.type]).reduce((i,a)=>!o||a.modified?hL(e,a,t,i):i,r),mL=()=>navigator.userAgent.toLowerCase().includes("android"),gL=(e,t)=>{const n={};if(!t)return e.forEach((l,u)=>{const d=u===0?null:u-1,p=u===e.length-1?null:u+1;n[u]={leftIndex:d,rightIndex:p}}),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let i=0,a=0,s=e.length-1;for(;s>=0;){a=e.findIndex((l,u)=>u>=i&&l.endSeparator?.includes(" ")&&l.endSeparator!==" / "),a===-1&&(a=e.length-1);for(let l=a;l>=i;l-=1)o[l]=s,r[s]=l,s-=1;i=a+1}return e.forEach((l,u)=>{const d=o[u],p=d===0?null:r[d-1],h=d===e.length-1?null:r[d+1];n[u]={leftIndex:p,rightIndex:h}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}},Oc=(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},bL=(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}},xL=(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}},yL=["value","referenceDate"],pr={emptyValue:null,getTodayValue:Cb,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=$e(e,yL);return t!=null&&r.utils.isValid(t)?t:n??oL(r)},cleanValue:QO,areValuesEqual:XO,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)},EL={updateReferenceValue:(e,t,n)=>t==null||!e.isValid(t)?n:t,getSectionsFromValue:(e,t,n,r)=>!e.isValid(t)&&!!n?n:r(t),getV7HiddenInputValueFromSections:dL,getV6InputValueFromSections:pL,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)},CL=["localeText"],Lc=D.createContext(null),Nc=function(t){const{localeText:n}=t,r=$e(t,CL),{utils:o,localeText:i}=D.useContext(Lc)??{utils:void 0,localeText:void 0},a=wt({props:r,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:l,dateFormats:u,dateLibInstance:d,adapterLocale:p,localeText:h}=a,f=D.useMemo(()=>U({},h,i,n),[h,i,n]),m=D.useMemo(()=>{if(!l)return o||null;const y=new l({locale:p,formats:u,instance:d});if(!y.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 y},[l,p,u,d,o]),b=D.useMemo(()=>m?{minDate:m.date("1900-01-01T00:00:00.000"),maxDate:m.date("2099-12-31T00:00:00.000")}:null,[m]),x=D.useMemo(()=>({utils:m,defaultDates:b,localeText:f}),[b,m,f]);return c.jsx(Lc.Provider,{value:x,children:s})},TL=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:U({},e)}}}}),wb=e=>{const{utils:t,formatKey:n,contextTranslation:r,propsTranslation:o}=e;return i=>{const a=i!==null&&t.isValid(i)?t.format(i,n):null;return(o??r)(i,t,a)}},Ib={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"},vL=Ib;TL(Ib);const Mo=()=>{const e=D.useContext(Lc);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=D.useMemo(()=>U({},vL,e.localeText),[e.localeText]);return D.useMemo(()=>U({},e,{localeText:t}),[e,t])},Rt=()=>Mo().utils,Ga=()=>Mo().defaultDates,Hl=e=>{const t=Rt(),n=D.useRef(void 0);return n.current===void 0&&(n.current=t.date(void 0,e)),n.current};function SL(e){return _e("MuiPickersToolbar",e)}Me("MuiPickersToolbar",["root","content"]);const kL=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],DL=e=>{const{classes:t}=e;return Fe({root:["root"],content:["content"]},SL,t)},wL=ie("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"}}]})),IL=ie("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"}}]}),AL=D.forwardRef(function(t,n){const r=wt({props:t,name:"MuiPickersToolbar"}),{children:o,className:i,toolbarTitle:a,hidden:s,titleId:l}=r,u=$e(r,kL),d=r,p=DL(d);return s?null:c.jsxs(wL,U({ref:n,className:Pe(p.root,i),ownerState:d},u,{children:[c.jsx(xt,{color:"text.secondary",variant:"overline",id:l,children:a}),c.jsx(IL,{className:p.content,ownerState:d,children:o})]}))}),Nr=()=>Mo().localeText;function PL(e){return _e("MuiDatePickerToolbar",e)}Me("MuiDatePickerToolbar",["root","title"]);const RL=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],ML=e=>{const{classes:t}=e;return Fe({root:["root"],title:["title"]},PL,t)},OL=ie(AL,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),LL=ie(xt,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),NL=D.forwardRef(function(t,n){const r=wt({props:t,name:"MuiDatePickerToolbar"}),{value:o,isLandscape:i,toolbarFormat:a,toolbarPlaceholder:s="––",views:l,className:u}=r,d=$e(r,RL),p=Rt(),h=Nr(),f=ML(r),m=D.useMemo(()=>{if(!o)return s;const x=Wd(p,{format:a,views:l},!0);return p.formatByString(o,x)},[o,a,s,p,l]),b=r;return c.jsx(OL,U({ref:n,toolbarTitle:h.datePickerToolbarTitle,isLandscape:i,className:Pe(f.root,u)},d,{children:c.jsx(LL,{variant:"h4",align:i?"left":"center",ownerState:b,className:f.title,children:m})}))});function Ab(e,t){const n=Rt(),r=Ga(),o=wt({props:e,name:t}),i=D.useMemo(()=>o.localeText?.toolbarTitle==null?o.localeText:U({},o.localeText,{datePickerToolbarTitle:o.localeText.toolbarTitle}),[o.localeText]);return U({},o,{localeText:i},GO({views:o.views,openTo:o.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:Un(n,o.minDate,r.minDate),maxDate:Un(n,o.maxDate,r.maxDate),slots:U({toolbar:NL},o.slots)})}const Qa=({props:e,value:t,timezone:n,adapter:r})=>{if(t===null)return null;const{shouldDisableDate:o,shouldDisableMonth:i,shouldDisableYear:a,disablePast:s,disableFuture:l}=e,u=r.utils.date(void 0,n),d=Un(r.utils,e.minDate,r.defaultDates.minDate),p=Un(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(o&&o(t)):return"shouldDisableDate";case!!(i&&i(t)):return"shouldDisableMonth";case!!(a&&a(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!!(p&&r.utils.isAfterDay(t,p)):return"maxDate";default:return null}};Qa.valueManager=pr;const Pb=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],FL=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],_L=["minDateTime","maxDateTime"],BL=[...Pb,...FL,..._L],Rb=e=>BL.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});function Mb(e){const{props:t,validator:n,value:r,timezone:o,onError:i}=e,a=Mo(),s=D.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:r,timezone:o,props:t}),u=n.valueManager.hasError(l);D.useEffect(()=>{i&&!n.valueManager.isSameError(l,s.current)&&i(l,r),s.current=l},[n,i,l,r]);const d=Ae(p=>n({adapter:a,value:p,timezone:o,props:t}));return{validationError:l,hasValidationError:u,getValidationErrorForNewValue:d}}function jL(e){return _e("MuiInputAdornment",e)}const vm=Me("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Sm;const $L=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ke(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},HL=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e,s={root:["root",n&&"disablePointerEvents",o&&`position${ke(o)}`,a,r&&"hiddenLabel",i&&`size${ke(i)}`]};return Fe(s,jL,t)},UL=ie("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:$L})(et(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${vm.positionStart}&:not(.${vm.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),Ob=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiInputAdornment"}),{children:o,className:i,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:u,variant:d,...p}=r,h=Yn()||{};let f=d;d&&h.variant,h&&!f&&(f=h.variant);const m={...r,hiddenLabel:h.hiddenLabel,size:h.size,disablePointerEvents:s,position:u,variant:f},b=HL(m);return c.jsx(Ll.Provider,{value:null,children:c.jsx(UL,{as:a,ownerState:m,className:Pe(b.root,i),ref:n,...p,children:typeof o=="string"&&!l?c.jsx(xt,{color:"textSecondary",children:o}):c.jsxs(D.Fragment,{children:[u==="start"?Sm||(Sm=c.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,o]})})})});function zL(e){return _e("MuiPickersPopper",e)}Me("MuiPickersPopper",["root","paper"]);function VL(e,t){return Array.isArray(t)?t.every(n=>e.indexOf(n)!==-1):e.indexOf(t)!==-1}const WL=(e,t)=>n=>{(n.key==="Enter"||n.key===" ")&&(e(n),n.preventDefault(),n.stopPropagation())},hn=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?hn(t.shadowRoot):t:null},qL="@media (pointer: fine)",YL="@media (prefers-reduced-motion: reduce)",ni=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),km=ni&&ni[1]?parseInt(ni[1],10):null,Dm=ni&&ni[2]?parseInt(ni[2],10):null,KL=km&&km<10||Dm&&Dm<13||!1,Lb=()=>Eb(YL,{defaultMatches:!1})||KL,GL=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],QL=e=>{const{classes:t}=e;return Fe({root:["root"],paper:["paper"]},zL,t)},XL=ie(zd,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.modal})),ZL=ie(Ro,{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 JL(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function eN(e,t){const n=D.useRef(!1),r=D.useRef(!1),o=D.useRef(null),i=D.useRef(!1);D.useEffect(()=>{if(!e)return;function l(){i.current=!0}return document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0),()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),i.current=!1}},[e]);const a=Ae(l=>{if(!i.current)return;const u=r.current;r.current=!1;const d=Ut(o.current);if(!o.current||"clientX"in l&&JL(l,d))return;if(n.current){n.current=!1;return}let p;l.composedPath?p=l.composedPath().indexOf(o.current)>-1:p=!d.documentElement.contains(l.target)||o.current.contains(l.target),!p&&!u&&t(l)}),s=()=>{r.current=!0};return D.useEffect(()=>{if(e){const l=Ut(o.current),u=()=>{n.current=!0};return l.addEventListener("touchstart",a),l.addEventListener("touchmove",u),()=>{l.removeEventListener("touchstart",a),l.removeEventListener("touchmove",u)}}},[e,a]),D.useEffect(()=>{if(e){const l=Ut(o.current);return l.addEventListener("click",a),()=>{l.removeEventListener("click",a),r.current=!1}}},[e,a]),[o,s,s]}const tN=D.forwardRef((e,t)=>{const{PaperComponent:n,popperPlacement:r,ownerState:o,children:i,paperSlotProps:a,paperClasses:s,onPaperClick:l,onPaperTouchStart:u}=e,d=$e(e,GL),p=U({},o,{placement:r}),h=rt({elementType:n,externalSlotProps:a,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:s,ownerState:p});return c.jsx(n,U({},d,h,{onClick:f=>{l(f),h.onClick?.(f)},onTouchStart:f=>{u(f),h.onTouchStart?.(f)},ownerState:p,children:i}))});function nN(e){const t=wt({props:e,name:"MuiPickersPopper"}),{anchorEl:n,children:r,containerRef:o=null,shouldRestoreFocus:i,onBlur:a,onDismiss:s,open:l,role:u,placement:d,slots:p,slotProps:h,reduceAnimations:f}=t;D.useEffect(()=>{function A(M){l&&M.key==="Escape"&&s()}return document.addEventListener("keydown",A),()=>{document.removeEventListener("keydown",A)}},[s,l]);const m=D.useRef(null);D.useEffect(()=>{u==="tooltip"||i&&!i()||(l?m.current=hn(document):m.current&&m.current instanceof HTMLElement&&setTimeout(()=>{m.current instanceof HTMLElement&&m.current.focus()}))},[l,u,i]);const[b,x,y]=eN(l,a??s),E=D.useRef(null),C=ot(E,o),k=ot(C,b),v=t,S=QL(v),N=Lb(),O=f??N,B=A=>{A.key==="Escape"&&(A.stopPropagation(),s())},R=p?.desktopTransition??O?So:Da,F=p?.desktopTrapFocus??Q1,T=p?.desktopPaper??ZL,L=p?.popper??XL,I=rt({elementType:L,externalSlotProps:h?.popper,additionalProps:{transition:!0,role:u,open:l,anchorEl:n,placement:d,onKeyDown:B},className:S.root,ownerState:t});return c.jsx(L,U({},I,{children:({TransitionProps:A,placement:M})=>c.jsx(F,U({open:l,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:u==="tooltip",isEnabled:()=>!0},h?.desktopTrapFocus,{children:c.jsx(R,U({},A,h?.desktopTransition,{children:c.jsx(tN,{PaperComponent:T,ownerState:v,popperPlacement:M,ref:k,onPaperClick:x,onPaperTouchStart:y,paperClasses:S.paper,paperSlotProps:h?.desktopPaper,children:r})}))}))}))}const rN=({open:e,onOpen:t,onClose:n})=>{const r=D.useRef(typeof e=="boolean").current,[o,i]=D.useState(!1);D.useEffect(()=>{if(r){if(typeof e!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(e)}},[r,e]);const a=D.useCallback(s=>{r||i(s),s&&t&&t(),!s&&n&&n()},[r,t,n]);return{isOpen:o,setIsOpen:a}},Kd=({timezone:e,value:t,defaultValue:n,referenceDate:r,onChange:o,valueManager:i})=>{const a=Rt(),s=D.useRef(n),l=t??s.current??i.emptyValue,u=D.useMemo(()=>i.getTimezone(a,l),[a,i,l]),d=Ae(m=>u==null?m:i.setTimezone(a,u,m));let p;e?p=e:u?p=u:r?p=a.getTimezone(r):p="default";const h=D.useMemo(()=>i.setTimezone(a,p,l),[i,a,p,l]),f=Ae((m,...b)=>{const x=d(m);o?.(x,...b)});return{value:h,handleValueChange:f,timezone:p}},Gd=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:o,onChange:i,valueManager:a})=>{const[s,l]=Sn({name:e,state:"value",controlled:n,default:r??a.emptyValue}),u=Ae((d,...p)=>{l(d),i?.(d,...p)});return Kd({timezone:t,value:s,defaultValue:void 0,referenceDate:o,onChange:u,valueManager:a})},oN=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o}=e,i=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromField"?!0:t.name==="setValueFromAction"?i&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastPublishedValue):t.name==="setValueFromView"&&t.selectionState!=="shallow"||t.name==="setValueFromShortcut"?i?!0:n(r.lastPublishedValue):!1},iN=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:i}=e,a=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromAction"?a&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastCommittedValue):t.name==="setValueFromView"&&t.selectionState==="finish"&&i?a?!0:n(r.lastCommittedValue):t.name==="setValueFromShortcut"?t.changeImportance==="accept"&&n(r.lastCommittedValue):!1},aN=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},sN=({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:i,onChange:a,value:s,defaultValue:l,closeOnSelect:u=r==="desktop",timezone:d,referenceDate:p}=e,{current:h}=D.useRef(l),{current:f}=D.useRef(s!==void 0),[m,b]=D.useState(d),x=Rt(),y=Mo(),{isOpen:E,setIsOpen:C}=rN(e),{timezone:k,value:v,handleValueChange:S}=Kd({timezone:d,value:s,defaultValue:h,referenceDate:p,onChange:a,valueManager:t}),[N,O]=D.useState(()=>{let re;return v!==void 0?re=v:h!==void 0?re=h:re=t.emptyValue,{draft:re,lastPublishedValue:re,lastCommittedValue:re,lastControlledValue:s,hasBeenModifiedSinceMount:!1}}),B=t.getTimezone(x,N.draft);m!==d&&(b(d),d&&B&&d!==B&&O(re=>U({},re,{draft:t.setTimezone(x,d,re.draft)})));const{getValidationErrorForNewValue:R}=Mb({props:e,validator:o,timezone:k,value:N.draft,onError:e.onError}),F=Ae(re=>{const Q={action:re,dateState:N,hasChanged:pe=>!t.areValuesEqual(x,re.value,pe),isControlled:f,closeOnSelect:u},K=oN(Q),ae=iN(Q),ee=aN(Q);O(pe=>U({},pe,{draft:re.value,lastPublishedValue:K?re.value:pe.lastPublishedValue,lastCommittedValue:ae?re.value:pe.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let ne=null;const ye=()=>(ne||(ne={validationError:re.name==="setValueFromField"?re.context.validationError:R(re.value)},re.name==="setValueFromShortcut"&&(ne.shortcut=re.shortcut)),ne);K&&S(re.value,ye()),ae&&i&&i(re.value,ye()),ee&&C(!1)});if(N.lastControlledValue!==s){const re=t.areValuesEqual(x,N.draft,v);O(Q=>U({},Q,{lastControlledValue:s},re?{}:{lastCommittedValue:v,lastPublishedValue:v,draft:v,hasBeenModifiedSinceMount:!0}))}const T=Ae(()=>{F({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),L=Ae(()=>{F({value:N.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),I=Ae(()=>{F({value:N.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),A=Ae(()=>{F({value:N.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),M=Ae(()=>{F({value:t.getTodayValue(x,k,n),name:"setValueFromAction",pickerAction:"today"})}),W=Ae(re=>{re.preventDefault(),C(!0)}),H=Ae(re=>{re?.preventDefault(),C(!1)}),j=Ae((re,Q="partial")=>F({name:"setValueFromView",value:re,selectionState:Q})),w=Ae((re,Q,K)=>F({name:"setValueFromShortcut",value:re,changeImportance:Q,shortcut:K})),V=Ae((re,Q)=>F({name:"setValueFromField",value:re,context:Q})),J={onClear:T,onAccept:L,onDismiss:I,onCancel:A,onSetToday:M,onOpen:W,onClose:H},_={value:N.draft,onChange:V},de=D.useMemo(()=>t.cleanValue(x,N.draft),[x,t,N.draft]),Z={value:de,onChange:j,onClose:H,open:E},te=U({},J,{value:de,onChange:j,onSelectShortcut:w,isValid:re=>{const Q=o({adapter:y,value:re,timezone:k,props:e});return!t.hasError(Q)}}),X=D.useMemo(()=>({onOpen:W,onClose:H,open:E}),[E,H,W]);return{open:E,fieldProps:_,viewProps:Z,layoutProps:te,actions:J,contextValue:X}};function Nb({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:i,focusedView:a,onFocusedViewChange:s}){const l=D.useRef(n),u=D.useRef(o),d=D.useRef(o.includes(n)?n:o[0]),[p,h]=Sn({name:"useViews",state:"view",controlled:r,default:d.current}),f=D.useRef(i?p:null),[m,b]=Sn({name:"useViews",state:"focusedView",controlled:a,default:f.current});D.useEffect(()=>{(l.current&&l.current!==n||u.current&&u.current.some(N=>!o.includes(N)))&&(h(o.includes(n)?n:o[0]),u.current=o,l.current=n)},[n,h,p,o]);const x=o.indexOf(p),y=o[x-1]??null,E=o[x+1]??null,C=Ae((N,O)=>{b(O?N:B=>N===B?null:B),s?.(N,O)}),k=Ae(N=>{C(N,!0),N!==p&&(h(N),t&&t(N))}),v=Ae(()=>{E&&k(E)}),S=Ae((N,O,B)=>{const R=O==="finish",F=B?o.indexOf(B)<o.length-1:!!E;if(e(N,R&&F?"partial":O,B),B&&B!==p){const L=o[o.indexOf(B)+1];L&&k(L)}else R&&v()});return{view:p,setView:k,focusedView:m,setFocusedView:C,nextView:E,previousView:y,defaultView:o.includes(n)?n:o[0],goToNextView:v,setValueAndGoToNextView:S}}const lN=["className","sx"],uN=({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:r,rendererInterceptor:o,fieldRef:i})=>{const{onChange:a,open:s,onClose:l}=t,{view:u,views:d,openTo:p,onViewChange:h,viewRenderers:f,timezone:m}=e,b=$e(e,lN),{view:x,setView:y,defaultView:E,focusedView:C,setFocusedView:k,setValueAndGoToNextView:v}=Nb({view:u,views:d,openTo:p,onChange:a,onViewChange:h,autoFocus:r}),{hasUIView:S,viewModeLookup:N}=D.useMemo(()=>d.reduce((I,A)=>{let M;return f[A]!=null?M="UI":M="field",I.viewModeLookup[A]=M,M==="UI"&&(I.hasUIView=!0),I},{hasUIView:!1,viewModeLookup:{}}),[f,d]),O=D.useMemo(()=>d.reduce((I,A)=>f[A]!=null&&tL(A)?I+1:I,0),[f,d]),B=N[x],R=Ae(()=>B==="UI"),[F,T]=D.useState(B==="UI"?x:null);return F!==x&&N[x]==="UI"&&T(x),Wt(()=>{B==="field"&&s&&(l(),setTimeout(()=>{i?.current?.setSelectedSections(x),i?.current?.focusField(x)}))},[x]),Wt(()=>{if(!s)return;let I=x;B==="field"&&F!=null&&(I=F),I!==E&&N[I]==="UI"&&N[E]==="UI"&&(I=E),I!==x&&y(I),k(I,!0)},[s]),{hasUIView:S,shouldRestoreFocus:R,layoutProps:{views:d,view:F,onViewChange:y},renderCurrentView:()=>{if(F==null)return null;const I=f[F];if(I==null)return null;const A=U({},b,n,t,{views:d,timezone:m,onChange:v,view:F,onViewChange:y,focusedView:C,onFocusedViewChange:k,showViewSwitcher:O>1,timeViewsCount:O});return o?o(f,F,A):I(A)}}};function wm(){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 cN=(e,t)=>{const[n,r]=D.useState(wm);return Wt(()=>{const i=()=>{r(wm())};return window.addEventListener("orientationchange",i),()=>{window.removeEventListener("orientationchange",i)}},[]),VL(e,["hours","minutes","seconds"])?!1:(t||n)==="landscape"},dN=({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=e,i=cN(n.views,o),a=Vn();return{layoutProps:U({},n,t,{isLandscape:i,isRtl:a,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}};function pN(e){const{props:t,pickerValueResponse:n}=e;return D.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 Fb=({props:e,valueManager:t,valueType:n,wrapperVariant:r,additionalViewProps:o,validator:i,autoFocusView:a,rendererInterceptor:s,fieldRef:l})=>{const u=sN({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:i}),d=uN({props:e,additionalViewProps:o,autoFocusView:a,fieldRef:l,propsFromPickerValue:u.viewProps,rendererInterceptor:s}),p=dN({props:e,wrapperVariant:r,propsFromPickerValue:u.layoutProps,propsFromPickerViews:d.layoutProps}),h=pN({props:e,pickerValueResponse:u});return{open:u.open,actions:u.actions,fieldProps:u.fieldProps,renderCurrentView:d.renderCurrentView,hasUIView:d.hasUIView,shouldRestoreFocus:d.shouldRestoreFocus,layoutProps:p.layoutProps,contextValue:u.contextValue,ownerState:h}};function _b(e){return _e("MuiPickersLayout",e)}const io=Me("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),fN=["onAccept","onClear","onCancel","onSetToday","actions"];function hN(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:o,actions:i}=e,a=$e(e,fN),s=Nr();if(i==null||i.length===0)return null;const l=i?.map(u=>{switch(u){case"clear":return c.jsx(Dt,{onClick:n,children:s.clearButtonLabel},u);case"cancel":return c.jsx(Dt,{onClick:r,children:s.cancelButtonLabel},u);case"accept":return c.jsx(Dt,{onClick:t,children:s.okButtonLabel},u);case"today":return c.jsx(Dt,{onClick:o,children:s.todayButtonLabel},u);default:return null}});return c.jsx(br,U({},a,{children:l}))}function mN(e){return _e("MuiListItem",e)}Me("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const gN=Me("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function bN(e){return _e("MuiListItemSecondaryAction",e)}Me("MuiListItemSecondaryAction",["root","disableGutters"]);const xN=e=>{const{disableGutters:t,classes:n}=e;return Fe({root:["root",t&&"disableGutters"]},bN,n)},yN=ie("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}}]}),Bb=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiListItemSecondaryAction"}),{className:o,...i}=r,a=D.useContext(bo),s={...r,disableGutters:a.disableGutters},l=xN(s);return c.jsx(yN,{className:Pe(l.root,o),ownerState:s,ref:n,...i})});Bb.muiName="ListItemSecondaryAction";const EN=(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]},CN=e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:a,hasSecondaryAction:s}=e;return Fe({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",a&&"divider",t==="flex-start"&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},mN,n)},TN=ie("div",{name:"MuiListItem",slot:"Root",overridesResolver:EN})(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:{[`& > .${gN.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}}]}))),vN=ie("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),SN=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiListItem"}),{alignItems:o="center",children:i,className:a,component:s,components:l={},componentsProps:u={},ContainerComponent:d="li",ContainerProps:{className:p,...h}={},dense:f=!1,disableGutters:m=!1,disablePadding:b=!1,divider:x=!1,secondaryAction:y,slotProps:E={},slots:C={},...k}=r,v=D.useContext(bo),S=D.useMemo(()=>({dense:f||v.dense||!1,alignItems:o,disableGutters:m}),[o,v.dense,f,m]),N=D.useRef(null),O=D.Children.toArray(i),B=O.length&&bs(O[O.length-1],["ListItemSecondaryAction"]),R={...r,alignItems:o,dense:S.dense,disableGutters:m,disablePadding:b,divider:x,hasSecondaryAction:B},F=CN(R),T=ot(N,n),L=C.root||l.Root||TN,I=E.root||u.root||{},A={className:Pe(F.root,I.className,a),...k};let M=s||"li";return B?(M=!A.component&&!s?"div":M,d==="li"&&(M==="li"?M="div":A.component==="li"&&(A.component="div")),c.jsx(bo.Provider,{value:S,children:c.jsxs(vN,{as:d,className:Pe(F.container,p),ref:T,ownerState:R,...h,children:[c.jsx(L,{...I,...!ui(L)&&{as:M,ownerState:{...R,...I.ownerState}},...A,children:O}),O.pop()]})})):c.jsx(bo.Provider,{value:S,children:c.jsxs(L,{...I,as:M,ref:T,...!ui(L)&&{ownerState:{...R,...I.ownerState}},...A,children:[O,y&&c.jsx(Bb,{children:y})]})})}),Aa=36,Ul=2,zl=320,kN=280,Qd=336,DN=["items","changeImportance","isLandscape","onChange","isValid"],wN=["getValue"];function IN(e){const{items:t,changeImportance:n="accept",onChange:r,isValid:o}=e,i=$e(e,DN);if(t==null||t.length===0)return null;const a=t.map(s=>{let{getValue:l}=s,u=$e(s,wN);const d=l({isValid:o});return U({},u,{label:u.label,onClick:()=>{r(d,n,u)},disabled:!o(d)})});return c.jsx(q1,U({dense:!0,sx:[{maxHeight:Qd,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:a.map(s=>c.jsx(SN,{children:c.jsx(gb,U({},s))},s.id??s.label))}))}function AN(e){return e.view!==null}const PN=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"]},_b,t)},RN=e=>{const{wrapperVariant:t,onAccept:n,onClear:r,onCancel:o,onSetToday:i,view:a,views:s,onViewChange:l,value:u,onChange:d,onSelectShortcut:p,isValid:h,isLandscape:f,disabled:m,readOnly:b,children:x,slots:y,slotProps:E}=e,C=PN(e),k=y?.actionBar??hN,v=rt({elementType:k,externalSlotProps:E?.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:o,onSetToday:i,actions:t==="desktop"?[]:["cancel","accept"]},className:C.actionBar,ownerState:U({},e,{wrapperVariant:t})}),S=c.jsx(k,U({},v)),N=y?.toolbar,O=rt({elementType:N,externalSlotProps:E?.toolbar,additionalProps:{isLandscape:f,onChange:d,value:u,view:a,onViewChange:l,views:s,disabled:m,readOnly:b},className:C.toolbar,ownerState:U({},e,{wrapperVariant:t})}),B=AN(O)&&N?c.jsx(N,U({},O)):null,R=x,F=y?.tabs,T=a&&F?c.jsx(F,U({view:a,onViewChange:l,className:C.tabs},E?.tabs)):null,L=y?.shortcuts??IN,I=rt({elementType:L,externalSlotProps:E?.shortcuts,additionalProps:{isValid:h,isLandscape:f,onChange:p},className:C.shortcuts,ownerState:{isValid:h,isLandscape:f,onChange:p,wrapperVariant:t}}),A=a&&L?c.jsx(L,U({},I)):null;return{toolbar:B,content:R,tabs:T,actionBar:S,shortcuts:A}},MN=e=>{const{isLandscape:t,classes:n}=e;return Fe({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},_b,n)},ON=ie("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${io.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${io.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${io.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${io.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${io.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${io.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${io.shortcuts}`]:{gridColumn:3}}}]}),LN=ie("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),jb=D.forwardRef(function(t,n){const r=wt({props:t,name:"MuiPickersLayout"}),{toolbar:o,content:i,tabs:a,actionBar:s,shortcuts:l}=RN(r),{sx:u,className:d,isLandscape:p,wrapperVariant:h}=r,f=MN(r);return c.jsxs(ON,{ref:n,sx:u,className:Pe(f.root,d),ownerState:r,children:[p?l:o,p?o:l,c.jsx(LN,{className:f.contentWrapper,children:h==="desktop"?c.jsxs(D.Fragment,{children:[i,a]}):c.jsxs(D.Fragment,{children:[a,i]})}),s]})}),NN=D.createContext(null);function $b(e){const{contextValue:t,localeText:n,children:r}=e;return c.jsx(NN.Provider,{value:t,children:c.jsx(Nc,{localeText:n,children:r})})}const FN=["props","getOpenDialogAriaText"],_N=["ownerState"],BN=["ownerState"],jN=e=>{let{props:t,getOpenDialogAriaText:n}=e,r=$e(e,FN);const{slots:o,slotProps:i,className:a,sx:s,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:d,selectedSections:p,onSelectedSectionsChange:h,timezone:f,name:m,label:b,inputRef:x,readOnly:y,disabled:E,autoFocus:C,localeText:k,reduceAnimations:v}=t,S=D.useRef(null),N=D.useRef(null),O=Jn(),B=i?.toolbar?.hidden??!1,{open:R,actions:F,hasUIView:T,layoutProps:L,renderCurrentView:I,shouldRestoreFocus:A,fieldProps:M,contextValue:W,ownerState:H}=Fb(U({},r,{props:t,fieldRef:N,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),j=o.inputAdornment??Ob,w=rt({elementType:j,externalSlotProps:i?.inputAdornment,additionalProps:{position:"end"},ownerState:t}),V=$e(w,_N),J=o.openPickerButton??wn,_=rt({elementType:J,externalSlotProps:i?.openPickerButton,additionalProps:{disabled:E||y,onClick:R?F.onClose:F.onOpen,"aria-label":n(M.value),edge:V.position},ownerState:t}),de=$e(_,BN),Z=o.openPickerIcon,Y=rt({elementType:Z,externalSlotProps:i?.openPickerIcon,ownerState:H}),te=o.field,X=rt({elementType:te,externalSlotProps:i?.field,additionalProps:U({},M,B&&{id:O},{readOnly:y,disabled:E,className:a,sx:s,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:d,selectedSections:p,onSelectedSectionsChange:h,timezone:f,label:b,name:m,autoFocus:C&&!t.open,focused:R?!0:void 0},x?{inputRef:x}:{}),ownerState:t});T&&(X.InputProps=U({},X.InputProps,{ref:S},!t.disableOpenPicker&&{[`${V.position}Adornment`]:c.jsx(j,U({},V,{children:c.jsx(J,U({},de,{children:c.jsx(Z,U({},Y))}))}))}));const re=U({textField:o.textField,clearIcon:o.clearIcon,clearButton:o.clearButton},X.slots),Q=o.layout??jb;let K=O;B&&(b?K=`${O}-label`:K=void 0);const ae=U({},i,{toolbar:U({},i?.toolbar,{titleId:O}),popper:U({"aria-labelledby":K},i?.popper)}),ee=ot(N,X.unstableFieldRef);return{renderPicker:()=>c.jsxs($b,{contextValue:W,localeText:k,children:[c.jsx(te,U({},X,{slots:re,slotProps:ae,unstableFieldRef:ee})),c.jsx(nN,U({role:"dialog",placement:"bottom-start",anchorEl:S.current},F,{open:R,slots:o,slotProps:ae,shouldRestoreFocus:A,reduceAnimations:v,children:c.jsx(Q,U({},L,ae?.layout,{slots:o,slotProps:ae,children:I()}))}))]})}},$N=tt(c.jsx("path",{d:"M7 10l5 5 5-5z"})),HN=tt(c.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})),UN=tt(c.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),zN=tt(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"}));tt(c.jsxs(D.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"})]}));tt(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"}));tt(c.jsxs(D.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 VN=tt(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"})),WN=({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},qN=({utils:e,expandedFormat:t})=>{const n=[],{start:r,end:o}=e.escapedCharacters,i=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let a=null;for(;a=i.exec(t);)n.push({start:a.index,end:i.lastIndex-1});return n},YN=(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}},KN=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:i,token:a,startSeparator:s})=>{if(a==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=Tb(e,a),u=Db(e,l.contentType,l.type,a),d=n?u:l.contentType==="digit",p=t!=null&&e.isValid(t);let h=p?e.formatByString(t,a):"",f=null;if(d)if(u)f=h===""?e.formatByString(i,a).length:h.length;else{if(l.maxLength==null)throw new Error(`MUI X: The token ${a} should have a 'maxDigitNumber' property on it's adapter`);f=l.maxLength,p&&(h=qd(Sb(Do(h,o),f),o))}return U({},l,{format:a,maxLength:f,value:h,placeholder:YN(e,r,l,a),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:d,startSeparator:s,endSeparator:"",modified:!1})},GN=e=>{const{utils:t,expandedFormat:n,escapedParts:r}=e,o=t.date(void 0),i=[];let a="";const s=Object.keys(t.formatTokenMap).sort((f,m)=>m.length-f.length),l=/^([a-zA-Z]+)/,u=new RegExp(`^(${s.join("|")})*$`),d=new RegExp(`^(${s.join("|")})`),p=f=>r.find(m=>m.start<=f&&m.end>=f);let h=0;for(;h<n.length;){const f=p(h),m=f!=null,b=l.exec(n.slice(h))?.[1];if(!m&&b!=null&&u.test(b)){let x=b;for(;x.length>0;){const y=d.exec(x)[1];x=x.slice(y.length),i.push(KN(U({},e,{now:o,token:y,startSeparator:a}))),a=""}h+=b.length}else{const x=n[h];m&&f?.start===h||f?.end===h||(i.length===0?a+=x:i[i.length-1].endSeparator+=x),h+=1}}return i.length===0&&a.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),i},QN=({isRtl:e,formatDensity:t,sections:n})=>n.map(r=>{const o=i=>{let a=i;return e&&a!==null&&a.includes(" ")&&(a=`${a}`),t==="spacious"&&["/",".","-"].includes(a)&&(a=` ${a} `),a};return r.startSeparator=o(r.startSeparator),r.endSeparator=o(r.endSeparator),r}),Im=e=>{let t=WN(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=qN(U({},e,{expandedFormat:t})),r=GN(U({},e,{expandedFormat:t,escapedParts:n}));return QN(U({},e,{sections:r}))},XN=e=>{const t=Rt(),n=Nr(),r=Mo(),o=Vn(),{valueManager:i,fieldValueManager:a,valueType:s,validator:l,internalProps:u,internalProps:{value:d,defaultValue:p,referenceDate:h,onChange:f,format:m,formatDensity:b="dense",selectedSections:x,onSelectedSectionsChange:y,shouldRespectLeadingZeros:E=!1,timezone:C,enableAccessibleFieldDOMStructure:k=!1}}=e,{timezone:v,value:S,handleValueChange:N}=Kd({timezone:C,value:d,defaultValue:p,referenceDate:h,onChange:f,valueManager:i}),O=D.useMemo(()=>sL(t),[t]),B=D.useMemo(()=>fL(t,O,v),[t,O,v]),R=D.useCallback((Z,Y=null)=>a.getSectionsFromValue(t,Z,Y,te=>Im({utils:t,localeText:n,localizedDigits:O,format:m,date:te,formatDensity:b,shouldRespectLeadingZeros:E,enableAccessibleFieldDOMStructure:k,isRtl:o})),[a,m,n,O,o,E,t,b,k]),[F,T]=D.useState(()=>{const Z=R(S),Y={sections:Z,value:S,referenceValue:i.emptyValue,tempValueStrAndroid:null},te=rL(Z),X=i.getInitialReferenceValue({referenceDate:h,value:S,utils:t,props:u,granularity:te,timezone:v});return U({},Y,{referenceValue:X})}),[L,I]=Sn({controlled:x,default:null,name:"useField",state:"selectedSections"}),A=Z=>{I(Z),y?.(Z)},M=D.useMemo(()=>Oc(L,F.sections),[L,F.sections]),W=M==="all"?0:M,H=({value:Z,referenceValue:Y,sections:te})=>{if(T(re=>U({},re,{sections:te,value:Z,referenceValue:Y,tempValueStrAndroid:null})),i.areValuesEqual(t,F.value,Z))return;const X={validationError:l({adapter:r,value:Z,timezone:v,props:u})};N(Z,X)},j=(Z,Y)=>{const te=[...F.sections];return te[Z]=U({},te[Z],{value:Y,modified:!0}),te},w=()=>{H({value:i.emptyValue,referenceValue:F.referenceValue,sections:R(i.emptyValue)})},V=()=>{if(W==null)return;const Z=F.sections[W],Y=a.getActiveDateManager(t,F,Z),X=Y.getSections(F.sections).filter(ae=>ae.value!=="").length===(Z.value===""?0:1),re=j(W,""),Q=X?null:t.getInvalidDate(),K=Y.getNewValuesFromNewActiveDate(Q);H(U({},K,{sections:re}))},J=Z=>{const Y=(re,Q)=>{const K=t.parse(re,m);if(K==null||!t.isValid(K))return null;const ae=Im({utils:t,localeText:n,localizedDigits:O,format:m,date:K,formatDensity:b,shouldRespectLeadingZeros:E,enableAccessibleFieldDOMStructure:k,isRtl:o});return Tm(t,K,ae,Q,!1)},te=a.parseValueStr(Z,F.referenceValue,Y),X=a.updateReferenceValue(t,te,F.referenceValue);H({value:te,referenceValue:X,sections:R(te,F.sections)})},_=({activeSection:Z,newSectionValue:Y,shouldGoToNextSection:te})=>{te&&W<F.sections.length-1&&A(W+1);const X=a.getActiveDateManager(t,F,Z),re=j(W,Y),Q=X.getSections(re),K=cL(t,Q,O);let ae,ee;if(K!=null&&t.isValid(K)){const ne=Tm(t,K,Q,X.referenceDate,!0);ae=X.getNewValuesFromNewActiveDate(ne),ee=!0}else ae=X.getNewValuesFromNewActiveDate(K),ee=(K!=null&&!t.isValid(K))!=(X.date!=null&&!t.isValid(X.date));return ee?H(U({},ae,{sections:re})):T(ne=>U({},ne,ae,{sections:re,tempValueStrAndroid:null}))},de=Z=>T(Y=>U({},Y,{tempValueStrAndroid:Z}));return D.useEffect(()=>{const Z=R(F.value);T(Y=>U({},Y,{sections:Z}))},[m,t.locale,o]),D.useEffect(()=>{let Z;i.areValuesEqual(t,F.value,S)?Z=i.getTimezone(t,F.value)!==i.getTimezone(t,S):Z=!0,Z&&T(Y=>U({},Y,{value:S,referenceValue:a.updateReferenceValue(t,S,Y.referenceValue),sections:R(S)}))},[S]),{state:F,activeSectionIndex:W,parsedSelectedSections:M,setSelectedSections:A,clearValue:w,clearActiveSection:V,updateSectionValue:_,updateValueFromValueStr:J,setTempAndroidValueStr:de,getSectionsFromValue:R,sectionsValueBoundaries:B,localizedDigits:O,timezone:v}},ZN=5e3,Wo=e=>e.saveQuery!=null,JN=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:o,timezone:i})=>{const a=Rt(),[s,l]=D.useState(null),u=Ae(()=>l(null));D.useEffect(()=>{s!=null&&e[s.sectionIndex]?.type!==s.sectionType&&u()},[e,s,u]),D.useEffect(()=>{if(s!=null){const m=setTimeout(()=>u(),ZN);return()=>{clearTimeout(m)}}return()=>{}},[s,u]);const d=({keyPressed:m,sectionIndex:b},x,y)=>{const E=m.toLowerCase(),C=e[b];if(s!=null&&(!y||y(s.value))&&s.sectionIndex===b){const v=`${s.value}${E}`,S=x(v,C);if(!Wo(S))return l({sectionIndex:b,value:v,sectionType:C.type}),S}const k=x(E,C);return Wo(k)&&!k.saveQuery?(u(),null):(l({sectionIndex:b,value:E,sectionType:C.type}),Wo(k)?null:k)},p=m=>{const b=(E,C,k)=>{const v=C.filter(S=>S.toLowerCase().startsWith(k));return v.length===0?{saveQuery:!1}:{sectionValue:v[0],shouldGoToNextSection:v.length===1}},x=(E,C,k,v)=>{const S=N=>vb(a,i,C.type,N);if(C.contentType==="letter")return b(C.format,S(C.format),E);if(k&&v!=null&&Tb(a,k).contentType==="letter"){const N=S(k),O=b(k,N,E);return Wo(O)?{saveQuery:!1}:U({},O,{sectionValue:v(O.sectionValue,N)})}return{saveQuery:!1}};return d(m,(E,C)=>{switch(C.type){case"month":{const k=v=>Em(a,v,a.formats.month,C.format);return x(E,C,a.formats.month,k)}case"weekDay":{const k=(v,S)=>S.indexOf(v).toString();return x(E,C,a.formats.weekday,k)}case"meridiem":return x(E,C);default:return{saveQuery:!1}}})},h=m=>{const b=(y,E)=>{const C=Do(y,r),k=Number(C),v=n[E.type]({currentDate:null,format:E.format,contentType:E.contentType});if(k>v.maximum)return{saveQuery:!1};if(k<v.minimum)return{saveQuery:!0};const S=k*10>v.maximum||C.length===v.maximum.toString().length;return{sectionValue:kb(a,k,v,r,E),shouldGoToNextSection:S}};return d(m,(y,E)=>{if(E.contentType==="digit"||E.contentType==="digit-with-letter")return b(y,E);if(E.type==="month"){Db(a,"digit","month","MM");const C=b(y,{type:E.type,format:"MM",hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(Wo(C))return C;const k=Em(a,C.sectionValue,"MM",E.format);return U({},C,{sectionValue:k})}if(E.type==="weekDay"){const C=b(y,E);if(Wo(C))return C;const k=$l(a,E.format)[Number(C.sectionValue)-1];return U({},C,{sectionValue:k})}return{saveQuery:!1}},y=>ym(y,r))};return{applyCharacterEditing:Ae(m=>{const b=e[m.sectionIndex],y=ym(m.keyPressed,r)?h(U({},m,{keyPressed:qd(m.keyPressed,r)})):p(m);if(y==null){o(null);return}t({activeSection:b,newSectionValue:y.sectionValue,shouldGoToNextSection:y.shouldGoToNextSection})}),resetCharacterQuery:u}},eF=e=>{const{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:o,onClick:i,onFocus:a,onInput:s,onPaste:l,focused:u,autoFocus:d=!1},fieldValueManager:p,applyCharacterEditing:h,resetCharacterQuery:f,setSelectedSections:m,parsedSelectedSections:b,state:x,clearActiveSection:y,clearValue:E,updateSectionValue:C,updateValueFromValueStr:k,sectionOrder:v,areAllSectionsEmpty:S,sectionsValueBoundaries:N}=e,O=D.useRef(null),B=ot(r,O),R=Nr(),F=Rt(),T=Jn(),[L,I]=D.useState(!1),A=D.useMemo(()=>({syncSelectionToDOM:()=>{if(!O.current)return;const ee=document.getSelection();if(!ee)return;if(b==null){ee.rangeCount>0&&O.current.getRoot().contains(ee.getRangeAt(0).startContainer)&&ee.removeAllRanges(),L&&O.current.getRoot().blur();return}if(!O.current.getRoot().contains(hn(document)))return;const ne=new window.Range;let ye;b==="all"?ye=O.current.getRoot():x.sections[b].type==="empty"?ye=O.current.getSectionContainer(b):ye=O.current.getSectionContent(b),ne.selectNodeContents(ye),ye.focus(),ee.removeAllRanges(),ee.addRange(ne)},getActiveSectionIndexFromDOM:()=>{const ee=hn(document);return!ee||!O.current||!O.current.getRoot().contains(ee)?null:O.current.getSectionIndexFromDOMElement(ee)},focusField:(ee=0)=>{if(!O.current||A.getActiveSectionIndexFromDOM()!=null)return;const ne=Oc(ee,x.sections);I(!0),O.current.getSectionContent(ne).focus()},setSelectedSections:ee=>{if(!O.current)return;const ne=Oc(ee,x.sections);I((ne==="all"?0:ne)!==null),m(ee)},isFieldFocused:()=>{const ee=hn(document);return!!O.current&&O.current.getRoot().contains(ee)}}),[b,m,x.sections,L]),M=Ae(ee=>{if(!O.current)return;const ne=x.sections[ee];O.current.getSectionContent(ee).innerHTML=ne.value||ne.placeholder,A.syncSelectionToDOM()}),W=Ae((ee,...ne)=>{ee.isDefaultPrevented()||!O.current||(I(!0),i?.(ee,...ne),b==="all"?setTimeout(()=>{const ye=document.getSelection().getRangeAt(0).startOffset;if(ye===0){m(v.startIndex);return}let pe=0,be=0;for(;be<ye&&pe<x.sections.length;){const le=x.sections[pe];pe+=1,be+=`${le.startSeparator}${le.value||le.placeholder}${le.endSeparator}`.length}m(pe-1)}):L?O.current.getRoot().contains(ee.target)||m(v.startIndex):(I(!0),m(v.startIndex)))}),H=Ae(ee=>{if(s?.(ee),!O.current||b!=="all")return;const ye=ee.target.textContent??"";O.current.getRoot().innerHTML=x.sections.map(pe=>`${pe.startSeparator}${pe.value||pe.placeholder}${pe.endSeparator}`).join(""),A.syncSelectionToDOM(),ye.length===0||ye.charCodeAt(0)===10?(f(),E(),m("all")):ye.length>1?k(ye):(b==="all"&&m(0),h({keyPressed:ye,sectionIndex:0}))}),j=Ae(ee=>{if(l?.(ee),n||b!=="all"){ee.preventDefault();return}const ne=ee.clipboardData.getData("text");ee.preventDefault(),f(),k(ne)}),w=Ae((...ee)=>{if(a?.(...ee),L||!O.current)return;I(!0),O.current.getSectionIndexFromDOMElement(hn(document))!=null||m(v.startIndex)}),V=Ae((...ee)=>{o?.(...ee),setTimeout(()=>{if(!O.current)return;const ne=hn(document);!O.current.getRoot().contains(ne)&&(I(!1),m(null))})}),J=Ae(ee=>ne=>{ne.isDefaultPrevented()||m(ee)}),_=Ae(ee=>{ee.preventDefault()}),de=Ae(ee=>()=>{m(ee)}),Z=Ae(ee=>{if(ee.preventDefault(),n||t||typeof b!="number")return;const ne=x.sections[b],ye=ee.clipboardData.getData("text"),pe=/^[a-zA-Z]+$/.test(ye),be=/^[0-9]+$/.test(ye),le=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(ye);ne.contentType==="letter"&&pe||ne.contentType==="digit"&&be||ne.contentType==="digit-with-letter"&&le?(f(),C({activeSection:ne,newSectionValue:ye,shouldGoToNextSection:!0})):!pe&&!be&&(f(),k(ye))}),Y=Ae(ee=>{ee.preventDefault(),ee.dataTransfer.dropEffect="none"}),te=Ae(ee=>{if(!O.current)return;const ne=ee.target,ye=ne.textContent??"",pe=O.current.getSectionIndexFromDOMElement(ne),be=x.sections[pe];if(n||!O.current){M(pe);return}if(ye.length===0){if(be.value===""){M(pe);return}const le=ee.nativeEvent.inputType;if(le==="insertParagraph"||le==="insertLineBreak"){M(pe);return}f(),y();return}h({keyPressed:ye,sectionIndex:pe}),M(pe)});Wt(()=>{if(!(!L||!O.current)){if(b==="all")O.current.getRoot().focus();else if(typeof b=="number"){const ee=O.current.getSectionContent(b);ee&&ee.focus()}}},[b,L]);const X=D.useMemo(()=>x.sections.reduce((ee,ne)=>(ee[ne.type]=N[ne.type]({currentDate:null,contentType:ne.contentType,format:ne.format}),ee),{}),[N,x.sections]),re=b==="all",Q=D.useMemo(()=>x.sections.map((ee,ne)=>{const ye=!re&&!t&&!n;return{container:{"data-sectionindex":ne,onClick:J(ne)},content:{tabIndex:re||ne>0?-1:0,contentEditable:!re&&!t&&!n,role:"spinbutton",id:`${T}-${ee.type}`,"aria-labelledby":`${T}-${ee.type}`,"aria-readonly":n,"aria-valuenow":xL(ee,F),"aria-valuemin":X[ee.type].minimum,"aria-valuemax":X[ee.type].maximum,"aria-valuetext":ee.value?bL(ee,F):R.empty,"aria-label":R[ee.type],"aria-disabled":t,spellCheck:ye?!1:void 0,autoCapitalize:ye?"off":void 0,autoCorrect:ye?"off":void 0,[parseInt(D.version,10)>=17?"enterKeyHint":"enterkeyhint"]:ye?"next":void 0,children:ee.value||ee.placeholder,onInput:te,onPaste:Z,onFocus:de(ne),onDragOver:Y,onMouseUp:_,inputMode:ee.contentType==="letter"?"text":"numeric"},before:{children:ee.startSeparator},after:{children:ee.endSeparator}}}),[x.sections,de,Z,Y,te,J,_,t,n,re,R,F,X,T]),K=Ae(ee=>{k(ee.target.value)}),ae=D.useMemo(()=>S?"":p.getV7HiddenInputValueFromSections(x.sections),[S,x.sections,p]);return D.useEffect(()=>{if(O.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&&O.current&&O.current.getSectionContent(v.startIndex).focus()},[]),{interactions:A,returnedValue:{autoFocus:d,readOnly:n,focused:u??L,sectionListRef:B,onBlur:V,onClick:W,onFocus:w,onInput:H,onPaste:j,enableAccessibleFieldDOMStructure:!0,elements:Q,tabIndex:b===0?-1:0,contentEditable:re,value:ae,onChange:K,areAllSectionsEmpty:S}}},Go=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),tF=(e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a<e.length;a+=1){const s=e[a],l=Yd(s,n?"input-rtl":"input-ltr",t),u=`${s.startSeparator}${l}${s.endSeparator}`,d=Go(u).length,p=u.length,h=Go(l),f=o+(h===""?0:l.indexOf(h[0]))+s.startSeparator.length,m=f+h.length;i.push(U({},s,{start:r,end:r+d,startInInput:f,endInInput:m})),r+=d,o+=p}return i},nF=e=>{const t=Vn(),n=D.useRef(void 0),r=D.useRef(void 0),{forwardedProps:{onFocus:o,onClick:i,onPaste:a,onBlur:s,inputRef:l,placeholder:u},internalProps:{readOnly:d=!1,disabled:p=!1},parsedSelectedSections:h,activeSectionIndex:f,state:m,fieldValueManager:b,valueManager:x,applyCharacterEditing:y,resetCharacterQuery:E,updateSectionValue:C,updateValueFromValueStr:k,clearActiveSection:v,clearValue:S,setTempAndroidValueStr:N,setSelectedSections:O,getSectionsFromValue:B,areAllSectionsEmpty:R,localizedDigits:F}=e,T=D.useRef(null),L=ot(l,T),I=D.useMemo(()=>tF(m.sections,F,t),[m.sections,F,t]),A=D.useMemo(()=>({syncSelectionToDOM:()=>{if(!T.current)return;if(h==null){T.current.scrollLeft&&(T.current.scrollLeft=0);return}if(T.current!==hn(document))return;const te=T.current.scrollTop;if(h==="all")T.current.select();else{const X=I[h],re=X.type==="empty"?X.startInInput-X.startSeparator.length:X.startInInput,Q=X.type==="empty"?X.endInInput+X.endSeparator.length:X.endInInput;(re!==T.current.selectionStart||Q!==T.current.selectionEnd)&&T.current===hn(document)&&T.current.setSelectionRange(re,Q),clearTimeout(r.current),r.current=setTimeout(()=>{T.current&&T.current===hn(document)&&T.current.selectionStart===T.current.selectionEnd&&(T.current.selectionStart!==re||T.current.selectionEnd!==Q)&&A.syncSelectionToDOM()})}T.current.scrollTop=te},getActiveSectionIndexFromDOM:()=>{const te=T.current.selectionStart??0,X=T.current.selectionEnd??0;if(te===0&&X===0)return null;const re=te<=I[0].startInInput?1:I.findIndex(Q=>Q.startInInput-Q.startSeparator.length>te);return re===-1?I.length-1:re-1},focusField:(te=0)=>{hn(document)!==T.current&&(T.current?.focus(),O(te))},setSelectedSections:te=>O(te),isFieldFocused:()=>T.current===hn(document)}),[T,h,I,O]),M=()=>{const te=T.current.selectionStart??0;let X;te<=I[0].startInInput||te>=I[I.length-1].endInInput?X=1:X=I.findIndex(Q=>Q.startInInput-Q.startSeparator.length>te);const re=X===-1?I.length-1:X-1;O(re)},W=Ae((...te)=>{o?.(...te);const X=T.current;clearTimeout(n.current),n.current=setTimeout(()=>{!X||X!==T.current||f==null&&(X.value.length&&Number(X.selectionEnd)-Number(X.selectionStart)===X.value.length?O("all"):M())})}),H=Ae((te,...X)=>{te.isDefaultPrevented()||(i?.(te,...X),M())}),j=Ae(te=>{if(a?.(te),te.preventDefault(),d||p)return;const X=te.clipboardData.getData("text");if(typeof h=="number"){const re=m.sections[h],Q=/^[a-zA-Z]+$/.test(X),K=/^[0-9]+$/.test(X),ae=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(X);if(re.contentType==="letter"&&Q||re.contentType==="digit"&&K||re.contentType==="digit-with-letter"&&ae){E(),C({activeSection:re,newSectionValue:X,shouldGoToNextSection:!0});return}if(Q||K)return}E(),k(X)}),w=Ae((...te)=>{s?.(...te),O(null)}),V=Ae(te=>{if(d)return;const X=te.target.value;if(X===""){E(),S();return}const re=te.nativeEvent.data,Q=re&&re.length>1,K=Q?re:X,ae=Go(K);if(h==="all"&&O(f),f==null||Q){k(Q?re:ae);return}let ee;if(h==="all"&&ae.length===1)ee=ae;else{const ne=Go(b.getV6InputValueFromSections(I,F,t));let ye=-1,pe=-1;for(let ve=0;ve<ne.length;ve+=1)ye===-1&&ne[ve]!==ae[ve]&&(ye=ve),pe===-1&&ne[ne.length-ve-1]!==ae[ae.length-ve-1]&&(pe=ve);const be=I[f];if(ye<be.start||ne.length-pe-1>be.end)return;const Re=ae.length-ne.length+be.end-Go(be.endSeparator||"").length;ee=ae.slice(be.start+Go(be.startSeparator||"").length,Re)}if(ee.length===0){mL()&&N(K),E(),v();return}y({keyPressed:ee,sectionIndex:f})}),J=D.useMemo(()=>u!==void 0?u:b.getV6InputValueFromSections(B(x.emptyValue),F,t),[u,b,B,x.emptyValue,F,t]),_=D.useMemo(()=>m.tempValueStrAndroid??b.getV6InputValueFromSections(m.sections,F,t),[m.sections,b,m.tempValueStrAndroid,F,t]);D.useEffect(()=>(T.current&&T.current===hn(document)&&O("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);const de=D.useMemo(()=>f==null||m.sections[f].contentType==="letter"?"text":"numeric",[f,m.sections]),Y=!(T.current&&T.current===hn(document))&&R;return{interactions:A,returnedValue:{readOnly:d,onBlur:w,onClick:H,onFocus:W,onPaste:j,inputRef:L,enableAccessibleFieldDOMStructure:!1,placeholder:J,inputMode:de,autoComplete:"off",value:Y?"":_,onChange:V}}},rF=e=>{const t=Rt(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:i=!1,disabled:a=!1,readOnly:s=!1},forwardedProps:{onKeyDown:l,error:u,clearable:d,onClear:p},fieldValueManager:h,valueManager:f,validator:m}=e,b=Vn(),x=XN(e),{state:y,activeSectionIndex:E,parsedSelectedSections:C,setSelectedSections:k,clearValue:v,clearActiveSection:S,updateSectionValue:N,setTempAndroidValueStr:O,sectionsValueBoundaries:B,localizedDigits:R,timezone:F}=x,T=JN({sections:y.sections,updateSectionValue:N,sectionsValueBoundaries:B,localizedDigits:R,setTempAndroidValueStr:O,timezone:F}),{resetCharacterQuery:L}=T,I=f.areValuesEqual(t,y.value,f.emptyValue),A=i?eF:nF,M=D.useMemo(()=>gL(y.sections,b&&!i),[y.sections,b,i]),{returnedValue:W,interactions:H}=A(U({},e,x,T,{areAllSectionsEmpty:I,sectionOrder:M})),j=Ae(Z=>{if(l?.(Z),!a)switch(!0){case((Z.ctrlKey||Z.metaKey)&&String.fromCharCode(Z.keyCode)==="A"&&!Z.shiftKey&&!Z.altKey):{Z.preventDefault(),k("all");break}case Z.key==="ArrowRight":{if(Z.preventDefault(),C==null)k(M.startIndex);else if(C==="all")k(M.endIndex);else{const Y=M.neighbors[C].rightIndex;Y!==null&&k(Y)}break}case Z.key==="ArrowLeft":{if(Z.preventDefault(),C==null)k(M.endIndex);else if(C==="all")k(M.startIndex);else{const Y=M.neighbors[C].leftIndex;Y!==null&&k(Y)}break}case Z.key==="Delete":{if(Z.preventDefault(),s)break;C==null||C==="all"?v():S(),L();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(Z.key):{if(Z.preventDefault(),s||E==null)break;C==="all"&&k(E);const Y=y.sections[E],te=h.getActiveDateManager(t,y,Y),X=lL(t,F,Y,Z.key,B,R,te.date,{minutesStep:o});N({activeSection:Y,newSectionValue:X,shouldGoToNextSection:!1});break}}});Wt(()=>{H.syncSelectionToDOM()});const{hasValidationError:w}=Mb({props:n,validator:m,timezone:F,value:y.value,onError:n.onError}),V=D.useMemo(()=>u!==void 0?u:w,[w,u]);D.useEffect(()=>{!V&&E==null&&L()},[y.referenceValue,E,V]),D.useEffect(()=>{y.tempValueStrAndroid!=null&&E!=null&&(L(),S())},[y.sections]),D.useImperativeHandle(r,()=>({getSections:()=>y.sections,getActiveSectionIndex:H.getActiveSectionIndexFromDOM,setSelectedSections:H.setSelectedSections,focusField:H.focusField,isFieldFocused:H.isFieldFocused}));const J=Ae((Z,...Y)=>{Z.preventDefault(),p?.(Z,...Y),v(),H.isFieldFocused()?k(M.startIndex):H.focusField(0)}),_={onKeyDown:j,onClear:J,error:V,clearable:!!(d&&!I&&!s&&!a)},de={disabled:a,readOnly:s};return U({},e.forwardedProps,_,de,W)},oF=["clearable","onClear","InputProps","sx","slots","slotProps"],iF=["ownerState"],aF=e=>{const t=Nr(),{clearable:n,onClear:r,InputProps:o,sx:i,slots:a,slotProps:s}=e,l=$e(e,oF),u=a?.clearButton??wn,d=rt({elementType:u,externalSlotProps:s?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),p=$e(d,iF),h=a?.clearIcon??VN,f=rt({elementType:h,externalSlotProps:s?.clearIcon,ownerState:{}});return U({},l,{InputProps:U({},o,{endAdornment:c.jsxs(D.Fragment,{children:[n&&c.jsx(Ob,{position:"end",sx:{marginRight:o?.endAdornment?-1:-1.5},children:c.jsx(u,U({},p,{onClick:r,children:c.jsx(h,U({fontSize:"small"},f))}))}),o?.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(i)?i:[i]]})},sF=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],lF=(e,t)=>D.useMemo(()=>{const n=U({},e),r={},o=i=>{n.hasOwnProperty(i)&&(r[i]=n[i],delete n[i])};return sF.forEach(o),Pb.forEach(o),{forwardedProps:n,internalProps:r}},[e,t]),uF=e=>{const t=Rt(),n=Ga();return U({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??t.formats.keyboardDate,minDate:Un(t,e.minDate,n.minDate),maxDate:Un(t,e.maxDate,n.maxDate)})},cF=e=>{const t=uF(e),{forwardedProps:n,internalProps:r}=lF(t,"date");return rF({forwardedProps:n,internalProps:r,valueManager:pr,fieldValueManager:EL,validator:Qa,valueType:"date"})};function dF(e){return _e("MuiPickersTextField",e)}Me("MuiPickersTextField",["root","focused","disabled","error","required"]);function pF(e){return _e("MuiPickersInputBase",e)}const ri=Me("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function fF(e){return _e("MuiPickersSectionList",e)}const Gi=Me("MuiPickersSectionList",["root","section","sectionContent"]),hF=["slots","slotProps","elements","sectionListRef"],Hb=ie("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),Ub=ie("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),zb=ie("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),Vb=ie("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),mF=e=>{const{classes:t}=e;return Fe({root:["root"],section:["section"],sectionContent:["sectionContent"]},fF,t)};function gF(e){const{slots:t,slotProps:n,element:r,classes:o}=e,i=t?.section??Ub,a=rt({elementType:i,externalSlotProps:n?.section,externalForwardedProps:r.container,className:o.section,ownerState:{}}),s=t?.sectionContent??Vb,l=rt({elementType:s,externalSlotProps:n?.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:{}}),u=t?.sectionSeparator??zb,d=rt({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),p=rt({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return c.jsxs(i,U({},a,{children:[c.jsx(u,U({},d)),c.jsx(s,U({},l)),c.jsx(u,U({},p))]}))}const bF=D.forwardRef(function(t,n){const r=wt({props:t,name:"MuiPickersSectionList"}),{slots:o,slotProps:i,elements:a,sectionListRef:s}=r,l=$e(r,hF),u=mF(r),d=D.useRef(null),p=ot(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};D.useImperativeHandle(s,()=>({getRoot(){return h("getRoot")},getSectionContainer(b){return h("getSectionContainer").querySelector(`.${Gi.section}[data-sectionindex="${b}"]`)},getSectionContent(b){return h("getSectionContent").querySelector(`.${Gi.section}[data-sectionindex="${b}"] .${Gi.sectionContent}`)},getSectionIndexFromDOMElement(b){const x=h("getSectionIndexFromDOMElement");if(b==null||!x.contains(b))return null;let y=null;return b.classList.contains(Gi.section)?y=b:b.classList.contains(Gi.sectionContent)&&(y=b.parentElement),y==null?null:Number(y.dataset.sectionindex)}}));const f=o?.root??Hb,m=rt({elementType:f,externalSlotProps:i?.root,externalForwardedProps:l,additionalProps:{ref:p,suppressContentEditableWarning:!0},className:u.root,ownerState:{}});return c.jsx(f,U({},m,{children:m.contentEditable?a.map(({content:b,before:x,after:y})=>`${x.children}${b.children}${y.children}`).join(""):c.jsx(D.Fragment,{children:a.map((b,x)=>c.jsx(gF,{slots:o,slotProps:i,element:b,classes:u},x))})}))}),xF=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],yF=e=>Math.round(e*1e5)/1e5,Vl=ie("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>U({},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:`${yF(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),Xd=ie(Hb,{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}}]})),EF=ie(Ub,{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"})),CF=ie(Vb,{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"})),TF=ie(zb,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),vF=ie("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(U({},KO)),SF=e=>{const{focused:t,disabled:n,error:r,classes:o,fullWidth:i,readOnly:a,color:s,size:l,endAdornment:u,startAdornment:d}=e,p={root:["root",t&&!n&&"focused",n&&"disabled",a&&"readOnly",r&&"error",i&&"fullWidth",`color${ke(s)}`,l==="small"&&"inputSizeSmall",!!d&&"adornedStart",!!u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return Fe(p,pF,o)},Zd=D.forwardRef(function(t,n){const r=wt({props:t,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:i,value:a,onChange:s,id:l,endAdornment:u,startAdornment:d,renderSuffix:p,slots:h,slotProps:f,contentEditable:m,tabIndex:b,onInput:x,onPaste:y,onKeyDown:E,name:C,readOnly:k,inputProps:v,inputRef:S,sectionListRef:N}=r,O=$e(r,xF),B=D.useRef(null),R=ot(n,B),F=ot(v?.ref,S),T=Vn(),L=Yn();if(!L)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const I=w=>{if(L.disabled){w.stopPropagation();return}L.onFocus?.(w)};D.useEffect(()=>{L&&L.setAdornedStart(!!d)},[L,d]),D.useEffect(()=>{L&&(i?L.onEmpty():L.onFilled())},[L,i]);const A=U({},r,L,{isRtl:T}),M=SF(A),W=h?.root||Vl,H=rt({elementType:W,externalSlotProps:f?.root,externalForwardedProps:O,additionalProps:{"aria-invalid":L.error,ref:R},className:M.root,ownerState:A}),j=h?.input||Xd;return c.jsxs(W,U({},H,{children:[d,c.jsx(bF,{sectionListRef:N,elements:o,contentEditable:m,tabIndex:b,className:M.sectionsContainer,onFocus:I,onBlur:L.onBlur,onInput:x,onPaste:y,onKeyDown:E,slots:{root:j,section:EF,sectionContent:CF,sectionSeparator:TF},slotProps:{root:{ownerState:A},sectionContent:{className:ri.sectionContent},sectionSeparator:({position:w})=>({className:w==="before"?ri.sectionBefore:ri.sectionAfter})}}),u,p?p(U({},L)):null,c.jsx(vF,U({name:C,className:M.input,value:a,onChange:s,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:k,required:L.required,disabled:L.disabled},v,{ref:F}))]}))});function kF(e){return _e("MuiPickersOutlinedInput",e)}const Qn=U({},ri,Me("MuiPickersOutlinedInput",["root","notchedOutline","input"])),DF=["children","className","label","notched","shrink"],wF=ie("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}}),Am=ie("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),IF=ie("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 AF(e){const{className:t,label:n}=e,r=$e(e,DF),o=n!=null&&n!=="",i=U({},e,{withLabel:o});return c.jsx(wF,U({"aria-hidden":!0,className:t},r,{ownerState:i,children:c.jsx(IF,{ownerState:i,children:o?c.jsx(Am,{children:n}):c.jsx(Am,{className:"notranslate",children:""})})}))}const PF=["label","autoFocus","ownerState","notched"],RF=ie(Vl,{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 .${Qn.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Qn.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Qn.focused} .${Qn.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${Qn.disabled}`]:{[`& .${Qn.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${Qn.error} .${Qn.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:{[`&.${Qn.focused}:not(.${Qn.error}) .${Qn.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),MF=ie(Xd,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),OF=e=>{const{classes:t}=e,r=Fe({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},kF,t);return U({},t,r)},Wb=D.forwardRef(function(t,n){const r=wt({props:t,name:"MuiPickersOutlinedInput"}),{label:o,ownerState:i,notched:a}=r,s=$e(r,PF),l=Yn(),u=U({},r,i,l,{color:l?.color||"primary"}),d=OF(u);return c.jsx(Zd,U({slots:{root:RF,input:MF},renderSuffix:p=>c.jsx(AF,{shrink:!!(a||p.adornedStart||p.focused||p.filled),notched:!!(a||p.adornedStart||p.focused||p.filled),className:d.notchedOutline,label:o!=null&&o!==""&&l?.required?c.jsxs(D.Fragment,{children:[o," ","*"]}):o,ownerState:u})},s,{label:o,classes:d,ref:n}))});Wb.muiName="Input";function LF(e){return _e("MuiPickersFilledInput",e)}const ao=U({},ri,Me("MuiPickersFilledInput",["root","underline","input"])),NF=["label","autoFocus","disableUnderline","ownerState"],FF=ie(Vl,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>dt.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)",i=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}},[`&.${ao.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${ao.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((e.vars??e).palette).filter(a=>(e.vars??e).palette[a].main).map(a=>({props:{color:a,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[a]?.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"},[`&.${ao.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ao.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(.${ao.disabled}, .${ao.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${ao.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:a})=>!!a,style:{paddingLeft:12}},{props:({endAdornment:a})=>!!a,style:{paddingRight:12}}]}}),_F=ie(Xd,{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}}]}),BF=e=>{const{classes:t,disableUnderline:n}=e,o=Fe({root:["root",!n&&"underline"],input:["input"]},LF,t);return U({},t,o)},qb=D.forwardRef(function(t,n){const r=wt({props:t,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:i=!1,ownerState:a}=r,s=$e(r,NF),l=Yn(),u=U({},r,a,l,{color:l?.color||"primary"}),d=BF(u);return c.jsx(Zd,U({slots:{root:FF,input:_F},slotProps:{root:{disableUnderline:i}}},s,{label:o,classes:d,ref:n}))});qb.muiName="Input";function jF(e){return _e("MuiPickersFilledInput",e)}const Qi=U({},ri,Me("MuiPickersInput",["root","input"])),$F=["label","autoFocus","disableUnderline","ownerState"],HF=ie(Vl,{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"},[`&.${Qi.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Qi.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(.${Qi.disabled}, .${Qi.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Qi.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),UF=e=>{const{classes:t,disableUnderline:n}=e,o=Fe({root:["root",!n&&"underline"],input:["input"]},jF,t);return U({},t,o)},Yb=D.forwardRef(function(t,n){const r=wt({props:t,name:"MuiPickersInput"}),{label:o,disableUnderline:i=!1,ownerState:a}=r,s=$e(r,$F),l=Yn(),u=U({},r,a,l,{disableUnderline:i,color:l?.color||"primary"}),d=UF(u);return c.jsx(Zd,U({slots:{root:HF}},s,{label:o,classes:d,ref:n}))});Yb.muiName="Input";const zF=["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"],VF={standard:Yb,filled:qb,outlined:Wb},WF=ie(rl,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({maxWidth:"100%"}),qF=e=>{const{focused:t,disabled:n,classes:r,required:o}=e;return Fe({root:["root",t&&!n&&"focused",n&&"disabled",o&&"required"]},dF,r)},YF=D.forwardRef(function(t,n){const r=wt({props:t,name:"MuiPickersTextField"}),{onFocus:o,onBlur:i,className:a,color:s="primary",disabled:l=!1,error:u=!1,variant:d="outlined",required:p=!1,InputProps:h,inputProps:f,inputRef:m,sectionListRef:b,elements:x,areAllSectionsEmpty:y,onClick:E,onKeyDown:C,onKeyUp:k,onPaste:v,onInput:S,endAdornment:N,startAdornment:O,tabIndex:B,contentEditable:R,focused:F,value:T,onChange:L,fullWidth:I,id:A,name:M,helperText:W,FormHelperTextProps:H,label:j,InputLabelProps:w}=r,V=$e(r,zF),J=D.useRef(null),_=ot(n,J),de=Jn(A),Z=W&&de?`${de}-helper-text`:void 0,Y=j&&de?`${de}-label`:void 0,te=U({},r,{color:s,disabled:l,error:u,focused:F,required:p,variant:d}),X=qF(te),re=VF[d];return c.jsxs(WF,U({className:Pe(X.root,a),ref:_,focused:F,onFocus:o,onBlur:i,disabled:l,variant:d,error:u,color:s,fullWidth:I,required:p,ownerState:te},V,{children:[c.jsx(nl,U({htmlFor:de,id:Y},w,{children:j})),c.jsx(re,U({elements:x,areAllSectionsEmpty:y,onClick:E,onKeyDown:C,onKeyUp:k,onInput:S,onPaste:v,endAdornment:N,startAdornment:O,tabIndex:B,contentEditable:R,value:T,onChange:L,id:de,fullWidth:I,inputProps:f,inputRef:m,sectionListRef:b,label:j,name:M,role:"group","aria-labelledby":Y,"aria-describedby":Z,"aria-live":Z?"polite":void 0},h)),W&&c.jsx(W1,U({id:Z},H,{children:W}))]}))}),KF=["enableAccessibleFieldDOMStructure"],GF=["InputProps","readOnly"],QF=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],XF=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=$e(e,KF);if(t){const{InputProps:p,readOnly:h}=n,f=$e(n,GF);return U({},f,{InputProps:U({},p??{},{readOnly:h})})}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:a,InputProps:s,inputProps:l,inputRef:u}=n,d=$e(n,QF);return U({},d,{InputProps:U({},s??{},{readOnly:a}),inputProps:U({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:u})})},ZF=["slots","slotProps","InputProps","inputProps"],Kb=D.forwardRef(function(t,n){const r=wt({props:t,name:"MuiDateField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=$e(r,ZF),u=r,d=o?.textField??(t.enableAccessibleFieldDOMStructure?YF:Qe),p=rt({elementType:d,externalSlotProps:i?.textField,externalForwardedProps:l,additionalProps:{ref:n},ownerState:u});p.inputProps=U({},s,p.inputProps),p.InputProps=U({},a,p.InputProps);const h=cF(p),f=XF(h),m=aF(U({},f,{slots:o,slotProps:i}));return c.jsx(d,U({},m))}),Gb=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a,timezone:s})=>{const l=Mo();return D.useCallback(u=>Qa({adapter:l,value:u,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a}})!==null,[l,e,t,n,r,o,i,a,s])},JF=(e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return U({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const i=o.newTimezone;if(n.getTimezone(r.currentMonth)===i)return r;let a=n.setTimezone(r.currentMonth,i);return n.getMonth(a)!==n.getMonth(r.currentMonth)&&(a=n.setMonth(a,n.getMonth(r.currentMonth))),U({},r,{currentMonth:a})}case"finishMonthSwitchingAnimation":return U({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(r.focusedDay!=null&&o.focusedDay!=null&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const i=o.focusedDay!=null&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return U({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:i&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:o.focusedDay!=null&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},e_=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:i=!1,maxDate:a,minDate:s,onMonthChange:l,reduceAnimations:u,shouldDisableDate:d,timezone:p}=e,h=Rt(),f=D.useRef(JF(!!u,i,h)).current,m=D.useMemo(()=>pr.getInitialReferenceValue({value:t,utils:h,timezone:p,props:e,referenceDate:n,granularity:sr.day}),[n,p]),[b,x]=D.useReducer(f,{isMonthSwitchingAnimating:!1,focusedDay:m,currentMonth:h.startOfMonth(m),slideDirection:"left"});D.useEffect(()=>{x({type:"changeMonthTimezone",newTimezone:h.getTimezone(m)})},[m,h]);const y=D.useCallback(S=>{x(U({type:"changeMonth"},S)),l&&l(S.newMonth)},[l]),E=D.useCallback(S=>{const N=S;h.isSameMonth(N,b.currentMonth)||y({newMonth:h.startOfMonth(N),direction:h.isAfterDay(N,b.currentMonth)?"left":"right"})},[b.currentMonth,y,h]),C=Gb({shouldDisableDate:d,minDate:s,maxDate:a,disableFuture:r,disablePast:o,timezone:p}),k=D.useCallback(()=>{x({type:"finishMonthSwitchingAnimation"})},[]),v=Ae((S,N)=>{C(S)||x({type:"changeFocusedDay",focusedDay:S,withoutMonthSwitchingAnimation:N})});return{referenceDate:m,calendarState:b,changeMonth:E,changeFocusedDay:v,isDateDisabled:C,onMonthSwitchingAnimationEnd:k,handleChangeMonth:y}},t_=e=>_e("MuiPickersFadeTransitionGroup",e);Me("MuiPickersFadeTransitionGroup",["root"]);const n_=e=>{const{classes:t}=e;return Fe({root:["root"]},t_,t)},r_=ie(qa,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function Qb(e){const t=wt({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=n_(t),s=Gr();return o?n:c.jsx(r_,{className:Pe(a.root,r),children:c.jsx(So,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:n},i)})}function o_(e){return _e("MuiPickersDay",e)}const so=Me("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),i_=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],a_=e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:i,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e,u=a&&!s;return Fe({root:["root",t&&!u&&"selected",i&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",a&&s&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},o_,l)},Xb=({theme:e})=>U({},e.typography.caption,{width:Aa,height:Aa,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})`:dt.alpha(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:dt.alpha(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${so.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${so.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}},[`&.${so.disabled}:not(.${so.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${so.disabled}&.${so.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${Ul}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${so.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),Zb=(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]},s_=ie(vo,{name:"MuiPickersDay",slot:"Root",overridesResolver:Zb})(Xb),l_=ie("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Zb})(({theme:e})=>U({},Xb({theme:e}),{opacity:0,pointerEvents:"none"})),Xi=()=>{},u_=D.forwardRef(function(t,n){const r=wt({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,day:a,disabled:s=!1,disableHighlightToday:l=!1,disableMargin:u=!1,isAnimating:d,onClick:p,onDaySelect:h,onFocus:f=Xi,onBlur:m=Xi,onKeyDown:b=Xi,onMouseDown:x=Xi,onMouseEnter:y=Xi,outsideCurrentMonth:E,selected:C=!1,showDaysOutsideCurrentMonth:k=!1,children:v,today:S=!1}=r,N=$e(r,i_),O=U({},r,{autoFocus:o,disabled:s,disableHighlightToday:l,disableMargin:u,selected:C,showDaysOutsideCurrentMonth:k,today:S}),B=a_(O),R=Rt(),F=D.useRef(null),T=ot(F,n);Wt(()=>{o&&!s&&!d&&!E&&F.current.focus()},[o,s,d,E]);const L=A=>{x(A),E&&A.preventDefault()},I=A=>{s||h(a),E&&A.currentTarget.focus(),p&&p(A)};return E&&!k?c.jsx(l_,{className:Pe(B.root,B.hiddenDaySpacingFiller,i),ownerState:O,role:N.role}):c.jsx(s_,U({className:Pe(B.root,i),ref:T,centerRipple:!0,disabled:s,tabIndex:C?0:-1,onKeyDown:A=>b(A,a),onFocus:A=>f(A,a),onBlur:A=>m(A,a),onMouseEnter:A=>y(A,a),onClick:I,onMouseDown:L},N,{ownerState:O,children:v||R.format(a,"dayOfMonth")}))}),c_=D.memo(u_),d_=e=>_e("MuiPickersSlideTransition",e),Rn=Me("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),p_=["children","className","reduceAnimations","slideDirection","transKey","classes"],f_=e=>{const{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Fe(r,d_,t)},h_=ie(qa,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Rn["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Rn["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Rn.slideEnterActive}`]:t.slideEnterActive},{[`.${Rn.slideExit}`]:t.slideExit},{[`.${Rn["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Rn["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},[`& .${Rn["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Rn["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Rn.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Rn.slideExit}`]:{transform:"translate(0%)"},[`& .${Rn["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Rn["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function m_(e){const t=wt({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=$e(t,p_),s=f_(t),l=Gr();if(o)return c.jsx("div",{className:Pe(s.root,r),children:n});const u={exit:s.exit,enterActive:s.enterActive,enter:s.enter,exitActive:s.exitActive};return c.jsx(h_,{className:Pe(s.root,r),childFactory:d=>D.cloneElement(d,{classNames:u}),role:"presentation",children:c.jsx(Dd,U({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:u},a,{children:n}),i)})}const g_=e=>_e("MuiDayCalendar",e);Me("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const b_=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],x_=["ownerState"],y_=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"]},g_,t)},Jb=(Aa+Ul*2)*6,E_=ie("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),C_=ie("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),T_=ie(xt,{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})),v_=ie(xt,{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})),S_=ie(xt,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>U({},e.typography.caption,{width:Aa,height:Aa,padding:0,margin:`0 ${Ul}px`,color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),k_=ie("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:Jb}),D_=ie(m_,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:Jb}),w_=ie("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),I_=ie("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${Ul}px 0`,display:"flex",justifyContent:"center"});function A_(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:a,isViewFocused:s}=e,l=$e(e,b_);const{disabled:u,disableHighlightToday:d,isMonthSwitchingAnimating:p,showDaysOutsideCurrentMonth:h,slots:f,slotProps:m,timezone:b}=t,x=Rt(),y=Hl(b),E=r!==null&&x.isSameDay(n,r),C=o.some(T=>x.isSameDay(T,n)),k=x.isSameDay(n,y),v=f?.day??c_,S=rt({elementType:v,externalSlotProps:m?.day,additionalProps:U({disableHighlightToday:d,showDaysOutsideCurrentMonth:h,role:"gridcell",isAnimating:p,"data-timestamp":x.toJsDate(n).valueOf()},l),ownerState:U({},t,{day:n,selected:C})}),N=$e(S,x_),O=D.useMemo(()=>u||i(n),[u,i,n]),B=D.useMemo(()=>x.getMonth(n)!==a,[x,n,a]),R=D.useMemo(()=>{const T=x.startOfMonth(x.setMonth(n,a));return h?x.isSameDay(n,x.startOfWeek(T)):x.isSameDay(n,T)},[a,n,h,x]),F=D.useMemo(()=>{const T=x.endOfMonth(x.setMonth(n,a));return h?x.isSameDay(n,x.endOfWeek(T)):x.isSameDay(n,T)},[a,n,h,x]);return c.jsx(v,U({},N,{day:n,disabled:O,autoFocus:s&&E,today:k,outsideCurrentMonth:B,isFirstVisibleCell:R,isLastVisibleCell:F,selected:C,tabIndex:E?0:-1,"aria-selected":C,"aria-current":k?"date":void 0}))}function P_(e){const t=wt({props:e,name:"MuiDayCalendar"}),n=Rt(),{onFocusedDayChange:r,className:o,currentMonth:i,selectedDays:a,focusedDay:s,loading:l,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:d,readOnly:p,reduceAnimations:h,renderLoading:f=()=>c.jsx("span",{children:"..."}),slideDirection:m,TransitionProps:b,disablePast:x,disableFuture:y,minDate:E,maxDate:C,shouldDisableDate:k,shouldDisableMonth:v,shouldDisableYear:S,dayOfWeekFormatter:N=pe=>n.format(pe,"weekdayShort").charAt(0).toUpperCase(),hasFocus:O,onFocusedViewChange:B,gridLabelId:R,displayWeekNumber:F,fixedWeekNumber:T,autoFocus:L,timezone:I}=t,A=Hl(I),M=y_(t),W=Vn(),H=Gb({shouldDisableDate:k,shouldDisableMonth:v,shouldDisableYear:S,minDate:E,maxDate:C,disablePast:x,disableFuture:y,timezone:I}),j=Nr(),[w,V]=Sn({name:"DayCalendar",state:"hasFocus",controlled:O,default:L??!1}),[J,_]=D.useState(()=>s||A),de=Ae(pe=>{p||u(pe)}),Z=pe=>{H(pe)||(r(pe),_(pe),B?.(!0),V(!0))},Y=Ae((pe,be)=>{switch(pe.key){case"ArrowUp":Z(n.addDays(be,-7)),pe.preventDefault();break;case"ArrowDown":Z(n.addDays(be,7)),pe.preventDefault();break;case"ArrowLeft":{const le=n.addDays(be,W?1:-1),Re=n.addMonths(be,W?1:-1),ve=ya({utils:n,date:le,minDate:W?le:n.startOfMonth(Re),maxDate:W?n.endOfMonth(Re):le,isDateDisabled:H,timezone:I});Z(ve||le),pe.preventDefault();break}case"ArrowRight":{const le=n.addDays(be,W?-1:1),Re=n.addMonths(be,W?-1:1),ve=ya({utils:n,date:le,minDate:W?n.startOfMonth(Re):le,maxDate:W?le:n.endOfMonth(Re),isDateDisabled:H,timezone:I});Z(ve||le),pe.preventDefault();break}case"Home":Z(n.startOfWeek(be)),pe.preventDefault();break;case"End":Z(n.endOfWeek(be)),pe.preventDefault();break;case"PageUp":Z(n.addMonths(be,1)),pe.preventDefault();break;case"PageDown":Z(n.addMonths(be,-1)),pe.preventDefault();break}}),te=Ae((pe,be)=>Z(be)),X=Ae((pe,be)=>{w&&n.isSameDay(J,be)&&B?.(!1)}),re=n.getMonth(i),Q=n.getYear(i),K=D.useMemo(()=>a.filter(pe=>!!pe).map(pe=>n.startOfDay(pe)),[n,a]),ae=`${Q}-${re}`,ee=D.useMemo(()=>D.createRef(),[ae]),ne=D.useMemo(()=>{const pe=n.startOfMonth(i),be=n.endOfMonth(i);return H(J)||n.isAfterDay(J,be)||n.isBeforeDay(J,pe)?ya({utils:n,date:J,minDate:pe,maxDate:be,disablePast:x,disableFuture:y,isDateDisabled:H,timezone:I}):J},[i,y,x,J,H,n,I]),ye=D.useMemo(()=>{const pe=n.getWeekArray(i);let be=n.addMonths(i,1);for(;T&&pe.length<T;){const le=n.getWeekArray(be),Re=n.isSameDay(pe[pe.length-1][0],le[0][0]);le.slice(Re?1:0).forEach(ve=>{pe.length<T&&pe.push(ve)}),be=n.addMonths(be,1)}return pe},[i,T,n]);return c.jsxs(E_,{role:"grid","aria-labelledby":R,className:M.root,children:[c.jsxs(C_,{role:"row",className:M.header,children:[F&&c.jsx(v_,{variant:"caption",role:"columnheader","aria-label":j.calendarWeekNumberHeaderLabel,className:M.weekNumberLabel,children:j.calendarWeekNumberHeaderText}),JO(n,A).map((pe,be)=>c.jsx(T_,{variant:"caption",role:"columnheader","aria-label":n.format(pe,"weekday"),className:M.weekDayLabel,children:N(pe)},be.toString()))]}),l?c.jsx(k_,{className:M.loadingContainer,children:f()}):c.jsx(D_,U({transKey:ae,onExited:d,reduceAnimations:h,slideDirection:m,className:Pe(o,M.slideTransition)},b,{nodeRef:ee,children:c.jsx(w_,{ref:ee,role:"rowgroup",className:M.monthContainer,children:ye.map((pe,be)=>c.jsxs(I_,{role:"row",className:M.weekContainer,"aria-rowindex":be+1,children:[F&&c.jsx(S_,{className:M.weekNumber,role:"rowheader","aria-label":j.calendarWeekNumberAriaLabelText(n.getWeekNumber(pe[0])),children:j.calendarWeekNumberText(n.getWeekNumber(pe[0]))}),pe.map((le,Re)=>c.jsx(A_,{parentProps:t,day:le,selectedDays:K,focusableDay:ne,onKeyDown:Y,onFocus:te,onBlur:X,onDaySelect:de,isDateDisabled:H,currentMonthNumber:re,isViewFocused:w,"aria-colindex":Re+1},le.toString()))]},`week-${pe[0]}`))})}))]})}function R_(e){return _e("MuiPickersMonth",e)}const hs=Me("MuiPickersMonth",["root","monthButton","disabled","selected"]),M_=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],O_=e=>{const{disabled:t,selected:n,classes:r}=e;return Fe({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},R_,r)},L_=ie("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%"}}]}),N_=ie("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${hs.disabled}`]:t.disabled},{[`&.${hs.selected}`]:t.selected}]})(({theme:e})=>U({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})`:dt.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:dt.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${hs.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${hs.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),F_=D.memo(function(t){const n=wt({props:t,name:"MuiPickersMonth"}),{autoFocus:r,className:o,children:i,disabled:a,selected:s,value:l,tabIndex:u,onClick:d,onKeyDown:p,onFocus:h,onBlur:f,"aria-current":m,"aria-label":b,slots:x,slotProps:y}=n,E=$e(n,M_),C=D.useRef(null),k=O_(n);Wt(()=>{r&&C.current?.focus()},[r]);const v=x?.monthButton??N_,S=rt({elementType:v,externalSlotProps:y?.monthButton,additionalProps:{children:i,disabled:a,tabIndex:u,ref:C,type:"button",role:"radio","aria-current":m,"aria-checked":s,"aria-label":b,onClick:N=>d(N,l),onKeyDown:N=>p(N,l),onFocus:N=>h(N,l),onBlur:N=>f(N,l)},ownerState:n,className:k.monthButton});return c.jsx(L_,U({className:Pe(k.root,o),ownerState:n},E,{children:c.jsx(v,U({},S))}))});function __(e){return _e("MuiMonthCalendar",e)}Me("MuiMonthCalendar",["root"]);const B_=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],j_=e=>{const{classes:t}=e;return Fe({root:["root"]},__,t)};function $_(e,t){const n=Rt(),r=Ga(),o=wt({props:e,name:t});return U({disableFuture:!1,disablePast:!1},o,{minDate:Un(n,o.minDate,r.minDate),maxDate:Un(n,o.maxDate,r.maxDate)})}const H_=ie("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:zl,boxSizing:"border-box"}),U_=D.forwardRef(function(t,n){const r=$_(t,"MuiMonthCalendar"),{className:o,value:i,defaultValue:a,referenceDate:s,disabled:l,disableFuture:u,disablePast:d,maxDate:p,minDate:h,onChange:f,shouldDisableMonth:m,readOnly:b,autoFocus:x=!1,onMonthFocus:y,hasFocus:E,onFocusedViewChange:C,monthsPerRow:k=3,timezone:v,gridLabelId:S,slots:N,slotProps:O}=r,B=$e(r,B_),{value:R,handleValueChange:F,timezone:T}=Gd({name:"MonthCalendar",timezone:v,value:i,defaultValue:a,referenceDate:s,onChange:f,valueManager:pr}),L=Hl(T),I=Vn(),A=Rt(),M=D.useMemo(()=>pr.getInitialReferenceValue({value:R,utils:A,props:r,timezone:T,referenceDate:s,granularity:sr.month}),[]),W=r,H=j_(W),j=D.useMemo(()=>A.getMonth(L),[A,L]),w=D.useMemo(()=>R!=null?A.getMonth(R):null,[R,A]),[V,J]=D.useState(()=>w||A.getMonth(M)),[_,de]=Sn({name:"MonthCalendar",state:"hasFocus",controlled:E,default:x??!1}),Z=Ae(ae=>{de(ae),C&&C(ae)}),Y=D.useCallback(ae=>{const ee=A.startOfMonth(d&&A.isAfter(L,h)?L:h),ne=A.startOfMonth(u&&A.isBefore(L,p)?L:p),ye=A.startOfMonth(ae);return A.isBefore(ye,ee)||A.isAfter(ye,ne)?!0:m?m(ye):!1},[u,d,p,h,L,m,A]),te=Ae((ae,ee)=>{if(b)return;const ne=A.setMonth(R??M,ee);F(ne)}),X=Ae(ae=>{Y(A.setMonth(R??M,ae))||(J(ae),Z(!0),y&&y(ae))});D.useEffect(()=>{J(ae=>w!==null&&ae!==w?w:ae)},[w]);const re=Ae((ae,ee)=>{switch(ae.key){case"ArrowUp":X((12+ee-3)%12),ae.preventDefault();break;case"ArrowDown":X((12+ee+3)%12),ae.preventDefault();break;case"ArrowLeft":X((12+ee+(I?1:-1))%12),ae.preventDefault();break;case"ArrowRight":X((12+ee+(I?-1:1))%12),ae.preventDefault();break}}),Q=Ae((ae,ee)=>{X(ee)}),K=Ae((ae,ee)=>{V===ee&&Z(!1)});return c.jsx(H_,U({ref:n,className:Pe(H.root,o),ownerState:W,role:"radiogroup","aria-labelledby":S},B,{children:Vd(A,R??M).map(ae=>{const ee=A.getMonth(ae),ne=A.format(ae,"monthShort"),ye=A.format(ae,"month"),pe=ee===w,be=l||Y(ae);return c.jsx(F_,{selected:pe,value:ee,onClick:te,onKeyDown:re,autoFocus:_&&ee===V,disabled:be,tabIndex:ee===V&&!be?0:-1,onFocus:Q,onBlur:K,"aria-current":j===ee?"date":void 0,"aria-label":ye,monthsPerRow:k,slots:N,slotProps:O,children:ne},ne)})}))});function z_(e){return _e("MuiPickersYear",e)}const ms=Me("MuiPickersYear",["root","yearButton","selected","disabled"]),V_=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],W_=e=>{const{disabled:t,selected:n,classes:r}=e;return Fe({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},z_,r)},q_=ie("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%"}}]}),Y_=ie("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${ms.disabled}`]:t.disabled},{[`&.${ms.selected}`]:t.selected}]})(({theme:e})=>U({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})`:dt.alpha(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:dt.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${ms.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${ms.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),K_=D.memo(function(t){const n=wt({props:t,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:i,disabled:a,selected:s,value:l,tabIndex:u,onClick:d,onKeyDown:p,onFocus:h,onBlur:f,"aria-current":m,slots:b,slotProps:x}=n,y=$e(n,V_),E=D.useRef(null),C=W_(n);Wt(()=>{r&&E.current?.focus()},[r]);const k=b?.yearButton??Y_,v=rt({elementType:k,externalSlotProps:x?.yearButton,additionalProps:{children:i,disabled:a,tabIndex:u,ref:E,type:"button",role:"radio","aria-current":m,"aria-checked":s,onClick:S=>d(S,l),onKeyDown:S=>p(S,l),onFocus:S=>h(S,l),onBlur:S=>f(S,l)},ownerState:n,className:C.yearButton});return c.jsx(q_,U({className:Pe(C.root,o),ownerState:n},y,{children:c.jsx(k,U({},v))}))});function G_(e){return _e("MuiYearCalendar",e)}Me("MuiYearCalendar",["root"]);const Q_=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],X_=e=>{const{classes:t}=e;return Fe({root:["root"]},G_,t)};function Z_(e,t){const n=Rt(),r=Ga(),o=wt({props:e,name:t});return U({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:Un(n,o.minDate,r.minDate),maxDate:Un(n,o.maxDate,r.maxDate)})}const J_=ie("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:zl,maxHeight:kN,boxSizing:"border-box",position:"relative"}),e7=D.forwardRef(function(t,n){const r=Z_(t,"MuiYearCalendar"),{autoFocus:o,className:i,value:a,defaultValue:s,referenceDate:l,disabled:u,disableFuture:d,disablePast:p,maxDate:h,minDate:f,onChange:m,readOnly:b,shouldDisableYear:x,onYearFocus:y,hasFocus:E,onFocusedViewChange:C,yearsOrder:k="asc",yearsPerRow:v,timezone:S,gridLabelId:N,slots:O,slotProps:B}=r,R=$e(r,Q_),{value:F,handleValueChange:T,timezone:L}=Gd({name:"YearCalendar",timezone:S,value:a,defaultValue:s,referenceDate:l,onChange:m,valueManager:pr}),I=Hl(L),A=Vn(),M=Rt(),W=D.useMemo(()=>pr.getInitialReferenceValue({value:F,utils:M,props:r,timezone:L,referenceDate:l,granularity:sr.year}),[]),H=r,j=X_(H),w=D.useMemo(()=>M.getYear(I),[M,I]),V=D.useMemo(()=>F!=null?M.getYear(F):null,[F,M]),[J,_]=D.useState(()=>V||M.getYear(W)),[de,Z]=Sn({name:"YearCalendar",state:"hasFocus",controlled:E,default:o??!1}),Y=Ae(le=>{Z(le),C&&C(le)}),te=D.useCallback(le=>{if(p&&M.isBeforeYear(le,I)||d&&M.isAfterYear(le,I)||f&&M.isBeforeYear(le,f)||h&&M.isAfterYear(le,h))return!0;if(!x)return!1;const Re=M.startOfYear(le);return x(Re)},[d,p,h,f,I,x,M]),X=Ae((le,Re)=>{if(b)return;const ve=M.setYear(F??W,Re);T(ve)}),re=Ae(le=>{te(M.setYear(F??W,le))||(_(le),Y(!0),y?.(le))});D.useEffect(()=>{_(le=>V!==null&&le!==V?V:le)},[V]);const Q=k!=="desc"?v*1:v*-1,K=A&&k==="asc"||!A&&k==="desc"?-1:1,ae=Ae((le,Re)=>{switch(le.key){case"ArrowUp":re(Re-Q),le.preventDefault();break;case"ArrowDown":re(Re+Q),le.preventDefault();break;case"ArrowLeft":re(Re-K),le.preventDefault();break;case"ArrowRight":re(Re+K),le.preventDefault();break}}),ee=Ae((le,Re)=>{re(Re)}),ne=Ae((le,Re)=>{J===Re&&Y(!1)}),ye=D.useRef(null),pe=ot(n,ye);D.useEffect(()=>{if(o||ye.current===null)return;const le=ye.current.querySelector('[tabindex="0"]');if(!le)return;const Re=le.offsetHeight,ve=le.offsetTop,ze=ye.current.clientHeight,De=ye.current.scrollTop,vt=ve+Re;Re>ze||ve<De||(ye.current.scrollTop=vt-ze/2-Re/2)},[o]);const be=M.getYearRange([f,h]);return k==="desc"&&be.reverse(),c.jsx(J_,U({ref:pe,className:Pe(j.root,i),ownerState:H,role:"radiogroup","aria-labelledby":N},R,{children:be.map(le=>{const Re=M.getYear(le),ve=Re===V,ze=u||te(le);return c.jsx(K_,{selected:ve,value:Re,onClick:X,onKeyDown:ae,autoFocus:de&&Re===J,disabled:ze,tabIndex:Re===J&&!ze?0:-1,onFocus:ee,onBlur:ne,"aria-current":w===Re?"date":void 0,yearsPerRow:v,slots:O,slotProps:B,children:M.format(le,"year")},M.format(le,"year"))})}))}),t7=e=>_e("MuiPickersCalendarHeader",e),n7=Me("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function r7(e){return _e("MuiPickersArrowSwitcher",e)}Me("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const o7=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],i7=["ownerState"],a7=["ownerState"],s7=ie("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),l7=ie("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),Pm=ie(wn,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),u7=e=>{const{classes:t}=e;return Fe({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},r7,t)},c7=D.forwardRef(function(t,n){const r=Vn(),o=wt({props:t,name:"MuiPickersArrowSwitcher"}),{children:i,className:a,slots:s,slotProps:l,isNextDisabled:u,isNextHidden:d,onGoToNext:p,nextLabel:h,isPreviousDisabled:f,isPreviousHidden:m,onGoToPrevious:b,previousLabel:x,labelId:y}=o,E=$e(o,o7),C=o,k=u7(C),v={isDisabled:u,isHidden:d,goTo:p,label:h},S={isDisabled:f,isHidden:m,goTo:b,label:x},N=s?.previousIconButton??Pm,O=rt({elementType:N,externalSlotProps:l?.previousIconButton,additionalProps:{size:"medium",title:S.label,"aria-label":S.label,disabled:S.isDisabled,edge:"end",onClick:S.goTo},ownerState:U({},C,{hidden:S.isHidden}),className:Pe(k.button,k.previousIconButton)}),B=s?.nextIconButton??Pm,R=rt({elementType:B,externalSlotProps:l?.nextIconButton,additionalProps:{size:"medium",title:v.label,"aria-label":v.label,disabled:v.isDisabled,edge:"start",onClick:v.goTo},ownerState:U({},C,{hidden:v.isHidden}),className:Pe(k.button,k.nextIconButton)}),F=s?.leftArrowIcon??HN,T=rt({elementType:F,externalSlotProps:l?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:C,className:k.leftArrowIcon}),L=$e(T,i7),I=s?.rightArrowIcon??UN,A=rt({elementType:I,externalSlotProps:l?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:C,className:k.rightArrowIcon}),M=$e(A,a7);return c.jsxs(s7,U({ref:n,className:Pe(k.root,a),ownerState:C},E,{children:[c.jsx(N,U({},O,{children:r?c.jsx(I,U({},M)):c.jsx(F,U({},L))})),i?c.jsx(xt,{variant:"subtitle1",component:"span",id:y,children:i}):c.jsx(l7,{className:k.spacer,ownerState:C}),c.jsx(B,U({},R,{children:r?c.jsx(F,U({},L)):c.jsx(I,U({},M))}))]}))});function d7(e,{disableFuture:t,maxDate:n,timezone:r}){const o=Rt();return D.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isBefore(i,n)?i:n);return!o.isAfter(a,e)},[t,n,e,o,r])}function p7(e,{disablePast:t,minDate:n,timezone:r}){const o=Rt();return D.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isAfter(i,n)?i:n);return!o.isBefore(a,e)},[t,n,e,o,r])}const f7=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],h7=["ownerState"],m7=e=>{const{classes:t}=e;return Fe({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},t7,t)},g7=ie("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}),b7=ie("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>U({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),x7=ie("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),y7=ie(wn,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${n7.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),E7=ie($N,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),C7=D.forwardRef(function(t,n){const r=Nr(),o=Rt(),i=wt({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:s,currentMonth:l,disabled:u,disableFuture:d,disablePast:p,maxDate:h,minDate:f,onMonthChange:m,onViewChange:b,view:x,reduceAnimations:y,views:E,labelId:C,className:k,timezone:v,format:S=`${o.formats.month} ${o.formats.year}`}=i,N=$e(i,f7),O=i,B=m7(i),R=a?.switchViewButton??y7,F=rt({elementType:R,externalSlotProps:s?.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(x)},ownerState:O,className:B.switchViewButton}),T=a?.switchViewIcon??E7,L=rt({elementType:T,externalSlotProps:s?.switchViewIcon,ownerState:O,className:B.switchViewIcon}),I=$e(L,h7),A=()=>m(o.addMonths(l,1),"left"),M=()=>m(o.addMonths(l,-1),"right"),W=d7(l,{disableFuture:d,maxDate:h,timezone:v}),H=p7(l,{disablePast:p,minDate:f,timezone:v}),j=()=>{if(!(E.length===1||!b||u))if(E.length===2)b(E.find(V=>V!==x)||E[0]);else{const V=E.indexOf(x)!==0?0:1;b(E[V])}};if(E.length===1&&E[0]==="year")return null;const w=o.formatByString(l,S);return c.jsxs(g7,U({},N,{ownerState:O,className:Pe(B.root,k),ref:n,children:[c.jsxs(b7,{role:"presentation",onClick:j,ownerState:O,"aria-live":"polite",className:B.labelContainer,children:[c.jsx(Qb,{reduceAnimations:y,transKey:w,children:c.jsx(x7,{id:C,ownerState:O,className:B.label,children:w})}),E.length>1&&!u&&c.jsx(R,U({},F,{children:c.jsx(T,U({},I))}))]}),c.jsx(So,{in:x==="day",appear:!y,enter:!y,children:c.jsx(c7,{slots:a,slotProps:s,onGoToPrevious:M,isPreviousDisabled:H,previousLabel:r.previousMonth,onGoToNext:A,isNextDisabled:W,nextLabel:r.nextMonth})})]}))}),T7=ie("div")({overflow:"hidden",width:zl,maxHeight:Qd,display:"flex",flexDirection:"column",margin:"0 auto"}),v7=e=>_e("MuiDateCalendar",e);Me("MuiDateCalendar",["root","viewTransitionContainer"]);const S7=["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"],k7=e=>{const{classes:t}=e;return Fe({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},v7,t)};function D7(e,t){const n=Rt(),r=Ga(),o=Lb(),i=wt({props:e,name:t});return U({},i,{loading:i.loading??!1,disablePast:i.disablePast??!1,disableFuture:i.disableFuture??!1,openTo:i.openTo??"day",views:i.views??["year","day"],reduceAnimations:i.reduceAnimations??o,renderLoading:i.renderLoading??(()=>c.jsx("span",{children:"..."})),minDate:Un(n,i.minDate,r.minDate),maxDate:Un(n,i.maxDate,r.maxDate)})}const w7=ie(T7,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:Qd}),I7=ie(Qb,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),A7=D.forwardRef(function(t,n){const r=Rt(),o=Jn(),i=D7(t,"MuiDateCalendar"),{autoFocus:a,onViewChange:s,value:l,defaultValue:u,referenceDate:d,disableFuture:p,disablePast:h,onChange:f,onYearChange:m,onMonthChange:b,reduceAnimations:x,shouldDisableDate:y,shouldDisableMonth:E,shouldDisableYear:C,view:k,views:v,openTo:S,className:N,disabled:O,readOnly:B,minDate:R,maxDate:F,disableHighlightToday:T,focusedView:L,onFocusedViewChange:I,showDaysOutsideCurrentMonth:A,fixedWeekNumber:M,dayOfWeekFormatter:W,slots:H,slotProps:j,loading:w,renderLoading:V,displayWeekNumber:J,yearsOrder:_,yearsPerRow:de,monthsPerRow:Z,timezone:Y}=i,te=$e(i,S7),{value:X,handleValueChange:re,timezone:Q}=Gd({name:"DateCalendar",timezone:Y,value:l,defaultValue:u,referenceDate:d,onChange:f,valueManager:pr}),{view:K,setView:ae,focusedView:ee,setFocusedView:ne,goToNextView:ye,setValueAndGoToNextView:pe}=Nb({view:k,views:v,openTo:S,onChange:re,onViewChange:s,autoFocus:a,focusedView:L,onFocusedViewChange:I}),{referenceDate:be,calendarState:le,changeFocusedDay:Re,changeMonth:ve,handleChangeMonth:ze,isDateDisabled:De,onMonthSwitchingAnimationEnd:vt}=e_({value:X,referenceDate:d,reduceAnimations:x,onMonthChange:b,minDate:R,maxDate:F,shouldDisableDate:y,disablePast:h,disableFuture:p,timezone:Q}),lt=O&&X||R,qe=O&&X||F,ue=`${o}-grid-label`,Ce=ee!==null,Oe=H?.calendarHeader??C7,He=rt({elementType:Oe,externalSlotProps:j?.calendarHeader,additionalProps:{views:v,view:K,currentMonth:le.currentMonth,onViewChange:ae,onMonthChange:(We,It)=>ze({newMonth:We,direction:It}),minDate:lt,maxDate:qe,disabled:O,disablePast:h,disableFuture:p,reduceAnimations:x,timezone:Q,labelId:ue},ownerState:i}),je=Ae(We=>{const It=r.startOfMonth(We),Lt=r.endOfMonth(We),yt=De(We)?ya({utils:r,date:We,minDate:r.isBefore(R,It)?It:R,maxDate:r.isAfter(F,Lt)?Lt:F,disablePast:h,disableFuture:p,isDateDisabled:De,timezone:Q}):We;yt?(pe(yt,"finish"),b?.(It)):(ye(),ve(It)),Re(yt,!0)}),Le=Ae(We=>{const It=r.startOfYear(We),Lt=r.endOfYear(We),yt=De(We)?ya({utils:r,date:We,minDate:r.isBefore(R,It)?It:R,maxDate:r.isAfter(F,Lt)?Lt:F,disablePast:h,disableFuture:p,isDateDisabled:De,timezone:Q}):We;yt?(pe(yt,"finish"),m?.(yt)):(ye(),ve(It)),Re(yt,!0)}),Je=Ae(We=>re(We&&al(r,We,X??be),"finish",K));D.useEffect(()=>{X!=null&&r.isValid(X)&&ve(X)},[X]);const gt=i,ft=k7(gt),se={disablePast:h,disableFuture:p,maxDate:F,minDate:R},xe={disableHighlightToday:T,readOnly:B,disabled:O,timezone:Q,gridLabelId:ue,slots:H,slotProps:j},Te=D.useRef(K);D.useEffect(()=>{Te.current!==K&&(ee===Te.current&&ne(K,!0),Te.current=K)},[ee,ne,K]);const Be=D.useMemo(()=>[X],[X]);return c.jsxs(w7,U({ref:n,className:Pe(ft.root,N),ownerState:gt},te,{children:[c.jsx(Oe,U({},He,{slots:H,slotProps:j})),c.jsx(I7,{reduceAnimations:x,className:ft.viewTransitionContainer,transKey:K,ownerState:gt,children:c.jsxs("div",{children:[K==="year"&&c.jsx(e7,U({},se,xe,{value:X,onChange:Le,shouldDisableYear:C,hasFocus:Ce,onFocusedViewChange:We=>ne("year",We),yearsOrder:_,yearsPerRow:de,referenceDate:be})),K==="month"&&c.jsx(U_,U({},se,xe,{hasFocus:Ce,className:N,value:X,onChange:je,shouldDisableMonth:E,onFocusedViewChange:We=>ne("month",We),monthsPerRow:Z,referenceDate:be})),K==="day"&&c.jsx(P_,U({},le,se,xe,{onMonthSwitchingAnimationEnd:vt,onFocusedDayChange:Re,reduceAnimations:x,selectedDays:Be,onSelectedDaysChange:Je,shouldDisableDate:y,shouldDisableMonth:E,shouldDisableYear:C,hasFocus:Ce,onFocusedViewChange:We=>ne("day",We),showDaysOutsideCurrentMonth:A,fixedWeekNumber:M,dayOfWeekFormatter:W,displayWeekNumber:J,loading:w,renderLoading:V}))]})})]}))}),oi=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:d,disableFuture:p,disablePast:h,minDate:f,maxDate:m,shouldDisableDate:b,shouldDisableMonth:x,shouldDisableYear:y,reduceAnimations:E,onMonthChange:C,monthsPerRow:k,onYearChange:v,yearsOrder:S,yearsPerRow:N,slots:O,slotProps:B,loading:R,renderLoading:F,disableHighlightToday:T,readOnly:L,disabled:I,showDaysOutsideCurrentMonth:A,dayOfWeekFormatter:M,sx:W,autoFocus:H,fixedWeekNumber:j,displayWeekNumber:w,timezone:V})=>c.jsx(A7,{view:e,onViewChange:t,views:n.filter(gm),focusedView:r&&gm(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:d,disableFuture:p,disablePast:h,minDate:f,maxDate:m,shouldDisableDate:b,shouldDisableMonth:x,shouldDisableYear:y,reduceAnimations:E,onMonthChange:C,monthsPerRow:k,onYearChange:v,yearsOrder:S,yearsPerRow:N,slots:O,slotProps:B,loading:R,renderLoading:F,disableHighlightToday:T,readOnly:L,disabled:I,showDaysOutsideCurrentMonth:A,dayOfWeekFormatter:M,sx:W,autoFocus:H,fixedWeekNumber:j,displayWeekNumber:w,timezone:V}),ex=D.forwardRef(function(t,n){const r=Nr(),o=Rt(),i=Ab(t,"MuiDesktopDatePicker"),a=U({day:oi,month:oi,year:oi},i.viewRenderers),s=U({},i,{viewRenderers:a,format:Wd(o,i,!1),yearsPerRow:i.yearsPerRow??4,slots:U({openPickerIcon:zN,field:Kb},i.slots),slotProps:U({},i.slotProps,{field:u=>U({},_n(i.slotProps?.field,u),Rb(i),{ref:n}),toolbar:U({hidden:!0},i.slotProps?.toolbar)})}),{renderPicker:l}=jN({props:s,valueManager:pr,valueType:"date",getOpenDialogAriaText:wb({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:s.localeText?.openDatePickerDialogue}),validator:Qa});return l()});ex.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:j1,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 P7=ie(gr)({[`& .${ga.container}`]:{outline:0},[`& .${ga.paper}`]:{outline:0,minWidth:zl}}),R7=ie(xr)({"&:first-of-type":{padding:0}});function M7(e){const{children:t,onDismiss:n,open:r,slots:o,slotProps:i}=e,a=o?.dialog??P7,s=o?.mobileTransition??So;return c.jsx(a,U({open:r,onClose:n},i?.dialog,{TransitionComponent:s,TransitionProps:i?.mobileTransition,PaperComponent:o?.mobilePaper,PaperProps:i?.mobilePaper,children:c.jsx(R7,{children:t})}))}const O7=["props","getOpenDialogAriaText"],L7=e=>{let{props:t,getOpenDialogAriaText:n}=e,r=$e(e,O7);const{slots:o,slotProps:i,className:a,sx:s,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:d,selectedSections:p,onSelectedSectionsChange:h,timezone:f,name:m,label:b,inputRef:x,readOnly:y,disabled:E,localeText:C}=t,k=D.useRef(null),v=Jn(),S=i?.toolbar?.hidden??!1,{open:N,actions:O,layoutProps:B,renderCurrentView:R,fieldProps:F,contextValue:T}=Fb(U({},r,{props:t,fieldRef:k,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),L=o.field,I=rt({elementType:L,externalSlotProps:i?.field,additionalProps:U({},F,S&&{id:v},!(E||y)&&{onClick:O.onOpen,onKeyDown:WL(O.onOpen)},{readOnly:y??!0,disabled:E,className:a,sx:s,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:d,selectedSections:p,onSelectedSectionsChange:h,timezone:f,label:b,name:m},x?{inputRef:x}:{}),ownerState:t});I.inputProps=U({},I.inputProps,{"aria-label":n(F.value)});const A=U({textField:o.textField},I.slots),M=o.layout??jb;let W=v;S&&(b?W=`${v}-label`:W=void 0);const H=U({},i,{toolbar:U({},i?.toolbar,{titleId:v}),mobilePaper:U({"aria-labelledby":W},i?.mobilePaper)}),j=ot(k,I.unstableFieldRef);return{renderPicker:()=>c.jsxs($b,{contextValue:T,localeText:C,children:[c.jsx(L,U({},I,{slots:A,slotProps:H,unstableFieldRef:j})),c.jsx(M7,U({},O,{open:N,slots:o,slotProps:H,children:c.jsx(M,U({},B,H?.layout,{slots:o,slotProps:H,children:R()}))}))]})}},tx=D.forwardRef(function(t,n){const r=Nr(),o=Rt(),i=Ab(t,"MuiMobileDatePicker"),a=U({day:oi,month:oi,year:oi},i.viewRenderers),s=U({},i,{viewRenderers:a,format:Wd(o,i,!1),slots:U({field:Kb},i.slots),slotProps:U({},i.slotProps,{field:u=>U({},_n(i.slotProps?.field,u),Rb(i),{ref:n}),toolbar:U({hidden:!1},i.slotProps?.toolbar)})}),{renderPicker:l}=L7({props:s,valueManager:pr,valueType:"date",getOpenDialogAriaText:wb({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:s.localeText?.openDatePickerDialogue}),validator:Qa});return l()});tx.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:j1,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 N7=["desktopModeMediaQuery"],$u=D.forwardRef(function(t,n){const r=wt({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=qL}=r,i=$e(r,N7);return Eb(o,{defaultMatches:!0})?c.jsx(ex,U({ref:n},i)):c.jsx(tx,U({ref:n},i))});var Ls={exports:{}},F7=Ls.exports,Rm;function _7(){return Rm||(Rm=1,(function(e,t){(function(n,r){e.exports=r()})(F7,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(i,a,s){var l=a.prototype;s.utc=function(b){var x={date:b,utc:!0,args:arguments};return new a(x)},l.utc=function(b){var x=s(this.toDate(),{locale:this.$L,utc:!0});return b?x.add(this.utcOffset(),n):x},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 p=l.utcOffset;l.utcOffset=function(b,x){var y=this.$utils().u;if(y(b))return this.$u?0:y(this.$offset)?p.call(this):this.$offset;if(typeof b=="string"&&(b=(function(v){v===void 0&&(v="");var S=v.match(r);if(!S)return null;var N=(""+S[0]).match(o)||["-",0,0],O=N[0],B=60*+N[1]+ +N[2];return B===0?0:O==="+"?B:-B})(b),b===null))return this;var E=Math.abs(b)<=16?60*b:b;if(E===0)return this.utc(x);var C=this.clone();if(x)return C.$offset=E,C.$u=!1,C;var k=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(C=this.local().add(E+k,n)).$offset=E,C.$x.$localOffset=k,C};var h=l.format;l.format=function(b){var x=b||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,x)},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 f=l.toDate;l.toDate=function(b){return b==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var m=l.diff;l.diff=function(b,x,y){if(b&&this.$u===b.$u)return m.call(this,b,x,y);var E=this.local(),C=s(b).local();return m.call(E,C,x,y)}}}))})(Ls)),Ls.exports}var B7=_7();const j7=Zn(B7);Et.extend(j7);function Hu(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 $7(e){return e==="DateMinMax"}function Uu(e){return e==="Between"}function nx({spec:e,values:t,selection:n,onChange:r,retrievalFn:o}){const i=()=>n?.matchType?n.matchType:e.defaultMatchType?e.defaultMatchType:e.filterType==="DateMinMax"?"Between":Hu(e.filterType)[0]||"Equals",[a,s]=q.useState(i()),[l,u]=q.useState(n?.value??""),[d,p]=q.useState(n?.value2??""),[h,f]=q.useState([]),[m,b]=q.useState(!1),[x,y]=q.useState(""),[E,C]=q.useState(!1),[k,v]=q.useState(!1),S=q.useRef(null),N=q.useRef(0),[O,B]=q.useState(!1);q.useEffect(()=>{if(e.filterType!=="Retrieval"||!o)return;const w=x.trim();if(w.length<=2){f([]),C(!1);return}return S.current&&clearTimeout(S.current),S.current=setTimeout(async()=>{N.current+=1;const V=N.current;b(!0);try{const J=await o(w,e);V===N.current&&f(J)}catch(J){V===N.current&&(console.error("Retrieval failed",J),f([]))}finally{V===N.current&&(b(!1),C(!0))}},500),()=>{S.current&&clearTimeout(S.current)}},[x,e,o]),q.useEffect(()=>{n===null?(u(""),p(""),s(e.defaultMatchType??(e.filterType==="DateMinMax"?"Between":Hu(e.filterType)[0]||"Equals"))):n&&(s(n.matchType),u(n.value??""),p(n.value2??""))},[n,e.filterType,e.defaultMatchType]);const R=Hu(e.filterType),F=$7(e.filterType),T=Uu(a),L=F&&t.length>=2&&t[0].value instanceof Date?Et.utc(t[0].value):void 0,I=F&&t.length>=2&&t[1].value instanceof Date?Et.utc(t[1].value):void 0,A=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 W=w=>{const V=w.target.value;s(V),Uu(V)||p(""),l&&r({dimensionName:e.dimensionName,source:e.source,filterName:e.filterName,matchType:V,value:l,...Uu(V)&&d&&{value2:d}})},H=(w,V)=>{u(w??""),V!==void 0&&p(V??"");const J=Array.isArray(w)&&w.length===0;r(!J&&w!==""&&w!==null&&w!==void 0?{dimensionName:e.dimensionName,source:e.source,filterName:e.filterName,matchType:a,value:w,...T&&V&&{value2:V}}:null)},j=()=>{u(""),p(""),r(null)};return c.jsxs(Pt,{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(Pt,{sx:{fontWeight:600,color:e.required&&!n?"error.main":"text.primary"},children:[e.label??e.dimensionName,e.required&&c.jsx(Pt,{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(rl,{size:"small",fullWidth:!0,children:[c.jsx(nl,{children:"Match Type"}),c.jsx(ol,{value:a,label:"Match Type",onChange:W,MenuProps:{PaperProps:{sx:{"& .MuiMenuItem-root":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}},children:R.map(w=>c.jsx(tn,{value:w,children:w},w))})]}),e.filterType==="Star"&&a==="Equals"&&c.jsx(Mc,{multiple:!0,size:"small",options:t,getOptionLabel:w=>typeof w=="string"?w:typeof w=="object"&&w!==null&&"value"in w?String(w.value):String(w),value:Array.isArray(l)?l.map(w=>t.find(V=>V.value===w)||w):l?[t.find(w=>w.value===l)||l]:[],onChange:(w,V)=>{const J=V.map(_=>typeof _=="string"?_:_&&typeof _=="object"&&"value"in _?_.value:_);H(J)},noOptionsText:"No matches found",renderInput:w=>c.jsx(Qe,{...w,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"&&a==="Contains"&&c.jsx(Qe,{size:"small",label:"Search Text",value:l,onChange:w=>u(w.target.value),onBlur:()=>H(l),onKeyDown:w=>{w.key==="Enter"&&H(l)},placeholder:"Enter text to search...",fullWidth:!0}),e.filterType==="Boolean"&&c.jsxs(rl,{size:"small",fullWidth:!0,children:[c.jsx(nl,{children:"Value"}),c.jsxs(ol,{value:l===!0?"true":l===!1?"false":"",label:"Value",onChange:w=>{const V=w.target.value;V==="true"?H(!0):V==="false"?H(!1):j()},MenuProps:{PaperProps:{sx:{"& .MuiMenuItem-root":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}},children:[c.jsx(tn,{value:"",children:c.jsx("em",{children:"Blank"})}),c.jsx(tn,{value:"true",children:"True"}),c.jsx(tn,{value:"false",children:"False"})]})]}),e.filterType==="Retrieval"&&a==="Semantic Search"&&c.jsx(Mc,{multiple:!0,size:"small",options:h,loading:m,getOptionLabel:w=>typeof w=="string"?w:typeof w=="object"&&w!==null&&"value"in w?String(w.value):String(w),value:Array.isArray(l)?l.map(w=>h.find(J=>J.value===w)||{value:w}):l?[{value:l}]:[],onInputChange:(w,V)=>{y(V)},onChange:(w,V)=>{const J=V.map(_=>typeof _=="string"?_:_&&typeof _=="object"&&"value"in _?_.value:_);H(J)},noOptionsText:x.trim().length<=2?"Type at least 3 characters to search":"No matches found",renderInput:w=>c.jsx(Qe,{...w,size:"small",label:"Search Values",placeholder:"Type to search...",onFocus:()=>v(!0),onBlur:()=>v(!1),helperText:k&&!m&&E&&h.length===0?"No matches found":void 0,InputProps:{...w.InputProps,endAdornment:c.jsxs(c.Fragment,{children:[m?c.jsx(Ad,{color:"inherit",size:20}):null,w.InputProps.endAdornment]})}}),freeSolo:!0,filterOptions:w=>w,slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}}}),e.filterType==="MinMax"&&!T&&c.jsx(Qe,{size:"small",type:"number",label:"Value",value:l,onChange:w=>H(parseFloat(w.target.value)||""),onFocus:()=>B(!0),onBlur:()=>B(!1),placeholder:"Enter number...",fullWidth:!0,inputProps:{min:A,max:M},helperText:O&&A!==void 0&&M!==void 0?`Valid range: [${A} - ${M}]`:void 0}),e.filterType==="MinMax"&&T&&c.jsxs(Pt,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c.jsxs(Pt,{sx:{display:"flex",gap:1,alignItems:"center"},children:[c.jsx(Qe,{size:"small",type:"number",label:"From",value:l,onChange:w=>H(parseFloat(w.target.value)||"",d),onFocus:()=>B(!0),onBlur:()=>B(!1),placeholder:"Min...",fullWidth:!0,inputProps:{min:A,max:d||M}}),c.jsx(Pt,{children:"to"}),c.jsx(Qe,{size:"small",type:"number",label:"To",value:d,onChange:w=>H(l,parseFloat(w.target.value)||""),onFocus:()=>B(!0),onBlur:()=>B(!1),placeholder:"Max...",fullWidth:!0,inputProps:{min:l||A,max:M}})]}),O&&A!==void 0&&M!==void 0&&c.jsxs(xt,{variant:"caption",color:"text.secondary",sx:{mt:-.5,ml:1.5},children:["Valid range: [",A," - ",M,"]"]})]}),F&&!T&&c.jsx(Nc,{dateAdapter:mm,children:c.jsx($u,{label:"Date",value:l instanceof Date?Et.utc(l):null,onChange:w=>{w===null?H(null):w.isValid()&&H(w.utc().toDate())},timezone:"UTC",minDate:l instanceof Date?void 0:L,maxDate:l instanceof Date?void 0:I,referenceDate:a==="After"&&L?L:void 0,slotProps:{textField:{size:"small",fullWidth:!0,sx:{minWidth:150},onFocus:()=>B(!0),onBlur:()=>B(!1),helperText:O&&L&&I?`Valid range: [${L.format("YYYY-MM-DD")} - ${I.format("YYYY-MM-DD")}]`:void 0},openPickerButton:{sx:{backgroundColor:"transparent"}}}})}),F&&T&&c.jsx(Nc,{dateAdapter:mm,children:c.jsxs(Pt,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c.jsxs(Pt,{sx:{display:"flex",gap:1,alignItems:"center"},children:[c.jsx(Pt,{sx:{flex:1,minWidth:0},children:c.jsx($u,{label:"From",value:l instanceof Date?Et.utc(l):null,onChange:w=>{w===null?H(null,d):w.isValid()&&H(w.utc().toDate(),d)},timezone:"UTC",minDate:l instanceof Date?void 0:L,maxDate:d instanceof Date?Et.utc(d):l instanceof Date?void 0:I,referenceDate:L,slotProps:{textField:{size:"small",fullWidth:!0,onFocus:()=>B(!0),onBlur:()=>B(!1)},openPickerButton:{sx:{backgroundColor:"transparent"}}}})}),c.jsx(Pt,{children:"to"}),c.jsx(Pt,{sx:{flex:1,minWidth:0},children:c.jsx($u,{label:"To",value:d instanceof Date?Et.utc(d):null,onChange:w=>{w===null?H(l,null):w.isValid()&&H(l,w.utc().toDate())},timezone:"UTC",minDate:l instanceof Date?Et.utc(l):d instanceof Date?void 0:L,maxDate:d instanceof Date?void 0:I,referenceDate:l instanceof Date?Et.utc(l):L,slotProps:{textField:{size:"small",fullWidth:!0,onFocus:()=>B(!0),onBlur:()=>B(!1)},openPickerButton:{sx:{backgroundColor:"transparent"}}}})})]}),O&&L&&I&&c.jsxs(xt,{variant:"caption",color:"text.secondary",sx:{mt:-.5,ml:1.5},children:["Valid range: [",L.format("YYYY-MM-DD")," -"," ",I.format("YYYY-MM-DD"),"]"]})]})})]})}function H7(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 rx(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 i of r)if(typeof i=="string"){const a=i.indexOf(".");a>0&&a<i.length-1&&o.push({source:i.substring(0,a),dimension:i.substring(a+1)})}if(o.length>0)return{filters:o}}}catch(r){console.error(`Failed to parse "${t}" annotation:`,r)}}return null}function ox(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 U7(e){const t=e.match(/^#\s*label\s*=\s*"([^"]+)"/);return t?t[1]:null}function ix(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 i=JSON.parse(o);i.name&&t.set(i.name,i)}catch(i){console.error("Failed to parse SourceInfo:",i)}}return{sourceInfoMap:t,modelPath:n}}function ax(e,t,n){const r=[];for(const{source:o,dimension:i}of t){const a=e.get(o);if(!a){console.warn(`Source "${o}" not found in notebook sources`),r.push({source:o,model:n,dimensionName:i,filterType:"Star"});continue}const s=a.schema?.fields;if(!s){r.push({source:o,model:n,dimensionName:i,filterType:"Star"});continue}const l=s.find(p=>p.name===i);if(!l){console.warn(`Dimension "${i}" not found in source "${o}"`),r.push({source:o,model:n,dimensionName:i,filterType:"Star"});continue}let u="Star",d;if("annotations"in l&&l.annotations){for(const p of l.annotations)if(p.value){const h=ox(p.value);h&&(u=h.type);const f=U7(p.value);f&&(d=f)}}r.push({source:o,model:n,dimensionName:i,filterType:u,label:d})}return r}function z7(e,t,n){return e.length===0?"":e.map(o=>{const{dimensionName:i,source:a,matchType:s,value:l,value2:u}=o,p=a&&a!==n?`\`${a}\`.\`${i}\``:`\`${i}\``,h=l instanceof Date,f=(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=>`${p} = ${f(b,h)}`).join(" or ")})`:`${p} = ${f(l,h)}`;case"Contains":return typeof l=="string"?`${p} ~ f'%${l.replace(/'/g,"\\'")}%'`:`${p} = ${f(l)}`;case"After":case"Greater Than":return`${p} > ${f(l,h)}`;case"Before":case"Less Than":return`${p} < ${f(l,h)}`;case"Between":return u!==void 0?`${p} >= ${f(l,h)} and ${p} <= ${f(u,h)}`:`${p} >= ${f(l,h)}`;default:return""}}).filter(o=>o.length>0).join(" and ")}function V7(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 W7(e,t){return`${e.trimEnd()} + {where: ${t}}`}const q7=tt(c.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M8 17c-.55 0-1-.45-1-1v-3c0-.55.45-1 1-1s1 .45 1 1v3c0 .55-.45 1-1 1m4 0c-.55 0-1-.45-1-1v-1c0-.55.45-1 1-1s1 .45 1 1v1c0 .55-.45 1-1 1m0-5c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m4 5c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v8c0 .55-.45 1-1 1"})),Y7=tt(c.jsx("path",{d:"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42s1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1"})),Mm=tt(c.jsx("path",{d:"m19.46 8 .79-1.75L22 5.46c.39-.18.39-.73 0-.91l-1.75-.79L19.46 2c-.18-.39-.73-.39-.91 0l-.79 1.75-1.76.79c-.39.18-.39.73 0 .91l1.75.79.79 1.76c.18.39.74.39.92 0M11.5 9.5 9.91 6c-.35-.78-1.47-.78-1.82 0L6.5 9.5 3 11.09c-.78.36-.78 1.47 0 1.82l3.5 1.59L8.09 18c.36.78 1.47.78 1.82 0l1.59-3.5 3.5-1.59c.78-.36.78-1.47 0-1.82zm7.04 6.5-.79 1.75-1.75.79c-.39.18-.39.73 0 .91l1.75.79.79 1.76c.18.39.73.39.91 0l.79-1.75 1.76-.79c.39-.18.39-.73 0-.91l-1.75-.79-.79-1.76c-.18-.39-.74-.39-.92 0"})),K7=tt(c.jsx("path",{d:"M8.7 15.9 4.8 12l3.9-3.9c.39-.39.39-1.01 0-1.4a.984.984 0 0 0-1.4 0l-4.59 4.59c-.39.39-.39 1.02 0 1.41l4.59 4.6c.39.39 1.01.39 1.4 0s.39-1.01 0-1.4m6.6 0 3.9-3.9-3.9-3.9a.984.984 0 0 1 0-1.4c.39-.39 1.01-.39 1.4 0l4.59 4.59c.39.39.39 1.02 0 1.41l-4.59 4.6c-.39.39-1.01.39-1.4 0a.984.984 0 0 1 0-1.4"})),G7=tt(c.jsx("path",{d:"M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1 1.1-.49 1.1-1.1-.49-1.1-1.1-1.1M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m2.19 12.19L6 18l3.81-8.19L18 6z"})),Q7=tt([c.jsx("path",{d:"M13 8.57c-.79 0-1.43.64-1.43 1.43s.64 1.43 1.43 1.43 1.43-.64 1.43-1.43-.64-1.43-1.43-1.43"},"0"),c.jsx("path",{d:"M13.21 3c-3.84-.11-7 2.87-7.19 6.64L4.1 12.2c-.25.33-.01.8.4.8H6v3c0 1.1.9 2 2 2h1v2c0 .55.45 1 1 1h5c.55 0 1-.45 1-1v-3.68c2.44-1.16 4.1-3.68 4-6.58-.14-3.62-3.18-6.63-6.79-6.74M16 10c0 .13-.01.26-.02.39l.83.66c.08.06.1.16.05.25l-.8 1.39c-.05.09-.16.12-.24.09l-.99-.4c-.21.16-.43.29-.67.39L14 13.83c-.01.1-.1.17-.2.17h-1.6c-.1 0-.18-.07-.2-.17l-.15-1.06c-.25-.1-.47-.23-.68-.39l-.99.4c-.09.03-.2 0-.25-.09l-.8-1.39c-.05-.08-.03-.19.05-.25l.84-.66c-.01-.13-.02-.26-.02-.39s.02-.27.04-.39l-.85-.66c-.08-.06-.1-.16-.05-.26l.8-1.38c.05-.09.15-.12.24-.09l1 .4c.2-.15.43-.29.67-.39L12 6.17c.02-.1.1-.17.2-.17h1.6c.1 0 .18.07.2.17l.15 1.06c.24.1.46.23.67.39l1-.4c.09-.03.2 0 .24.09l.8 1.38c.05.09.03.2-.05.26l-.85.66c.03.12.04.25.04.39"},"1")]),Om=tt(c.jsx("path",{d:"M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2m0-3h2v2H4zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2m4 1H4V5h2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2m0-3h2v2H4z"})),sx=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(" ")+"..."},lx=(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 X7(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:o,resumeHideDuration:i}=e,a=Ol();D.useEffect(()=>{if(!o)return;function y(E){E.defaultPrevented||E.key==="Escape"&&r?.(E,"escapeKeyDown")}return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[o,r]);const s=Ae((y,E)=>{r?.(y,E)}),l=Ae(y=>{!r||y==null||a.start(y,()=>{s(null,"timeout")})});D.useEffect(()=>(o&&l(t),a.clear),[o,t,l,a]);const u=y=>{r?.(y,"clickaway")},d=a.clear,p=D.useCallback(()=>{t!=null&&l(i??t*.5)},[t,i,l]),h=y=>E=>{const C=y.onBlur;C?.(E),p()},f=y=>E=>{const C=y.onFocus;C?.(E),d()},m=y=>E=>{const C=y.onMouseEnter;C?.(E),d()},b=y=>E=>{const C=y.onMouseLeave;C?.(E),p()};return D.useEffect(()=>{if(!n&&o)return window.addEventListener("focus",p),window.addEventListener("blur",d),()=>{window.removeEventListener("focus",p),window.removeEventListener("blur",d)}},[n,o,p,d]),{getRootProps:(y={})=>{const E={...sn(e),...sn(y)};return{role:"presentation",...y,...E,onBlur:h(E),onFocus:f(E),onMouseEnter:m(E),onMouseLeave:b(E)}},onClickAway:u}}function Lm(e){return e.substring(2).toLowerCase()}function Z7(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function J7(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:o,touchEvent:i="onTouchEnd"}=e,a=D.useRef(!1),s=D.useRef(null),l=D.useRef(!1),u=D.useRef(!1);D.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const d=ot(Ii(t),s),p=Ae(m=>{const b=u.current;u.current=!1;const x=Ut(s.current);if(!l.current||!s.current||"clientX"in m&&Z7(m,x))return;if(a.current){a.current=!1;return}let y;m.composedPath?y=m.composedPath().includes(s.current):y=!x.documentElement.contains(m.target)||s.current.contains(m.target),!y&&(n||!b)&&o(m)}),h=m=>b=>{u.current=!0;const x=t.props[m];x&&x(b)},f={ref:d};return i!==!1&&(f[i]=h(i)),D.useEffect(()=>{if(i!==!1){const m=Lm(i),b=Ut(s.current),x=()=>{a.current=!0};return b.addEventListener(m,p),b.addEventListener("touchmove",x),()=>{b.removeEventListener(m,p),b.removeEventListener("touchmove",x)}}},[p,i]),r!==!1&&(f[r]=h(r)),D.useEffect(()=>{if(r!==!1){const m=Lm(r),b=Ut(s.current);return b.addEventListener(m,p),()=>{b.removeEventListener(m,p)}}},[p,r]),D.cloneElement(t,f)}function e9(e){return _e("MuiSnackbarContent",e)}Me("MuiSnackbarContent",["root","message","action"]);const t9=e=>{const{classes:t}=e;return Fe({root:["root"],action:["action"],message:["message"]},e9,t)},n9=ie(Ro,{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(qu(e.palette.background.default,t)),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:qu(e.palette.background.default,t),display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),r9=ie("div",{name:"MuiSnackbarContent",slot:"Message"})({padding:"8px 0"}),o9=ie("div",{name:"MuiSnackbarContent",slot:"Action"})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),i9=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiSnackbarContent"}),{action:o,className:i,message:a,role:s="alert",...l}=r,u=r,d=t9(u);return c.jsxs(n9,{role:s,elevation:6,className:Pe(d.root,i),ownerState:u,ref:n,...l,children:[c.jsx(r9,{className:d.message,ownerState:u,children:a}),o?c.jsx(o9,{className:d.action,ownerState:u,children:o}):null]})});function a9(e){return _e("MuiSnackbar",e)}Me("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const s9=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${ke(n.vertical)}${ke(n.horizontal)}`]};return Fe(r,a9,t)},l9=ie("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${ke(n.anchorOrigin.vertical)}${ke(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%)"}}}]}))),u9=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiSnackbar"}),o=Gr(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:s,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:u=null,children:d,className:p,ClickAwayListenerProps:h,ContentProps:f,disableWindowBlurListener:m=!1,message:b,onBlur:x,onClose:y,onFocus:E,onMouseEnter:C,onMouseLeave:k,open:v,resumeHideDuration:S,slots:N={},slotProps:O={},TransitionComponent:B,transitionDuration:R=i,TransitionProps:{onEnter:F,onExited:T,...L}={},...I}=r,A={...r,anchorOrigin:{vertical:s,horizontal:l},autoHideDuration:u,disableWindowBlurListener:m,TransitionComponent:B,transitionDuration:R},M=s9(A),{getRootProps:W,onClickAway:H}=X7({...A}),[j,w]=D.useState(!0),V=ee=>{w(!0),T&&T(ee)},J=(ee,ne)=>{w(!1),F&&F(ee,ne)},_={slots:{transition:B,...N},slotProps:{content:f,clickAwayListener:h,transition:L,...O}},[de,Z]=ct("root",{ref:n,className:[M.root,p],elementType:l9,getSlotProps:W,externalForwardedProps:{..._,...I},ownerState:A}),[Y,{ownerState:te,...X}]=ct("clickAwayListener",{elementType:J7,externalForwardedProps:_,getSlotProps:ee=>({onClickAway:(...ne)=>{const ye=ne[0];ee.onClickAway?.(...ne),!ye?.defaultMuiPrevented&&H(...ne)}}),ownerState:A}),[re,Q]=ct("content",{elementType:i9,shouldForwardComponentProp:!0,externalForwardedProps:_,additionalProps:{message:b,action:a},ownerState:A}),[K,ae]=ct("transition",{elementType:Da,externalForwardedProps:_,getSlotProps:ee=>({onEnter:(...ne)=>{ee.onEnter?.(...ne),J(...ne)},onExited:(...ne)=>{ee.onExited?.(...ne),V(...ne)}}),additionalProps:{appear:!0,in:v,timeout:R,direction:s==="top"?"down":"up"},ownerState:A});return!v&&j?null:c.jsx(Y,{...X,...N.clickAwayListener&&{ownerState:te},children:c.jsx(de,{...Z,children:c.jsx(K,{...ae,children:d||c.jsx(re,{...Q})})})})});function Nm(){const[e,t]=q.useState(!1),{apiClients:n}=st.useServer(),[r,o]=q.useState(""),i=()=>{t(!0)},a=()=>{t(!1)},s=Mr.useQueryClient(),l=ur({async mutationFn(d){return n.environments.createEnvironment({name:d.name,readme:lx({name:d.name,readme:""},d.description)})},onSuccess(){a(),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 p=new FormData(d.currentTarget),h=p.get("name")?.toString(),f=p.get("description")?.toString();if(!h)throw new Error("Name is required");l.mutate({name:h,description:f})};return c.jsxs(q.Fragment,{children:[c.jsx(Dt,{variant:"contained",onClick:i,startIcon:c.jsx(Dn.AddCircleRounded,{}),sx:{mt:2,color:"white"},children:"Create New Environment"}),c.jsxs(gr,{open:e,onClose:a,children:[c.jsx(Lr,{children:"Create New Environment"}),c.jsxs(xr,{children:[c.jsx(Ai,{children:"Add a new environment to start exploring semantic models and analyzing data."}),c.jsxs("form",{onSubmit:u,id:"environment-form",children:[c.jsx(Qe,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Environment Name",type:"text",fullWidth:!0,variant:"standard"}),c.jsx(Qe,{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(br,{children:[c.jsx(Dt,{disabled:l.isPending,onClick:a,children:"Cancel"}),c.jsx(Dt,{type:"submit",form:"environment-form",loading:l.isPending,children:"Create Environment"})]})]}),c.jsx(u9,{open:r!=="",autoHideDuration:6e3,onClose:()=>o(""),message:r})]})}function c9({environment:e,onCloseDialog:t}){const[n,r]=q.useState(!1),{apiClients:o}=st.useServer(),i=Mr.useQueryClient(),[a,s]=q.useState(""),l=()=>{r(!0)},u=()=>{r(!1),t()},d=ur({mutationFn:()=>o.environments.deleteEnvironment(e.name),onSuccess(){u(),i.invalidateQueries({queryKey:["environments"]}),s("Environment deleted successfully")},onError(p){s(p instanceof Error?p.message:"An unknown error occurred")}});return c.jsxs(q.Fragment,{children:[c.jsxs(P.MenuItem,{onClick:l,children:[c.jsx(P.ListItemIcon,{children:c.jsx(Dn.Delete,{fontSize:"small"})}),c.jsx(P.ListItemText,{children:"Delete"})]}),c.jsxs(gr,{onClose:u,"aria-labelledby":"customized-dialog-title",open:n,children:[c.jsx(Lr,{sx:{m:0,p:2},id:"customized-dialog-title",children:"Delete Environment"}),c.jsx(wn,{"aria-label":"close",onClick:u,sx:p=>({position:"absolute",right:8,top:8,color:p.palette.grey[500]}),children:c.jsx(Kr,{})}),c.jsx(xr,{dividers:!0,children:c.jsxs(xt,{gutterBottom:!0,children:['Are you sure you want to delete "',e.name,'"? This action cannot be undone.']})}),c.jsxs(br,{children:[c.jsx(Dt,{variant:"outlined",onClick:u,style:{borderColor:"#14b3cb",color:"#14b3cb"},children:"Cancel"}),c.jsx(Dt,{loading:d.isPending,variant:"contained",autoFocus:!0,onClick:()=>d.mutate(),color:"error",children:"Delete"})]}),c.jsx(P.Snackbar,{open:a!=="",autoHideDuration:6e3,onClose:()=>s(""),message:a})]})]})}function d9({environment:e,onCloseDialog:t}){const[n,r]=q.useState(!1),{apiClients:o}=st.useServer(),i=Mr.useQueryClient(),[a,s]=q.useState(""),l=()=>{r(!0)},u=()=>{r(!1),t()},d=ur({async mutationFn(h){return o.environments.updateEnvironment(e.name,{name:e.name,readme:lx({name:e.name,readme:e.readme},h.description)})},onSuccess(){u(),i.invalidateQueries({queryKey:["environments"]}),s("Environment updated successfully")},onError(h){s(h instanceof Error?h.message:"An unknown error occurred")}}),p=h=>{h.preventDefault();const m=new FormData(h.currentTarget).get("description")?.toString();d.mutate({description:m})};return c.jsxs(q.Fragment,{children:[c.jsxs(P.MenuItem,{onClick:l,children:[c.jsx(P.ListItemIcon,{children:c.jsx(Dn.Edit,{fontSize:"small"})}),c.jsx(P.ListItemText,{children:"Edit"})]}),c.jsxs(gr,{open:n,onClose:u,children:[c.jsx(Lr,{children:"Edit Environment"}),c.jsxs(xr,{children:[c.jsx(Ai,{children:"Edit this environment's description."}),c.jsxs("form",{onSubmit:p,id:"environment-form",children:[c.jsx(Qe,{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(Qe,{margin:"dense",id:"description",name:"description",label:"Environment Description",type:"text",fullWidth:!0,variant:"standard",defaultValue:sx(e.readme)})]})]}),c.jsxs(br,{children:[c.jsx(Dt,{disabled:d.isPending,onClick:u,children:"Cancel"}),c.jsx(Dt,{type:"submit",form:"environment-form",loading:d.isPending,children:"Save Changes"})]})]}),c.jsx(P.Snackbar,{open:a!=="",autoHideDuration:6e3,onClose:()=>s(""),message:a})]})}function p9({onClickEnvironment:e}){const{apiClients:t,mutable:n}=st.useServer(),{data:r,isSuccess:o,isError:i,error:a}=Qt({queryKey:["environments"],queryFn:()=>t.environments.listEnvironments()});return i?c.jsx(Jt,{error:a,context:"Environments List"}):o?c.jsxs(P.Container,{maxWidth:"lg",sx:{py:4},children:[c.jsxs(P.Box,{sx:{textAlign:"center",mb:6},children:[c.jsxs(P.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[c.jsx(Mm,{sx:{fontSize:32,color:"primary.main"}}),c.jsx(P.Typography,{variant:"h3",component:"h1",fontWeight:700,children:"Publisher"})]}),c.jsx(P.Typography,{variant:"h5",color:"text.secondary",sx:{mb:3,maxWidth:600,mx:"auto"},children:"The open-source semantic model server for the Malloy data language"}),c.jsx(P.Typography,{variant:"body1",color:"text.secondary",sx:{maxWidth:800,mx:"auto"},children:"Define semantic models once — and use them everywhere. Publisher serves Malloy models through clean APIs, enabling consistent, interpretable, and AI-ready data access for tools, applications, and agents."})]}),c.jsxs(P.Grid,{container:!0,spacing:3,sx:{mb:6},children:[c.jsx(P.Grid,{size:{xs:12,md:4},children:c.jsx(P.Card,{variant:"outlined",onClick:()=>{window.open("https://github.com/malloydata/publisher/blob/main/README.md#ad-hoc-data-analysis","_blank")},sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2}},children:c.jsxs(P.CardContent,{sx:{p:3},children:[c.jsxs(P.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[c.jsx(q7,{sx:{color:"info.main",fontSize:28}}),c.jsx(P.Typography,{variant:"h6",fontWeight:600,children:"Ad Hoc Analysis"})]}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Use Explorer, a visual query builder that allows analysts to browse semantic sources, build queries, and run nested logic — all without writing code."}),c.jsx(P.Chip,{label:"No-code",size:"small",color:"primary",variant:"outlined"})]})})}),c.jsx(P.Grid,{size:{xs:12,md:4},children:c.jsx(P.Card,{variant:"outlined",onClick:()=>{window.open("https://github.com/malloydata/publisher/blob/main/README.md#notebook-based-dashboards","_blank")},sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2}},children:c.jsxs(P.CardContent,{sx:{p:3},children:[c.jsxs(P.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[c.jsx(K7,{sx:{color:"warning.main",fontSize:28}}),c.jsx(P.Typography,{variant:"h6",fontWeight:600,children:"Notebook Dashboards"})]}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Create shareable, code-first dashboards using Malloy notebooks. Include text, charts, and reusable views — all versioned alongside your models."}),c.jsx(P.Chip,{label:"Versioned",size:"small",color:"warning",variant:"outlined"})]})})}),c.jsx(P.Grid,{size:{xs:12,md:4},children:c.jsx(P.Card,{variant:"outlined",onClick:()=>{window.open("https://github.com/malloydata/publisher/blob/main/README.md#mcp-based-ai-data-agents","_blank")},sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2}},children:c.jsxs(P.CardContent,{sx:{p:3},children:[c.jsxs(P.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[c.jsx(Q7,{sx:{color:"success.main",fontSize:28}}),c.jsx(P.Typography,{variant:"h6",fontWeight:600,children:"AI Data Agents"})]}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Expose your semantic models via the Model Context Protocol (MCP), enabling AI agents to discover sources and ask well-formed questions."}),c.jsx(P.Chip,{label:"AI-Ready",size:"small",color:"success",variant:"outlined"})]})})})]}),c.jsx(P.Divider,{sx:{my:4}}),r.data.length>0?c.jsxs(c.Fragment,{children:[c.jsxs(P.Box,{sx:{textAlign:"center",mb:4},children:[c.jsxs(P.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[c.jsx(Om,{sx:{color:"primary.main",fontSize:24}}),c.jsx(P.Typography,{variant:"h4",fontWeight:600,children:"Select an Environment"})]}),c.jsx(P.Typography,{variant:"body1",color:"text.secondary",children:"Choose an environment to explore its semantic models and start analyzing your data"}),n&&c.jsx(Nm,{})]}),c.jsx(P.Grid,{container:!0,spacing:3,justifyContent:"center",children:r.data.map(s=>c.jsx(P.Grid,{size:{xs:12,sm:6,md:4},children:c.jsx(f9,{environment:s,onClickEnvironment:e})},s.name))})]}):c.jsxs(P.Box,{sx:{textAlign:"center",mb:4},children:[c.jsxs(P.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[c.jsx(Om,{sx:{color:"primary.main",fontSize:24}}),c.jsx(P.Typography,{variant:"h4",fontWeight:600,children:"Get Started"})]}),c.jsx(P.Typography,{variant:"body1",color:"text.secondary",sx:{mb:3},children:"No environments found. Create your first Malloy environment to start exploring semantic models and building data experiences."}),n?c.jsx(Nm,{}):c.jsx(P.Button,{variant:"contained",size:"large",color:"primary",startIcon:c.jsx(Mm,{}),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.Box,{sx:{textAlign:"center",mt:6,pt:4,borderTop:1,borderColor:"divider"},children: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("a",{href:"https://join.slack.com/t/malloy-community/shared_invite/zt-1kgfwgi5g-CrsdaRqs81QY67QW0~t_uw",target:"_blank",rel:"noopener noreferrer",style:{color:"primary.main",textDecoration:"underline"},children:"Malloy Slack community"})," ","to ask questions, share ideas, and contribute to the future of data modeling."]})})]}):c.jsx(Zt,{text:"Loading environments..."})}function f9({environment:e,onClickEnvironment:t}){const{mutable:n}=st.useServer(),[r,o]=q.useState(null),i=!!r,a=l=>{o(l.currentTarget)},s=()=>{o(null)};return c.jsx("div",{children:c.jsxs(P.Card,{variant:"outlined",sx:{height:"100%",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2,borderColor:"primary.main"}},children:[n&&c.jsxs(c.Fragment,{children:[c.jsx(P.IconButton,{"aria-label":`Environment actions for ${e.name}`,"aria-controls":i?"environment-menu":void 0,"aria-haspopup":"true","aria-expanded":i?"true":void 0,onClick:a,sx:{position:"absolute",top:8,right:8},children:c.jsx(Dn.MoreVert,{fontSize:"small"})}),c.jsxs(P.Menu,{id:"environment-menu","aria-haspopup":"true","aria-expanded":i?"true":void 0,open:i,anchorEl:r,onClose:s,disableRestoreFocus:!0,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},children:[c.jsx(d9,{environment:e,onCloseDialog:s}),c.jsx(c9,{environment:e,onCloseDialog:s})]})]}),c.jsxs(P.CardContent,{sx:{p:3,textAlign:"center"},children:[c.jsx(G7,{sx:{fontSize:48,color:"primary.main",mb:2}}),c.jsx(P.Typography,{variant:"h6",fontWeight:600,gutterBottom:!0,children:e.name}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2,minHeight:"60px"},children:sx(e.readme)}),c.jsx(P.Button,{variant:"contained",color:"secondary",endIcon:c.jsx(Y7,{}),fullWidth:!0,onClick:l=>t(`/${e.name}/`,l),children:"Open Environment"})]})]})})}const mi=tt(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"})),h9=tt(c.jsx("path",{d:"M8 5v14l11-7z"}));function ux({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:"#666666"},children:c.jsx(Kr,{})})]}),c.jsx(P.DialogContent,{sx:{height:"calc(95vh - 120px)",overflow:"auto",padding:"0 16px"},children:c.jsx(Di,{result:n,maxHeight:800,maxResultSize:1e6})})]})}function m9({queryName:e,annotations:t,resourceUri:n,runOnDemand:r=!1,maxResultSize:o=0}){const[i,a]=q.useState(),[s,l]=q.useState(!1),[u,d]=q.useState(!1),{packageName:p,environmentName:h,versionId:f,modelPath:m}=Tt(n),{apiClients:b}=st.useServer(),{data:x,isSuccess:y,isLoading:E}=Qt({queryKey:["namedQueryResult",n,e],queryFn:()=>b.models.executeQueryModel(h,p,m,{query:void 0,sourceName:void 0,queryName:e,versionId:f}),enabled:r?u:!0});return q.useEffect(()=>{if(t&&t.length>0){const C=t.map(k=>`// ${k}`).join(`
|
|
205
|
-
`);Zs(C,"typescript").then(k=>{a(k)})}},[t]),c.jsxs(Zu,{children:[i&&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:i}})})}),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(mi,{sx:{fontSize:"18px",color:"#666666"}})})]}),c.jsxs(xs,{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(h9,{}),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)&&y&&x?.data?.result&&c.jsx(Di,{result:x.data.result,maxHeight:600,maxResultSize:o})]}),c.jsx(ux,{open:s,onClose:()=>l(!1),result:x?.data?.result||"",title:`Query: ${e}`})]})}function Jd(e,t=!0){const{modelPath:n,environmentName:r,packageName:o,versionId:i}=Tt(e),{apiClients:a}=st.useServer();return Qt({queryKey:["package",r,o,n,i],queryFn:async()=>(await a.models.getModel(r,o,n,i)).data,enabled:t})}function ep({data:e,onChange:t,existingQuery:n,initialSelectedSourceIndex:r=0,onSourceChange:o,resourceUri:i}){const[a,s]=q.useState(r);q.useEffect(()=>{s(r)},[r]);const{data:l,isError:u,isLoading:d,error:p}=Jd(i,!e),{modelPath:h}=Tt(i),f=e||l;if(d&&!e)return c.jsx(Zt,{text:"Fetching Model..."});if(u&&!e)return console.log("error",p),c.jsx(Jt,{error:p,context:`ModelExplorer > ${h}`});if(!f)return c.jsx(Zt,{text:"Loading..."});const m=(f?.sourceInfos||[]).map((x,y)=>{try{return JSON.parse(x)?.name||`Source ${y+1}`}catch{return`Source ${y+1}`}}),b=m[a]||"";return c.jsxs(Us,{variant:"outlined",children:[c.jsx(u0,{children:c.jsx(P.Stack,{sx:{flexDirection:"row"},children:c.jsx(Mc,{size:"small",id:"size-small-standard",disablePortal:!0,options:m,value:b,onChange:(x,y)=>{if(!y)return;const E=m.indexOf(y);E>=0&&(s(E),o?.(E))},renderInput:x=>c.jsx(Qe,{...x}),style:{width:350,marginTop:"3px",marginLeft:"6px",marginBottom:"8px"}})})}),c.jsx(Wc,{children:c.jsxs(P.Stack,{spacing:2,component:"section",children:[Array.isArray(f.sourceInfos)&&f.sourceInfos.length>0&&c.jsx(vd,{sourceAndPaths:f.sourceInfos.map(x=>({sourceInfo:JSON.parse(x),modelPath:h})),selectedSourceIndex:a,existingQuery:n,onQueryChange:t,resourceUri:i}),c.jsx(P.Box,{height:"5px"})]})})]})}function tp({open:e,onClose:t,resourceUri:n,data:r,title:o="Data Sources",hasValidImport:i=!0,existingQuery:a,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:"#666666"},children:c.jsx(Kr,{})})]}),c.jsx(P.DialogContent,{children:i?c.jsx(ep,{resourceUri:n,data:r,existingQuery:a,initialSelectedSourceIndex:s,onChange:l,onSourceChange:u}):c.jsx("div",{children:"No valid import statement found in cell"})})]})}function g9({onChange:e,resourceUri:t,runOnDemand:n=!1,maxResultSize:r=0}){const{modelPath:o}=Tt(t),{data:i,isError:a,isLoading:s,error:l}=Jd(t),[u,d]=q.useState(!1),[p,h]=q.useState(),[f,m]=q.useState(0),[b,x]=q.useState("");if(s)return c.jsx(Zt,{text:"Fetching Model..."});if(a)return console.log("error",l),c.jsx(Jt,{error:l,context:`Model > ${o}`});const y=k=>{h(k),e&&e(k)},E=k=>{m(k)},C=()=>{const k=window.location.href;navigator.clipboard.writeText(k).then(()=>x("URL copied to clipboard!")).catch(()=>x("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(i?.sourceInfos)&&i.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(qc,{sx:{fontSize:"24px",color:"#666666",cursor:"pointer"},onClick:C})})]}),c.jsx(ep,{data:i,onChange:y,onSourceChange:E,existingQuery:p,initialSelectedSourceIndex:f,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(mi,{sx:{fontSize:"18px",color:"#666666",marginBottom:"5px"}})})]}),i?.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"})}),i.queries.map(k=>c.jsx(m9,{queryName:k.name,annotations:k.annotations,resourceUri:t,runOnDemand:n,maxResultSize:r},k.name))]}),c.jsx(tp,{open:u,onClose:()=>d(!1),resourceUri:t,data:i,title:`Model: ${o.split("/").pop()}`,existingQuery:p,initialSelectedSourceIndex:f,onChange:y,onSourceChange:E})]}),c.jsx(P.Snackbar,{open:b!=="",autoHideDuration:6e3,onClose:()=>x(""),message:b})]})}function cx(e,t){return`${e}:${t}`}function Rr(e){return cx(e.source,e.filterName??e.dimensionName)}function dx(e){return e.replace(/'/g,"\\'").replace(/\\/g,"\\\\")}function nr(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"?`'${dx(e)}'`:typeof e=="number"?String(e):typeof e=="boolean"?e?"true":"false":String(e)}function b9(e){const{dimensionName:t,matchType:n,value:r,value2:o}=e,i=`\`${t}\``,a=r instanceof Date;switch(n){case"Equals":case"Semantic Search":return Array.isArray(r)&&r.length>0?`(${r.map(l=>`${i} = ${nr(l,a)}`).join(" or ")})`:Array.isArray(r)?"":`${i} = ${nr(r,a)}`;case"Contains":return typeof r=="string"?`${i} ~ f'%${dx(r)}%'`:Array.isArray(r)?"":`${i} = ${nr(r)}`;case"After":return Array.isArray(r)?"":`${i} > ${nr(r,a)}`;case"Before":return Array.isArray(r)?"":`${i} < ${nr(r,a)}`;case"Greater Than":return Array.isArray(r)?"":`${i} > ${nr(r)}`;case"Less Than":return Array.isArray(r)?"":`${i} < ${nr(r)}`;case"Between":return Array.isArray(r)?"":o!==void 0?`${i} >= ${nr(r,a)} and ${i} <= ${nr(o,a)}`:`${i} >= ${nr(r,a)}`;default:return""}}function x9(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 y9(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 a=[...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=>b9(u)).filter(u=>u.length>0).join(" and "):"";return`
|
|
206
|
-
run: ${e} -> {
|
|
207
|
-
${l?`where: ${l}`:""}
|
|
208
|
-
index: ${a}
|
|
209
|
-
} -> {
|
|
210
|
-
select: *
|
|
211
|
-
order_by: weight desc
|
|
212
|
-
|
|
213
|
-
limit: ${n}
|
|
214
|
-
}
|
|
215
|
-
`}function E9(e,t){const n=new Map;for(const d of t){const p=Rr(d);n.set(p,[])}const r=JSON.parse(e),o=r.schema.fields,i=new Map;o.forEach((d,p)=>{i.set(d.name,p)});const a=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 p={};return d.kind==="record_cell"&&d.record_value&&d.record_value.forEach((h,f)=>{const m=o[f]?.name;if(m){const b=a(h);m==="fieldName"&&typeof b=="string"?p.fieldName=b:m==="fieldPath"&&typeof b=="string"?p.fieldPath=b:m==="fieldType"&&typeof b=="string"?p.fieldType=b:m==="fieldValue"&&typeof b=="string"?p.fieldValue=b:m==="weight"&&typeof b=="number"&&(p.weight=b)}}),p}),u=l.length===0||l.every(d=>!d.fieldName);for(const d of t){if(d.filterType==="NONE"||d.filterType==="Retrieval")continue;const p=l.filter(f=>{const m=f.fieldName||"",b=f.fieldPath||"";if(m===d.dimensionName||b===d.dimensionName||m.toLowerCase()===d.dimensionName.toLowerCase()||b.toLowerCase()===d.dimensionName.toLowerCase())return!0;const x=b.split(".").pop()||"";return x===d.dimensionName||x.toLowerCase()===d.dimensionName.toLowerCase()});if(p.length===0)continue;const h=Rr(d);if(d.filterType==="Star"){const f=p.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,f)}else if(d.filterType==="MinMax"){console.log("MinMax dimensionEntries: "+JSON.stringify(p,null,2)),console.log("All MinMax dimension entries fieldTypes:",p.map(m=>m.fieldType));const f=p.find(m=>m.fieldType==="number");if(console.log("numericEntry: "+JSON.stringify(f,null,2)),f?.fieldValue){const m=f.fieldValue,b=m.split(" to ");if(console.log("rangeParts: "+b),b.length===2){const x=[{value:parseFloat(b[0])},{value:parseFloat(b[1])}];n.set(h,x)}else console.warn(`Could not parse numeric range for ${d.dimensionName}: ${m}`)}else console.warn(`No numeric entry found for ${d.dimensionName}. Available entries:`,p)}else if(d.filterType==="DateMinMax"){const f=p.find(m=>m.fieldType==="date"||m.fieldType==="timestamp"||m.fieldType==="string");if(console.log("dateEntry: "+JSON.stringify(f,null,2)),console.log("All date dimension entries fieldTypes:",p.map(m=>m.fieldType)),f?.fieldValue){const m=f.fieldValue,b=m.split(" to ");if(console.log("date rangeParts: "+b),b.length===2){const x=[{value:new Date(b[0].trim())},{value:new Date(b[1].trim())}];n.set(h,x)}else console.warn(`Could not parse date range for ${d.dimensionName}: ${m}`)}else console.warn(`No date entry found for ${d.dimensionName}. Available entries:`,p)}}return{values:n,noRowsMatchedFilter:u}}function np(e){const{environment:t,package:n,dimensionSpecs:r,versionId:o,enabled:i=!0,indexLimit:a=1e4,activeFilters:s=[]}=e,l=q.useMemo(()=>x9(r),[r]),u=q.useMemo(()=>{const b=[];for(const[x,y]of l){const[E,C]=x.split("|"),k=y9(E,y,a,s);k?b.push({key:x,source:E,model:C,query:k,specs:y}):console.log("No query for source: ",E,"model: ",C)}return b},[l,a,s]),d=q.useMemo(()=>i&&u.length>0&&r.some(b=>b.filterType==="Star"||b.filterType==="MinMax"||b.filterType==="DateMinMax"),[i,u,r]),{apiClients:p}=st.useServer(),h=Qt({queryKey:["dimensionalFilter",t,n,r,o,s],queryFn:async()=>{if(!d){const E=new Map;for(const C of r){const k=Rr(C);E.set(k,[])}return{values:E,noRowsMatchedFilter:!1}}const b=await Promise.all(u.map(async E=>{const C=await p.models.executeQueryModel(t,n,E.model,{query:E.query,versionId:o,bypassFilters:!0});return{config:E,result:E9(C.data.result,E.specs)}})),x=new Map;let y=!1;for(const{result:E}of b){for(const[C,k]of E.values)x.set(C,k);E.noRowsMatchedFilter&&(y=!0)}return{values:x,noRowsMatchedFilter:y}},enabled:d,staleTime:300*1e3,placeholderData:b=>b}),f=h.data?.values;return{data:q.useMemo(()=>{const b=new Map;for(const x of r){const y=Rr(x);x.values?b.set(y,x.values.map(E=>({value:E}))):b.set(y,[])}if(f)for(const[x,y]of f)y.length>0&&b.set(x,y);return b},[r,f]),noRowsMatchedFilter:h.data?.noRowsMatchedFilter??!1,isLoading:d?h.isPending:!1,isError:d?h.isError:!1,error:d?h.error:null,refetch:h.refetch}}function px(e){return e.replace(/'/g,"\\'").replace(/\\/g,"\\\\")}function rr(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"?`'${px(e)}'`:typeof e=="number"?String(e):typeof e=="boolean"?e?"true":"false":String(e)}function C9(e){const{dimensionName:t,matchType:n,value:r,value2:o}=e,i=`\`${t}\``,a=r instanceof Date;switch(n){case"Equals":case"Semantic Search":return Array.isArray(r)&&r.length>0?`(${r.map(l=>`${i} = ${rr(l,a)}`).join(" or ")})`:Array.isArray(r)?"":`${i} = ${rr(r,a)}`;case"Contains":return typeof r=="string"?`${i} ~ f'%${px(r)}%'`:Array.isArray(r)?"":`${i} = ${rr(r)}`;case"After":return Array.isArray(r)?"":`${i} > ${rr(r,a)}`;case"Before":return Array.isArray(r)?"":`${i} < ${rr(r,a)}`;case"Greater Than":return Array.isArray(r)?"":`${i} > ${rr(r)}`;case"Less Than":return Array.isArray(r)?"":`${i} < ${rr(r)}`;case"Between":return Array.isArray(r)?"":o!==void 0?`${i} >= ${rr(r,a)} and ${i} <= ${rr(o,a)}`:`${i} >= ${rr(r,a)}`;default:return""}}function rp(e){const{dimensionSpecs:t}=e,[n,r]=q.useState(()=>{const u=new Map;return t.forEach(d=>{const p=Rr(d);u.set(p,{spec:d,selection:null})}),u});q.useEffect(()=>{r(u=>{const d=new Map;return t.forEach(p=>{const h=Rr(p),f=u.get(h);d.set(h,{spec:p,selection:f?.selection??null})}),d})},[t]);const o=q.useCallback((u,d)=>{r(p=>{const h=new Map(p),f=h.get(u);return f&&h.set(u,{...f,selection:d}),h})},[]),i=q.useCallback(u=>{o(u,null)},[o]),a=q.useCallback(()=>{r(u=>{const d=new Map(u);return d.forEach((p,h)=>{d.set(h,{...p,selection:null})}),d})},[]),s=q.useCallback(()=>{const u=[];return n.forEach(d=>{d.selection&&u.push(d.selection)}),u},[n]),l=q.useCallback(()=>{const u=s();if(u.length===0)return"";const d=u.map(p=>C9(p)).filter(p=>p.length>0);return d.length===0?"":`where ${d.join(" and ")}`},[s]);return{filterStates:n,updateFilter:o,clearFilter:i,clearAllFilters:a,getActiveFilters:s,generateWhereClause:l}}const T9=tt(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 op(e){const{environmentName:t,packageName:n}=Tt(e.resourceUri);if(!t||!n)throw new Error("Environment and Package name must be provided for query embedding.");return JSON.stringify({...e})}function v9({embeddedQueryResult:e}){const{query:t,sourceName:n,queryName:r,resourceUri:o,height:i}=JSON.parse(e),{modelPath:a}=Tt(o);if(!a||!t&&(!r||!n)||typeof a!="string")throw new Error("Invalid embedded query result: "+e);return c.jsx(fx,{query:t,sourceName:n,queryName:r,resourceUri:o,height:i})}function fx({query:e,sourceName:t,queryName:n,resourceUri:r,height:o=400}){const{modelPath:i,environmentName:a,packageName:s,versionId:l}=Tt(r),{apiClients:u}=st.useServer();if(!a||!s)throw new Error("No project or package name provided. A resource URI must be provided.");const{data:d,isSuccess:p,isError:h,error:f}=Qt({queryKey:[r,e,t,n],queryFn:()=>u.models.executeQueryModel(a,s,i,{query:e,sourceName:t,queryName:n,versionId:l})});return c.jsxs(c.Fragment,{children:[!p&&!h&&c.jsx(Zt,{text:"Fetching Query Results..."}),p&&c.jsx(q.Suspense,{fallback:c.jsx("div",{children:"Loading..."}),children:c.jsx(Di,{result:d.data.result,maxHeight:o})}),h&&c.jsx(Jt,{context:`${a} > ${s} > ${i}`,error:f})]})}function S9({cell:e,hideCodeCellIcon:t,hideEmbeddingIcon:n,resourceUri:r,index:o,maxResultSize:i,isExecuting:a}){const[s,l]=q.useState(!1),[u,d]=q.useState(!1),[p,h]=q.useState(!1),[f,m]=q.useState(),[b,x]=q.useState(),[y,E]=q.useState(!1),[C,k]=q.useState(""),v=/import\s*\{([^}]+)\}\s*from\s*['"`][^'"`]+['"`]/,S=/import\s*(?:\{[^}]*\}\s*from\s*)?['"`]([^'"`]+)['"`]/,N=L=>L.split(`
|
|
216
|
-
`).filter(I=>!I.trimStart().startsWith("##")).join(`
|
|
217
|
-
`),O=!!e.text&&(v.test(e.text)||S.test(e.text)),B=()=>{if(!e.newSources||e.newSources.length===0)return 0;let L=[],I="";if(e.text){const A=e.text.match(v);A&&(L=A[1].split(",").map(W=>W.trim()));const M=e.text.match(S);M&&(I=M[1].trim())}for(let A=0;A<e.newSources.length;A++)try{const M=JSON.parse(e.newSources[A]);if(L.length>0&&L.includes(M.name)||I&&I===M.path)return A}catch{continue}return 0},R=e.newSources&&e.newSources.length>0?{sourceInfos:e.newSources,resource:r}:void 0,F=op({query:e.text,resourceUri:r});q.useEffect(()=>{e.type==="code"&&Zs(N(e.text),"malloy").then(L=>{m(L)})},[e]),q.useEffect(()=>{Zs(F,"typescript").then(L=>{x(L)})},[F]);const T=()=>{const L=window.location.href;navigator.clipboard.writeText(L).then(()=>k("URL copied to clipboard!")).catch(()=>k("Failed to copy URL"))};return e.type==="markdown"&&c.jsx(Zu,{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(Bs,{children:e.text}),c.jsx(P.Tooltip,{title:"Click to copy link",children:c.jsx(qc,{sx:{fontSize:"24px",color:"#666666",cursor:"pointer",marginTop:"26px"},onClick:T})})]}):c.jsx(Bs,{children:e.text}),c.jsx(P.Snackbar,{open:C!=="",autoHideDuration:6e3,onClose:()=>k(""),message:C})]})})||e.type==="code"&&c.jsxs(Zu,{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(xs,{sx:{position:"relative",padding:"0"},children:c.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:"24px",paddingRight:"8px"},children:[f&&c.jsx("span",{dangerouslySetInnerHTML:{__html:f},style:{fontFamily:"monospace",fontSize:"14px",flex:1,marginRight:"8px"}}),O&&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(mi,{sx:{fontSize:"18px",color:"#666666"}})})]})})}),c.jsx(tp,{open:y,onClose:()=>E(!1),title:"Data Sources",hasValidImport:O,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:"#666666"},children:c.jsx(Kr,{})})]}),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:f}})})})]}),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:"#666666"},children:c.jsx(Kr,{})})]}),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:"#666666"},onClick:()=>{navigator.clipboard.writeText(F)},children:c.jsx(T9,{})})})]})})]}),c.jsx(ux,{open:p,onClose:()=>h(!1),result:e.result||"",title:"Results"}),a&&!e.result&&!O&&!(e.newSources&&e.newSources.length>0)&&c.jsx(xs,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:200},children:c.jsx(P.CircularProgress,{size:32})}),e.result&&c.jsxs(xs,{sx:{position:"relative"},children:[c.jsx(P.Box,{sx:{paddingTop:"24px"},children:c.jsx(Di,{result:e.result,maxHeight:700,maxResultSize:i})}),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:L=>{L.stopPropagation(),l(!0)},children:c.jsx(d0,{sx:{fontSize:"18px",color:"#666666"}})}),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(mi,{sx:{fontSize:"18px",color:"#666666"}})})]})]})]})}const k9=4;function hx({resourceUri:e,maxResultSize:t=0,retrievalFn:n}){const{apiClients:r}=st.useServer(),{environmentName:o,packageName:i,versionId:a,modelPath:s}=Tt(e),{data:l,isSuccess:u,isError:d,error:p}=Qt({queryKey:[e],queryFn:async()=>(await r.notebooks.getNotebook(o,i,s,a)).data}),[h,f]=q.useState([]),[m,b]=q.useState(!1),[x,y]=q.useState(null),E=q.useMemo(()=>l?rx(l.annotations):null,[l]),C=q.useMemo(()=>l?.notebookCells?ix(l.notebookCells):null,[l]),k=q.useMemo(()=>C?.sourceInfoMap??new Map,[C]),v=C?.modelPath??null,S=q.useMemo(()=>{const H=new Map;if(!l?.sources)return H;for(const j of l.sources)if(j.name&&j.filters&&j.filters.length>0){const w=j.filters.filter(V=>!V.implicit);w.length>0&&H.set(j.name,w)}return H},[l]),N=S.size>0,O=q.useMemo(()=>{if(N&&v){const H=[];for(const[j,w]of S)for(const V of w??[]){if(!V.dimension||!V.type)continue;let J;const _=V.dimensionType;_==="boolean"?J="Boolean":_==="date"||_==="timestamp"||_==="timestamptz"?J="DateMinMax":_==="number"?J=V.type==="equal"||V.type==="in"?"Star":"MinMax":J={equal:"Star",in:"Star",like:"Star",greater_than:"MinMax",less_than:"MinMax"}[V.type]??"Star";const Z={equal:"Equals",in:"Equals",like:"Contains",greater_than:J==="DateMinMax"?"After":"Greater Than",less_than:J==="DateMinMax"?"Before":"Less Than"}[V.type],Y=V.name!==V.dimension?V.name:void 0;H.push({source:j,model:v,dimensionName:V.dimension,filterType:J,label:Y,filterName:V.name??V.dimension,defaultMatchType:Z,required:V.required??!1})}return H}return!E||k.size===0||!v?[]:ax(k,E.filters,v)},[N,S,E,k,v]),{filterStates:B,updateFilter:R,getActiveFilters:F}=rp({dimensionSpecs:O}),T=q.useMemo(()=>F(),[B,F]);q.useMemo(()=>{const H=new Map;for(const j of O){const w=Rr(j);H.set(w,j.source)}return H},[O]);const{data:L}=np({environment:o,package:i,dimensionSpecs:O,versionId:a,enabled:O.length>0}),I=q.useCallback(H=>{if(H.length===0)return;const j=V=>V instanceof Date?V.toISOString().slice(0,10):String(V),w={};for(const V of H){const J=V.filterName??V.dimensionName,_=V.value;Array.isArray(_)?w[J]=_.map(j):_!=null&&(w[J]=j(_))}return Object.keys(w).length>0?JSON.stringify(w):void 0},[]),A=q.useCallback(async(H=[])=>{if(!u||!l?.notebookCells)return;f(w=>w.length===0?l.notebookCells.map(V=>({...V})):w.map(V=>({...V,result:void 0}))),b(!0),y(null);const j=N?I(H):void 0;try{const w=[];for(let J=0;J<l.notebookCells.length;J++){const _=l.notebookCells[J];if(_.type==="markdown")continue;const de=J,Z=async()=>{try{const te=(await r.notebooks.executeNotebookCell(o,i,s,de,a,j)).data,X=te.result,re=_.newSources||te.newSources;f(Q=>{const K=[...Q];return K[de]||(K[de]={..._}),K[de]={...K[de],result:X,newSources:re},K})}catch(Y){console.error(`Error executing cell ${de}:`,Y)}};w.push(Z)}const V=[];for(const J of w){const _=J().then(()=>{V.splice(V.indexOf(_),1)});V.push(_),V.length>=k9&&await Promise.race(V)}await Promise.all(V)}catch(w){console.error("Error executing notebook cells:",w),y(w)}finally{b(!1)}},[u,l,N,I,o,i,s,a,r.notebooks]);q.useEffect(()=>{!u||!l?.notebookCells||A([])},[u,l,A]);const M=q.useRef("");q.useEffect(()=>{const H=JSON.stringify(T.map(j=>({dim:j.dimensionName,type:j.matchType,val:j.value,val2:j.value2})));if(H!==M.current){if(M.current===""&&T.length===0){M.current=H;return}M.current=H,m||A(T)}},[T,m,A]);const W=q.useCallback(H=>j=>{R(H,j)},[R]);return O.some(H=>H.filterType==="Retrieval"),c.jsx(SE,{children:c.jsx(kE,{children:c.jsxs(P.Stack,{spacing:3,component:"section",children:[O.length>0&&L&&c.jsxs(P.Paper,{elevation:0,sx:{p:3,backgroundColor:"#ffffff",border:"1px solid #f0f0f0",borderRadius:2,boxShadow:"0 1px 3px rgba(0, 0, 0, 0.04)",transition:"box-shadow 0.2s ease-in-out","&:hover":{boxShadow:"0 2px 6px rgba(0, 0, 0, 0.08)"}},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:O.map(H=>{const j=Rr(H),w=L.get(j)||[],V=B.get(j);return H.filterType==="Retrieval"&&!n?null:c.jsx(P.Box,{children:c.jsx(nx,{spec:H,values:w,selection:V?.selection,onChange:W(j),retrievalFn:n})},j)})})]}),!u&&!d&&c.jsx(Zt,{text:"Fetching Notebook..."}),u&&(h.length>0?h:l?.notebookCells||[]).map((H,j)=>c.jsx(S9,{cell:H,index:j,resourceUri:e,maxResultSize:t,isExecuting:m},j)),d&&p.status===404&&c.jsxs(P.Typography,{variant:"body2",sx:{color:"#666666"},children:[c.jsx("code",{children:`${o} > ${i} > ${s}`})," ","not found."]}),d&&p.status!==404&&c.jsx(Jt,{error:p,context:`${o} > ${i} > ${s}`}),x&&c.jsx(Jt,{error:{message:x.message,status:500,name:"ExecutionError"},context:"Notebook Execution"})]})})})}const mx=tt(c.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}));function D9({resourceUri:e}){const{apiClients:t}=st.useServer(),{environmentName:n,packageName:r,versionId:o}=Tt(e),{data:i,isSuccess:a,isError:s,error:l}=Qt({queryKey:["package",n,r,o],queryFn:()=>t.packages.getPackage(n,r,o,!1)});return c.jsx(Qr,{children:c.jsxs(Xr,{children:[c.jsx(wo,{children:"Package Config"}),c.jsx(P.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:c.jsxs(P.List,{dense:!0,disablePadding:!0,children:[c.jsx(P.ListItem,{dense:!0,disablePadding:!0,children:c.jsx(P.ListItemText,{primary:"Name",primaryTypographyProps:{fontWeight:"500"},secondary:r})}),!a&&!s&&c.jsx(P.ListItem,{children:c.jsx(Zt,{text:"Fetching Package Metadata..."})}),a&&(i.data&&c.jsx(P.ListItem,{dense:!0,disablePadding:!0,children:c.jsx(P.ListItemText,{primary:"Description",primaryTypographyProps:{fontWeight:"500"},secondary:i.data.description})})||c.jsxs(P.ListItem,{disablePadding:!0,dense:!0,sx:{mt:"20px"},children:[c.jsx(mx,{sx:{color:"grey.600",mr:"10px"}}),c.jsx(P.ListItemText,{primary:"No package manifest"})]})),s&&c.jsx(Jt,{error:l,context:`${n} > ${r} > ${o}`})]})})]})})}const gx=tt(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"})),Dr={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:[]},Ns={postgres:"postgresConnection",bigquery:"bigqueryConnection",snowflake:"snowflakeConnection",trino:"trinoConnection",databricks:"databricksConnection",mysql:"mysqlConnection",duckdb:"duckdbConnection",motherduck:"motherduckConnection",ducklake:"ducklakeConnection"},Fc={postgres:"postgresConnection",bigquery:"bigqueryConnection",snowflake:"snowflakeConnection",gcs:"gcsConnection",s3:"s3Connection",azure:"azureConnection"},Pa=[{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}],Ra=[{label:"Key ID",name:"keyId",type:"text",required:!0},{label:"Secret",name:"secret",type:"password",required:!0}],w9=[{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 sl(e){return e==="postgres"||e==="bigquery"||e==="snowflake"?Dr[e]||[]:e==="s3"?Pa:e==="gcs"?Ra:e==="azure"?w9:[]}function I9({onSubmit:e,isSubmitting:t}){const[n,r]=q.useState(!1),[o,i]=q.useState("postgres"),[a,s]=q.useState([]),[l,u]=q.useState("postgres"),[d,p]=q.useState("s3"),h=()=>{r(!0)},f=()=>{r(!1),s([]),i("postgres"),u("postgres"),p("s3")},m=async E=>{E.preventDefault();const C=new FormData(E.currentTarget),k=C.get("name")?.toString(),v=C.get("type")?.toString(),S=Dr[v];if(!k)throw new Error("Name is required");if(!v)throw new Error("Type is required");let N;if(v==="ducklake"){const O={};if(l==="postgres"){const F=Dr.postgres,T={};if(F.forEach(L=>{const I=C.get(`ducklake_pg_${L.name}`)?.toString();I&&(T[L.name]=I)}),Object.keys(T).length===0)throw new Error("DuckLake requires catalog connection");O.postgresConnection=T}const B=C.get("ducklake_bucketUrl")?.toString();if(!B)throw new Error("DuckLake requires a bucket URL");const R={bucketUrl:B};if(d==="s3"){const F={};if(Pa.forEach(T=>{const L=C.get(`ducklake_s3_${T.name}`)?.toString();L&&(F[T.name]=L)}),!F.accessKeyId)throw new Error("S3 Access Key ID is required");if(!F.secretAccessKey)throw new Error("S3 Secret Access Key is required");Object.keys(F).length>0&&(R.s3Connection=F)}else if(d==="gcs"){const F={};if(Ra.forEach(T=>{const L=C.get(`ducklake_gcs_${T.name}`)?.toString();L&&(F[T.name]=L)}),!F.keyId)throw new Error("GCS Key ID is required");if(!F.secret)throw new Error("GCS Secret is required");Object.keys(F).length>0&&(R.gcsConnection=F)}N={name:k,type:v,ducklakeConnection:{catalog:O,storage:R}}}else if(v==="duckdb"){if(a.length===0)throw new Error("DuckDB connection must have at least one attached database");const O=a.map((B,R)=>{const F=B.dbType,T=C.get(`attachedDb_${R}_name`)?.toString();if(!T)throw new Error(`Attached database at index ${R} must have a name`);const L={name:T,type:F},I=sl(F);if(I&&I.length>0){const A={};I.forEach(W=>{const H=C.get(`attachedDb_${R}_${W.name}`)?.toString();H&&(A[W.name]=H)});const M=Fc[F];M&&(L[M]=A)}return L});N={name:k,type:v,duckdbConnection:{attachedDatabases:O}}}else{const O={};if(S.forEach(B=>{const R=C.get(B.name)?.toString();R&&(O[B.name]=R)}),v==="postgres"){if(!!!O.connectionString?.trim()){const R=["host","port","databaseName","userName","password"];for(const F of R)if(!O[F])throw new Error(`${S.find(T=>T.name===F)?.label||F} is required`)}}else if(v==="bigquery"){if(!O.serviceAccountKeyJson)throw new Error("Service Account Key JSON is required")}else if(v==="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(v==="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(v==="mysql"){const B=["host","port","database","user","password"];for(const R of B)if(!O[R])throw new Error(`${S.find(F=>F.name===R)?.label||R} is required`)}else if(v==="motherduck"){if(!O.accessToken)throw new Error("Access Token is required")}else if(v==="databricks"){if(!O.host)throw new Error("Host is required");if(!O.path)throw new Error("HTTP Path is required");const B=O.oauthClientId&&O.oauthClientSecret;if(!O.token&&!B)throw new Error("Either Access Token or OAuth Client ID + Secret is required")}N={name:k,type:v,[Ns[v]]:O}}await e(N),f()},b=()=>{s([...a,{name:"",dbType:"postgres"}])},x=E=>{s(a.filter((C,k)=>k!==E))},y=(E,C)=>{const k=[...a];k[E]={...k[E],dbType:C},s(k)};return c.jsxs(q.Fragment,{children:[c.jsx(Dt,{variant:"outlined",onClick:h,children:"Add Connection"}),c.jsxs(gr,{open:n,onClose:f,children:[c.jsx(Lr,{children:"Create New Connection"}),c.jsxs(xr,{children:[c.jsx(Ai,{children:"Add a new connection to query your data database using Malloy."}),c.jsxs("form",{onSubmit:m,id:"connection-form",children:[c.jsx(Qe,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Connection Name",type:"text",fullWidth:!0,variant:"standard"}),c.jsx(Qe,{margin:"dense",id:"type",name:"type",label:"Connection Type",fullWidth:!0,variant:"standard",value:o,select:!0,onChange:E=>i(E.target.value),children:Object.values(st.ConnectionTypeEnum).map(E=>c.jsx(tn,{value:E,children:E},E))}),o==="ducklake"?c.jsxs(Pt,{sx:{mt:2},children:[c.jsxs(Pt,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[c.jsx(xt,{variant:"subtitle2",sx:{mb:2},fontWeight:500,children:"Catalog"}),c.jsx(Qe,{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(tn,{value:"postgres",children:"PostgreSQL"})}),l==="postgres"&&c.jsx(c.Fragment,{children:Dr.postgres.map(E=>c.jsx(Qe,{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(Pt,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[c.jsx(xt,{variant:"subtitle2",sx:{mb:2},fontWeight:500,children:"Storage"}),c.jsxs(Qe,{margin:"dense",id:"ducklake_storageType",label:"Storage Type",fullWidth:!0,variant:"standard",value:d,select:!0,onChange:E=>p(E.target.value),children:[c.jsx(tn,{value:"s3",children:"S3"}),c.jsx(tn,{value:"gcs",children:"GCS"})]}),c.jsx(Qe,{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(xt,{variant:"caption",sx:{mt:2,mb:1,display:"block"},color:"text.secondary",children:"S3 Credentials"}),Pa.map(E=>c.jsx(Qe,{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(xt,{variant:"caption",sx:{mt:2,mb:1,display:"block"},color:"text.secondary",children:"GCS Credentials"}),Ra.map(E=>c.jsx(Qe,{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(Pt,{sx:{mt:2},children:[c.jsxs(Pt,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[c.jsx(xt,{variant:"subtitle1",fontWeight:500,children:"Attached Databases"}),c.jsx(Dt,{startIcon:c.jsx(Vc,{}),onClick:b,size:"small",variant:"outlined",children:"Add Database"})]}),a.length===0&&c.jsx(xt,{variant:"body2",color:"text.secondary",sx:{mb:2},children:'DuckDB connections require at least one attached database. Click "Add Database" to get started.'}),a.map((E,C)=>{const k=sl(E.dbType);return c.jsxs(Pt,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[c.jsxs(Pt,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[c.jsxs(xt,{variant:"subtitle2",children:["Database ",C+1]}),c.jsx(wn,{onClick:()=>x(C),size:"small",color:"error",children:c.jsx(gx,{fontSize:"small"})})]}),c.jsx(Qe,{margin:"dense",required:!0,id:`attachedDb_${C}_name`,name:`attachedDb_${C}_name`,label:"Database Name",type:"text",fullWidth:!0,variant:"standard",defaultValue:E.name}),c.jsx(Qe,{margin:"dense",id:`attachedDb_${C}_type`,name:`attachedDb_${C}_type`,label:"Database Type",fullWidth:!0,variant:"standard",value:E.dbType,select:!0,onChange:v=>y(C,v.target.value),children:Object.values(st.AttachedDatabaseTypeEnum).map(v=>c.jsx(tn,{value:v,children:v},v))}),k.filter(v=>v.visibleWhen?(E[v.visibleWhen.field]||k.find(N=>N.name===v.visibleWhen?.field)?.selectOptions?.[0]?.value)===v.visibleWhen.value:!0).map(v=>c.jsx(Qe,{margin:"dense",id:`attachedDb_${C}_${v.name}`,name:`attachedDb_${C}_${v.name}`,label:v.label,type:v.selectOptions?void 0:v.type,fullWidth:!0,variant:"standard",required:v.required,select:!!v.selectOptions,defaultValue:v.selectOptions?.[0]?.value,onChange:v.selectOptions?S=>{const N=[...a];N[C]={...N[C],[v.name]:S.target.value},s(N)}:void 0,children:v.selectOptions?.map(S=>c.jsx(tn,{value:S.value,children:S.label},S.value))},v.name))]},C)})]}):Dr[o].map(E=>c.jsx(Qe,{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(br,{children:[c.jsx(Dt,{disabled:t,onClick:f,children:"Cancel"}),c.jsx(Dt,{type:"submit",form:"connection-form",loading:t,children:"Create Connection"})]})]})]})}function A9({connection:e,onCloseDialog:t,isMutating:n,onDelete:r}){const[o,i]=q.useState(!1),[a,s]=q.useState(""),l=()=>{i(!0)},u=()=>{i(!1),t()};return c.jsxs(q.Fragment,{children:[c.jsx(wn,{"aria-label":`Delete connection ${e?.name??""}`.trim(),onClick:d=>{d.stopPropagation(),l()},children:c.jsx(Dn.Delete,{})}),c.jsxs(gr,{onClose:u,"aria-labelledby":"customized-dialog-title",open:o,children:[c.jsx(Lr,{sx:{m:0,p:2},id:"customized-dialog-title",children:"Delete Connection"}),c.jsx(wn,{"aria-label":"close",onClick:u,sx:d=>({position:"absolute",right:8,top:8,color:d.palette.grey[500]}),children:c.jsx(Kr,{})}),c.jsx(xr,{dividers:!0,children:c.jsxs(xt,{gutterBottom:!0,children:['Are you sure you want to delete "',e.name,'"? This action cannot be undone.']})}),c.jsx(br,{children:c.jsx(Dt,{loading:n,variant:"contained",autoFocus:!0,onClick:()=>r(),color:"error",children:"Delete"})}),c.jsx(P.Snackbar,{open:a!=="",autoHideDuration:6e3,onClose:()=>s(""),message:a})]})]})}function Fm(e){const t=e.duckdbConnection?.attachedDatabases;return!t||t.length===0?[]:t.map(n=>({name:n.name||"",dbType:n.type||"postgres"}))}function _m(e){const t=e.ducklakeConnection;return t&&t.storage?.gcsConnection?"gcs":"s3"}function P9({connection:e,onSubmit:t,isSubmitting:n}){const[r,o]=q.useState(!1),[i,a]=q.useState(e.type),[s,l]=q.useState(()=>Fm(e)),[u,d]=q.useState("postgres"),[p,h]=q.useState(()=>_m(e)),f=()=>{l(Fm(e)),a(e.type),d("postgres"),h(_m(e)),o(!0)},m=()=>{o(!1)},b=async v=>{v.preventDefault();const S=new FormData(v.currentTarget),N=S.get("name")?.toString(),O=S.get("type")?.toString(),B=Dr[O];if(!N)throw new Error("Name is required");if(!O)throw new Error("Type is required");let R;if(O==="ducklake"){const F={};if(u==="postgres"){const I=Dr.postgres,A={};if(I.forEach(M=>{const W=S.get(`ducklake_pg_${M.name}`)?.toString();W&&(A[M.name]=W)}),Object.keys(A).length===0)throw new Error("DuckLake requires catalog connection");F.postgresConnection=A}const T=S.get("ducklake_bucketUrl")?.toString();if(!T)throw new Error("DuckLake requires a bucket URL");const L={bucketUrl:T};if(p==="s3"){const I={};Pa.forEach(M=>{const W=S.get(`ducklake_s3_${M.name}`)?.toString();W&&(I[M.name]=W)});const A=e.ducklakeConnection?.storage?.s3Connection;if(A&&(!I.accessKeyId&&A.accessKeyId&&(I.accessKeyId=A.accessKeyId),!I.secretAccessKey&&A.secretAccessKey&&(I.secretAccessKey=A.secretAccessKey)),!I.accessKeyId)throw new Error("S3 Access Key ID is required");if(!I.secretAccessKey)throw new Error("S3 Secret Access Key is required");Object.keys(I).length>0&&(L.s3Connection=I)}else if(p==="gcs"){const I={};Ra.forEach(M=>{const W=S.get(`ducklake_gcs_${M.name}`)?.toString();W&&(I[M.name]=W)});const A=e.ducklakeConnection?.storage?.gcsConnection;if(A&&(!I.keyId&&A.keyId&&(I.keyId=A.keyId),!I.secret&&A.secret&&(I.secret=A.secret)),!I.keyId)throw new Error("GCS Key ID is required");if(!I.secret)throw new Error("GCS Secret is required");Object.keys(I).length>0&&(L.gcsConnection=I)}R={name:N,type:O,ducklakeConnection:{catalog:F,storage:L}}}else if(O==="duckdb"){if(s.length===0)throw new Error("DuckDB connection must have at least one attached database");const F=s.map((T,L)=>{const I=T.dbType,A=S.get(`attachedDb_${L}_name`)?.toString();if(!A)throw new Error(`Attached database at index ${L} must have a name`);const M={name:A,type:I},W=sl(I);if(W&&W.length>0){const H={};W.forEach(w=>{const V=S.get(`attachedDb_${L}_${w.name}`)?.toString();V&&(H[w.name]=V)});const j=Fc[I];j&&(M[j]=H)}return M});R={name:N,type:O,duckdbConnection:{attachedDatabases:F}}}else{const F=e[Ns[O]]||{},T={};if(B.forEach(L=>{const I=S.get(L.name)?.toString(),A=F[L.name],M=L.type==="password"||L.name==="password"||L.name==="secretAccessKey"||L.name==="secret"||L.name==="accessToken"||L.name==="privateKey";I?T[L.name]=I:M&&A?T[L.name]=A:I!==void 0?T[L.name]=I:A&&(T[L.name]=A)}),O==="postgres"){if(!!!T.connectionString?.trim()){const I=["host","port","databaseName","userName","password"];for(const A of I)if(!T[A])throw new Error(`${B.find(M=>M.name===A)?.label||A} is required`)}}else if(O==="bigquery"){if(!T.serviceAccountKeyJson)throw new Error("Service Account Key JSON is required")}else if(O==="snowflake"){if(!T.account)throw new Error("Account is required");if(!T.username)throw new Error("Username is required");if(!T.warehouse)throw new Error("Warehouse is required");if(!T.password&&!T.privateKey)throw new Error("Either password or private key is required")}else if(O==="trino"){if(!T.server)throw new Error("Server is required");if(!T.user)throw new Error("User is required");if(T.server.trim().startsWith("https://")&&!T.password&&!T.peakaKey)throw new Error("Password is required for HTTPS connections (or use Peaka Key)")}else if(O==="mysql"){const L=["host","port","database","user","password"];for(const I of L)if(!T[I])throw new Error(`${B.find(A=>A.name===I)?.label||I} is required`)}else if(O==="motherduck"){if(!T.accessToken)throw new Error("Access Token is required")}else if(O==="databricks"){if(!T.host)throw new Error("Host is required");if(!T.path)throw new Error("HTTP Path is required");const L=T.oauthClientId&&T.oauthClientSecret;if(!T.token&&!L)throw new Error("Either Access Token or OAuth Client ID + Secret is required")}R={name:N,type:O,[Ns[O]]:T}}await t(R),m()},x=()=>{l([...s,{name:"",dbType:"postgres"}])},y=v=>{l(s.filter((S,N)=>N!==v))},E=(v,S)=>{const N=[...s];N[v]={...N[v],dbType:S},l(N)},C=(v,S)=>{const N=e.duckdbConnection?.attachedDatabases;if(!N||!N[v])return"";const O=N[v],B=Fc[O.type||""];return B&&O[B]?O[B][S]??"":""},k=v=>{const S=e.ducklakeConnection;if(!S)return"";if(v.startsWith("pg_")){const N=v.replace("pg_","");return S.catalog?.postgresConnection?.[N]??""}if(v==="bucketUrl")return S.storage?.bucketUrl??"";if(v.startsWith("s3_")){const N=v.replace("s3_","");return S.storage?.s3Connection?.[N]??""}if(v.startsWith("gcs_")){const N=v.replace("gcs_","");return S.storage?.gcsConnection?.[N]??""}return""};return c.jsxs(q.Fragment,{children:[c.jsx(wn,{"aria-label":`Edit connection ${e?.name??""}`.trim(),onClick:v=>{v.preventDefault(),v.stopPropagation(),f()},children:c.jsx(Dn.Edit,{})}),c.jsxs(gr,{open:r,onClose:m,children:[c.jsx(Lr,{onClick:v=>{v.stopPropagation()},children:"Edit Connection"}),c.jsxs(xr,{onClick:v=>{v.stopPropagation()},children:[c.jsx(Ai,{children:"Edit a connection to query your data database using Malloy."}),c.jsxs("form",{onSubmit:b,id:"connection-form",children:[c.jsx(Qe,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Connection Name",type:"text",fullWidth:!0,variant:"standard",defaultValue:e.name}),c.jsx(Qe,{margin:"dense",id:"type",name:"type",label:"Connection Type",fullWidth:!0,variant:"standard",value:i,select:!0,onChange:v=>a(v.target.value),children:Object.values(st.ConnectionTypeEnum).map(v=>c.jsx(tn,{value:v,children:v},v))}),i==="ducklake"?c.jsxs(Pt,{sx:{mt:2},children:[c.jsxs(Pt,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[c.jsx(xt,{variant:"subtitle2",sx:{mb:2},fontWeight:500,children:"Catalog"}),c.jsx(Qe,{margin:"dense",id:"ducklake_catalogType",label:"Catalog Type",fullWidth:!0,variant:"standard",value:u,select:!0,onChange:v=>d(v.target.value),children:c.jsx(tn,{value:"postgres",children:"PostgreSQL"})}),u==="postgres"&&c.jsx(c.Fragment,{children:Dr.postgres.map(v=>c.jsx(Qe,{margin:"dense",id:`ducklake_pg_${v.name}`,name:`ducklake_pg_${v.name}`,label:v.label,type:v.type,fullWidth:!0,variant:"standard",defaultValue:k(`pg_${v.name}`)},`pg_${v.name}`))})]}),c.jsxs(Pt,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[c.jsx(xt,{variant:"subtitle2",sx:{mb:2},fontWeight:500,children:"Storage"}),c.jsxs(Qe,{margin:"dense",id:"ducklake_storageType",label:"Storage Type",fullWidth:!0,variant:"standard",value:p,select:!0,onChange:v=>h(v.target.value),children:[c.jsx(tn,{value:"s3",children:"S3"}),c.jsx(tn,{value:"gcs",children:"GCS"})]}),c.jsx(Qe,{margin:"dense",required:!0,id:"ducklake_bucketUrl",name:"ducklake_bucketUrl",label:p==="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")}),p==="s3"&&c.jsxs(c.Fragment,{children:[c.jsx(xt,{variant:"caption",sx:{mt:2,mb:1,display:"block"},color:"text.secondary",children:"S3 Credentials"}),Pa.map(v=>c.jsx(Qe,{margin:"dense",id:`ducklake_s3_${v.name}`,name:`ducklake_s3_${v.name}`,label:v.label,type:v.type,fullWidth:!0,variant:"standard",required:v.required&&v.name!=="secretAccessKey",defaultValue:k(`s3_${v.name}`),placeholder:v.name==="region"?"us-east-1":v.name==="secretAccessKey"?"Leave empty to keep existing":void 0},`s3_${v.name}`))]}),p==="gcs"&&c.jsxs(c.Fragment,{children:[c.jsx(xt,{variant:"caption",sx:{mt:2,mb:1,display:"block"},color:"text.secondary",children:"GCS Credentials"}),Ra.map(v=>c.jsx(Qe,{margin:"dense",id:`ducklake_gcs_${v.name}`,name:`ducklake_gcs_${v.name}`,label:v.label,type:v.type,fullWidth:!0,variant:"standard",required:v.required&&v.name!=="secret",defaultValue:k(`gcs_${v.name}`),placeholder:v.name==="secret"?"Leave empty to keep existing":void 0},`gcs_${v.name}`))]})]})]}):i==="duckdb"?c.jsxs(Pt,{sx:{mt:2},children:[c.jsxs(Pt,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[c.jsx(xt,{variant:"subtitle1",fontWeight:500,children:"Attached Databases"}),c.jsx(Dt,{startIcon:c.jsx(Vc,{}),onClick:x,size:"small",variant:"outlined",children:"Add Database"})]}),s.length===0&&c.jsx(xt,{variant:"body2",color:"text.secondary",sx:{mb:2},children:'DuckDB connections require at least one attached database. Click "Add Database" to get started.'}),s.map((v,S)=>{const N=sl(v.dbType);return c.jsxs(Pt,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[c.jsxs(Pt,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[c.jsxs(xt,{variant:"subtitle2",children:["Database ",S+1]}),c.jsx(wn,{"aria-label":`Remove attached database ${S+1}`,onClick:()=>y(S),size:"small",color:"error",children:c.jsx(gx,{fontSize:"small"})})]}),c.jsx(Qe,{margin:"dense",required:!0,id:`attachedDb_${S}_name`,name:`attachedDb_${S}_name`,label:"Database Name",type:"text",fullWidth:!0,variant:"standard",defaultValue:v.name}),c.jsx(Qe,{margin:"dense",id:`attachedDb_${S}_type`,name:`attachedDb_${S}_type`,label:"Database Type",fullWidth:!0,variant:"standard",value:v.dbType,select:!0,onChange:O=>E(S,O.target.value),children:Object.values(st.AttachedDatabaseTypeEnum).map(O=>c.jsx(tn,{value:O,children:O},O))}),N.filter(O=>O.visibleWhen?(v[O.visibleWhen.field]||C(S,O.visibleWhen.field)||N.find(R=>R.name===O.visibleWhen?.field)?.selectOptions?.[0]?.value)===O.visibleWhen.value:!0).map(O=>c.jsx(Qe,{margin:"dense",id:`attachedDb_${S}_${O.name}`,name:`attachedDb_${S}_${O.name}`,label:O.label,type:O.selectOptions?void 0:O.type,fullWidth:!0,variant:"standard",required:O.required,select:!!O.selectOptions,defaultValue:C(S,O.name)||O.selectOptions?.[0]?.value,onChange:O.selectOptions?B=>{const R=[...s];R[S]={...R[S],[O.name]:B.target.value},l(R)}:void 0,children:O.selectOptions?.map(B=>c.jsx(tn,{value:B.value,children:B.label},B.value))},O.name))]},S)})]}):Dr[i].map(v=>{const S=e?.[Ns[i]??""]?.[v.name??""]??"",N=v.type==="password"||v.name==="password"||v.name==="secretAccessKey"||v.name==="secret"||v.name==="accessToken"||v.name==="privateKey";return c.jsx(Qe,{margin:"dense",id:v.name,name:v.name,label:v.label,type:v.type,fullWidth:!0,variant:"standard",required:v.required&&!N&&!S,defaultValue:S,placeholder:N&&S?"Leave empty to keep existing":void 0},v.name)})]})]}),c.jsxs(br,{onClick:v=>{v.stopPropagation()},children:[c.jsx(Dt,{disabled:n,onClick:m,children:"Cancel"}),c.jsx(Dt,{type:"submit",form:"connection-form",loading:n,children:"Edit Connection"})]})]})]})}function Bm(e,t){return!e||e.type!=="duckdb"?!1:(e.duckdbConnection?.attachedDatabases||[]).some(r=>r.type==="azure"&&r.name===t)}function R9(e){return e.startsWith("gs://")||e.startsWith("s3://")||e.startsWith("https://")||e.startsWith("abfss://")||e.startsWith("az://")}function bx({connectionName:e,resourceUri:t,schema:n,connection:r}){const{apiClients:o}=st.useServer(),{environmentName:i}=Tt(t),[a,s]=q.useState(null),[l,u]=q.useState(n||null),[d,p]=q.useState(!1),{data:h,isError:f,isLoading:m,error:b}=Qt({queryKey:["schemas",i,e],queryFn:()=>o.connections.listSchemas(i,e)}),x=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:y=>p(y.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(Zt,{text:"Loading schemas..."}),f&&c.jsx(Jt,{error:b,context:`${i} > ${e} > Schemas`}),!m&&!f&&x.length===0&&c.jsx(P.Typography,{variant:"body2",children:"No Schemas"}),!m&&!f&&x.length>0&&c.jsx(P.List,{dense:!0,disablePadding:!0,children:x.map(y=>{const E=y.name;if(y.isHidden&&!d)return null;const k=l===E;return c.jsx(P.ListItemButton,{selected:k,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(L9,{connectionName:e,schemaName:l,onTableSelect:y=>{s(y)},resourceUri:t,connection:r})})}),c.jsx(P.Grid,{size:{xs:12,md:n?6:4},children:l&&a&&c.jsx(M9,{environmentName:i,connectionName:e,schemaName:l,tableResource:a})})]})}function M9({environmentName:e,connectionName:t,schemaName:n,tableResource:r}){const{apiClients:o}=st.useServer(),{data:i,isLoading:a,isError:s,error:l}=Qt({queryKey:["connectionTableDetail",e,t,n,r],queryFn:()=>o.connections.getTable(e,t,n,r),enabled:!!n&&!!r}),u={resource:i?.data?.resource??r,columns:i?.data?.columns??[]};return c.jsxs(P.Paper,{sx:{p:1,m:0},children:[s&&c.jsx(Jt,{error:l,context:`${e} > ${t} > ${n} > ${r}`}),!s&&c.jsx(O9,{table:u,loading:a})]})}function O9({table:e,loading:t}){return t?c.jsx(Zt,{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 L9({connectionName:e,schemaName:t,onTableSelect:n,resourceUri:r,connection:o}){const{environmentName:i}=Tt(r),{apiClients:a}=st.useServer(),[s,l]=q.useState(""),{data:u,isSuccess:d,isError:p,error:h,isLoading:f}=Qt({queryKey:["tablesInSchema",i,e,t],queryFn:()=>a.connections.listTables(i,e,t)}),m=Bm(o,t),b=y=>m?y:y.split(".").pop()||y,x=d&&u?.data?u.data.filter(y=>b(y.resource).toLowerCase().includes(s.toLowerCase())).sort((y,E)=>b(y.resource).localeCompare(b(E.resource))):[];return c.jsxs(c.Fragment,{children:[c.jsx(P.Typography,{variant:"overline",fontWeight:"bold",children:R9(t)||Bm(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:y=>l(y.target.value),variant:"outlined"})}),c.jsx(P.Divider,{}),c.jsxs(P.Box,{sx:{mt:"2px",maxHeight:"600px",overflowY:"auto"},children:[f&&c.jsx(Zt,{text:"Fetching Tables..."}),p&&c.jsx(Jt,{error:h,context:`${i} > ${e} > ${t}`}),d&&x.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:x.map(y=>{let E=b(y.resource);return!m&&y.resource.includes("://")&&(E=y.resource.split("/").pop()||y.resource),c.jsx(P.ListItemButton,{onClick:()=>n(y.resource),children:c.jsx(P.ListItemText,{primary:E,secondary:y.columns.length>0?`${y.columns.length} columns`:void 0})},y.resource)})})]})]})}function N9({connection:e,onClick:t,onEdit:n,onDelete:r,isMutating:o,mutable:i,isAdding:a}){return c.jsxs(P.TableRow,{sx:{"&:hover":{backgroundColor:a?void 0:"action.hover"}},children:[c.jsx(P.TableCell,{sx:{cursor:a?"default":"pointer",flexGrow:1,opacity:a?.5:1},onClick:a?void 0:t,children:c.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(P.Typography,{variant:"body2",children:e.name}),c.jsx(mi,{sx:{fontSize:"1rem",color:"action.active",opacity:.7}})]})}),c.jsx(P.TableCell,{sx:{minWidth:"120px"},children:c.jsx(P.Typography,{variant:"body2",children:e.type})}),i&&c.jsxs(P.TableCell,{sx:{minWidth:"120px"},children:[c.jsx(P9,{connection:e,onSubmit:n,isSubmitting:o}),c.jsx(A9,{connection:e,onCloseDialog:()=>{},isMutating:o,onDelete:()=>r(e)})]})]},e.name)}function F9({resourceUri:e}){const{apiClients:t,mutable:n}=st.useServer(),r=Mr.useQueryClient(),{environmentName:o}=Tt(e),[i,a]=q.useState(""),[s,l]=q.useState(null),u=Wa({environmentName:o,connectionName:s}),{data:d,isSuccess:p,isError:h,error:f}=Qt({queryKey:["connections",o],queryFn:()=>t.connections.listConnections(o)}),m=C=>{l(C)},b=()=>{l(null)},x=ur({mutationFn:C=>t.environments.updateEnvironment(o,{name:o,connections:[...d.data,C]}),onSuccess(){a("Connection added successfully"),r.invalidateQueries({queryKey:["connections",o]})},onError(C){a(C.message)}}),y=ur({mutationFn:C=>t.environments.updateEnvironment(o,{name:o,connections:d.data.map(k=>k.name===C.name?C:k)}),onSuccess(C,k){a(`Connection ${k.name} updated successfully`),r.invalidateQueries({queryKey:["connections",o]})},onError(C){a(C.message)}}),E=ur({mutationFn:C=>t.environments.updateEnvironment(o,{name:o,connections:d.data.filter(k=>k.name!==C.name)}),onSuccess(C,k){a(`Connection ${k.name} deleted successfully`),r.invalidateQueries({queryKey:["connections",o]})},onError(C){a(C.message)}});return c.jsxs(c.Fragment,{children:[c.jsx(Qr,{children:c.jsxs(Xr,{children:[c.jsx(wo,{children:"Database Connections"}),c.jsxs(P.Box,{sx:{mb:1,maxHeight:"200px",overflowY:"auto"},children:[!p&&!h&&c.jsx(P.Typography,{variant:"body2",sx:{m:"auto"},children:"Fetching Connections..."}),p&&d.data.length>0&&c.jsx(P.Table,{size:"small",sx:{borderCollapse:"collapse","& .MuiTableRow-root":{display:"flex",width:"100%"},"& .MuiTableCell-root":{borderBottom:"1px solid #e0e0e0",display:"flex",alignItems:"center"},"& .MuiTableRow-root:last-child .MuiTableCell-root":{borderBottom:"none"}},children:c.jsxs(P.TableBody,{children:[c.jsxs(P.TableRow,{children:[c.jsx(P.TableCell,{sx:{flexGrow:1},children:c.jsx(P.Typography,{variant:"body2",fontWeight:"500",color:"text.secondary",children:"Connection Name"})}),c.jsx(P.TableCell,{sx:{minWidth:"120px"},children:c.jsx(P.Typography,{variant:"body2",fontWeight:"500",color:"text.secondary",children:"Type"})}),n&&c.jsx(P.TableCell,{sx:{minWidth:"120px"},children:c.jsx(P.Typography,{variant:"body2",fontWeight:"500",color:"text.secondary",sx:{mx:"auto"},children:"Actions"})})]}),d.data.map(C=>c.jsx(N9,{connection:C,onClick:()=>m(C.name),onEdit:k=>y.mutateAsync(k),onDelete:k=>{C.resource?a("Cannot delete this connection"):E.mutateAsync(k)},isMutating:x.isPending||y.isPending||E.isPending,mutable:n,isAdding:x.isPending},C.name))]})}),p&&d.data.length===0&&c.jsx(P.Typography,{variant:"body2",children:"No Connections"}),h&&c.jsx(Jt,{error:f,context:`${o} > Connections`})]}),n&&c.jsx(P.Box,{sx:{display:"flex",justifyContent:"flex-end"},children:c.jsx(I9,{onSubmit:C=>x.mutateAsync(C),isSubmitting:x.isPending})})]})}),c.jsx(P.Snackbar,{open:i!=="",autoHideDuration:6e3,onClose:()=>a(""),message:i}),c.jsxs(P.Dialog,{open:s!==null,onClose:b,maxWidth:"lg",fullWidth:!0,children:[c.jsxs(P.DialogTitle,{children:["Connection Explorer: ",s,c.jsx(P.IconButton,{"aria-label":"close",onClick:b,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(bx,{resourceUri:u,connectionName:s,connection:d?.data?.find(C=>C.name===s)})})]})]})}function _9({resourceUri:e}){const{apiClients:t}=st.useServer(),{environmentName:n,packageName:r,versionId:o}=Tt(e),[i,a]=q.useState(!1),[s,l]=q.useState(null),u=x=>{l(x),a(!0)},d=()=>{a(!1),l(null)},{data:p,isError:h,error:f,isSuccess:m}=Qt({queryKey:["databases",n,r,o],queryFn:()=>t.databases.listDatabases(n,r,o)}),b=x=>x>=1024*1024*1024*1024?`${(x/(1024*1024*1024)).toFixed(2)} T`:x>=1024*1024*1024?`${(x/(1024*1024*1024)).toFixed(2)} G`:x>=1024*1024?`${(x/(1024*1024)).toFixed(2)} M`:`${(x/1024).toFixed(2)} K`;return c.jsxs(c.Fragment,{children:[c.jsx(Qr,{children:c.jsxs(Xr,{children:[c.jsx(wo,{children:"Embedded Databases"}),c.jsxs(P.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!m&&!h&&c.jsx(Zt,{text:"Fetching Databases..."}),h&&c.jsx(Jt,{error:f,context:`${n} > ${r} > Databases`}),m&&p.data.length>0&&c.jsx(P.Table,{size:"small",sx:{borderCollapse:"collapse","& .MuiTableCell-root":{borderBottom:"1px solid #e0e0e0"},"& .MuiTableRow-root:last-child .MuiTableCell-root":{borderBottom:"none"}},children:c.jsxs(P.TableBody,{children:[c.jsxs(P.TableRow,{children:[c.jsx(P.TableCell,{children:c.jsx(P.Typography,{variant:"body2",fontWeight:"500",color:"text.secondary",children:"Name"})}),c.jsx(P.TableCell,{align:"right",children:c.jsx(P.Typography,{variant:"body2",fontWeight:"500",color:"text.secondary",children:"Rows"})})]}),p.data.map(x=>c.jsxs(P.TableRow,{onClick:()=>u(x),sx:{cursor:"pointer","&:hover":{backgroundColor:"action.hover"}},children:[c.jsx(P.TableCell,{component:"th",scope:"row",children:c.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(P.Typography,{variant:"body2",children:x.path}),c.jsx(mi,{sx:{fontSize:"1rem",color:"action.active",opacity:.7}})]})}),c.jsx(P.TableCell,{align:"right",children:c.jsx(P.Typography,{variant:"body2",children:b(x.info.rowCount)})})]},x.path))]})}),m&&p.data.length===0&&c.jsx(P.Typography,{variant:"body2",sx:{m:"auto"},children:"No databases found"})]})]})}),c.jsxs(P.Dialog,{open:i,onClose:d,maxWidth:"sm",fullWidth:!0,children:[c.jsxs(P.DialogTitle,{children:[s?.path,c.jsx(P.IconButton,{"aria-label":"close",onClick:d,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?.info?.columns&&c.jsx(P.TableContainer,{children: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:s.info.columns.map(x=>c.jsxs(P.TableRow,{children:[c.jsx(P.TableCell,{component:"th",scope:"row",children:x.name}),c.jsx(P.TableCell,{children:x.type})]},x.name))})]})})})]})]})}function B9(e){return _e("MuiCollapse",e)}Me("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const j9=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Fe(r,B9,n)},$9=ie("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(et(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),H9=ie("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),U9=ie("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Ma=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiCollapse"}),{addEndListener:o,children:i,className:a,collapsedSize:s="0px",component:l,easing:u,in:d,onEnter:p,onEntered:h,onEntering:f,onExit:m,onExited:b,onExiting:x,orientation:y="vertical",style:E,timeout:C=e0.standard,TransitionComponent:k=qn,...v}=r,S={...r,orientation:y,collapsedSize:s},N=j9(S),O=Gr(),B=Ol(),R=D.useRef(null),F=D.useRef(),T=typeof s=="number"?`${s}px`:s,L=y==="horizontal",I=L?"width":"height",A=D.useRef(null),M=ot(n,A),W=Y=>te=>{if(Y){const X=A.current;te===void 0?Y(X):Y(X,te)}},H=()=>R.current?R.current[L?"clientWidth":"clientHeight"]:0,j=W((Y,te)=>{R.current&&L&&(R.current.style.position="absolute"),Y.style[I]=T,p&&p(Y,te)}),w=W((Y,te)=>{const X=H();R.current&&L&&(R.current.style.position="");const{duration:re,easing:Q}=ci({style:E,timeout:C,easing:u},{mode:"enter"});if(C==="auto"){const K=O.transitions.getAutoHeightDuration(X);Y.style.transitionDuration=`${K}ms`,F.current=K}else Y.style.transitionDuration=typeof re=="string"?re:`${re}ms`;Y.style[I]=`${X}px`,Y.style.transitionTimingFunction=Q,f&&f(Y,te)}),V=W((Y,te)=>{Y.style[I]="auto",h&&h(Y,te)}),J=W(Y=>{Y.style[I]=`${H()}px`,m&&m(Y)}),_=W(b),de=W(Y=>{const te=H(),{duration:X,easing:re}=ci({style:E,timeout:C,easing:u},{mode:"exit"});if(C==="auto"){const Q=O.transitions.getAutoHeightDuration(te);Y.style.transitionDuration=`${Q}ms`,F.current=Q}else Y.style.transitionDuration=typeof X=="string"?X:`${X}ms`;Y.style[I]=T,Y.style.transitionTimingFunction=re,x&&x(Y)}),Z=Y=>{C==="auto"&&B.start(F.current||0,Y),o&&o(A.current,Y)};return c.jsx(k,{in:d,onEnter:j,onEntered:V,onEntering:w,onExit:J,onExited:_,onExiting:de,addEndListener:Z,nodeRef:A,timeout:C==="auto"?null:C,...v,children:(Y,{ownerState:te,...X})=>c.jsx($9,{as:l,className:Pe(N.root,a,{entered:N.entered,exited:!d&&T==="0px"&&N.hidden}[Y]),style:{[L?"minWidth":"minHeight"]:T,...E},ref:M,ownerState:{...S,state:Y},...X,children:c.jsx(H9,{ownerState:{...S,state:Y},className:N.wrapper,ref:R,children:c.jsx(U9,{ownerState:{...S,state:Y},className:N.wrapperInner,children:i})})})})});Ma&&(Ma.muiSupportAuto=!0);function z9(e){return _e("PrivateSwitchBase",e)}Me("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const V9=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${ke(o)}`],input:["input"]};return Fe(i,z9,t)},W9=ie(vo,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),q9=ie("input",{name:"MuiSwitchBase",shouldForwardProp:dn})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Y9=D.forwardRef(function(t,n){const{autoFocus:r,checked:o,checkedIcon:i,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:u=!1,icon:d,id:p,inputProps:h,inputRef:f,name:m,onBlur:b,onChange:x,onFocus:y,readOnly:E,required:C=!1,tabIndex:k,type:v,value:S,slots:N={},slotProps:O={},...B}=t,[R,F]=Sn({controlled:o,default:!!a,name:"SwitchBase",state:"checked"}),T=Yn(),L=Z=>{y&&y(Z),T&&T.onFocus&&T.onFocus(Z)},I=Z=>{b&&b(Z),T&&T.onBlur&&T.onBlur(Z)},A=Z=>{if(Z.nativeEvent.defaultPrevented)return;const Y=Z.target.checked;F(Y),x&&x(Z,Y)};let M=s;T&&typeof M>"u"&&(M=T.disabled);const W=v==="checkbox"||v==="radio",H={...t,checked:R,disabled:M,disableFocusRipple:l,edge:u},j=V9(H),w={slots:N,slotProps:{input:h,...O}},[V,J]=ct("root",{ref:n,elementType:W9,className:j.root,shouldForwardComponentProp:!0,externalForwardedProps:{...w,component:"span",...B},getSlotProps:Z=>({...Z,onFocus:Y=>{Z.onFocus?.(Y),L(Y)},onBlur:Y=>{Z.onBlur?.(Y),I(Y)}}),ownerState:H,additionalProps:{centerRipple:!0,focusRipple:!l,disabled:M,role:void 0,tabIndex:null}}),[_,de]=ct("input",{ref:f,elementType:q9,className:j.input,externalForwardedProps:w,getSlotProps:Z=>({...Z,onChange:Y=>{Z.onChange?.(Y),A(Y)}}),ownerState:H,additionalProps:{autoFocus:r,checked:o,defaultChecked:a,disabled:M,id:W?p:void 0,name:m,readOnly:E,required:C,tabIndex:k,type:v,...v==="checkbox"&&S===void 0?{}:{value:S}}});return c.jsxs(V,{...J,children:[c.jsx(_,{...de}),R?i:d]})}),K9=tt(c.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),G9=tt(c.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),Q9=tt(c.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}));function X9(e){return _e("MuiCheckbox",e)}const zu=Me("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Z9=e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i={root:["root",n&&"indeterminate",`color${ke(r)}`,`size${ke(o)}`]},a=Fe(i,X9,t);return{...t,...a}},J9=ie(Y9,{shouldForwardProp:e=>dn(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${ke(n.size)}`],n.color!=="default"&&t[`color${ke(n.color)}`]]}})(et(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(un()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(un()).map(([t])=>({props:{color:t},style:{[`&.${zu.checked}, &.${zu.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${zu.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),eB=c.jsx(G9,{}),tB=c.jsx(K9,{}),nB=c.jsx(Q9,{}),xx=D.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiCheckbox"}),{checkedIcon:o=eB,color:i="primary",icon:a=tB,indeterminate:s=!1,indeterminateIcon:l=nB,inputProps:u,size:d="medium",disableRipple:p=!1,className:h,slots:f={},slotProps:m={},...b}=r,x=s?l:a,y=s?l:o,E={...r,disableRipple:p,color:i,indeterminate:s,size:d},C=Z9(E),k=m.input??u,[v,S]=ct("root",{ref:n,elementType:J9,className:Pe(C.root,h),shouldForwardComponentProp:!0,externalForwardedProps:{slots:f,slotProps:m,...b},ownerState:E,additionalProps:{type:"checkbox",icon:D.cloneElement(x,{fontSize:x.props.fontSize??d}),checkedIcon:D.cloneElement(y,{fontSize:y.props.fontSize??d}),disableRipple:p,slots:f,slotProps:{input:l0(typeof k=="function"?k(E):k,{"data-indeterminate":s})}}});return c.jsx(v,{...S,classes:C})});function yx(e){return wt}const Ex=D.createContext(null);function rB(e){const{value:t,children:n}=e;return c.jsx(Ex.Provider,{value:t,children:t.wrapRoot({children:n,instance:t.instance})})}const Oo=()=>{const e=D.useContext(Ex);if(e==null)throw new Error(["MUI X: Could not find the Tree View context.","It looks like you rendered your component outside of a SimpleTreeView or RichTreeView parent component.","This can also happen if you are bundling multiple versions of the Tree View."].join(`
|
|
218
|
-
`));return e},oB=({props:e})=>{const{instance:t}=Oo(),{label:n,itemId:r}=e,[o,i]=D.useState(n),a=t.isItemBeingEdited(r);return D.useEffect(()=>{a||i(n)},[a,n]),{propsEnhancers:{labelInput:({externalEventHandlers:s,interactions:l})=>t.isItemEditable(r)?{value:o??"","data-element":"labelInput",onChange:f=>{s.onChange?.(f),i(f.target.value)},onKeyDown:f=>{if(s.onKeyDown?.(f),f.defaultMuiPrevented)return;const m=f.target;f.key==="Enter"&&m.value?l.handleSaveItemLabel(f,m.value):f.key==="Escape"&&l.handleCancelItemLabelEditing(f)},onBlur:f=>{s.onBlur?.(f),!f.defaultMuiPrevented&&f.target.value&&l.handleSaveItemLabel(f,f.target.value)},autoFocus:!0,type:"text"}:{}}}},jn=({instance:e,state:t,setState:n,params:r})=>{const o=D.useRef(t.editedItemId),i=p=>o.current===p,a=p=>{n(h=>U({},h,{editedItemId:p})),o.current=p},s=p=>p===t.editedItemId,l=!!r.isItemEditable,u=p=>{if(p==null||!l)return!1;const h=e.getItem(p);return h?typeof r.isItemEditable=="function"?r.isItemEditable(h):!!r.isItemEditable:!1},d=(p,h)=>{if(!h)throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.","The label of an item cannot be empty.",p].join(`
|
|
219
|
-
`));n(f=>{const m=f.items.itemMetaMap[p];return m.label!==h?U({},f,{items:U({},f.items,{itemMetaMap:U({},f.items.itemMetaMap,{[p]:U({},m,{label:h})})})}):f}),r.onItemLabelChange&&r.onItemLabelChange(p,h)};return{instance:{setEditedItemId:a,isItemBeingEdited:s,updateItemLabel:d,isItemEditable:u,isTreeViewEditable:l,isItemBeingEditedRef:i},publicAPI:{updateItemLabel:d}}};jn.itemPlugin=oB;jn.getDefaultizedParams=({params:e,experimentalFeatures:t})=>{const n=t?.labelEditing;return U({},e,{isItemEditable:n?e.isItemEditable??!1:!1})};jn.getInitialState=()=>({editedItemId:null});jn.params={onItemLabelChange:!0,isItemEditable:!0};const yo=(e,t)=>e.getAvailablePlugins().has(t),Cx=e=>Array.isArray(e)?e.length>0&&e.some(Cx):!!e,iB=({itemId:e,children:t})=>{const{instance:n,selection:{multiSelect:r},publicAPI:o}=Oo(),i={expandable:Cx(t),expanded:n.isItemExpanded(e),focused:n.isItemFocused(e),selected:n.isItemSelected(e),disabled:n.isItemDisabled(e),editing:n?.isItemBeingEdited?n?.isItemBeingEdited(e):!1,editable:n.isItemEditable?n.isItemEditable(e):!1},a=f=>{if(i.disabled)return;i.focused||n.focusItem(f,e);const m=r&&(f.shiftKey||f.ctrlKey||f.metaKey);i.expandable&&!(m&&n.isItemExpanded(e))&&n.toggleItemExpansion(f,e)},s=f=>{if(i.disabled)return;!i.focused&&!i.editing&&n.focusItem(f,e),r&&(f.shiftKey||f.ctrlKey||f.metaKey)?f.shiftKey?n.expandSelectionRange(f,e):n.selectItem({event:f,itemId:e,keepExistingSelection:!0}):n.selectItem({event:f,itemId:e,shouldBeSelected:!0})},l=f=>{const m=f.nativeEvent.shiftKey;r&&m?n.expandSelectionRange(f,e):n.selectItem({event:f,itemId:e,keepExistingSelection:r,shouldBeSelected:f.target.checked})},u=()=>{yo(n,jn)&&n.isItemEditable(e)&&(n.isItemBeingEdited(e)?n.setEditedItemId(null):n.setEditedItemId(e))};return{interactions:{handleExpansion:a,handleSelection:s,handleCheckboxSelection:l,toggleItemEditing:u,handleSaveItemLabel:(f,m)=>{yo(n,jn)&&n.isItemBeingEditedRef(e)&&(n.updateItemLabel(e,m),u(),n.focusItem(f,e))},handleCancelItemLabelEditing:f=>{yo(n,jn)&&n.isItemBeingEditedRef(e)&&(u(),n.focusItem(f,e))}},status:i,publicAPI:o}},ip=D.createContext(()=>-1),Tx=(e,t)=>{let n=t.length-1;for(;n>=0&&!e.isItemNavigable(t[n]);)n-=1;if(n!==-1)return t[n]},vx=(e,t)=>{const n=e.getItemMeta(t),r=e.getItemOrderedChildrenIds(n.parentId),o=e.getItemIndex(t);if(o===0)return n.parentId;let i=o-1;for(;!e.isItemNavigable(r[i])&&i>=0;)i-=1;if(i===-1)return n.parentId==null?null:vx(e,n.parentId);let a=r[i],s=Tx(e,e.getItemOrderedChildrenIds(a));for(;e.isItemExpanded(a)&&s!=null;)a=s,s=e.getItemOrderedChildrenIds(a).find(e.isItemNavigable);return a},Fs=(e,t)=>{if(e.isItemExpanded(t)){const r=e.getItemOrderedChildrenIds(t).find(e.isItemNavigable);if(r!=null)return r}let n=e.getItemMeta(t);for(;n!=null;){const r=e.getItemOrderedChildrenIds(n.parentId),o=e.getItemIndex(n.id);if(o<r.length-1){let i=o+1;for(;!e.isItemNavigable(r[i])&&i<r.length-1;)i+=1;if(e.isItemNavigable(r[i]))return r[i]}n=e.getItemMeta(n.parentId)}return null},Sx=e=>{let t=null;for(;t==null||e.isItemExpanded(t);){const n=e.getItemOrderedChildrenIds(t),r=Tx(e,n);if(r==null)return t;t=r}return t},Oa=e=>e.getItemOrderedChildrenIds(null).find(e.isItemNavigable),kx=(e,t,n)=>{if(t===n)return[t,n];const r=e.getItemMeta(t),o=e.getItemMeta(n);if(r.parentId===o.id||o.parentId===r.id)return o.parentId===r.id?[r.id,o.id]:[o.id,r.id];const i=[r.id],a=[o.id];let s=r.parentId,l=o.parentId,u=a.indexOf(s)!==-1,d=i.indexOf(l)!==-1,p=!0,h=!0;for(;!d&&!u;)p&&(i.push(s),u=a.indexOf(s)!==-1,p=s!==null,!u&&p&&(s=e.getItemMeta(s).parentId)),h&&!u&&(a.push(l),d=i.indexOf(l)!==-1,h=l!==null,!d&&h&&(l=e.getItemMeta(l).parentId));const f=u?s:l,m=e.getItemOrderedChildrenIds(f),b=i[i.indexOf(f)-1],x=a[a.indexOf(f)-1];return m.indexOf(b)<m.indexOf(x)?[t,n]:[n,t]},aB=(e,t,n)=>{const r=l=>{if(e.isItemExpandable(l)&&e.isItemExpanded(l))return e.getItemOrderedChildrenIds(l)[0];let u=e.getItemMeta(l);for(;u!=null;){const d=e.getItemOrderedChildrenIds(u.parentId),p=e.getItemIndex(u.id);if(p<d.length-1)return d[p+1];u=e.getItemMeta(u.parentId)}throw new Error("Invalid range")},[o,i]=kx(e,t,n),a=[o];let s=o;for(;s!==i;)s=r(s),e.isItemDisabled(s)||a.push(s);return a},sB=e=>{let t=Oa(e);const n=[];for(;t!=null;)n.push(t),t=Fs(e,t);return n},La=(e,t)=>t!==e.closest('*[role="treeitem"]');let jm=0;const lB=()=>(jm+=1,`mui-tree-view-${jm}`),ap=({id:e,treeId:t="",itemId:n})=>e??`${t}-${n}`,uB=e=>{const{runItemPlugins:t,items:{onItemClick:n,disabledItemsFocusable:r,indentationAtItemLevel:o},selection:{disableSelection:i,checkboxSelection:a},expansion:{expansionTrigger:s},treeId:l,instance:u,publicAPI:d}=Oo(),p=D.useContext(ip),{id:h,itemId:f,label:m,children:b,rootRef:x}=e,{rootRef:y,contentRef:E,propsEnhancers:C}=t(e),{interactions:k,status:v}=iB({itemId:f,children:b}),S=D.useRef(null),N=D.useRef(null),O=ot(x,y,S),B=ot(E,N),R=D.useRef(null),F=ap({itemId:f,treeId:l,id:h}),T=u.canItemBeTabbed(f)?0:-1,L={rootRefObject:S,contentRefObject:N,interactions:k},I=Q=>K=>{if(Q.onFocus?.(K),K.defaultMuiPrevented)return;const ae=!v.disabled||r;!v.focused&&ae&&K.currentTarget===K.target&&u.focusItem(K,f)},A=Q=>K=>{if(Q.onBlur?.(K),K.defaultMuiPrevented)return;const ae=u.getItemDOMElement(f);v.editing||K.relatedTarget&&La(K.relatedTarget,ae)&&(K.target&&K.target?.dataset?.element==="labelInput"&&La(K.target,ae)||K.relatedTarget?.dataset?.element==="labelInput")||u.removeFocusedItem()},M=Q=>K=>{Q.onKeyDown?.(K),!(K.defaultMuiPrevented||K.target?.dataset?.element==="labelInput")&&u.handleItemKeyDown(K,f)},W=Q=>K=>{Q.onDoubleClick?.(K),!K.defaultMuiPrevented&&k.toggleItemEditing()},H=Q=>K=>{Q.onClick?.(K),n?.(K,f),!(K.defaultMuiPrevented||R.current?.contains(K.target))&&(s==="content"&&k.handleExpansion(K),a||k.handleSelection(K))},j=Q=>K=>{Q.onMouseDown?.(K),!K.defaultMuiPrevented&&(K.shiftKey||K.ctrlKey||K.metaKey||v.disabled)&&K.preventDefault()},w=Q=>K=>{Q.onChange?.(K),!K.defaultMuiPrevented&&(i||v.disabled||k.handleCheckboxSelection(K))},V=Q=>K=>{Q.onClick?.(K),!K.defaultMuiPrevented&&s==="iconContainer"&&k.handleExpansion(K)};return{getRootProps:(Q={})=>{const K=U({},sn(e),sn(Q));let ae;v.selected?ae=!0:i||v.disabled?ae=void 0:ae=!1;const ee=U({},K,{ref:O,role:"treeitem",tabIndex:T,id:F,"aria-expanded":v.expandable?v.expanded:void 0,"aria-selected":ae,"aria-disabled":v.disabled||void 0},Q,{onFocus:I(K),onBlur:A(K),onKeyDown:M(K)});o&&(ee.style={"--TreeView-itemDepth":typeof p=="function"?p(f):p});const ne=C.root?.(U({},L,{externalEventHandlers:K}))??{};return U({},ee,ne)},getContentProps:(Q={})=>{const K=sn(Q),ae=U({},K,Q,{ref:B,onClick:H(K),onMouseDown:j(K),status:v});o&&(ae.indentationAtItemLevel=!0);const ee=C.content?.(U({},L,{externalEventHandlers:K}))??{};return U({},ae,ee)},getGroupTransitionProps:(Q={})=>{const K=sn(Q),ae=U({},K,{unmountOnExit:!0,component:"ul",role:"group",in:v.expanded,children:b},Q);return o&&(ae.indentationAtItemLevel=!0),ae},getIconContainerProps:(Q={})=>{const K=sn(Q);return U({},K,Q,{onClick:V(K)})},getCheckboxProps:(Q={})=>{const K=sn(Q);return U({},K,{visible:a,ref:R,checked:v.selected,disabled:i||v.disabled,tabIndex:-1},Q,{onChange:w(K)})},getLabelProps:(Q={})=>{const K=U({},sn(Q)),ae=U({},K,{children:m},Q,{onDoubleClick:W(K)});return u.isTreeViewEditable&&(ae.editable=v.editable),ae},getLabelInputProps:(Q={})=>{const K=sn(Q),ae=C.labelInput?.({rootRefObject:S,contentRefObject:N,externalEventHandlers:K,interactions:k})??{};return U({},Q,ae)},getDragAndDropOverlayProps:(Q={})=>{const K=sn(Q),ae=C.dragAndDropOverlay?.(U({},L,{externalEventHandlers:K}))??{};return U({},Q,ae)},rootRef:O,status:v,publicAPI:d}},cB=uB;function Dx(e){const{instance:t,items:{onItemClick:n},selection:{multiSelect:r,checkboxSelection:o,disableSelection:i},expansion:{expansionTrigger:a}}=Oo(),s=t.isItemExpandable(e),l=t.isItemExpanded(e),u=t.isItemFocused(e),d=t.isItemSelected(e),p=t.isItemDisabled(e),h=t?.isItemBeingEdited?t?.isItemBeingEdited(e):!1,f=t.isItemEditable?t.isItemEditable(e):!1,m=v=>{if(!p){u||t.focusItem(v,e);const S=r&&(v.shiftKey||v.ctrlKey||v.metaKey);s&&!(S&&t.isItemExpanded(e))&&t.toggleItemExpansion(v,e)}},b=v=>{p||(!u&&!h&&t.focusItem(v,e),r&&(v.shiftKey||v.ctrlKey||v.metaKey)?v.shiftKey?t.expandSelectionRange(v,e):t.selectItem({event:v,itemId:e,keepExistingSelection:!0}):t.selectItem({event:v,itemId:e,shouldBeSelected:!0}))},x=v=>{if(i||p)return;const S=v.nativeEvent.shiftKey;r&&S?t.expandSelectionRange(v,e):t.selectItem({event:v,itemId:e,keepExistingSelection:r,shouldBeSelected:v.target.checked})},y=v=>{(v.shiftKey||v.ctrlKey||v.metaKey||p)&&v.preventDefault()},E=()=>{yo(t,jn)&&t.isItemEditable(e)&&(t.isItemBeingEdited(e)?t.setEditedItemId(null):t.setEditedItemId(e))};return{disabled:p,expanded:l,selected:d,focused:u,editable:f,editing:h,disableSelection:i,checkboxSelection:o,handleExpansion:m,handleSelection:b,handleCheckboxSelection:x,handleContentClick:n,preventSelection:y,expansionTrigger:a,toggleItemEditing:E,handleSaveItemLabel:(v,S)=>{yo(t,jn)&&t.isItemBeingEditedRef(e)&&(t.updateItemLabel(e,S),E(),t.focusItem(v,e))},handleCancelItemLabelEditing:v=>{yo(t,jn)&&t.isItemBeingEditedRef(e)&&(E(),t.focusItem(v,e))}}}const dB=ie("div",{name:"MuiTreeItem2DragAndDropOverlay",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>dt.shouldForwardProp(e)&&e!=="action"})(({theme:e})=>({position:"absolute",left:0,display:"flex",top:0,bottom:0,right:0,pointerEvents:"none",variants:[{props:{action:"make-child"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderRadius:e.shape.borderRadius,backgroundColor:e.vars?`rgba(${e.vars.palette.primary.darkChannel} / ${e.vars.palette.action.focusOpacity})`:dt.alpha(e.palette.primary.dark,e.palette.action.focusOpacity)}},{props:{action:"reorder-above"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderTop:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:"reorder-below"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:"move-to-parent"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * calc(var(--TreeView-itemDepth) - 1))",borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}}]}));function pB(e){return e.action==null?null:c.jsx(dB,U({},e))}const fB=ie("input",{name:"MuiTreeItem2",slot:"LabelInput",overridesResolver:(e,t)=>t.labelInput})(({theme:e})=>U({},e.typography.body1,{width:"100%",backgroundColor:e.palette.background.paper,borderRadius:e.shape.borderRadius,border:"none",padding:"0 2px",boxSizing:"border-box","&:focus":{outline:`1px solid ${e.palette.primary.main}`}})),hB=["classes","className","displayIcon","expansionIcon","icon","label","itemId","onClick","onMouseDown","dragAndDropOverlayProps","labelInputProps"],wx=D.forwardRef(function(t,n){const{classes:r,className:o,displayIcon:i,expansionIcon:a,icon:s,label:l,itemId:u,onClick:d,onMouseDown:p,dragAndDropOverlayProps:h,labelInputProps:f}=t,m=$e(t,hB),{disabled:b,expanded:x,selected:y,focused:E,editing:C,editable:k,disableSelection:v,checkboxSelection:S,handleExpansion:N,handleSelection:O,handleCheckboxSelection:B,handleContentClick:R,preventSelection:F,expansionTrigger:T,toggleItemEditing:L}=Dx(u),I=s||a||i,A=D.useRef(null),M=j=>{F(j),p&&p(j)},W=j=>{R?.(j,u),!A.current?.contains(j.target)&&(T==="content"&&N(j),S||O(j),d&&d(j))},H=j=>{j.defaultMuiPrevented||L()};return c.jsxs("div",U({},m,{className:Pe(r.root,o,x&&r.expanded,y&&r.selected,E&&r.focused,b&&r.disabled,C&&r.editing,k&&r.editable),onClick:W,onMouseDown:M,ref:n,children:[c.jsx("div",{className:r.iconContainer,children:I}),S&&c.jsx(xx,{className:r.checkbox,checked:y,onChange:B,disabled:b||v,ref:A,tabIndex:-1}),C?c.jsx(fB,U({},f,{className:r.labelInput})):c.jsx("div",U({className:r.label},k&&{onDoubleClick:H},{children:l})),h&&c.jsx(pB,U({},h))]}))});function mB(e){return _e("MuiTreeItem",e)}const Sr=Me("MuiTreeItem",["root","groupTransition","content","expanded","selected","focused","disabled","iconContainer","label","checkbox","labelInput","editable","editing","dragAndDropOverlay"]),Ix=tt(c.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),Ax=tt(c.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}));function sp(e){const{children:t,itemId:n}=e,{wrapItem:r,instance:o}=Oo();return r({children:t,itemId:n,instance:o})}sp.propTypes={children:ce.node,itemId:ce.string.isRequired};const gB=["children","className","slots","slotProps","ContentComponent","ContentProps","itemId","id","label","onClick","onMouseDown","onFocus","onBlur","onKeyDown"],bB=["ownerState"],xB=["ownerState"],yB=["ownerState"],EB=yx(),CB=e=>{const{classes:t}=e;return Fe({root:["root"],content:["content"],expanded:["expanded"],selected:["selected"],focused:["focused"],disabled:["disabled"],iconContainer:["iconContainer"],checkbox:["checkbox"],label:["label"],labelInput:["labelInput"],editing:["editing"],editable:["editable"],groupTransition:["groupTransition"]},mB,t)},TB=ie("li",{name:"MuiTreeItem",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),vB=ie(wx,{name:"MuiTreeItem",slot:"Content",overridesResolver:(e,t)=>[t.content,t.iconContainer&&{[`& .${Sr.iconContainer}`]:t.iconContainer},t.label&&{[`& .${Sr.label}`]:t.label}],shouldForwardProp:e=>qr(e)&&e!=="indentationAtItemLevel"})(({theme:e})=>({padding:e.spacing(.5,1),borderRadius:e.shape.borderRadius,width:"100%",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",gap:e.spacing(1),cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Sr.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"},[`&.${Sr.focused}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Sr.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:dt.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:dt.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:dt.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Sr.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:dt.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`& .${Sr.iconContainer}`]:{width:16,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}},[`& .${Sr.label}`]:U({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative"},e.typography.body1),[`& .${Sr.checkbox}`]:{padding:0},variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:`calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`}}]})),SB=ie(Ma,{name:"MuiTreeItem",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition,shouldForwardProp:e=>qr(e)&&e!=="indentationAtItemLevel"})({margin:0,padding:0,paddingLeft:"var(--TreeView-itemChildrenIndentation)",variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:0}}]}),kB=D.forwardRef(function(t,n){const{icons:r,runItemPlugins:o,items:{disabledItemsFocusable:i,indentationAtItemLevel:a},selection:{disableSelection:s},expansion:{expansionTrigger:l},treeId:u,instance:d}=Oo(),p=D.useContext(ip),h=EB({props:t,name:"MuiTreeItem"}),{children:f,className:m,slots:b,slotProps:x,ContentComponent:y=wx,ContentProps:E,itemId:C,id:k,label:v,onClick:S,onMouseDown:N,onBlur:O,onKeyDown:B}=h,R=$e(h,gB),{expanded:F,focused:T,selected:L,disabled:I,editing:A,handleExpansion:M,handleCancelItemLabelEditing:W,handleSaveItemLabel:H}=Dx(C),{contentRef:j,rootRef:w,propsEnhancers:V}=o(h),J=D.useRef(null),_=D.useRef(null),de=ot(n,w,J),Z=ot(E?.ref,j,_),Y={expandIcon:b?.expandIcon??r.slots.expandIcon??Ix,collapseIcon:b?.collapseIcon??r.slots.collapseIcon??Ax,endIcon:b?.endIcon??r.slots.endIcon,icon:b?.icon,groupTransition:b?.groupTransition},te=Te=>Array.isArray(Te)?Te.length>0&&Te.some(te):!!Te,X=te(f),re=U({},h,{expanded:F,focused:T,selected:L,disabled:I,indentationAtItemLevel:a}),Q=CB(re),K=Y.groupTransition??void 0,ae=rt({elementType:K,ownerState:{},externalSlotProps:x?.groupTransition,additionalProps:U({unmountOnExit:!0,in:F,component:"ul",role:"group"},a?{indentationAtItemLevel:!0}:{}),className:Q.groupTransition}),ee=Te=>{l==="iconContainer"&&M(Te)},ne=F?Y.collapseIcon:Y.expandIcon,ye=rt({elementType:ne,ownerState:{},externalSlotProps:Te=>F?U({},_n(r.slotProps.collapseIcon,Te),_n(x?.collapseIcon,Te)):U({},_n(r.slotProps.expandIcon,Te),_n(x?.expandIcon,Te)),additionalProps:{onClick:ee}}),pe=$e(ye,bB),be=X&&ne?c.jsx(ne,U({},pe)):null,le=X?void 0:Y.endIcon,Re=rt({elementType:le,ownerState:{},externalSlotProps:Te=>X?{}:U({},_n(r.slotProps.endIcon,Te),_n(x?.endIcon,Te))}),ve=$e(Re,xB),ze=le?c.jsx(le,U({},ve)):null,De=Y.icon,vt=rt({elementType:De,ownerState:{},externalSlotProps:x?.icon}),lt=$e(vt,yB),qe=De?c.jsx(De,U({},lt)):null;let ue;L?ue=!0:s||I?ue=void 0:ue=!1;function Ce(Te){!T&&(!I||i)&&Te.currentTarget===Te.target&&d.focusItem(Te,C)}function Oe(Te){O?.(Te),!(A||Te.relatedTarget&&La(Te.relatedTarget,J.current)&&(Te.target&&Te.target?.dataset?.element==="labelInput"&&La(Te.target,J.current)||Te.relatedTarget?.dataset?.element==="labelInput"))&&d.removeFocusedItem()}const He=Te=>{B?.(Te),Te.target?.dataset?.element!=="labelInput"&&d.handleItemKeyDown(Te,C)},je=ap({itemId:C,treeId:u,id:k}),Le=d.canItemBeTabbed(C)?0:-1,Je={rootRefObject:J,contentRefObject:_,interactions:{handleSaveItemLabel:H,handleCancelItemLabelEditing:W}},gt=V.root?.(U({},Je,{externalEventHandlers:sn(R)}))??{},ft=V.content?.(U({},Je,{externalEventHandlers:sn(E)}))??{},se=V.dragAndDropOverlay?.(U({},Je,{externalEventHandlers:{}}))??{},xe=V.labelInput?.(U({},Je,{externalEventHandlers:{}}))??{};return c.jsx(sp,{itemId:C,children:c.jsxs(TB,U({className:Pe(Q.root,m),role:"treeitem","aria-expanded":X?F:void 0,"aria-selected":ue,"aria-disabled":I||void 0,id:je,tabIndex:Le},R,{ownerState:re,onFocus:Ce,onBlur:Oe,onKeyDown:He,ref:de,style:a?U({},R.style,{"--TreeView-itemDepth":typeof p=="function"?p(C):p}):R.style},gt,{children:[c.jsx(vB,U({as:y,classes:{root:Q.content,expanded:Q.expanded,selected:Q.selected,focused:Q.focused,disabled:Q.disabled,editable:Q.editable,editing:Q.editing,iconContainer:Q.iconContainer,label:Q.label,labelInput:Q.labelInput,checkbox:Q.checkbox},label:v,itemId:C,onClick:S,onMouseDown:N,icon:qe,expansionIcon:be,displayIcon:ze,ownerState:re},E,ft,se.action==null?{}:{dragAndDropOverlayProps:se},xe.value==null?{}:{labelInputProps:xe},{ref:Z})),f&&c.jsx(SB,U({as:K},ae,{children:f}))]}))})});function DB(e){const{slots:t,slotProps:n,status:r}=e,o=Oo(),i=U({},o.icons.slots,{expandIcon:o.icons.slots.expandIcon??Ix,collapseIcon:o.icons.slots.collapseIcon??Ax}),a=o.icons.slotProps;let s;t?.icon?s="icon":r.expandable?r.expanded?s="collapseIcon":s="expandIcon":s="endIcon";const l=t?.[s]??i[s],u=rt({elementType:l,externalSlotProps:d=>U({},_n(a[s],d),_n(n?.[s],d)),ownerState:{}});return l?c.jsx(l,U({},u)):null}const wB=["visible"],IB=ie("li",{name:"MuiTreeItem2",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),AB=ie("div",{name:"MuiTreeItem2",slot:"Content",overridesResolver:(e,t)=>t.content,shouldForwardProp:e=>qr(e)&&e!=="status"&&e!=="indentationAtItemLevel"})(({theme:e})=>({padding:e.spacing(.5,1),borderRadius:e.shape.borderRadius,width:"100%",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",gap:e.spacing(1),cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:`calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`}},{props:({status:t})=>t.disabled,style:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"}},{props:({status:t})=>t.focused,style:{backgroundColor:(e.vars||e).palette.action.focus}},{props:({status:t})=>t.selected,style:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:dt.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:dt.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:dt.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},{props:({status:t})=>t.selected&&t.focused,style:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:dt.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}]})),PB=ie("div",{name:"MuiTreeItem2",slot:"Label",overridesResolver:(e,t)=>t.label,shouldForwardProp:e=>qr(e)&&e!=="editable"})(({theme:e})=>U({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative",overflow:"hidden"},e.typography.body1,{variants:[{props:({editable:t})=>t,style:{paddingLeft:"2px"}}]})),RB=ie("div",{name:"MuiTreeItem2",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})({width:16,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}});ie(Ma,{name:"MuiTreeItem2",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition,shouldForwardProp:e=>qr(e)&&e!=="indentationAtItemLevel"})({margin:0,padding:0,paddingLeft:"var(--TreeView-itemChildrenIndentation)",variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:0}}]});ie(D.forwardRef((e,t)=>{const{visible:n}=e,r=$e(e,wB);return n?c.jsx(xx,U({},r,{ref:t})):null}),{name:"MuiTreeItem2",slot:"Checkbox",overridesResolver:(e,t)=>t.checkbox})({padding:0});function MB(e){return _e("MuiRichTreeView",e)}Me("MuiRichTreeView",["root"]);const OB=(e,t)=>{const n=D.useRef({}),[r,o]=D.useState(()=>{const a={};return e.forEach(s=>{s.models&&Object.entries(s.models).forEach(([l,u])=>{n.current[l]={isControlled:t[l]!==void 0,getDefaultValue:u.getDefaultValue},a[l]=u.getDefaultValue(t)})}),a});return Object.fromEntries(Object.entries(n.current).map(([a,s])=>{const l=t[a]??r[a];return[a,{value:l,setControlledValue:u=>{s.isControlled||o(d=>U({},d,{[a]:u}))}}]}))};class LB{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,n,r={}){let o=this.events[t];o||(o={highPriority:new Map,regular:new Map},this.events[t]=o),r.isFirst?o.highPriority.set(n,!0):o.regular.set(n,!0)}removeListener(t,n){this.events[t]&&(this.events[t].regular.delete(n),this.events[t].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(t,...n){const r=this.events[t];if(!r)return;const o=Array.from(r.highPriority.keys()),i=Array.from(r.regular.keys());for(let a=o.length-1;a>=0;a-=1){const s=o[a];r.highPriority.has(s)&&s.apply(this,n)}for(let a=0;a<i.length;a+=1){const s=i[a];r.regular.has(s)&&s.apply(this,n)}}once(t,n){const r=this;this.on(t,function o(...i){r.removeListener(t,o),n.apply(r,i)})}}const NB=e=>e.isPropagationStopped!==void 0,Px=()=>{const[e]=D.useState(()=>new LB),t=D.useCallback((...r)=>{const[o,i,a={}]=r;a.defaultMuiPrevented=!1,!(NB(a)&&a.isPropagationStopped())&&e.emit(o,i,a)},[e]),n=D.useCallback((r,o)=>(e.on(r,o),()=>{e.removeListener(r,o)}),[e]);return{instance:{$$publishEvent:t,$$subscribeEvent:n}}};Px.params={};const Rx=({plugins:e})=>{const t=new Set(e);return{instance:{getAvailablePlugins:()=>t}}};Rx.params={};const lp=({params:e,state:t,setState:n})=>{D.useEffect(()=>{n(o=>o.id.treeId===e.id&&o.id.treeId!==void 0?o:U({},o,{id:U({},o.id,{treeId:e.id??lB()})}))},[n,e.id]);const r=e.id??t.id.treeId;return{getRootProps:()=>({id:r}),contextValue:{treeId:r}}};lp.params={id:!0};lp.getInitialState=({id:e})=>({id:{treeId:e??void 0}});const FB=[Px,Rx,lp],_B=["slots","slotProps","apiRef","experimentalFeatures"],BB=e=>{let{props:{slots:t,slotProps:n,apiRef:r,experimentalFeatures:o},plugins:i}=e,a=$e(e.props,_B);const s={};i.forEach(h=>{Object.assign(s,h.params)});const l={},u={};Object.keys(a).forEach(h=>{const f=a[h];s[h]?l[h]=f:u[h]=f});const d=o??{},p=i.reduce((h,f)=>f.getDefaultizedParams?f.getDefaultizedParams({params:h,experimentalFeatures:d}):h,l);return{apiRef:r,forwardedProps:u,pluginParams:p,slots:t??{},slotProps:n??{},experimentalFeatures:d}},jB=({plugins:e,instance:t,publicAPI:n,rootRef:r})=>({runItemPlugins:s=>{let l=null,u=null;const d=[],p={};e.forEach(m=>{if(!m.itemPlugin)return;const b=m.itemPlugin({props:s,rootRef:l,contentRef:u});b?.rootRef&&(l=b.rootRef),b?.contentRef&&(u=b.contentRef),b?.propsEnhancers&&(d.push(b.propsEnhancers),Object.keys(b.propsEnhancers).forEach(x=>{p[x]=!0}))});const h=m=>b=>{const x={};return d.forEach(y=>{const E=y[m];E!=null&&Object.assign(x,E(b))}),x},f=Object.fromEntries(Object.keys(p).map(m=>[m,h(m)]));return{contentRef:u,rootRef:l,propsEnhancers:f}},wrapItem:({itemId:s,children:l})=>{let u=l;for(let d=e.length-1;d>=0;d-=1){const p=e[d];p.wrapItem&&(u=p.wrapItem({itemId:s,children:u,instance:t}))}return u},wrapRoot:({children:s})=>{let l=s;for(let u=e.length-1;u>=0;u-=1){const d=e[u];d.wrapRoot&&(l=d.wrapRoot({children:l,instance:t}))}return l},instance:t,rootRef:r,publicAPI:n});function $B(e){const t=D.useRef({});return e?(e.current==null&&(e.current={}),e.current):t.current}const HB=({plugins:e,rootRef:t,props:n})=>{const r=[...FB,...e],{pluginParams:o,forwardedProps:i,apiRef:a,experimentalFeatures:s,slots:l,slotProps:u}=BB({plugins:r,props:n}),d=OB(r,o),h=D.useRef({}).current,f=$B(a),m=D.useRef(null),b=ot(m,t),x=jB({plugins:r,instance:h,publicAPI:f,rootRef:m}),[y,E]=D.useState(()=>{const S={};return r.forEach(N=>{N.getInitialState&&Object.assign(S,N.getInitialState(o))}),S}),C=[],k=S=>{const N=S({instance:h,params:o,slots:l,slotProps:u,experimentalFeatures:s,state:y,setState:E,rootRef:m,models:d,plugins:r});N.getRootProps&&C.push(N.getRootProps),N.publicAPI&&Object.assign(f,N.publicAPI),N.instance&&Object.assign(h,N.instance),N.contextValue&&Object.assign(x,N.contextValue)};return r.forEach(k),{getRootProps:(S={})=>{const N=U({role:"tree"},i,S,{ref:b});return C.forEach(O=>{Object.assign(N,O(S))}),N},rootRef:b,contextValue:x,instance:h}},UB=(e,t,n)=>{e.$$publishEvent(t,n)},Qo="__TREE_VIEW_ROOT_PARENT_ID__",zB=e=>{const t={};return e.forEach((n,r)=>{t[n]=r}),t},VB=["children"],Mx=({items:e,isItemDisabled:t,getItemLabel:n,getItemId:r})=>{const o={},i={},a={[Qo]:[]},s=(u,d,p)=>{const h=r?r(u):u.id;if(h==null)throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.","An item was provided without id in the `items` prop:",JSON.stringify(u)].join(`
|
|
220
|
-
`));if(o[h]!=null)throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.",`Two items were provided with the same id in the \`items\` prop: "${h}"`].join(`
|
|
221
|
-
`));const f=n?n(u):u.label;if(f==null)throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.","Alternatively, you can use the `getItemLabel` prop to specify a custom label for each item.","An item was provided without label in the `items` prop:",JSON.stringify(u)].join(`
|
|
222
|
-
`));o[h]={id:h,label:f,parentId:p,idAttribute:void 0,expandable:!!u.children?.length,disabled:t?t(u):!1,depth:d},i[h]=u;const m=p??Qo;a[m]||(a[m]=[]),a[m].push(h),u.children?.forEach(b=>s(b,d+1,h))};e.forEach(u=>s(u,0,null));const l={};return Object.keys(a).forEach(u=>{l[u]=zB(a[u])}),{itemMetaMap:o,itemMap:i,itemOrderedChildrenIds:a,itemChildrenIndexes:l}},Xa=({instance:e,params:t,state:n,setState:r,experimentalFeatures:o})=>{const i=D.useCallback(y=>n.items.itemMetaMap[y],[n.items.itemMetaMap]),a=D.useCallback(y=>n.items.itemMap[y],[n.items.itemMap]),s=D.useCallback(()=>{const y=E=>{const C=n.items.itemMap[E],k=$e(C,VB),v=n.items.itemOrderedChildrenIds[E];return v&&(k.children=v.map(y)),k};return n.items.itemOrderedChildrenIds[Qo].map(y)},[n.items.itemMap,n.items.itemOrderedChildrenIds]),l=D.useCallback(y=>{if(y==null)return!1;let E=e.getItemMeta(y);if(!E)return!1;if(E.disabled)return!0;for(;E.parentId!=null;)if(E=e.getItemMeta(E.parentId),E.disabled)return!0;return!1},[e]),u=D.useCallback(y=>{const E=e.getItemMeta(y).parentId??Qo;return n.items.itemChildrenIndexes[E][y]},[e,n.items.itemChildrenIndexes]),d=D.useCallback(y=>n.items.itemOrderedChildrenIds[y??Qo]??[],[n.items.itemOrderedChildrenIds]),p=y=>{const E=e.getItemMeta(y);return E==null?null:document.getElementById(ap({treeId:n.id.treeId,itemId:y,id:E.idAttribute}))},h=y=>t.disabledItemsFocusable?!0:!e.isItemDisabled(y),f=D.useRef(!1),m=D.useCallback(()=>{f.current=!0},[]),b=D.useCallback(()=>f.current,[]);return D.useEffect(()=>{e.areItemUpdatesPrevented()||r(y=>{const E=Mx({items:t.items,isItemDisabled:t.isItemDisabled,getItemId:t.getItemId,getItemLabel:t.getItemLabel});return Object.values(y.items.itemMetaMap).forEach(C=>{E.itemMetaMap[C.id]||UB(e,"removeItem",{id:C.id})}),U({},y,{items:E})})},[e,r,t.items,t.isItemDisabled,t.getItemId,t.getItemLabel]),{getRootProps:()=>({style:{"--TreeView-itemChildrenIndentation":typeof t.itemChildrenIndentation=="number"?`${t.itemChildrenIndentation}px`:t.itemChildrenIndentation}}),publicAPI:{getItem:a,getItemDOMElement:p,getItemTree:s,getItemOrderedChildrenIds:d},instance:{getItemMeta:i,getItem:a,getItemTree:s,getItemsToRender:()=>{const y=E=>{const C=n.items.itemMetaMap[E];return{label:C.label,itemId:C.id,id:C.idAttribute,children:n.items.itemOrderedChildrenIds[E]?.map(y)}};return n.items.itemOrderedChildrenIds[Qo].map(y)},getItemIndex:u,getItemDOMElement:p,getItemOrderedChildrenIds:d,isItemDisabled:l,isItemNavigable:h,preventItemUpdates:m,areItemUpdatesPrevented:b},contextValue:{items:{onItemClick:t.onItemClick,disabledItemsFocusable:t.disabledItemsFocusable,indentationAtItemLevel:o.indentationAtItemLevel??!1}}}};Xa.getInitialState=e=>({items:Mx({items:e.items,isItemDisabled:e.isItemDisabled,getItemId:e.getItemId,getItemLabel:e.getItemLabel})});Xa.getDefaultizedParams=({params:e})=>U({},e,{disabledItemsFocusable:e.disabledItemsFocusable??!1,itemChildrenIndentation:e.itemChildrenIndentation??"12px"});Xa.wrapRoot=({children:e,instance:t})=>c.jsx(ip.Provider,{value:n=>t.getItemMeta(n)?.depth??0,children:e});Xa.params={disabledItemsFocusable:!0,items:!0,isItemDisabled:!0,getItemLabel:!0,getItemId:!0,onItemClick:!0,itemChildrenIndentation:!0};const Wl=({instance:e,params:t,models:n})=>{const r=D.useMemo(()=>{const p=new Map;return n.expandedItems.value.forEach(h=>{p.set(h,!0)}),p},[n.expandedItems.value]),o=(p,h)=>{t.onExpandedItemsChange?.(p,h),n.expandedItems.setControlledValue(h)},i=D.useCallback(p=>r.has(p),[r]),a=D.useCallback(p=>!!e.getItemMeta(p)?.expandable,[e]),s=Ae((p,h)=>{const f=e.isItemExpanded(h);e.setItemExpansion(p,h,!f)}),l=Ae((p,h,f)=>{if(e.isItemExpanded(h)===f)return;let b;f?b=[h].concat(n.expandedItems.value):b=n.expandedItems.value.filter(x=>x!==h),t.onItemExpansionToggle&&t.onItemExpansionToggle(p,h,f),o(p,b)}),u=(p,h)=>{const f=e.getItemMeta(h),b=e.getItemOrderedChildrenIds(f.parentId).filter(y=>e.isItemExpandable(y)&&!e.isItemExpanded(y)),x=n.expandedItems.value.concat(b);b.length>0&&(t.onItemExpansionToggle&&b.forEach(y=>{t.onItemExpansionToggle(p,y,!0)}),o(p,x))},d=D.useMemo(()=>t.expansionTrigger?t.expansionTrigger:e.isTreeViewEditable?"iconContainer":"content",[t.expansionTrigger,e.isTreeViewEditable]);return{publicAPI:{setItemExpansion:l},instance:{isItemExpanded:i,isItemExpandable:a,setItemExpansion:l,toggleItemExpansion:s,expandAllSiblings:u},contextValue:{expansion:{expansionTrigger:d}}}};Wl.models={expandedItems:{getDefaultValue:e=>e.defaultExpandedItems}};const WB=[];Wl.getDefaultizedParams=({params:e})=>U({},e,{defaultExpandedItems:e.defaultExpandedItems??WB});Wl.params={expandedItems:!0,defaultExpandedItems:!0,onExpandedItemsChange:!0,onItemExpansionToggle:!0,expansionTrigger:!0};const _s=e=>Array.isArray(e)?e:e!=null?[e]:[],Vu=e=>{const t={};return e.forEach(n=>{t[n]=!0}),t},ql=({instance:e,params:t,models:n})=>{const r=D.useRef(null),o=D.useRef({}),i=D.useMemo(()=>{const b=new Map;return Array.isArray(n.selectedItems.value)?n.selectedItems.value.forEach(x=>{b.set(x,!0)}):n.selectedItems.value!=null&&b.set(n.selectedItems.value,!0),b},[n.selectedItems.value]),a=(b,x)=>{if(t.onItemSelectionToggle)if(t.multiSelect){const y=x.filter(C=>!e.isItemSelected(C)),E=n.selectedItems.value.filter(C=>!x.includes(C));y.forEach(C=>{t.onItemSelectionToggle(b,C,!0)}),E.forEach(C=>{t.onItemSelectionToggle(b,C,!1)})}else x!==n.selectedItems.value&&(n.selectedItems.value!=null&&t.onItemSelectionToggle(b,n.selectedItems.value,!1),x!=null&&t.onItemSelectionToggle(b,x,!0));t.onSelectedItemsChange&&t.onSelectedItemsChange(b,x),n.selectedItems.setControlledValue(x)},s=b=>i.has(b),l=({event:b,itemId:x,keepExistingSelection:y=!1,shouldBeSelected:E})=>{if(t.disableSelection)return;let C;if(y){const k=_s(n.selectedItems.value),v=e.isItemSelected(x);v&&(E===!1||E==null)?C=k.filter(S=>S!==x):!v&&(E===!0||E==null)?C=[x].concat(k):C=k}else E===!1||E==null&&e.isItemSelected(x)?C=t.multiSelect?[]:null:C=t.multiSelect?[x]:x;a(b,C),r.current=x,o.current={}},u=(b,[x,y])=>{if(t.disableSelection||!t.multiSelect)return;let E=_s(n.selectedItems.value).slice();Object.keys(o.current).length>0&&(E=E.filter(S=>!o.current[S]));const C=Vu(E),k=aB(e,x,y),v=k.filter(S=>!C[S]);E=E.concat(v),a(b,E),o.current=Vu(k)};return{getRootProps:()=>({"aria-multiselectable":t.multiSelect}),publicAPI:{selectItem:l},instance:{isItemSelected:s,selectItem:l,selectAllNavigableItems:b=>{if(t.disableSelection||!t.multiSelect)return;const x=sB(e);a(b,x),o.current=Vu(x)},expandSelectionRange:(b,x)=>{if(r.current!=null){const[y,E]=kx(e,x,r.current);u(b,[y,E])}},selectRangeFromStartToItem:(b,x)=>{u(b,[Oa(e),x])},selectRangeFromItemToEnd:(b,x)=>{u(b,[x,Sx(e)])},selectItemFromArrowNavigation:(b,x,y)=>{if(t.disableSelection||!t.multiSelect)return;let E=_s(n.selectedItems.value).slice();Object.keys(o.current).length===0?(E.push(y),o.current={[x]:!0,[y]:!0}):(o.current[x]||(o.current={}),o.current[y]?(E=E.filter(C=>C!==x),delete o.current[x]):(E.push(y),o.current[y]=!0)),a(b,E)}},contextValue:{selection:{multiSelect:t.multiSelect,checkboxSelection:t.checkboxSelection,disableSelection:t.disableSelection}}}};ql.models={selectedItems:{getDefaultValue:e=>e.defaultSelectedItems}};const qB=[];ql.getDefaultizedParams=({params:e})=>U({},e,{disableSelection:e.disableSelection??!1,multiSelect:e.multiSelect??!1,checkboxSelection:e.checkboxSelection??!1,defaultSelectedItems:e.defaultSelectedItems??(e.multiSelect?qB:null)});ql.params={disableSelection:!0,multiSelect:!0,checkboxSelection:!0,defaultSelectedItems:!0,selectedItems:!0,onSelectedItemsChange:!0,onItemSelectionToggle:!0};const $m=1e3;class YB{constructor(t=$m){this.timeouts=new Map,this.cleanupTimeout=$m,this.cleanupTimeout=t}register(t,n,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(t){const n=this.timeouts.get(t.cleanupToken);n&&(this.timeouts.delete(t.cleanupToken),clearTimeout(n))}reset(){this.timeouts&&(this.timeouts.forEach((t,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}}class KB{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,n,r){this.registry.register(t,n,r)}unregister(t){this.registry.unregister(t)}reset(){}}class GB{}function QB(e){let t=0;return function(r,o,i){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new KB:new YB);const[a]=D.useState(new GB),s=D.useRef(null),l=D.useRef(void 0);l.current=i;const u=D.useRef(null);if(!s.current&&l.current){const d=(p,h)=>{h.defaultMuiPrevented||l.current?.(p,h)};s.current=r.$$subscribeEvent(o,d),t+=1,u.current={cleanupToken:t},e.registry.register(a,()=>{s.current?.(),s.current=null,u.current=null},u.current)}else!l.current&&s.current&&(s.current(),s.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));D.useEffect(()=>{if(!s.current&&l.current){const d=(p,h)=>{h.defaultMuiPrevented||l.current?.(p,h)};s.current=r.$$subscribeEvent(o,d)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{s.current?.(),s.current=null}},[r,o])}}const XB={registry:null},ZB=QB(XB),Ox=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?Ox(t.shadowRoot):t:null},JB=(e,t)=>{let n=_s(t).find(r=>{if(!e.isItemNavigable(r))return!1;const o=e.getItemMeta(r);return o&&(o.parentId==null||e.isItemExpanded(o.parentId))});return n==null&&(n=Oa(e)),n},up=({instance:e,params:t,state:n,setState:r,models:o,rootRef:i})=>{const a=JB(e,o.selectedItems.value),s=Ae(x=>{const y=typeof x=="function"?x(n.focusedItemId):x;n.focusedItemId!==y&&r(E=>U({},E,{focusedItemId:y}))}),l=D.useCallback(()=>!!i.current&&i.current.contains(Ox(Ut(i.current))),[i]),u=D.useCallback(x=>n.focusedItemId===x&&l(),[n.focusedItemId,l]),d=x=>{const y=e.getItemMeta(x);return y&&(y.parentId==null||e.isItemExpanded(y.parentId))},p=(x,y)=>{const E=e.getItemDOMElement(y);E&&E.focus(),s(y),t.onItemFocus&&t.onItemFocus(x,y)},h=Ae((x,y)=>{d(y)&&p(x,y)}),f=Ae(()=>{if(n.focusedItemId==null)return;if(e.getItemMeta(n.focusedItemId)){const y=e.getItemDOMElement(n.focusedItemId);y&&y.blur()}s(null)}),m=x=>x===a;ZB(e,"removeItem",({id:x})=>{n.focusedItemId===x&&p(null,a)});const b=x=>y=>{x.onFocus?.(y),!y.defaultMuiPrevented&&y.target===y.currentTarget&&p(y,a)};return{getRootProps:x=>({onFocus:b(x)}),publicAPI:{focusItem:h},instance:{isItemFocused:u,canItemBeTabbed:m,focusItem:h,removeFocusedItem:f}}};up.getInitialState=()=>({focusedItemId:null});up.params={onItemFocus:!0};function ej(e){return!!e&&e.length===1&&!!e.match(/\S/)}const Lx=({instance:e,params:t,state:n})=>{const r=Vn(),o=D.useRef({}),i=Ae(d=>{o.current=d(o.current)});D.useEffect(()=>{if(e.areItemUpdatesPrevented())return;const d={},p=h=>{d[h.id]=h.label.substring(0,1).toLowerCase()};Object.values(n.items.itemMetaMap).forEach(p),o.current=d},[n.items.itemMetaMap,t.getItemId,e]);const a=(d,p)=>{const h=p.toLowerCase(),f=y=>{const E=Fs(e,y);return E===null?Oa(e):E};let m=null,b=f(d);const x={};for(;m==null&&!x[b];)o.current[b]===h?m=b:(x[b]=!0,b=f(b));return m},s=d=>!t.disableSelection&&!e.isItemDisabled(d),l=d=>!e.isItemDisabled(d)&&e.isItemExpandable(d);return{instance:{updateFirstCharMap:i,handleItemKeyDown:(d,p)=>{if(d.defaultMuiPrevented||d.altKey||La(d.target,d.currentTarget))return;const h=d.ctrlKey||d.metaKey,f=d.key;switch(!0){case(f===" "&&s(p)):{d.preventDefault(),t.multiSelect&&d.shiftKey?e.expandSelectionRange(d,p):e.selectItem({event:d,itemId:p,keepExistingSelection:t.multiSelect,shouldBeSelected:t.multiSelect?void 0:!0});break}case f==="Enter":{yo(e,jn)&&e.isItemEditable(p)&&!e.isItemBeingEdited(p)?e.setEditedItemId(p):l(p)?(e.toggleItemExpansion(d,p),d.preventDefault()):s(p)&&(t.multiSelect?(d.preventDefault(),e.selectItem({event:d,itemId:p,keepExistingSelection:!0})):e.isItemSelected(p)||(e.selectItem({event:d,itemId:p}),d.preventDefault()));break}case f==="ArrowDown":{const m=Fs(e,p);m&&(d.preventDefault(),e.focusItem(d,m),t.multiSelect&&d.shiftKey&&s(m)&&e.selectItemFromArrowNavigation(d,p,m));break}case f==="ArrowUp":{const m=vx(e,p);m&&(d.preventDefault(),e.focusItem(d,m),t.multiSelect&&d.shiftKey&&s(m)&&e.selectItemFromArrowNavigation(d,p,m));break}case(f==="ArrowRight"&&!r||f==="ArrowLeft"&&r):{if(h)return;if(e.isItemExpanded(p)){const m=Fs(e,p);m&&(e.focusItem(d,m),d.preventDefault())}else l(p)&&(e.toggleItemExpansion(d,p),d.preventDefault());break}case(f==="ArrowLeft"&&!r||f==="ArrowRight"&&r):{if(h)return;if(l(p)&&e.isItemExpanded(p))e.toggleItemExpansion(d,p),d.preventDefault();else{const m=e.getItemMeta(p).parentId;m&&(e.focusItem(d,m),d.preventDefault())}break}case f==="Home":{s(p)&&t.multiSelect&&h&&d.shiftKey?e.selectRangeFromStartToItem(d,p):e.focusItem(d,Oa(e)),d.preventDefault();break}case f==="End":{s(p)&&t.multiSelect&&h&&d.shiftKey?e.selectRangeFromItemToEnd(d,p):e.focusItem(d,Sx(e)),d.preventDefault();break}case f==="*":{e.expandAllSiblings(d,p),d.preventDefault();break}case(String.fromCharCode(d.keyCode)==="A"&&h&&t.multiSelect&&!t.disableSelection):{e.selectAllNavigableItems(d),d.preventDefault();break}case(!h&&!d.shiftKey&&ej(f)):{const m=a(p,f);m!=null&&(e.focusItem(d,m),d.preventDefault());break}}}}}};Lx.params={};const Nx=({slots:e,slotProps:t})=>({contextValue:{icons:{slots:{collapseIcon:e.collapseIcon,expandIcon:e.expandIcon,endIcon:e.endIcon},slotProps:{collapseIcon:t.collapseIcon,expandIcon:t.expandIcon,endIcon:t.endIcon}}}});Nx.params={};const tj=[Xa,Wl,ql,up,Lx,Nx,jn],nj=["ownerState"];function rj({slots:e,slotProps:t,label:n,id:r,itemId:o,itemsToRender:i}){const a=e?.item??kB,s=rt({elementType:a,externalSlotProps:t?.item,additionalProps:{itemId:o,id:r,label:n},ownerState:{itemId:o,label:n}}),l=$e(s,nj),u=D.useMemo(()=>i?c.jsx(Fx,{itemsToRender:i,slots:e,slotProps:t}):null,[i,e,t]);return c.jsx(a,U({},l,{children:u}))}function Fx(e){const{itemsToRender:t,slots:n,slotProps:r}=e;return c.jsx(D.Fragment,{children:t.map(o=>c.jsx(rj,{slots:n,slotProps:r,label:o.label,id:o.id,itemId:o.itemId,itemsToRender:o.children},o.itemId))})}const oj=yx(),ij=e=>{const{classes:t}=e;return Fe({root:["root"]},MB,t)},aj=ie("ul",{name:"MuiRichTreeView",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,margin:0,listStyle:"none",outline:0,position:"relative"}),sj=D.forwardRef(function(t,n){const r=oj({props:t,name:"MuiRichTreeView"}),{getRootProps:o,contextValue:i,instance:a}=HB({plugins:tj,rootRef:n,props:r}),{slots:s,slotProps:l}=r,u=ij(r),d=s?.root??aj,p=rt({elementType:d,externalSlotProps:l?.root,className:u.root,getSlotProps:o,ownerState:r});return c.jsx(rB,{value:i,children:c.jsx(d,U({},p,{children:c.jsx(Fx,{slots:s,slotProps:l,itemsToRender:a.getItemsToRender()})}))})}),lj=tt(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"})),uj=tt([c.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),c.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),cj=tt(c.jsx("path",{d:"M19 15v4H5v-4zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1M7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5M19 5v4H5V5zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1M7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5"})),dj=tt(c.jsx("path",{d:"M15 4v2h3v12h-3v2h5V4zM4 20h5v-2H6V6h3V4H4z"}));function _x({items:e,defaultExpandedItems:t,onClickTreeNode:n}){return c.jsx(sj,{items:gj(e,n),defaultExpandedItems:t,slots:{item:mj}})}const pj=Hm.animated(Ma);function fj(e){const t=Hm.useSpring({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return c.jsx(pj,{style:t,...e})}function hj({item:e,...t}){const n=c.jsxs(PB,{...t,sx:{display:"flex",alignItems:"center",color:e.error?"error.main":"grey.600"},children:[e.fileType==="directory"&&c.jsx(lj,{})||e.fileType==="notebook"&&c.jsx(uj,{})||e.fileType==="model"&&c.jsx(dj,{})||e.fileType=="database"&&c.jsx(cj,{})||c.jsx(mx,{}),c.jsx(P.Typography,{variant:"body2",sx:{marginLeft:"5px"},color:e.error?"error.main":e.link?"primary.main":"grey.600",children:e.label})]});return e.error?c.jsx(P.Tooltip,{title:e.error,placement:"right",children:n}):n}const mj=D.forwardRef(function(t,n){const{id:r,itemId:o,label:i,children:a,disabled:s,...l}=t,{getRootProps:u,getContentProps:d,getLabelProps:p,getIconContainerProps:h,getGroupTransitionProps:f,status:m,publicAPI:b}=cB({id:r,itemId:o,children:a,label:i,disabled:s,rootRef:n}),x=b.getItem(o);return m.selected=!1,m.focused=!1,c.jsx(sp,{itemId:o,children:c.jsxs(IB,{...u(l),children:[c.jsxs(AB,{...d(),...x.link&&{onClick:y=>x.link(y)},sx:{pointerEvents:!x.selectable&&"none"},children:[c.jsx(RB,{...h(),children:c.jsx(DB,{status:m})}),c.jsx(hj,{...p({item:x})})]}),a&&c.jsx(fj,{...f()})]})})});function gj(e,t){const n=new Map;return e.map(r=>{let o=n;const i=r.path.split("/");i.forEach((a,s)=>{s===i.length-1?o.set(a,r):(o.has(a)||o.set(a,new Map),o=o.get(a))})}),Bx(n,"",t)}function Bx(e,t,n){const r=[];return e.forEach((o,i)=>{const a=i.endsWith(".malloy")&&"model"||i.endsWith(".malloynb")&&"notebook"||i.endsWith(".parquet")&&"database"||"unknown";if(a!=="unknown"){const s=o;r.push({id:t+i,label:i,fileType:a,link:a==="model"||a==="notebook"?l=>n(t+i,l):void 0,selectable:a==="model"||a==="notebook",error:"error"in s?s.error:void 0})}else{const s=t+i+"/";r.push({id:s,label:i,fileType:"directory",selectable:!0,link:void 0,children:Bx(o,s,n)})}}),r}const bj=["notebooks/","models/"];function jx({onClickModelFile:e,resourceUri:t}){const{environmentName:n,packageName:r,versionId:o}=Tt(t),{apiClients:i}=st.useServer(),{data:a,isError:s,error:l,isSuccess:u}=Qt({queryKey:["models",n,r,o],queryFn:()=>i.models.listModels(n,r,o)});return c.jsx(Qr,{children:c.jsxs(Xr,{children:[c.jsx(wo,{children:"Semantic Models"}),c.jsxs(P.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!u&&!s&&c.jsx(Zt,{text:"Fetching Models..."}),s&&c.jsx(Jt,{error:l,context:`${n} > ${r} > Models`}),u&&a.data.length>0&&c.jsx(_x,{items:a.data.sort((d,p)=>d.path.localeCompare(p.path)),onClickTreeNode:e,defaultExpandedItems:bj}),u&&a.data.length===0&&c.jsx(P.Typography,{variant:"body2",children:"No models found"})]})]})})}const xj=["notebooks/"];function yj({onClickNotebookFile:e,resourceUri:t}){const{apiClients:n}=st.useServer(),{environmentName:r,packageName:o,versionId:i}=Tt(t),{data:a,isError:s,error:l,isSuccess:u}=Qt({queryKey:["notebooks",r,o,i],queryFn:()=>n.notebooks.listNotebooks(r,o,i)});return c.jsx(Qr,{children:c.jsxs(Xr,{children:[c.jsx(wo,{children:"Notebooks"}),c.jsxs(P.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!u&&!s&&c.jsx(Zt,{text:"Fetching Notebooks..."}),s&&c.jsx(Jt,{error:l,context:`${r} > ${o} > Notebooks`}),u&&a.data.length>0&&c.jsx(_x,{items:a.data.sort((d,p)=>d.path.localeCompare(p.path)),defaultExpandedItems:xj,onClickTreeNode:e}),u&&a.data.length===0&&c.jsx(P.Typography,{variant:"body2",children:"No notebooks found"})]})]})})}const Ej="README.malloynb";function Cj({onClickPackageFile:e,resourceUri:t,retrievalFn:n}){e||(e=o=>{window.location.href=o});const r=Wa({...Tt(t),modelPath:Ej});return c.jsx(c.Fragment,{children:c.jsxs(P.Grid,{container:!0,spacing:3,columns:12,children:[c.jsx(P.Grid,{size:{xs:12,md:4},children:c.jsx(D9,{resourceUri:t})}),c.jsx(P.Grid,{size:{xs:12,md:4},children:c.jsx(yj,{onClickNotebookFile:e,resourceUri:t})}),c.jsx(P.Grid,{size:{xs:12,md:4},children:c.jsx(jx,{onClickModelFile:e,resourceUri:t})}),c.jsx(P.Grid,{size:{xs:12,md:6},children:c.jsx(_9,{resourceUri:t})}),c.jsx(P.Grid,{size:{xs:12,md:6},children:c.jsx(F9,{resourceUri:t})}),c.jsx(P.Grid,{size:{xs:12,md:12},children:c.jsx(Qr,{children:c.jsxs(Xr,{children:[c.jsx(wo,{children:"README"}),c.jsx(P.Box,{sx:{mt:1},children:c.jsx(hx,{resourceUri:r,retrievalFn:n})})]})})})]})})}const Tj=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 vj({result:e,height:t,onDrill:n,onSizeChange:r}){const o=q.useRef(null),i=q.useRef(!1);return q.useLayoutEffect(()=>{if(!o.current||!e)return;let a=!0;const s=o.current;for(;s.firstChild;)s.removeChild(s.firstChild);i.current=!1;let l=null,u=null;const d=()=>{if(i.current||!a||!s.firstElementChild)return;const h=s.firstElementChild.firstElementChild;if(!h)return;const f=h.firstElementChild;let m=h.scrollHeight||h.offsetHeight||0;f&&h.classList.contains("malloy-dashboard")&&(m=f.scrollHeight||f.offsetHeight||0),m>0&&(i.current=!0,r&&r(m))};return Tj(n).then(p=>{if(a){l=new MutationObserver(()=>{u&&clearTimeout(u),u=setTimeout(()=>{d(),l?.disconnect()},100)}),l.observe(s,{childList:!0,subtree:!0,attributes:!0});try{p.setResult(JSON.parse(e)),p.render(s)}catch(h){console.error("Error rendering visualization:",h),l?.disconnect()}}}).catch(p=>{console.error("Failed to create renderer:",p)}),()=>{a=!1,l?.disconnect(),u&&clearTimeout(u)}},[e,n,r]),c.jsx("div",{ref:o,style:{width:"100%",height:t?`${t}px`:"400px"}})}function $x(e){return typeof window>"u"?c.jsx("div",{style:{width:"100%",height:e.height?`${e.height}px`:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"#666"},children:"Loading..."}):c.jsx(q.Suspense,{fallback:c.jsx("div",{style:{width:"100%",height:e.height?`${e.height}px`:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"#666"},children:"Loading visualization..."}),children:c.jsx(vj,{...e})})}const Sj=Object.freeze(Object.defineProperty({__proto__:null,default:$x},Symbol.toStringTag,{value:"Module"}));function Hx(e){return e.replace(/'/g,"\\'").replace(/\\/g,"\\\\")}function or(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"?`'${Hx(e)}'`:typeof e=="number"?String(e):typeof e=="boolean"?e?"true":"false":String(e)}function kj(e){const{dimensionName:t,matchType:n,value:r,value2:o}=e,i=`\`${t}\``,a=r instanceof Date;switch(n){case"Equals":case"Semantic Search":return Array.isArray(r)&&r.length>0?`(${r.map(l=>`${i} = ${or(l,a)}`).join(" or ")})`:Array.isArray(r)?"":`${i} = ${or(r,a)}`;case"Contains":return typeof r=="string"?`${i} ~ f'%${Hx(r)}%'`:Array.isArray(r)?"":`${i} = ${or(r)}`;case"After":return Array.isArray(r)?"":`${i} > ${or(r,a)}`;case"Before":return Array.isArray(r)?"":`${i} < ${or(r,a)}`;case"Greater Than":return Array.isArray(r)?"":`${i} > ${or(r)}`;case"Less Than":return Array.isArray(r)?"":`${i} < ${or(r)}`;case"Between":return Array.isArray(r)?"":o!==void 0?`${i} >= ${or(r,a)} and ${i} <= ${or(o,a)}`:`${i} >= ${or(r,a)}`;default:return""}}function Dj(e){if(e.length===0)return"";const t=e.map(n=>kj(n)).filter(n=>n.length>0);return t.length===0?"":t.join(" and ")}function wj(e,t,n,r=1e3){const o=Dj(t),a=n&&n.length>0?`group_by: ${n.map(s=>`\`${s}\``).join(", ")}`:"select: *";return o?`
|
|
223
|
-
run: ${e} -> {
|
|
224
|
-
where: ${o}
|
|
225
|
-
${a}
|
|
226
|
-
limit: ${r}
|
|
227
|
-
}
|
|
228
|
-
`:`
|
|
229
|
-
run: ${e} -> {
|
|
230
|
-
${a}
|
|
231
|
-
limit: ${r}
|
|
232
|
-
}
|
|
233
|
-
`}function Ux(e){const{environment:t,package:n,model:r,source:o,filterSelections:i,fields:a,limit:s=1e3}=e,[l,u]=q.useState(null),d=q.useMemo(()=>wj(o,i,a,s),[o,i,a,s]),p=q.useMemo(()=>Wa({environmentName:t,packageName:n,modelPath:r}),[t,n,r]),h=i.length>0,f=q.useCallback(()=>{if(!h){u(null);return}const m=op({resourceUri:p,query:d});u(m)},[h,p,d]);return{embeddedQueryResult:l,queryString:d,resourceUri:p,executeQuery:f,canExecute:h}}function Ij(e,t=5e3){const n=e.dimensionSpecs[0]?.source??"",r=e.dimensionSpecs[0]?.model??"",{filterStates:o,updateFilter:i,clearAllFilters:a,getActiveFilters:s}=rp({dimensionSpecs:e.dimensionSpecs}),l=q.useMemo(()=>s(),[o,s]),{data:u,noRowsMatchedFilter:d,isLoading:p,isError:h,error:f,refetch:m}=np({environment:e.environment,package:e.package,indexLimit:e.indexLimit,dimensionSpecs:e.dimensionSpecs,versionId:e.versionId,activeFilters:l}),b=p&&!u,{embeddedQueryResult:x,queryString:y,executeQuery:E,canExecute:C}=Ux({environment:e.environment,package:e.package,model:r,source:n,filterSelections:l,limit:t,fields:e.selectFields});return{filterStates:o,updateFilter:i,clearAllFilters:a,activeFilters:l,data:u,noRowsMatchedFilter:d,isLoading:p,isInitialLoading:b,isError:h,error:f,refetch:m,embeddedQueryResult:x,queryString:y,executeQuery:E,canExecute:C}}function Aj({modelPath:e,query:t,sourceName:n,queryName:r,enabled:o=!0,resourceUri:i}){const{environmentName:a,packageName:s,versionId:l}=Tt(i),{apiClients:u}=st.useServer(),{data:d,isSuccess:p,isError:h,error:f,isLoading:m}=Qt({queryKey:["rawQueryData",a,s,e,l,t,n,r],queryFn:()=>u.models.executeQueryModel(a,s,e,{query:t,sourceName:n,queryName:r,versionId:l}),enabled:o});return{data:p&&d?.data?.result?(()=>{try{return JSON.parse(d.data.result).data?.array_value||[]}catch(x){return console.error("Failed to parse query result:",x),[]}})():[],isSuccess:p,isError:h,error:f,isLoading:m}}exports.AnalyzePackageButton=c5;exports.BrowserWorkbookStorage=u5;exports.ConnectionExplorer=bx;exports.DimensionFilter=nx;exports.EmbeddedQueryResult=v9;exports.Environment=v8;exports.Home=p9;exports.Loading=Zt;exports.Model=g9;exports.ModelExplorer=ep;exports.ModelExplorerDialog=tp;exports.Models=jx;exports.Notebook=hx;exports.Package=Cj;exports.Packages=ab;exports.QueryResult=fx;exports.RenderedResult=$x;exports.ResultContainer=Di;exports.SourceExplorerComponent=N1;exports.SourcesExplorer=vd;exports.Workbook=s5;exports.WorkbookList=B1;exports.WorkbookManager=Zo;exports.WorkbookStorageProvider=o5;exports.ccount=uc;exports.createEmbeddedQueryResult=op;exports.encodeResourceUri=Wa;exports.extractDimensionSpecs=ax;exports.extractSourceFromQuery=V7;exports.find=ja;exports.generateFilterClause=z7;exports.getDimensionKey=Rr;exports.getJoinedSources=H7;exports.html=xi;exports.htmlVoidElements=Ig;exports.injectWhereClause=W7;exports.makeDimensionKey=cx;exports.parseAllSourceInfos=ix;exports.parseDimensionFilterAnnotation=ox;exports.parseNotebookFilterAnnotation=rx;exports.parseResourceUri=Tt;exports.stringify=yl;exports.stringify$1=El;exports.svg=Zr;exports.useDimensionFilters=rp;exports.useDimensionFiltersFromSpec=Ij;exports.useDimensionFiltersQuery=Ux;exports.useDimensionalFilterRangeData=np;exports.useModelData=Jd;exports.useRawQueryData=Aj;exports.useRouterClickHandler=_1;exports.whitespace=Yc;exports.zwitch=wl;
|