hasancode-api-docs 1.0.9 → 1.0.10

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.
@@ -0,0 +1,16 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-CU67Zn6k.js","./html-GMplVEZG.js","./javascript-wDzz0qaB.js","./css-DPfMkruS.js","./angular-ts-BwZT4LLn.js","./scss-OYdSNvt2.js","./apl-dKokRX4l.js","./xml-sdJ4AIDG.js","./java-CylS5w8V.js","./json-Cp-IABpG.js","./astro-CbQHKStN.js","./typescript-BPQ3VLAy.js","./postcss-CXtECtnM.js","./tsx-COt5Ahok.js","./blade-D4QpJJKB.js","./html-derivative-BFtXZ54Q.js","./sql-BLtJtn59.js","./bsl-BO_Y6i37.js","./sdbl-DVxCFoDh.js","./cairo-KRGpt6FW.js","./python-B6aJPvgy.js","./cobol-nwyudZeR.js","./coffee-Ch7k5sss.js","./cpp-CofmeUqb.js","./regexp-CDVJQ6XC.js","./glsl-DplSGwfg.js","./c-BIGW1oBm.js","./crystal-tKQVLTB8.js","./shellscript-Yzrsuije.js","./edge-BkV0erSs.js","./elixir-CDX3lj18.js","./elm-DbKCFpqz.js","./erb-B12qg9BL.js","./ruby-Dw2BHqvy.js","./haml-B8DHNrY2.js","./graphql-ChdNCCLP.js","./jsx-g9-lgVsj.js","./lua-BaeVxFsk.js","./yaml-Buea-lGh.js","./erlang-DsQrWhSR.js","./markdown-Cvjx9yec.js","./fortran-fixed-form-CkoXwp7k.js","./fortran-free-form-BxgE0vQu.js","./fsharp-CXgrBDvD.js","./gdresource-BOOCDP_w.js","./gdshader-DkwncUOv.js","./gdscript-C5YyOfLZ.js","./git-commit-F4YmCXRG.js","./diff-D97Zzqfu.js","./git-rebase-r7XF79zn.js","./glimmer-js-Rg0-pVw9.js","./glimmer-ts-U6CK756n.js","./hack-CaT9iCJl.js","./handlebars-BL8al0AC.js","./http-jrhK8wxY.js","./hurl-irOxFIW8.js","./csv-fuZLfV_i.js","./hxml-Bvhsp5Yf.js","./haxe-CzTSHFRz.js","./jinja-4LBKfQ-Z.js","./jison-wvAkD_A8.js","./julia-CxzCAyBv.js","./r-Dspwwk_N.js","./just-Cw27pwNe.js","./perl-C0TMdlhV.js","./latex-CWtU0Tv5.js","./tex-idrVyKtj.js","./liquid-DYVedYrR.js","./marko-CnJfTvn9.js","./less-B1dDrJ26.js","./mdc-BMNejdWA.js","./nextflow-Zz6hmt5N.js","./nextflow-groovy-BeH2EWoN.js","./nginx-BpAMiNFr.js","./nim-CVrawwO9.js","./php-Dhbhpdrm.js","./pug-CGlum2m_.js","./qml-3beO22l8.js","./razor-Uh8Bk_45.js","./csharp-COcwbKMJ.js","./rst-BrH8l1NY.js","./cmake-D1j8_8rp.js","./sas-cz2c8ADy.js","./shaderlab-Dg9Lc6iA.js","./hlsl-D3lLCCz7.js","./shellsession-BADoaaVG.js","./soy-Brmx7dQM.js","./sparql-rVzFXLq3.js","./turtle-BsS91CYL.js","./stata-BH5u7GGu.js","./surrealql-Bq5Q-fJD.js","./svelte-C_ipcX3V.js","./templ-P3uqSqPl.js","./go-CxLEBnE3.js","./ts-tags-zn1MmPIZ.js","./twig-DNn4PbVi.js","./vue-DN_0RTcg.js","./vue-html-AaS7Mt5G.js","./vue-vine-CQOfvN7w.js","./stylus-BEDo0Tqx.js","./xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
2
+ function $a(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const o in n)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(n,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>n[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function ja(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $r={exports:{}},z={};var Jn;function Ba(){if(Jn)return z;Jn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=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.memo"),c=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),h=Symbol.iterator;function f(_){return _===null||typeof _!="object"?null:(_=h&&_[h]||_["@@iterator"],typeof _=="function"?_:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,b={};function w(_,T,N){this.props=_,this.context=T,this.refs=b,this.updater=N||g}w.prototype.isReactComponent={},w.prototype.setState=function(_,T){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,T,"setState")},w.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function P(){}P.prototype=w.prototype;function L(_,T,N){this.props=_,this.context=T,this.refs=b,this.updater=N||g}var D=L.prototype=new P;D.constructor=L,S(D,w.prototype),D.isPureReactComponent=!0;var k=Array.isArray;function H(){}var $={H:null,A:null,T:null,S:null},v=Object.prototype.hasOwnProperty;function Z(_,T,N){var M=N.ref;return{$$typeof:e,type:_,key:T,ref:M!==void 0?M:null,props:N}}function re(_,T){return Z(_.type,T,_.props)}function se(_){return typeof _=="object"&&_!==null&&_.$$typeof===e}function X(_){var T={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(N){return T[N]})}var me=/\/+/g;function K(_,T){return typeof _=="object"&&_!==null&&_.key!=null?X(""+_.key):T.toString(36)}function G(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(H,H):(_.status="pending",_.then(function(T){_.status==="pending"&&(_.status="fulfilled",_.value=T)},function(T){_.status==="pending"&&(_.status="rejected",_.reason=T)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function ne(_,T,N,M,q){var Y=typeof _;(Y==="undefined"||Y==="boolean")&&(_=null);var ee=!1;if(_===null)ee=!0;else switch(Y){case"bigint":case"string":case"number":ee=!0;break;case"object":switch(_.$$typeof){case e:case t:ee=!0;break;case c:return ee=_._init,ne(ee(_._payload),T,N,M,q)}}if(ee)return q=q(_),ee=M===""?"."+K(_,0):M,k(q)?(N="",ee!=null&&(N=ee.replace(me,"$&/")+"/"),ne(q,T,N,"",function(kr){return kr})):q!=null&&(se(q)&&(q=re(q,N+(q.key==null||_&&_.key===q.key?"":(""+q.key).replace(me,"$&/")+"/")+ee)),T.push(q)),1;ee=0;var Ae=M===""?".":M+":";if(k(_))for(var he=0;he<_.length;he++)M=_[he],Y=Ae+K(M,he),ee+=ne(M,T,N,Y,q);else if(he=f(_),typeof he=="function")for(_=he.call(_),he=0;!(M=_.next()).done;)M=M.value,Y=Ae+K(M,he++),ee+=ne(M,T,N,Y,q);else if(Y==="object"){if(typeof _.then=="function")return ne(G(_),T,N,M,q);throw T=String(_),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.")}return ee}function fe(_,T,N){if(_==null)return _;var M=[],q=0;return ne(_,M,"","",function(Y){return T.call(N,Y,q++)}),M}function Re(_){if(_._status===-1){var T=_._result;T=T(),T.then(function(N){(_._status===0||_._status===-1)&&(_._status=1,_._result=N)},function(N){(_._status===0||_._status===-1)&&(_._status=2,_._result=N)}),_._status===-1&&(_._status=0,_._result=T)}if(_._status===1)return _._result.default;throw _._result}var Q=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var T=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(T))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},Ce={map:fe,forEach:function(_,T,N){fe(_,function(){T.apply(this,arguments)},N)},count:function(_){var T=0;return fe(_,function(){T++}),T},toArray:function(_){return fe(_,function(T){return T})||[]},only:function(_){if(!se(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return z.Activity=d,z.Children=Ce,z.Component=w,z.Fragment=r,z.Profiler=o,z.PureComponent=L,z.StrictMode=n,z.Suspense=l,z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,z.__COMPILER_RUNTIME={__proto__:null,c:function(_){return $.H.useMemoCache(_)}},z.cache=function(_){return function(){return _.apply(null,arguments)}},z.cacheSignal=function(){return null},z.cloneElement=function(_,T,N){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var M=S({},_.props),q=_.key;if(T!=null)for(Y in T.key!==void 0&&(q=""+T.key),T)!v.call(T,Y)||Y==="key"||Y==="__self"||Y==="__source"||Y==="ref"&&T.ref===void 0||(M[Y]=T[Y]);var Y=arguments.length-2;if(Y===1)M.children=N;else if(1<Y){for(var ee=Array(Y),Ae=0;Ae<Y;Ae++)ee[Ae]=arguments[Ae+2];M.children=ee}return Z(_.type,q,M)},z.createContext=function(_){return _={$$typeof:a,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:i,_context:_},_},z.createElement=function(_,T,N){var M,q={},Y=null;if(T!=null)for(M in T.key!==void 0&&(Y=""+T.key),T)v.call(T,M)&&M!=="key"&&M!=="__self"&&M!=="__source"&&(q[M]=T[M]);var ee=arguments.length-2;if(ee===1)q.children=N;else if(1<ee){for(var Ae=Array(ee),he=0;he<ee;he++)Ae[he]=arguments[he+2];q.children=Ae}if(_&&_.defaultProps)for(M in ee=_.defaultProps,ee)q[M]===void 0&&(q[M]=ee[M]);return Z(_,Y,q)},z.createRef=function(){return{current:null}},z.forwardRef=function(_){return{$$typeof:s,render:_}},z.isValidElement=se,z.lazy=function(_){return{$$typeof:c,_payload:{_status:-1,_result:_},_init:Re}},z.memo=function(_,T){return{$$typeof:u,type:_,compare:T===void 0?null:T}},z.startTransition=function(_){var T=$.T,N={};$.T=N;try{var M=_(),q=$.S;q!==null&&q(N,M),typeof M=="object"&&M!==null&&typeof M.then=="function"&&M.then(H,Q)}catch(Y){Q(Y)}finally{T!==null&&N.types!==null&&(T.types=N.types),$.T=T}},z.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},z.use=function(_){return $.H.use(_)},z.useActionState=function(_,T,N){return $.H.useActionState(_,T,N)},z.useCallback=function(_,T){return $.H.useCallback(_,T)},z.useContext=function(_){return $.H.useContext(_)},z.useDebugValue=function(){},z.useDeferredValue=function(_,T){return $.H.useDeferredValue(_,T)},z.useEffect=function(_,T){return $.H.useEffect(_,T)},z.useEffectEvent=function(_){return $.H.useEffectEvent(_)},z.useId=function(){return $.H.useId()},z.useImperativeHandle=function(_,T,N){return $.H.useImperativeHandle(_,T,N)},z.useInsertionEffect=function(_,T){return $.H.useInsertionEffect(_,T)},z.useLayoutEffect=function(_,T){return $.H.useLayoutEffect(_,T)},z.useMemo=function(_,T){return $.H.useMemo(_,T)},z.useOptimistic=function(_,T){return $.H.useOptimistic(_,T)},z.useReducer=function(_,T,N){return $.H.useReducer(_,T,N)},z.useRef=function(_){return $.H.useRef(_)},z.useState=function(_){return $.H.useState(_)},z.useSyncExternalStore=function(_,T,N){return $.H.useSyncExternalStore(_,T,N)},z.useTransition=function(){return $.H.useTransition()},z.version="19.2.4",z}var Xn;function ei(){return Xn||(Xn=1,$r.exports=Ba()),$r.exports}var E=ei();const Ua=ja(E),Fa=$a({__proto__:null,default:Ua},[E]);var jr={exports:{}},Se={};var Qn;function Ha(){if(Qn)return Se;Qn=1;var e=ei();function t(l){var u="https://react.dev/errors/"+l;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)u+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+l+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function i(l,u,c){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:d==null?null:""+d,children:l,containerInfo:u,implementation:c}}var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function s(l,u){if(l==="font")return"";if(typeof u=="string")return u==="use-credentials"?u:""}return Se.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,Se.createPortal=function(l,u){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)throw Error(t(299));return i(l,u,null,c)},Se.flushSync=function(l){var u=a.T,c=n.p;try{if(a.T=null,n.p=2,l)return l()}finally{a.T=u,n.p=c,n.d.f()}},Se.preconnect=function(l,u){typeof l=="string"&&(u?(u=u.crossOrigin,u=typeof u=="string"?u==="use-credentials"?u:"":void 0):u=null,n.d.C(l,u))},Se.prefetchDNS=function(l){typeof l=="string"&&n.d.D(l)},Se.preinit=function(l,u){if(typeof l=="string"&&u&&typeof u.as=="string"){var c=u.as,d=s(c,u.crossOrigin),h=typeof u.integrity=="string"?u.integrity:void 0,f=typeof u.fetchPriority=="string"?u.fetchPriority:void 0;c==="style"?n.d.S(l,typeof u.precedence=="string"?u.precedence:void 0,{crossOrigin:d,integrity:h,fetchPriority:f}):c==="script"&&n.d.X(l,{crossOrigin:d,integrity:h,fetchPriority:f,nonce:typeof u.nonce=="string"?u.nonce:void 0})}},Se.preinitModule=function(l,u){if(typeof l=="string")if(typeof u=="object"&&u!==null){if(u.as==null||u.as==="script"){var c=s(u.as,u.crossOrigin);n.d.M(l,{crossOrigin:c,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0})}}else u==null&&n.d.M(l)},Se.preload=function(l,u){if(typeof l=="string"&&typeof u=="object"&&u!==null&&typeof u.as=="string"){var c=u.as,d=s(c,u.crossOrigin);n.d.L(l,c,{crossOrigin:d,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,type:typeof u.type=="string"?u.type:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0,referrerPolicy:typeof u.referrerPolicy=="string"?u.referrerPolicy:void 0,imageSrcSet:typeof u.imageSrcSet=="string"?u.imageSrcSet:void 0,imageSizes:typeof u.imageSizes=="string"?u.imageSizes:void 0,media:typeof u.media=="string"?u.media:void 0})}},Se.preloadModule=function(l,u){if(typeof l=="string")if(u){var c=s(u.as,u.crossOrigin);n.d.m(l,{as:typeof u.as=="string"&&u.as!=="script"?u.as:void 0,crossOrigin:c,integrity:typeof u.integrity=="string"?u.integrity:void 0})}else n.d.m(l)},Se.requestFormReset=function(l){n.d.r(l)},Se.unstable_batchedUpdates=function(l,u){return l(u)},Se.useFormState=function(l,u,c){return a.H.useFormState(l,u,c)},Se.useFormStatus=function(){return a.H.useHostTransitionStatus()},Se.version="19.2.4",Se}var Zn;function za(){if(Zn)return jr.exports;Zn=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),jr.exports=Ha(),jr.exports}const ti=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();const Ga=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Wa=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase());const eo=e=>{const t=Wa(e);return t.charAt(0).toUpperCase()+t.slice(1)};var qa={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ka=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const Ya=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:i,iconNode:a,...s},l)=>E.createElement("svg",{ref:l,...qa,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:ti("lucide",o),...!i&&!Ka(s)&&{"aria-hidden":"true"},...s},[...a.map(([u,c])=>E.createElement(u,c)),...Array.isArray(i)?i:[i]]));const Rt=(e,t)=>{const r=E.forwardRef(({className:n,...o},i)=>E.createElement(Ya,{ref:i,iconNode:t,className:ti(`lucide-${Ga(eo(e))}`,`lucide-${e}`,n),...o}));return r.displayName=eo(e),r};const Ja=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Vm=Rt("check",Ja);const Xa=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],$m=Rt("chevron-right",Xa);const Qa=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],jm=Rt("copy",Qa);const Za=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],Bm=Rt("panel-left-close",Za);const el=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 14v1",key:"askpd8"}],["path",{d:"M9 19v2",key:"16tejx"}],["path",{d:"M9 3v2",key:"1noubl"}],["path",{d:"M9 9v1",key:"19ebxg"}]],Um=Rt("panel-left-dashed",el);const tl=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Fm=Rt("refresh-cw",tl);var ri=e=>{throw TypeError(e)},rl=(e,t,r)=>t.has(e)||ri("Cannot "+r),Br=(e,t,r)=>(rl(e,t,"read from private field"),r?r.call(e):t.get(e)),nl=(e,t,r)=>t.has(e)?ri("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),to="popstate";function ro(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function ol(e={}){function t(n,o){let i=o.state?.masked,{pathname:a,search:s,hash:l}=i||n.location;return Vt("",{pathname:a,search:s,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default",i?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function r(n,o){return typeof o=="string"?o:ze(o)}return al(t,r,null,e)}function J(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function de(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function il(){return Math.random().toString(36).substring(2,10)}function no(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Vt(e,t,r=null,n,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ye(t):t,state:r,key:t&&t.key||n||il(),unstable_mask:o}}function ze({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Ye(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function al(e,t,r,n={}){let{window:o=document.defaultView,v5Compat:i=!1}=n,a=o.history,s="POP",l=null,u=c();u==null&&(u=0,a.replaceState({...a.state,idx:u},""));function c(){return(a.state||{idx:null}).idx}function d(){s="POP";let b=c(),w=b==null?null:b-u;u=b,l&&l({action:s,location:S.location,delta:w})}function h(b,w){s="PUSH";let P=ro(b)?b:Vt(S.location,b,w);u=c()+1;let L=no(P,u),D=S.createHref(P.unstable_mask||P);try{a.pushState(L,"",D)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;o.location.assign(D)}i&&l&&l({action:s,location:S.location,delta:1})}function f(b,w){s="REPLACE";let P=ro(b)?b:Vt(S.location,b,w);u=c();let L=no(P,u),D=S.createHref(P.unstable_mask||P);a.replaceState(L,"",D),i&&l&&l({action:s,location:S.location,delta:0})}function g(b){return ni(b)}let S={get action(){return s},get location(){return e(o,a)},listen(b){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(to,d),l=b,()=>{o.removeEventListener(to,d),l=null}},createHref(b){return t(o,b)},createURL:g,encodeLocation(b){let w=g(b);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:h,replace:f,go(b){return a.go(b)}};return S}function ni(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),J(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:ze(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}var It,oo=class{constructor(e){if(nl(this,It,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(Br(this,It).has(e))return Br(this,It).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Br(this,It).set(e,t)}};It=new WeakMap;var ll=new Set(["lazy","caseSensitive","path","id","index","children"]);function sl(e){return ll.has(e)}var ul=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function cl(e){return ul.has(e)}function dl(e){return e.index===!0}function $t(e,t,r=[],n={},o=!1){return e.map((i,a)=>{let s=[...r,String(a)],l=typeof i.id=="string"?i.id:s.join("-");if(J(i.index!==!0||!i.children,"Cannot specify children on an index route"),J(o||!n[l],`Found a route id collision on id "${l}". Route id's must be globally unique within Data Router usages`),dl(i)){let u={...i,id:l};return n[l]=io(u,t(u)),u}else{let u={...i,id:l,children:void 0};return n[l]=io(u,t(u)),i.children&&(u.children=$t(i.children,t,s,n,o)),u}})}function io(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Qe(e,t,r="/"){return kt(e,t,r,!1)}function kt(e,t,r,n){let o=typeof t=="string"?Ye(t):t,i=$e(o.pathname||"/",r);if(i==null)return null;let a=oi(e);fl(a);let s=null;for(let l=0;s==null&&l<a.length;++l){let u=Sl(i);s=bl(a[l],u,n)}return s}function ml(e,t){let{route:r,pathname:n,params:o}=e;return{id:r.id,pathname:n,params:o,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function oi(e,t=[],r=[],n="",o=!1){let i=(a,s,l=o,u)=>{let c={relativePath:u===void 0?a.path||"":u,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(n)&&l)return;J(c.relativePath.startsWith(n),`Absolute route path "${c.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(n.length)}let d=je([n,c.relativePath]),h=r.concat(c);a.children&&a.children.length>0&&(J(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),oi(a.children,t,h,d,l)),!(a.path==null&&!a.index)&&t.push({path:d,score:El(d,a.index),routesMeta:h})};return e.forEach((a,s)=>{if(a.path===""||!a.path?.includes("?"))i(a,s);else for(let l of ii(a.path))i(a,s,!0,l)}),t}function ii(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return o?[i,""]:[i];let a=ii(n.join("/")),s=[];return s.push(...a.map(l=>l===""?i:[i,l].join("/"))),o&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function fl(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Rl(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var hl=/^:[\w-]+$/,pl=3,gl=2,_l=1,yl=10,vl=-2,ao=e=>e==="*";function El(e,t){let r=e.split("/"),n=r.length;return r.some(ao)&&(n+=vl),t&&(n+=gl),r.filter(o=>!ao(o)).reduce((o,i)=>o+(hl.test(i)?pl:i===""?_l:yl),n)}function Rl(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function bl(e,t,r=!1){let{routesMeta:n}=e,o={},i="/",a=[];for(let s=0;s<n.length;++s){let l=n[s],u=s===n.length-1,c=i==="/"?t:t.slice(i.length)||"/",d=pr({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),h=l.route;if(!d&&u&&r&&!n[n.length-1].route.index&&(d=pr({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;Object.assign(o,d.params),a.push({params:o,pathname:je([i,d.pathname]),pathnameBase:Tl(je([i,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(i=je([i,d.pathnameBase]))}return a}function pr(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=wl(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:n.reduce((u,{paramName:c,isOptional:d},h)=>{if(c==="*"){let g=s[h]||"";a=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const f=s[h];return d&&!f?u[c]=void 0:u[c]=(f||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:a,pattern:e}}function wl(e,t=!1,r=!0){de(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l,u,c)=>{if(n.push({paramName:s,isOptional:l!=null}),l){let d=c.charAt(u+a.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function Sl(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return de(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function $e(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Ll({basename:e,pathname:t}){return t==="/"?e:je([e,t])}var ai=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gn=e=>ai.test(e);function Pl(e,t="/"){let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?Ye(e):e,i;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?i=lo(r.substring(1),"/"):i=lo(r,t)):i=t,{pathname:i,search:Cl(n),hash:Al(o)}}function lo(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Ur(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function li(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Pr(e){let t=li(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function zt(e,t,r,n=!1){let o;typeof e=="string"?o=Ye(e):(o={...e},J(!o.pathname||!o.pathname.includes("?"),Ur("?","pathname","search",o)),J(!o.pathname||!o.pathname.includes("#"),Ur("#","pathname","hash",o)),J(!o.search||!o.search.includes("#"),Ur("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(a==null)s=r;else{let d=t.length-1;if(!n&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),d-=1;o.pathname=h.join("/")}s=d>=0?t[d]:"/"}let l=Pl(o,s),u=a&&a!=="/"&&a.endsWith("/"),c=(i||a===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var je=e=>e.join("/").replace(/\/\/+/g,"/"),Tl=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Cl=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Al=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Gt=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function jt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Wt(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var si=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ui(e,t){let r=e;if(typeof r!="string"||!ai.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,o=!1;if(si)try{let i=new URL(window.location.href),a=r.startsWith("//")?new URL(i.protocol+r):new URL(r),s=$e(a.pathname,t);a.origin===i.origin&&s!=null?r=s+a.search+a.hash:o=!0}catch{de(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:o,to:r}}var et=Symbol("Uninstrumented");function Ol(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(o=>o({id:t.id,index:t.index,path:t.path,instrument(i){let a=Object.keys(r);for(let s of a)i[s]&&r[s].push(i[s])}}));let n={};if(typeof t.lazy=="function"&&r.lazy.length>0){let o=pt(r.lazy,t.lazy,()=>{});o&&(n.lazy=o)}if(typeof t.lazy=="object"){let o=t.lazy;["middleware","loader","action"].forEach(i=>{let a=o[i],s=r[`lazy.${i}`];if(typeof a=="function"&&s.length>0){let l=pt(s,a,()=>{});l&&(n.lazy=Object.assign(n.lazy||{},{[i]:l}))}})}return["loader","action"].forEach(o=>{let i=t[o];if(typeof i=="function"&&r[o].length>0){let a=i[et]??i,s=pt(r[o],a,(...l)=>so(l[0]));s&&(o==="loader"&&a.hydrate===!0&&(s.hydrate=!0),s[et]=a,n[o]=s)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(n.middleware=t.middleware.map(o=>{let i=o[et]??o,a=pt(r.middleware,i,(...s)=>so(s[0]));return a?(a[et]=i,a):o})),n}function Dl(e,t){let r={navigate:[],fetch:[]};if(t.forEach(n=>n({instrument(o){let i=Object.keys(o);for(let a of i)o[a]&&r[a].push(o[a])}})),r.navigate.length>0){let n=e.navigate[et]??e.navigate,o=pt(r.navigate,n,(...i)=>{let[a,s]=i;return{to:typeof a=="number"||typeof a=="string"?a:a?ze(a):".",...uo(e,s??{})}});o&&(o[et]=n,e.navigate=o)}if(r.fetch.length>0){let n=e.fetch[et]??e.fetch,o=pt(r.fetch,n,(...i)=>{let[a,,s,l]=i;return{href:s??".",fetcherKey:a,...uo(e,l??{})}});o&&(o[et]=n,e.fetch=o)}return e}function pt(e,t,r){return e.length===0?null:async(...n)=>{let o=await ci(e,r(...n),()=>t(...n),e.length-1);if(o.type==="error")throw o.value;return o.value}}async function ci(e,t,r,n){let o=e[n],i;if(o){let a,s=async()=>(a?console.error("You cannot call instrumented handlers more than once"):a=ci(e,t,r,n-1),i=await a,J(i,"Expected a result"),i.type==="error"&&i.value instanceof Error?{status:"error",error:i.value}:{status:"success",error:void 0});try{await o(s,t)}catch(l){console.error("An instrumentation function threw an error:",l)}a||await s(),await a}else try{i={type:"success",value:await r()}}catch(a){i={type:"error",value:a}}return i||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function so(e){let{request:t,context:r,params:n,unstable_pattern:o}=e;return{request:Il(t),params:{...n},unstable_pattern:o,context:kl(r)}}function uo(e,t){return{currentUrl:ze(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function Il(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function kl(e){if(Nl(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var xl=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Nl(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===xl}var di=["POST","PUT","PATCH","DELETE"],Ml=new Set(di),Vl=["GET",...di],$l=new Set(Vl),mi=new Set([301,302,303,307,308]),jl=new Set([307,308]),Fr={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Bl={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ct={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ul=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),fi="remix-router-transitions",hi=Symbol("ResetLoaderData");function Fl(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";J(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],o=e.mapRouteProperties||Ul,i=o;if(e.unstable_instrumentations){let p=e.unstable_instrumentations;i=y=>({...o(y),...Ol(p.map(R=>R.route).filter(Boolean),y)})}let a={},s=$t(e.routes,i,void 0,a),l,u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let c=e.dataStrategy||ql,d={...e.future},h=null,f=new Set,g=null,S=null,b=null,w=e.hydrationData!=null,P=Qe(s,e.history.location,u),L=!1,D=null,k,H;if(P==null&&!e.patchRoutesOnNavigation){let p=Ve(404,{pathname:e.history.location.pathname}),{matches:y,route:R}=nr(s);k=!0,H=!k,P=y,D={[R.id]:p}}else if(P&&!e.hydrationData&&Qt(P,s,e.history.location.pathname).active&&(P=null),P)if(P.some(p=>p.route.lazy))k=!1,H=!k;else if(!P.some(p=>_n(p.route)))k=!0,H=!k;else{let p=e.hydrationData?e.hydrationData.loaderData:null,y=e.hydrationData?e.hydrationData.errors:null,R=P;if(y){let C=P.findIndex(O=>y[O.route.id]!==void 0);R=R.slice(0,C+1)}H=!1,k=R.every(C=>{let O=pi(C.route,p,y);return H=H||O.renderFallback,!O.shouldLoad})}else{k=!1,H=!k,P=[];let p=Qt(null,s,e.history.location.pathname);p.active&&p.matches&&(L=!0,P=p.matches)}let $,v={historyAction:e.history.action,location:e.history.location,matches:P,initialized:k,renderFallback:H,navigation:Fr,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||D,fetchers:new Map,blockers:new Map},Z="POP",re=null,se=!1,X,me=!1,K=new Map,G=null,ne=!1,fe=!1,Re=new Set,Q=new Map,Ce=0,_=-1,T=new Map,N=new Set,M=new Map,q=new Map,Y=new Set,ee=new Map,Ae,he=null;function kr(){if(h=e.history.listen(({action:p,location:y,delta:R})=>{if(Ae){Ae(),Ae=void 0;return}de(ee.size===0||R!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let C=Gn({currentLocation:v.location,nextLocation:y,historyAction:p});if(C&&R!=null){let O=new Promise(V=>{Ae=V});e.history.go(R*-1),Xt(C,{state:"blocked",location:y,proceed(){Xt(C,{state:"proceeding",proceed:void 0,reset:void 0,location:y}),O.then(()=>e.history.go(R))},reset(){let V=new Map(v.blockers);V.set(C,Ct),be({blockers:V})}}),re?.resolve(),re=null;return}return rt(p,y)}),r){ds(t,K);let p=()=>ms(t,K);t.addEventListener("pagehide",p),G=()=>t.removeEventListener("pagehide",p)}return v.initialized||rt("POP",v.location,{initialHydration:!0}),$}function Ra(){h&&h(),G&&G(),f.clear(),X&&X.abort(),v.fetchers.forEach((p,y)=>Nr(y)),v.blockers.forEach((p,y)=>zn(y))}function ba(p){return f.add(p),()=>f.delete(p)}function be(p,y={}){p.matches&&(p.matches=p.matches.map(O=>{let V=a[O.route.id],I=O.route;return I.element!==V.element||I.errorElement!==V.errorElement||I.hydrateFallbackElement!==V.hydrateFallbackElement?{...O,route:V}:O})),v={...v,...p};let R=[],C=[];v.fetchers.forEach((O,V)=>{O.state==="idle"&&(Y.has(V)?R.push(V):C.push(V))}),Y.forEach(O=>{!v.fetchers.has(O)&&!Q.has(O)&&R.push(O)}),[...f].forEach(O=>O(v,{deletedFetchers:R,newErrors:p.errors??null,viewTransitionOpts:y.viewTransitionOpts,flushSync:y.flushSync===!0})),R.forEach(O=>Nr(O)),C.forEach(O=>v.fetchers.delete(O))}function mt(p,y,{flushSync:R}={}){let C=v.actionData!=null&&v.navigation.formMethod!=null&&Pe(v.navigation.formMethod)&&v.navigation.state==="loading"&&p.state?._isRedirect!==!0,O;y.actionData?Object.keys(y.actionData).length>0?O=y.actionData:O=null:C?O=v.actionData:O=null;let V=y.loaderData?Eo(v.loaderData,y.loaderData,y.matches||[],y.errors):v.loaderData,I=v.blockers;I.size>0&&(I=new Map(I),I.forEach((F,j)=>I.set(j,Ct)));let B=ne?!1:qn(p,y.matches||v.matches),x=se===!0||v.navigation.formMethod!=null&&Pe(v.navigation.formMethod)&&p.state?._isRedirect!==!0;l&&(s=l,l=void 0),ne||Z==="POP"||(Z==="PUSH"?e.history.push(p,p.state):Z==="REPLACE"&&e.history.replace(p,p.state));let U;if(Z==="POP"){let F=K.get(v.location.pathname);F&&F.has(p.pathname)?U={currentLocation:v.location,nextLocation:p}:K.has(p.pathname)&&(U={currentLocation:p,nextLocation:v.location})}else if(me){let F=K.get(v.location.pathname);F?F.add(p.pathname):(F=new Set([p.pathname]),K.set(v.location.pathname,F)),U={currentLocation:v.location,nextLocation:p}}be({...y,actionData:O,loaderData:V,historyAction:Z,location:p,initialized:!0,renderFallback:!1,navigation:Fr,revalidation:"idle",restoreScrollPosition:B,preventScrollReset:x,blockers:I},{viewTransitionOpts:U,flushSync:R===!0}),Z="POP",se=!1,me=!1,ne=!1,fe=!1,re?.resolve(),re=null,he?.resolve(),he=null}async function Vn(p,y){if(re?.resolve(),re=null,typeof p=="number"){re||(re=So());let ue=re.promise;return e.history.go(p),ue}let R=en(v.location,v.matches,u,p,y?.fromRouteId,y?.relative),{path:C,submission:O,error:V}=co(!1,R,y),I;y?.unstable_mask&&(I={pathname:"",search:"",hash:"",...typeof y.unstable_mask=="string"?Ye(y.unstable_mask):{...v.location.unstable_mask,...y.unstable_mask}});let B=v.location,x=Vt(B,C,y&&y.state,void 0,I);x={...x,...e.history.encodeLocation(x)};let U=y&&y.replace!=null?y.replace:void 0,F="PUSH";U===!0?F="REPLACE":U===!1||O!=null&&Pe(O.formMethod)&&O.formAction===v.location.pathname+v.location.search&&(F="REPLACE");let j=y&&"preventScrollReset"in y?y.preventScrollReset===!0:void 0,ie=(y&&y.flushSync)===!0,oe=Gn({currentLocation:B,nextLocation:x,historyAction:F});if(oe){Xt(oe,{state:"blocked",location:x,proceed(){Xt(oe,{state:"proceeding",proceed:void 0,reset:void 0,location:x}),Vn(p,y)},reset(){let ue=new Map(v.blockers);ue.set(oe,Ct),be({blockers:ue})}});return}await rt(F,x,{submission:O,pendingError:V,preventScrollReset:j,replace:y&&y.replace,enableViewTransition:y&&y.viewTransition,flushSync:ie,callSiteDefaultShouldRevalidate:y&&y.unstable_defaultShouldRevalidate})}function wa(){he||(he=So()),xr(),be({revalidation:"loading"});let p=he.promise;return v.navigation.state==="submitting"?p:v.navigation.state==="idle"?(rt(v.historyAction,v.location,{startUninterruptedRevalidation:!0}),p):(rt(Z||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation,enableViewTransition:me===!0}),p)}async function rt(p,y,R){X&&X.abort(),X=null,Z=p,ne=(R&&R.startUninterruptedRevalidation)===!0,xa(v.location,v.matches),se=(R&&R.preventScrollReset)===!0,me=(R&&R.enableViewTransition)===!0;let C=l||s,O=R&&R.overrideNavigation,V=R?.initialHydration&&v.matches&&v.matches.length>0&&!L?v.matches:Qe(C,y,u),I=(R&&R.flushSync)===!0;if(V&&v.initialized&&!fe&&ts(v.location,y)&&!(R&&R.submission&&Pe(R.submission.formMethod))){mt(y,{matches:V},{flushSync:I});return}let B=Qt(V,C,y.pathname);if(B.active&&B.matches&&(V=B.matches),!V){let{error:ve,notFoundMatches:Oe,route:ae}=Mr(y.pathname);mt(y,{matches:Oe,loaderData:{},errors:{[ae.id]:ve}},{flushSync:I});return}X=new AbortController;let x=ht(e.history,y,X.signal,R&&R.submission),U=e.getContext?await e.getContext():new oo,F;if(R&&R.pendingError)F=[Ze(V).route.id,{type:"error",error:R.pendingError}];else if(R&&R.submission&&Pe(R.submission.formMethod)){let ve=await Sa(x,y,R.submission,V,U,B.active,R&&R.initialHydration===!0,{replace:R.replace,flushSync:I});if(ve.shortCircuited)return;if(ve.pendingActionResult){let[Oe,ae]=ve.pendingActionResult;if(ke(ae)&&jt(ae.error)&&ae.error.status===404){X=null,mt(y,{matches:ve.matches,loaderData:{},errors:{[Oe]:ae.error}});return}}V=ve.matches||V,F=ve.pendingActionResult,O=Hr(y,R.submission),I=!1,B.active=!1,x=ht(e.history,x.url,x.signal)}let{shortCircuited:j,matches:ie,loaderData:oe,errors:ue}=await La(x,y,V,U,B.active,O,R&&R.submission,R&&R.fetcherSubmission,R&&R.replace,R&&R.initialHydration===!0,I,F,R&&R.callSiteDefaultShouldRevalidate);j||(X=null,mt(y,{matches:ie||V,...Ro(F),loaderData:oe,errors:ue}))}async function Sa(p,y,R,C,O,V,I,B={}){xr();let x=us(y,R);if(be({navigation:x},{flushSync:B.flushSync===!0}),V){let j=await Zt(C,y.pathname,p.signal);if(j.type==="aborted")return{shortCircuited:!0};if(j.type==="error"){if(j.partialMatches.length===0){let{matches:oe,route:ue}=nr(s);return{matches:oe,pendingActionResult:[ue.id,{type:"error",error:j.error}]}}let ie=Ze(j.partialMatches).route.id;return{matches:j.partialMatches,pendingActionResult:[ie,{type:"error",error:j.error}]}}else if(j.matches)C=j.matches;else{let{notFoundMatches:ie,error:oe,route:ue}=Mr(y.pathname);return{matches:ie,pendingActionResult:[ue.id,{type:"error",error:oe}]}}}let U,F=cr(C,y);if(!F.route.action&&!F.route.lazy)U={type:"error",error:Ve(405,{method:p.method,pathname:y.pathname,routeId:F.route.id})};else{let j=_t(i,a,p,C,F,I?[]:n,O),ie=await Lt(p,j,O,null);if(U=ie[F.route.id],!U){for(let oe of C)if(ie[oe.route.id]){U=ie[oe.route.id];break}}if(p.signal.aborted)return{shortCircuited:!0}}if(st(U)){let j;return B&&B.replace!=null?j=B.replace:j=_o(U.response.headers.get("Location"),new URL(p.url),u,e.history)===v.location.pathname+v.location.search,await nt(p,U,!0,{submission:R,replace:j}),{shortCircuited:!0}}if(ke(U)){let j=Ze(C,F.route.id);return(B&&B.replace)!==!0&&(Z="PUSH"),{matches:C,pendingActionResult:[j.route.id,U,F.route.id]}}return{matches:C,pendingActionResult:[F.route.id,U]}}async function La(p,y,R,C,O,V,I,B,x,U,F,j,ie){let oe=V||Hr(y,I),ue=I||B||wo(oe),ve=!ne&&!U;if(O){if(ve){let we=$n(j);be({navigation:oe,...we!==void 0?{actionData:we}:{}},{flushSync:F})}let te=await Zt(R,y.pathname,p.signal);if(te.type==="aborted")return{shortCircuited:!0};if(te.type==="error"){if(te.partialMatches.length===0){let{matches:ft,route:at}=nr(s);return{matches:ft,loaderData:{},errors:{[at.id]:te.error}}}let we=Ze(te.partialMatches).route.id;return{matches:te.partialMatches,loaderData:{},errors:{[we]:te.error}}}else if(te.matches)R=te.matches;else{let{error:we,notFoundMatches:ft,route:at}=Mr(y.pathname);return{matches:ft,loaderData:{},errors:{[at.id]:we}}}}let Oe=l||s,{dsMatches:ae,revalidatingFetchers:Ne}=mo(p,C,i,a,e.history,v,R,ue,y,U?[]:n,U===!0,fe,Re,Y,M,N,Oe,u,e.patchRoutesOnNavigation!=null,j,ie);if(_=++Ce,!e.dataStrategy&&!ae.some(te=>te.shouldLoad)&&!ae.some(te=>te.route.middleware&&te.route.middleware.length>0)&&Ne.length===0){let te=Fn();return mt(y,{matches:R,loaderData:{},errors:j&&ke(j[1])?{[j[0]]:j[1].error}:null,...Ro(j),...te?{fetchers:new Map(v.fetchers)}:{}},{flushSync:F}),{shortCircuited:!0}}if(ve){let te={};if(!O){te.navigation=oe;let we=$n(j);we!==void 0&&(te.actionData=we)}Ne.length>0&&(te.fetchers=Pa(Ne)),be(te,{flushSync:F})}Ne.forEach(te=>{qe(te.key),te.controller&&Q.set(te.key,te.controller)});let ot=()=>Ne.forEach(te=>qe(te.key));X&&X.signal.addEventListener("abort",ot);let{loaderResults:Pt,fetcherResults:Xe}=await jn(ae,Ne,p,C);if(p.signal.aborted)return{shortCircuited:!0};X&&X.signal.removeEventListener("abort",ot),Ne.forEach(te=>Q.delete(te.key));let Ue=or(Pt);if(Ue)return await nt(p,Ue.result,!0,{replace:x}),{shortCircuited:!0};if(Ue=or(Xe),Ue)return N.add(Ue.key),await nt(p,Ue.result,!0,{replace:x}),{shortCircuited:!0};let{loaderData:Vr,errors:Tt}=vo(v,R,Pt,j,Ne,Xe);U&&v.errors&&(Tt={...v.errors,...Tt});let it=Fn(),er=Hn(_),tr=it||er||Ne.length>0;return{matches:R,loaderData:Vr,errors:Tt,...tr?{fetchers:new Map(v.fetchers)}:{}}}function $n(p){if(p&&!ke(p[1]))return{[p[0]]:p[1].data};if(v.actionData)return Object.keys(v.actionData).length===0?null:v.actionData}function Pa(p){return p.forEach(y=>{let R=v.fetchers.get(y.key),C=At(void 0,R?R.data:void 0);v.fetchers.set(y.key,C)}),new Map(v.fetchers)}async function Ta(p,y,R,C){qe(p);let O=(C&&C.flushSync)===!0,V=l||s,I=en(v.location,v.matches,u,R,y,C?.relative),B=Qe(V,I,u),x=Qt(B,V,I);if(x.active&&x.matches&&(B=x.matches),!B){We(p,y,Ve(404,{pathname:I}),{flushSync:O});return}let{path:U,submission:F,error:j}=co(!0,I,C);if(j){We(p,y,j,{flushSync:O});return}let ie=e.getContext?await e.getContext():new oo,oe=(C&&C.preventScrollReset)===!0;if(F&&Pe(F.formMethod)){await Ca(p,y,U,B,ie,x.active,O,oe,F,C&&C.unstable_defaultShouldRevalidate);return}M.set(p,{routeId:y,path:U}),await Aa(p,y,U,B,ie,x.active,O,oe,F)}async function Ca(p,y,R,C,O,V,I,B,x,U){xr(),M.delete(p);let F=v.fetchers.get(p);Ge(p,cs(x,F),{flushSync:I});let j=new AbortController,ie=ht(e.history,R,j.signal,x);if(V){let ce=await Zt(C,new URL(ie.url).pathname,ie.signal,p);if(ce.type==="aborted")return;if(ce.type==="error"){We(p,y,ce.error,{flushSync:I});return}else if(ce.matches)C=ce.matches;else{We(p,y,Ve(404,{pathname:R}),{flushSync:I});return}}let oe=cr(C,R);if(!oe.route.action&&!oe.route.lazy){let ce=Ve(405,{method:x.formMethod,pathname:R,routeId:y});We(p,y,ce,{flushSync:I});return}Q.set(p,j);let ue=Ce,ve=_t(i,a,ie,C,oe,n,O),Oe=await Lt(ie,ve,O,p),ae=Oe[oe.route.id];if(!ae){for(let ce of ve)if(Oe[ce.route.id]){ae=Oe[ce.route.id];break}}if(ie.signal.aborted){Q.get(p)===j&&Q.delete(p);return}if(Y.has(p)){if(st(ae)||ke(ae)){Ge(p,Ke(void 0));return}}else{if(st(ae))if(Q.delete(p),_>ue){Ge(p,Ke(void 0));return}else return N.add(p),Ge(p,At(x)),nt(ie,ae,!1,{fetcherSubmission:x,preventScrollReset:B});if(ke(ae)){We(p,y,ae.error);return}}let Ne=v.navigation.location||v.location,ot=ht(e.history,Ne,j.signal),Pt=l||s,Xe=v.navigation.state!=="idle"?Qe(Pt,v.navigation.location,u):v.matches;J(Xe,"Didn't find any matches after fetcher action");let Ue=++Ce;T.set(p,Ue);let Vr=At(x,ae.data);v.fetchers.set(p,Vr);let{dsMatches:Tt,revalidatingFetchers:it}=mo(ot,O,i,a,e.history,v,Xe,x,Ne,n,!1,fe,Re,Y,M,N,Pt,u,e.patchRoutesOnNavigation!=null,[oe.route.id,ae],U);it.filter(ce=>ce.key!==p).forEach(ce=>{let rr=ce.key,Yn=v.fetchers.get(rr),Va=At(void 0,Yn?Yn.data:void 0);v.fetchers.set(rr,Va),qe(rr),ce.controller&&Q.set(rr,ce.controller)}),be({fetchers:new Map(v.fetchers)});let er=()=>it.forEach(ce=>qe(ce.key));j.signal.addEventListener("abort",er);let{loaderResults:tr,fetcherResults:te}=await jn(Tt,it,ot,O);if(j.signal.aborted)return;if(j.signal.removeEventListener("abort",er),T.delete(p),Q.delete(p),it.forEach(ce=>Q.delete(ce.key)),v.fetchers.has(p)){let ce=Ke(ae.data);v.fetchers.set(p,ce)}let we=or(tr);if(we)return nt(ot,we.result,!1,{preventScrollReset:B});if(we=or(te),we)return N.add(we.key),nt(ot,we.result,!1,{preventScrollReset:B});let{loaderData:ft,errors:at}=vo(v,Xe,tr,void 0,it,te);Hn(Ue),v.navigation.state==="loading"&&Ue>_?(J(Z,"Expected pending action"),X&&X.abort(),mt(v.navigation.location,{matches:Xe,loaderData:ft,errors:at,fetchers:new Map(v.fetchers)})):(be({errors:at,loaderData:Eo(v.loaderData,ft,Xe,at),fetchers:new Map(v.fetchers)}),fe=!1)}async function Aa(p,y,R,C,O,V,I,B,x){let U=v.fetchers.get(p);Ge(p,At(x,U?U.data:void 0),{flushSync:I});let F=new AbortController,j=ht(e.history,R,F.signal);if(V){let ae=await Zt(C,new URL(j.url).pathname,j.signal,p);if(ae.type==="aborted")return;if(ae.type==="error"){We(p,y,ae.error,{flushSync:I});return}else if(ae.matches)C=ae.matches;else{We(p,y,Ve(404,{pathname:R}),{flushSync:I});return}}let ie=cr(C,R);Q.set(p,F);let oe=Ce,ue=_t(i,a,j,C,ie,n,O),Oe=(await Lt(j,ue,O,p))[ie.route.id];if(Q.get(p)===F&&Q.delete(p),!j.signal.aborted){if(Y.has(p)){Ge(p,Ke(void 0));return}if(st(Oe))if(_>oe){Ge(p,Ke(void 0));return}else{N.add(p),await nt(j,Oe,!1,{preventScrollReset:B});return}if(ke(Oe)){We(p,y,Oe.error);return}Ge(p,Ke(Oe.data))}}async function nt(p,y,R,{submission:C,fetcherSubmission:O,preventScrollReset:V,replace:I}={}){R||(re?.resolve(),re=null),y.response.headers.has("X-Remix-Revalidate")&&(fe=!0);let B=y.response.headers.get("Location");J(B,"Expected a Location header on the redirect Response"),B=_o(B,new URL(p.url),u,e.history);let x=Vt(v.location,B,{_isRedirect:!0});if(r){let ue=!1;if(y.response.headers.has("X-Remix-Reload-Document"))ue=!0;else if(gn(B)){const ve=ni(B,!0);ue=ve.origin!==t.location.origin||$e(ve.pathname,u)==null}if(ue){I?t.location.replace(B):t.location.assign(B);return}}X=null;let U=I===!0||y.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:F,formAction:j,formEncType:ie}=v.navigation;!C&&!O&&F&&j&&ie&&(C=wo(v.navigation));let oe=C||O;if(jl.has(y.response.status)&&oe&&Pe(oe.formMethod))await rt(U,x,{submission:{...oe,formAction:B},preventScrollReset:V||se,enableViewTransition:R?me:void 0});else{let ue=Hr(x,C);await rt(U,x,{overrideNavigation:ue,fetcherSubmission:O,preventScrollReset:V||se,enableViewTransition:R?me:void 0})}}async function Lt(p,y,R,C){let O,V={};try{O=await Yl(c,p,y,C,R,!1)}catch(I){return y.filter(B=>B.shouldLoad).forEach(B=>{V[B.route.id]={type:"error",error:I}}),V}if(p.signal.aborted)return V;if(!Pe(p.method))for(let I of y){if(O[I.route.id]?.type==="error")break;!O.hasOwnProperty(I.route.id)&&!v.loaderData.hasOwnProperty(I.route.id)&&(!v.errors||!v.errors.hasOwnProperty(I.route.id))&&I.shouldCallHandler()&&(O[I.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${I.route.id}`)})}for(let[I,B]of Object.entries(O))if(is(B)){let x=B.result;V[I]={type:"redirect",response:Zl(x,p,I,y,u)}}else V[I]=await Ql(B);return V}async function jn(p,y,R,C){let O=Lt(R,p,C,null),V=Promise.all(y.map(async x=>{if(x.matches&&x.match&&x.request&&x.controller){let F=(await Lt(x.request,x.matches,C,x.key))[x.match.route.id];return{[x.key]:F}}else return Promise.resolve({[x.key]:{type:"error",error:Ve(404,{pathname:x.path})}})})),I=await O,B=(await V).reduce((x,U)=>Object.assign(x,U),{});return{loaderResults:I,fetcherResults:B}}function xr(){fe=!0,M.forEach((p,y)=>{Q.has(y)&&Re.add(y),qe(y)})}function Ge(p,y,R={}){v.fetchers.set(p,y),be({fetchers:new Map(v.fetchers)},{flushSync:(R&&R.flushSync)===!0})}function We(p,y,R,C={}){let O=Ze(v.matches,y);Nr(p),be({errors:{[O.route.id]:R},fetchers:new Map(v.fetchers)},{flushSync:(C&&C.flushSync)===!0})}function Bn(p){return q.set(p,(q.get(p)||0)+1),Y.has(p)&&Y.delete(p),v.fetchers.get(p)||Bl}function Oa(p,y){qe(p,y?.reason),Ge(p,Ke(null))}function Nr(p){let y=v.fetchers.get(p);Q.has(p)&&!(y&&y.state==="loading"&&T.has(p))&&qe(p),M.delete(p),T.delete(p),N.delete(p),Y.delete(p),Re.delete(p),v.fetchers.delete(p)}function Da(p){let y=(q.get(p)||0)-1;y<=0?(q.delete(p),Y.add(p)):q.set(p,y),be({fetchers:new Map(v.fetchers)})}function qe(p,y){let R=Q.get(p);R&&(R.abort(y),Q.delete(p))}function Un(p){for(let y of p){let R=Bn(y),C=Ke(R.data);v.fetchers.set(y,C)}}function Fn(){let p=[],y=!1;for(let R of N){let C=v.fetchers.get(R);J(C,`Expected fetcher: ${R}`),C.state==="loading"&&(N.delete(R),p.push(R),y=!0)}return Un(p),y}function Hn(p){let y=[];for(let[R,C]of T)if(C<p){let O=v.fetchers.get(R);J(O,`Expected fetcher: ${R}`),O.state==="loading"&&(qe(R),T.delete(R),y.push(R))}return Un(y),y.length>0}function Ia(p,y){let R=v.blockers.get(p)||Ct;return ee.get(p)!==y&&ee.set(p,y),R}function zn(p){v.blockers.delete(p),ee.delete(p)}function Xt(p,y){let R=v.blockers.get(p)||Ct;J(R.state==="unblocked"&&y.state==="blocked"||R.state==="blocked"&&y.state==="blocked"||R.state==="blocked"&&y.state==="proceeding"||R.state==="blocked"&&y.state==="unblocked"||R.state==="proceeding"&&y.state==="unblocked",`Invalid blocker state transition: ${R.state} -> ${y.state}`);let C=new Map(v.blockers);C.set(p,y),be({blockers:C})}function Gn({currentLocation:p,nextLocation:y,historyAction:R}){if(ee.size===0)return;ee.size>1&&de(!1,"A router only supports one blocker at a time");let C=Array.from(ee.entries()),[O,V]=C[C.length-1],I=v.blockers.get(O);if(!(I&&I.state==="proceeding")&&V({currentLocation:p,nextLocation:y,historyAction:R}))return O}function Mr(p){let y=Ve(404,{pathname:p}),R=l||s,{matches:C,route:O}=nr(R);return{notFoundMatches:C,route:O,error:y}}function ka(p,y,R){if(g=p,b=y,S=R||null,!w&&v.navigation===Fr){w=!0;let C=qn(v.location,v.matches);C!=null&&be({restoreScrollPosition:C})}return()=>{g=null,b=null,S=null}}function Wn(p,y){return S&&S(p,y.map(C=>ml(C,v.loaderData)))||p.key}function xa(p,y){if(g&&b){let R=Wn(p,y);g[R]=b()}}function qn(p,y){if(g){let R=Wn(p,y),C=g[R];if(typeof C=="number")return C}return null}function Qt(p,y,R){if(e.patchRoutesOnNavigation)if(p){if(Object.keys(p[0].params).length>0)return{active:!0,matches:kt(y,R,u,!0)}}else return{active:!0,matches:kt(y,R,u,!0)||[]};return{active:!1,matches:null}}async function Zt(p,y,R,C){if(!e.patchRoutesOnNavigation)return{type:"success",matches:p};let O=p;for(;;){let V=l==null,I=l||s,B=a;try{await e.patchRoutesOnNavigation({signal:R,path:y,matches:O,fetcherKey:C,patch:(F,j)=>{R.aborted||fo(F,j,I,B,i,!1)}})}catch(F){return{type:"error",error:F,partialMatches:O}}finally{V&&!R.aborted&&(s=[...s])}if(R.aborted)return{type:"aborted"};let x=Qe(I,y,u),U=null;if(x){if(Object.keys(x[0].params).length===0)return{type:"success",matches:x};if(U=kt(I,y,u,!0),!(U&&O.length<U.length&&Kn(O,U.slice(0,O.length))))return{type:"success",matches:x}}if(U||(U=kt(I,y,u,!0)),!U||Kn(O,U))return{type:"success",matches:null};O=U}}function Kn(p,y){return p.length===y.length&&p.every((R,C)=>R.route.id===y[C].route.id)}function Na(p){a={},l=$t(p,i,void 0,a)}function Ma(p,y,R=!1){let C=l==null;fo(p,y,l||s,a,i,R),C&&(s=[...s],be({}))}return $={get basename(){return u},get future(){return d},get state(){return v},get routes(){return s},get window(){return t},initialize:kr,subscribe:ba,enableScrollRestoration:ka,navigate:Vn,fetch:Ta,revalidate:wa,createHref:p=>e.history.createHref(p),encodeLocation:p=>e.history.encodeLocation(p),getFetcher:Bn,resetFetcher:Oa,deleteFetcher:Da,dispose:Ra,getBlocker:Ia,deleteBlocker:zn,patchRoutes:Ma,_internalFetchControllers:Q,_internalSetRoutes:Na,_internalSetStateDoNotUseOrYouWillBreakYourApp(p){be(p)}},e.unstable_instrumentations&&($=Dl($,e.unstable_instrumentations.map(p=>p.router).filter(Boolean))),$}function Hl(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function en(e,t,r,n,o,i){let a,s;if(o){a=[];for(let u of t)if(a.push(u),u.route.id===o){s=u;break}}else a=t,s=t[t.length-1];let l=zt(n||".",Pr(a),$e(e.pathname,r)||e.pathname,i==="path");if(n==null&&(l.search=e.search,l.hash=e.hash),(n==null||n===""||n===".")&&s){let u=vn(l.search);if(s.route.index&&!u)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&u){let c=new URLSearchParams(l.search),d=c.getAll("index");c.delete("index"),d.filter(f=>f).forEach(f=>c.append("index",f));let h=c.toString();l.search=h?`?${h}`:""}}return r!=="/"&&(l.pathname=Ll({basename:r,pathname:l.pathname})),ze(l)}function co(e,t,r){if(!r||!Hl(r))return{path:t};if(r.formMethod&&!ss(r.formMethod))return{path:t,error:Ve(405,{method:r.formMethod})};let n=()=>({path:t,error:Ve(400,{type:"invalid-body"})}),i=(r.formMethod||"get").toUpperCase(),a=Ri(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Pe(i))return n();let d=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((h,[f,g])=>`${h}${f}=${g}
3
+ `,""):String(r.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:d}}}else if(r.formEncType==="application/json"){if(!Pe(i))return n();try{let d=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:d,text:void 0}}}catch{return n()}}}J(typeof FormData=="function","FormData is not available in this environment");let s,l;if(r.formData)s=rn(r.formData),l=r.formData;else if(r.body instanceof FormData)s=rn(r.body),l=r.body;else if(r.body instanceof URLSearchParams)s=r.body,l=yo(s);else if(r.body==null)s=new URLSearchParams,l=new FormData;else try{s=new URLSearchParams(r.body),l=yo(s)}catch{return n()}let u={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Pe(u.formMethod))return{path:t,submission:u};let c=Ye(t);return e&&c.search&&vn(c.search)&&s.append("index",""),c.search=`?${s}`,{path:ze(c),submission:u}}function mo(e,t,r,n,o,i,a,s,l,u,c,d,h,f,g,S,b,w,P,L,D){let k=L?ke(L[1])?L[1].error:L[1].data:void 0,H=o.createURL(i.location),$=o.createURL(l),v;if(c&&i.errors){let G=Object.keys(i.errors)[0];v=a.findIndex(ne=>ne.route.id===G)}else if(L&&ke(L[1])){let G=L[0];v=a.findIndex(ne=>ne.route.id===G)-1}let Z=L?L[1].statusCode:void 0,re=Z&&Z>=400,se={currentUrl:H,currentParams:i.matches[0]?.params||{},nextUrl:$,nextParams:a[0].params,...s,actionResult:k,actionStatus:Z},X=Wt(a),me=a.map((G,ne)=>{let{route:fe}=G,Re=null;if(v!=null&&ne>v)Re=!1;else if(fe.lazy)Re=!0;else if(!_n(fe))Re=!1;else if(c){let{shouldLoad:T}=pi(fe,i.loaderData,i.errors);Re=T}else zl(i.loaderData,i.matches[ne],G)&&(Re=!0);if(Re!==null)return tn(r,n,e,X,G,u,t,Re);let Q=!1;typeof D=="boolean"?Q=D:re?Q=!1:(d||H.pathname+H.search===$.pathname+$.search||H.search!==$.search||Gl(i.matches[ne],G))&&(Q=!0);let Ce={...se,defaultShouldRevalidate:Q},_=Nt(G,Ce);return tn(r,n,e,X,G,u,t,_,Ce,D)}),K=[];return g.forEach((G,ne)=>{if(c||!a.some(M=>M.route.id===G.routeId)||f.has(ne))return;let fe=i.fetchers.get(ne),Re=fe&&fe.state!=="idle"&&fe.data===void 0,Q=Qe(b,G.path,w);if(!Q){if(P&&Re)return;K.push({key:ne,routeId:G.routeId,path:G.path,matches:null,match:null,request:null,controller:null});return}if(S.has(ne))return;let Ce=cr(Q,G.path),_=new AbortController,T=ht(o,G.path,_.signal),N=null;if(h.has(ne))h.delete(ne),N=_t(r,n,T,Q,Ce,u,t);else if(Re)d&&(N=_t(r,n,T,Q,Ce,u,t));else{let M;typeof D=="boolean"?M=D:re?M=!1:M=d;let q={...se,defaultShouldRevalidate:M};Nt(Ce,q)&&(N=_t(r,n,T,Q,Ce,u,t,q))}N&&K.push({key:ne,routeId:G.routeId,path:G.path,matches:N,match:Ce,request:T,controller:_})}),{dsMatches:me,revalidatingFetchers:K}}function _n(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function pi(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!_n(e))return{shouldLoad:!1,renderFallback:!1};let n=t!=null&&e.id in t,o=r!=null&&r[e.id]!==void 0;if(!n&&o)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!n};let i=!n&&!o;return{shouldLoad:i,renderFallback:i}}function zl(e,t,r){let n=!t||r.route.id!==t.route.id,o=!e.hasOwnProperty(r.route.id);return n||o}function Gl(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Nt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function fo(e,t,r,n,o,i){let a;if(e){let u=n[e];J(u,`No route found to patch children into: routeId = ${e}`),u.children||(u.children=[]),a=u.children}else a=r;let s=[],l=[];if(t.forEach(u=>{let c=a.find(d=>gi(u,d));c?l.push({existingRoute:c,newRoute:u}):s.push(u)}),s.length>0){let u=$t(s,o,[e||"_","patch",String(a?.length||"0")],n);a.push(...u)}if(i&&l.length>0)for(let u=0;u<l.length;u++){let{existingRoute:c,newRoute:d}=l[u],h=c,[f]=$t([d],o,[],{},!0);Object.assign(h,{element:f.element?f.element:h.element,errorElement:f.errorElement?f.errorElement:h.errorElement,hydrateFallbackElement:f.hydrateFallbackElement?f.hydrateFallbackElement:h.hydrateFallbackElement})}}function gi(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((r,n)=>t.children?.some(o=>gi(r,o)))??!1:!1}var ho=new WeakMap,_i=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let o=r[t.id];if(J(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let i=o.lazy[e];if(!i)return;let a=ho.get(o);a||(a={},ho.set(o,a));let s=a[e];if(s)return s;let l=(async()=>{let u=sl(e),d=o[e]!==void 0&&e!=="hasErrorBoundary";if(u)de(!u,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),a[e]=Promise.resolve();else if(d)de(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let h=await i();h!=null&&(Object.assign(o,{[e]:h}),Object.assign(o,n(o)))}typeof o.lazy=="object"&&(o.lazy[e]=void 0,Object.values(o.lazy).every(h=>h===void 0)&&(o.lazy=void 0))})();return a[e]=l,l},po=new WeakMap;function Wl(e,t,r,n,o){let i=r[e.id];if(J(i,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let c=po.get(i);if(c)return{lazyRoutePromise:c,lazyHandlerPromise:c};let d=(async()=>{J(typeof e.lazy=="function","No lazy route function found");let h=await e.lazy(),f={};for(let g in h){let S=h[g];if(S===void 0)continue;let b=cl(g),P=i[g]!==void 0&&g!=="hasErrorBoundary";b?de(!b,"Route property "+g+" is not a supported property to be returned from a lazy route function. This property will be ignored."):P?de(!P,`Route "${i.id}" has a static property "${g}" defined but its lazy function is also returning a value for this property. The lazy route property "${g}" will be ignored.`):f[g]=S}Object.assign(i,f),Object.assign(i,{...n(i),lazy:void 0})})();return po.set(i,d),d.catch(()=>{}),{lazyRoutePromise:d,lazyHandlerPromise:d}}let a=Object.keys(e.lazy),s=[],l;for(let c of a){if(o&&o.includes(c))continue;let d=_i({key:c,route:e,manifest:r,mapRouteProperties:n});d&&(s.push(d),c===t&&(l=d))}let u=s.length>0?Promise.all(s).then(()=>{}):void 0;return u?.catch(()=>{}),l?.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:l}}async function go(e){let t=e.matches.filter(o=>o.shouldLoad),r={};return(await Promise.all(t.map(o=>o.resolve()))).forEach((o,i)=>{r[t[i].route.id]=o}),r}async function ql(e){return e.matches.some(t=>t.route.middleware)?yi(e,()=>go(e)):go(e)}function yi(e,t){return Kl(e,t,n=>{if(ls(n))throw n;return n},ns,r);function r(n,o,i){if(i)return Promise.resolve(Object.assign(i.value,{[o]:{type:"error",result:n}}));{let{matches:a}=e,s=Math.min(Math.max(a.findIndex(u=>u.route.id===o),0),Math.max(a.findIndex(u=>u.shouldCallHandler()),0)),l=Ze(a,a[s].route.id).route.id;return Promise.resolve({[l]:{type:"error",result:n}})}}}async function Kl(e,t,r,n,o){let{matches:i,request:a,params:s,context:l,unstable_pattern:u}=e,c=i.flatMap(h=>h.route.middleware?h.route.middleware.map(f=>[h.route.id,f]):[]);return await vi({request:a,params:s,context:l,unstable_pattern:u},c,t,r,n,o)}async function vi(e,t,r,n,o,i,a=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??new Error(`Request aborted: ${s.method} ${s.url}`);let l=t[a];if(!l)return await r();let[u,c]=l,d,h=async()=>{if(d)throw new Error("You may only call `next()` once per middleware");try{return d={value:await vi(e,t,r,n,o,i,a+1)},d.value}catch(f){return d={value:await i(f,u,d)},d.value}};try{let f=await c(e,h),g=f!=null?n(f):void 0;return o(g)?g:d?g??d.value:(d={value:await h()},d.value)}catch(f){return await i(f,u,d)}}function Ei(e,t,r,n,o){let i=_i({key:"middleware",route:n.route,manifest:t,mapRouteProperties:e}),a=Wl(n.route,Pe(r.method)?"action":"loader",t,e,o);return{middleware:i,route:a.lazyRoutePromise,handler:a.lazyHandlerPromise}}function tn(e,t,r,n,o,i,a,s,l=null,u){let c=!1,d=Ei(e,t,r,o,i);return{...o,_lazyPromises:d,shouldLoad:s,shouldRevalidateArgs:l,shouldCallHandler(h){return c=!0,l?typeof u=="boolean"?Nt(o,{...l,defaultShouldRevalidate:u}):typeof h=="boolean"?Nt(o,{...l,defaultShouldRevalidate:h}):Nt(o,l):s},resolve(h){let{lazy:f,loader:g,middleware:S}=o.route,b=c||s||h&&!Pe(r.method)&&(f||g),w=S&&S.length>0&&!g&&!f;return b&&(Pe(r.method)||!w)?Jl({request:r,unstable_pattern:n,match:o,lazyHandlerPromise:d?.handler,lazyRoutePromise:d?.route,handlerOverride:h,scopedContext:a}):Promise.resolve({type:"data",result:void 0})}}}function _t(e,t,r,n,o,i,a,s=null){return n.map(l=>l.route.id!==o.route.id?{...l,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:Ei(e,t,r,l,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:tn(e,t,r,Wt(n),l,i,a,!0,s))}async function Yl(e,t,r,n,o,i){r.some(u=>u._lazyPromises?.middleware)&&await Promise.all(r.map(u=>u._lazyPromises?.middleware));let a={request:t,unstable_pattern:Wt(r),params:r[0].params,context:o,matches:r},l=await e({...a,fetcherKey:n,runClientMiddleware:u=>{let c=a;return yi(c,()=>u({...c,fetcherKey:n,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(u=>[u._lazyPromises?.handler,u._lazyPromises?.route]))}catch{}return l}async function Jl({request:e,unstable_pattern:t,match:r,lazyHandlerPromise:n,lazyRoutePromise:o,handlerOverride:i,scopedContext:a}){let s,l,u=Pe(e.method),c=u?"action":"loader",d=h=>{let f,g=new Promise((w,P)=>f=P);l=()=>f(),e.signal.addEventListener("abort",l);let S=w=>typeof h!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${c}" [routeId: ${r.route.id}]`)):h({request:e,unstable_pattern:t,params:r.params,context:a},...w!==void 0?[w]:[]),b=(async()=>{try{return{type:"data",result:await(i?i(P=>S(P)):S())}}catch(w){return{type:"error",result:w}}})();return Promise.race([b,g])};try{let h=u?r.route.action:r.route.loader;if(n||o)if(h){let f,[g]=await Promise.all([d(h).catch(S=>{f=S}),n,o]);if(f!==void 0)throw f;s=g}else{await n;let f=u?r.route.action:r.route.loader;if(f)[s]=await Promise.all([d(f),o]);else if(c==="action"){let g=new URL(e.url),S=g.pathname+g.search;throw Ve(405,{method:e.method,pathname:S,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(h)s=await d(h);else{let f=new URL(e.url),g=f.pathname+f.search;throw Ve(404,{pathname:g})}}catch(h){return{type:"error",result:h}}finally{l&&e.signal.removeEventListener("abort",l)}return s}async function Xl(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Ql(e){let{result:t,type:r}=e;if(yn(t)){let n;try{n=await Xl(t)}catch(o){return{type:"error",error:o}}return r==="error"?{type:"error",error:new Gt(t.status,t.statusText,n),statusCode:t.status,headers:t.headers}:{type:"data",data:n,statusCode:t.status,headers:t.headers}}return r==="error"?bo(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:rs(t),statusCode:jt(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:jt(t)?t.status:void 0}:bo(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Zl(e,t,r,n,o){let i=e.headers.get("Location");if(J(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!gn(i)){let a=n.slice(0,n.findIndex(s=>s.route.id===r)+1);i=en(new URL(t.url),a,o,i),e.headers.set("Location",i)}return e}function _o(e,t,r,n){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(gn(e)){let i=e,a=i.startsWith("//")?new URL(t.protocol+i):new URL(i);if(o.includes(a.protocol))throw new Error("Invalid redirect location");let s=$e(a.pathname,r)!=null;if(a.origin===t.origin&&s)return a.pathname+a.search+a.hash}try{let i=n.createURL(e);if(o.includes(i.protocol))throw new Error("Invalid redirect location")}catch{}return e}function ht(e,t,r,n){let o=e.createURL(Ri(t)).toString(),i={signal:r};if(n&&Pe(n.formMethod)){let{formMethod:a,formEncType:s}=n;i.method=a.toUpperCase(),s==="application/json"?(i.headers=new Headers({"Content-Type":s}),i.body=JSON.stringify(n.json)):s==="text/plain"?i.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?i.body=rn(n.formData):i.body=n.formData}return new Request(o,i)}function rn(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function yo(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function es(e,t,r,n=!1,o=!1){let i={},a=null,s,l=!1,u={},c=r&&ke(r[1])?r[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let h=d.route.id,f=t[h];if(J(!st(f),"Cannot handle redirect results in processLoaderData"),ke(f)){let g=f.error;if(c!==void 0&&(g=c,c=void 0),a=a||{},o)a[h]=g;else{let S=Ze(e,h);a[S.route.id]==null&&(a[S.route.id]=g)}n||(i[h]=hi),l||(l=!0,s=jt(f.error)?f.error.status:500),f.headers&&(u[h]=f.headers)}else i[h]=f.data,f.statusCode&&f.statusCode!==200&&!l&&(s=f.statusCode),f.headers&&(u[h]=f.headers)}),c!==void 0&&r&&(a={[r[0]]:c},r[2]&&(i[r[2]]=void 0)),{loaderData:i,errors:a,statusCode:s||200,loaderHeaders:u}}function vo(e,t,r,n,o,i){let{loaderData:a,errors:s}=es(t,r,n);return o.filter(l=>!l.matches||l.matches.some(u=>u.shouldLoad)).forEach(l=>{let{key:u,match:c,controller:d}=l;if(d&&d.signal.aborted)return;let h=i[u];if(J(h,"Did not find corresponding fetcher result"),ke(h)){let f=Ze(e.matches,c?.route.id);s&&s[f.route.id]||(s={...s,[f.route.id]:h.error}),e.fetchers.delete(u)}else if(st(h))J(!1,"Unhandled fetcher revalidation redirect");else{let f=Ke(h.data);e.fetchers.set(u,f)}}),{loaderData:a,errors:s}}function Eo(e,t,r,n){let o=Object.entries(t).filter(([,i])=>i!==hi).reduce((i,[a,s])=>(i[a]=s,i),{});for(let i of r){let a=i.route.id;if(!t.hasOwnProperty(a)&&e.hasOwnProperty(a)&&i.route.loader&&(o[a]=e[a]),n&&n.hasOwnProperty(a))break}return o}function Ro(e){return e?ke(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ze(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function nr(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ve(e,{pathname:t,routeId:r,method:n,type:o,message:i}={}){let a="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(a="Bad Request",n&&t&&r?s=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:o==="invalid-body"&&(s="Unable to encode submission body")):e===403?(a="Forbidden",s=`Route "${r}" does not match URL "${t}"`):e===404?(a="Not Found",s=`No route matches URL "${t}"`):e===405&&(a="Method Not Allowed",n&&t&&r?s=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(s=`Invalid request method "${n.toUpperCase()}"`)),new Gt(e||500,a,new Error(s),!0)}function or(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,o]=t[r];if(st(o))return{key:n,result:o}}}function Ri(e){let t=typeof e=="string"?Ye(e):e;return ze({...t,hash:""})}function ts(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function rs(e){return new Gt(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function ns(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&os(r))}function os(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function is(e){return yn(e.result)&&mi.has(e.result.status)}function ke(e){return e.type==="error"}function st(e){return(e&&e.type)==="redirect"}function bo(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function yn(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function as(e){return mi.has(e)}function ls(e){return yn(e)&&as(e.status)&&e.headers.has("Location")}function ss(e){return $l.has(e.toUpperCase())}function Pe(e){return Ml.has(e.toUpperCase())}function vn(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function cr(e,t){let r=typeof t=="string"?Ye(t).search:t.search;if(e[e.length-1].route.index&&vn(r||""))return e[e.length-1];let n=li(e);return n[n.length-1]}function wo(e){let{formMethod:t,formAction:r,formEncType:n,text:o,formData:i,json:a}=e;if(!(!t||!r||!n)){if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:o};if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:i,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:a,text:void 0}}}function Hr(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function us(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function At(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function cs(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ke(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function ds(e,t){try{let r=e.sessionStorage.getItem(fi);if(r){let n=JSON.parse(r);for(let[o,i]of Object.entries(n||{}))i&&Array.isArray(i)&&t.set(o,new Set(i||[]))}}catch{}}function ms(e,t){if(t.size>0){let r={};for(let[n,o]of t)r[n]=[...o];try{e.sessionStorage.setItem(fi,JSON.stringify(r))}catch(n){de(!1,`Failed to save applied view transitions in sessionStorage (${n}).`)}}}function So(){let e,t,r=new Promise((n,o)=>{e=async i=>{n(i);try{await r}catch{}},t=async i=>{o(i);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var ct=E.createContext(null);ct.displayName="DataRouter";var qt=E.createContext(null);qt.displayName="DataRouterState";var bi=E.createContext(!1);function fs(){return E.useContext(bi)}var En=E.createContext({isTransitioning:!1});En.displayName="ViewTransition";var wi=E.createContext(new Map);wi.displayName="Fetchers";var hs=E.createContext(null);hs.displayName="Await";var xe=E.createContext(null);xe.displayName="Navigation";var Tr=E.createContext(null);Tr.displayName="Location";var Be=E.createContext({outlet:null,matches:[],isDataRoute:!1});Be.displayName="Route";var Rn=E.createContext(null);Rn.displayName="RouteError";var Si="REACT_ROUTER_ERROR",ps="REDIRECT",gs="ROUTE_ERROR_RESPONSE";function _s(e){if(e.startsWith(`${Si}:${ps}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function ys(e){if(e.startsWith(`${Si}:${gs}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Gt(t.status,t.statusText,t.data)}catch{}}function vs(e,{relative:t}={}){J(bt(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=E.useContext(xe),{hash:o,pathname:i,search:a}=Kt(e,{relative:t}),s=i;return r!=="/"&&(s=i==="/"?r:je([r,i])),n.createHref({pathname:s,search:a,hash:o})}function bt(){return E.useContext(Tr)!=null}function Je(){return J(bt(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(Tr).location}var Li="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Pi(e){E.useContext(xe).static||E.useLayoutEffect(e)}function Ti(){let{isDataRoute:e}=E.useContext(Be);return e?Is():Es()}function Es(){J(bt(),"useNavigate() may be used only in the context of a <Router> component.");let e=E.useContext(ct),{basename:t,navigator:r}=E.useContext(xe),{matches:n}=E.useContext(Be),{pathname:o}=Je(),i=JSON.stringify(Pr(n)),a=E.useRef(!1);return Pi(()=>{a.current=!0}),E.useCallback((l,u={})=>{if(de(a.current,Li),!a.current)return;if(typeof l=="number"){r.go(l);return}let c=zt(l,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:je([t,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,i,o,e])}E.createContext(null);function Hm(){let{matches:e}=E.useContext(Be),t=e[e.length-1];return t?t.params:{}}function Kt(e,{relative:t}={}){let{matches:r}=E.useContext(Be),{pathname:n}=Je(),o=JSON.stringify(Pr(r));return E.useMemo(()=>zt(e,JSON.parse(o),n,t==="path"),[e,o,n,t])}function Rs(e,t,r){J(bt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=E.useContext(xe),{matches:o}=E.useContext(Be),i=o[o.length-1],a=i?i.params:{},s=i?i.pathname:"/",l=i?i.pathnameBase:"/",u=i&&i.route;{let b=u&&u.path||"";Ai(s,!u||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
4
+
5
+ Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let c=Je(),d;d=c;let h=d.pathname||"/",f=h;if(l!=="/"){let b=l.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(b.length).join("/")}let g=Qe(e,{pathname:f});return de(u||g!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),de(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Ps(g&&g.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:je([l,n.encodeLocation?n.encodeLocation(b.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:je([l,n.encodeLocation?n.encodeLocation(b.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathnameBase])})),o,r)}function bs(){let e=Ds(),t=jt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:i},"ErrorBoundary")," or"," ",E.createElement("code",{style:i},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),r?E.createElement("pre",{style:o},r):null,a)}var ws=E.createElement(bs,null),Ci=class extends E.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=ys(e.digest);r&&(e=r)}let t=e!==void 0?E.createElement(Be.Provider,{value:this.props.routeContext},E.createElement(Rn.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?E.createElement(Ss,{error:e},t):t}};Ci.contextType=bi;var zr=new WeakMap;function Ss({children:e,error:t}){let{basename:r}=E.useContext(xe);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=_s(t.digest);if(n){let o=zr.get(t);if(o)throw o;let i=ui(n.location,r);if(si&&!zr.get(t))if(i.isExternal||n.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:n.replace}));throw zr.set(t,a),a}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Ls({routeContext:e,match:t,children:r}){let n=E.useContext(ct);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),E.createElement(Be.Provider,{value:e},r)}function Ps(e,t=[],r){let n=r?.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,i=n?.errors;if(i!=null){let c=o.findIndex(d=>d.route.id&&i?.[d.route.id]!==void 0);J(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,c+1))}let a=!1,s=-1;if(r&&n){a=n.renderFallback;for(let c=0;c<o.length;c++){let d=o[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(s=c),d.route.id){let{loaderData:h,errors:f}=n,g=d.route.loader&&!h.hasOwnProperty(d.route.id)&&(!f||f[d.route.id]===void 0);if(d.route.lazy||g){r.isStatic&&(a=!0),s>=0?o=o.slice(0,s+1):o=[o[0]];break}}}}let l=r?.onError,u=n&&l?(c,d)=>{l(c,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Wt(n.matches),errorInfo:d})}:void 0;return o.reduceRight((c,d,h)=>{let f,g=!1,S=null,b=null;n&&(f=i&&d.route.id?i[d.route.id]:void 0,S=d.route.errorElement||ws,a&&(s<0&&h===0?(Ai("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,b=null):s===h&&(g=!0,b=d.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,h+1)),P=()=>{let L;return f?L=S:g?L=b:d.route.Component?L=E.createElement(d.route.Component,null):d.route.element?L=d.route.element:L=c,E.createElement(Ls,{match:d,routeContext:{outlet:c,matches:w,isDataRoute:n!=null},children:L})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?E.createElement(Ci,{location:n.location,revalidation:n.revalidation,component:S,error:f,children:P(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:u}):P()},null)}function bn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ts(e){let t=E.useContext(ct);return J(t,bn(e)),t}function Cs(e){let t=E.useContext(qt);return J(t,bn(e)),t}function As(e){let t=E.useContext(Be);return J(t,bn(e)),t}function wn(e){let t=As(e),r=t.matches[t.matches.length-1];return J(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Os(){return wn("useRouteId")}function Ds(){let e=E.useContext(Rn),t=Cs("useRouteError"),r=wn("useRouteError");return e!==void 0?e:t.errors?.[r]}function Is(){let{router:e}=Ts("useNavigate"),t=wn("useNavigate"),r=E.useRef(!1);return Pi(()=>{r.current=!0}),E.useCallback(async(o,i={})=>{de(r.current,Li),r.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var Lo={};function Ai(e,t,r){!t&&!Lo[e]&&(Lo[e]=!0,de(!1,r))}var Po={};function To(e,t){!e&&!Po[t]&&(Po[t]=!0,console.warn(t))}var ks="useOptimistic",Co=Fa[ks],xs=()=>{};function Ns(e){return Co?Co(e):[e,xs]}function Ms(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&de(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:E.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&de(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:E.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&de(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:E.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Vs=["HydrateFallback","hydrateFallbackElement"],$s=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function js({router:e,flushSync:t,onError:r,unstable_useTransitions:n}){n=fs()||n;let[i,a]=E.useState(e.state),[s,l]=Ns(i),[u,c]=E.useState(),[d,h]=E.useState({isTransitioning:!1}),[f,g]=E.useState(),[S,b]=E.useState(),[w,P]=E.useState(),L=E.useRef(new Map),D=E.useCallback((v,{deletedFetchers:Z,newErrors:re,flushSync:se,viewTransitionOpts:X})=>{re&&r&&Object.values(re).forEach(K=>r(K,{location:v.location,params:v.matches[0]?.params??{},unstable_pattern:Wt(v.matches)})),v.fetchers.forEach((K,G)=>{K.data!==void 0&&L.current.set(G,K.data)}),Z.forEach(K=>L.current.delete(K)),To(se===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let me=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(To(X==null||me,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!X||!me){t&&se?t(()=>a(v)):n===!1?a(v):E.startTransition(()=>{n===!0&&l(K=>Ao(K,v)),a(v)});return}if(t&&se){t(()=>{S&&(f?.resolve(),S.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:X.currentLocation,nextLocation:X.nextLocation})});let K=e.window.document.startViewTransition(()=>{t(()=>a(v))});K.finished.finally(()=>{t(()=>{g(void 0),b(void 0),c(void 0),h({isTransitioning:!1})})}),t(()=>b(K));return}S?(f?.resolve(),S.skipTransition(),P({state:v,currentLocation:X.currentLocation,nextLocation:X.nextLocation})):(c(v),h({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}))},[e.window,t,S,f,n,l,r]);E.useLayoutEffect(()=>e.subscribe(D),[e,D]),E.useEffect(()=>{d.isTransitioning&&!d.flushSync&&g(new $s)},[d]),E.useEffect(()=>{if(f&&u&&e.window){let v=u,Z=f.promise,re=e.window.document.startViewTransition(async()=>{n===!1?a(v):E.startTransition(()=>{n===!0&&l(se=>Ao(se,v)),a(v)}),await Z});re.finished.finally(()=>{g(void 0),b(void 0),c(void 0),h({isTransitioning:!1})}),b(re)}},[u,f,e.window,n,l]),E.useEffect(()=>{f&&u&&s.location.key===u.location.key&&f.resolve()},[f,S,s.location,u]),E.useEffect(()=>{!d.isTransitioning&&w&&(c(w.state),h({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),P(void 0))},[d.isTransitioning,w]);let k=E.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:v=>e.navigate(v),push:(v,Z,re)=>e.navigate(v,{state:Z,preventScrollReset:re?.preventScrollReset}),replace:(v,Z,re)=>e.navigate(v,{replace:!0,state:Z,preventScrollReset:re?.preventScrollReset})}),[e]),H=e.basename||"/",$=E.useMemo(()=>({router:e,navigator:k,static:!1,basename:H,onError:r}),[e,k,H,r]);return E.createElement(E.Fragment,null,E.createElement(ct.Provider,{value:$},E.createElement(qt.Provider,{value:s},E.createElement(wi.Provider,{value:L.current},E.createElement(En.Provider,{value:d},E.createElement(Fs,{basename:H,location:s.location,navigationType:s.historyAction,navigator:k,unstable_useTransitions:n},E.createElement(Bs,{routes:e.routes,future:e.future,state:s,isStatic:!1,onError:r})))))),null)}function Ao(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var Bs=E.memo(Us);function Us({routes:e,future:t,state:r,isStatic:n,onError:o}){return Rs(e,void 0,{state:r,isStatic:n,onError:o})}function zm({to:e,replace:t,state:r,relative:n}){J(bt(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=E.useContext(xe);de(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=E.useContext(Be),{pathname:a}=Je(),s=Ti(),l=zt(e,Pr(i),a,n==="path"),u=JSON.stringify(l);return E.useEffect(()=>{s(JSON.parse(u),{replace:t,state:r,relative:n})},[s,u,n,t,r]),null}function Fs({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:o,static:i=!1,unstable_useTransitions:a}){J(!bt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=E.useMemo(()=>({basename:s,navigator:o,static:i,unstable_useTransitions:a,future:{}}),[s,o,i,a]);typeof r=="string"&&(r=Ye(r));let{pathname:u="/",search:c="",hash:d="",state:h=null,key:f="default",unstable_mask:g}=r,S=E.useMemo(()=>{let b=$e(u,s);return b==null?null:{location:{pathname:b,search:c,hash:d,state:h,key:f,unstable_mask:g},navigationType:n}},[s,u,c,d,h,f,n,g]);return de(S!=null,`<Router basename="${s}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:E.createElement(xe.Provider,{value:l},E.createElement(Tr.Provider,{children:t,value:S}))}var dr="get",mr="application/x-www-form-urlencoded";function Cr(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Hs(e){return Cr(e)&&e.tagName.toLowerCase()==="button"}function zs(e){return Cr(e)&&e.tagName.toLowerCase()==="form"}function Gs(e){return Cr(e)&&e.tagName.toLowerCase()==="input"}function Ws(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qs(e,t){return e.button===0&&(!t||t==="_self")&&!Ws(e)}var ir=null;function Ks(){if(ir===null)try{new FormData(document.createElement("form"),0),ir=!1}catch{ir=!0}return ir}var Ys=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Gr(e){return e!=null&&!Ys.has(e)?(de(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${mr}"`),null):e}function Js(e,t){let r,n,o,i,a;if(zs(e)){let s=e.getAttribute("action");n=s?$e(s,t):null,r=e.getAttribute("method")||dr,o=Gr(e.getAttribute("enctype"))||mr,i=new FormData(e)}else if(Hs(e)||Gs(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||s.getAttribute("action");if(n=l?$e(l,t):null,r=e.getAttribute("formmethod")||s.getAttribute("method")||dr,o=Gr(e.getAttribute("formenctype"))||Gr(s.getAttribute("enctype"))||mr,i=new FormData(s,e),!Ks()){let{name:u,type:c,value:d}=e;if(c==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,d)}}else{if(Cr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=dr,n=null,o=mr,a=e}return i&&o==="text/plain"&&(a=i,i=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:i,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Sn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Xs(e,t,r,n){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${n}`:o.pathname=`${o.pathname}.${n}`:o.pathname==="/"?o.pathname=`_root.${n}`:t&&$e(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${n}`,o}async function Qs(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Zs(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function eu(e,t,r){let n=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let a=await Qs(i,r);return a.links?a.links():[]}return[]}));return ou(n.flat(1).filter(Zs).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Oo(e,t,r,n,o,i){let a=(l,u)=>r[u]?l.route.id!==r[u].route.id:!0,s=(l,u)=>r[u].pathname!==l.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==l.params["*"];return i==="assets"?t.filter((l,u)=>a(l,u)||s(l,u)):i==="data"?t.filter((l,u)=>{let c=n.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(a(l,u)||s(l,u))return!0;if(l.route.shouldRevalidate){let d=l.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function tu(e,t,{includeHydrateFallback:r}={}){return ru(e.map(n=>{let o=t.routes[n.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}function ru(e){return[...new Set(e)]}function nu(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function ou(e,t){let r=new Set;return new Set(t),e.reduce((n,o)=>{let i=JSON.stringify(nu(o));return r.has(i)||(r.add(i),n.push({key:i,link:o})),n},[])}function Oi(){let e=E.useContext(ct);return Sn(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function iu(){let e=E.useContext(qt);return Sn(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ln=E.createContext(void 0);Ln.displayName="FrameworkContext";function Di(){let e=E.useContext(Ln);return Sn(e,"You must render this element inside a <HydratedRouter> element"),e}function au(e,t){let r=E.useContext(Ln),[n,o]=E.useState(!1),[i,a]=E.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,h=E.useRef(null);E.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let S=w=>{w.forEach(P=>{a(P.isIntersecting)})},b=new IntersectionObserver(S,{threshold:.5});return h.current&&b.observe(h.current),()=>{b.disconnect()}}},[e]),E.useEffect(()=>{if(n){let S=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(S)}}},[n]);let f=()=>{o(!0)},g=()=>{o(!1),a(!1)};return r?e!=="intent"?[i,h,{}]:[i,h,{onFocus:Ot(s,f),onBlur:Ot(l,g),onMouseEnter:Ot(u,f),onMouseLeave:Ot(c,g),onTouchStart:Ot(d,f)}]:[!1,h,{}]}function Ot(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function lu({page:e,...t}){let{router:r}=Oi(),n=E.useMemo(()=>Qe(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?E.createElement(uu,{page:e,matches:n,...t}):null}function su(e){let{manifest:t,routeModules:r}=Di(),[n,o]=E.useState([]);return E.useEffect(()=>{let i=!1;return eu(e,t,r).then(a=>{i||o(a)}),()=>{i=!0}},[e,t,r]),n}function uu({page:e,matches:t,...r}){let n=Je(),{future:o,manifest:i,routeModules:a}=Di(),{basename:s}=Oi(),{loaderData:l,matches:u}=iu(),c=E.useMemo(()=>Oo(e,t,u,i,n,"data"),[e,t,u,i,n]),d=E.useMemo(()=>Oo(e,t,u,i,n,"assets"),[e,t,u,i,n]),h=E.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let S=new Set,b=!1;if(t.forEach(P=>{let L=i.routes[P.route.id];!L||!L.hasLoader||(!c.some(D=>D.route.id===P.route.id)&&P.route.id in l&&a[P.route.id]?.shouldRevalidate||L.hasClientLoader?b=!0:S.add(P.route.id))}),S.size===0)return[];let w=Xs(e,s,o.unstable_trailingSlashAwareDataRequests,"data");return b&&S.size>0&&w.searchParams.set("_routes",t.filter(P=>S.has(P.route.id)).map(P=>P.route.id).join(",")),[w.pathname+w.search]},[s,o.unstable_trailingSlashAwareDataRequests,l,n,i,c,t,e,a]),f=E.useMemo(()=>tu(d,i),[d,i]),g=su(d);return E.createElement(E.Fragment,null,h.map(S=>E.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...r})),f.map(S=>E.createElement("link",{key:S,rel:"modulepreload",href:S,...r})),g.map(({key:S,link:b})=>E.createElement("link",{key:S,nonce:r.nonce,...b,crossOrigin:b.crossOrigin??r.crossOrigin})))}function cu(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var du=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{du&&(window.__reactRouterVersion="7.13.1")}catch{}function Gm(e,t){return Fl({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:ol({window:t?.window}),hydrationData:mu(),routes:e,mapRouteProperties:Ms,hydrationRouteProperties:Vs,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function mu(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:fu(e.errors)}),e}function fu(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,o]of t)if(o&&o.__type==="RouteErrorResponse")r[n]=new Gt(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let i=window[o.__subType];if(typeof i=="function")try{let a=new i(o.message);a.stack="",r[n]=a}catch{}}if(r[n]==null){let i=new Error(o.message);i.stack="",r[n]=i}}else r[n]=o;return r}var Ii=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ki=E.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:o,reloadDocument:i,replace:a,unstable_mask:s,state:l,target:u,to:c,preventScrollReset:d,viewTransition:h,unstable_defaultShouldRevalidate:f,...g},S){let{basename:b,navigator:w,unstable_useTransitions:P}=E.useContext(xe),L=typeof c=="string"&&Ii.test(c),D=ui(c,b);c=D.to;let k=vs(c,{relative:o}),H=Je(),$=null;if(s){let G=zt(s,[],H.unstable_mask?H.unstable_mask.pathname:"/",!0);b!=="/"&&(G.pathname=G.pathname==="/"?b:je([b,G.pathname])),$=w.createHref(G)}let[v,Z,re]=au(n,g),se=_u(c,{replace:a,unstable_mask:s,state:l,target:u,preventScrollReset:d,relative:o,viewTransition:h,unstable_defaultShouldRevalidate:f,unstable_useTransitions:P});function X(G){t&&t(G),G.defaultPrevented||se(G)}let me=!(D.isExternal||i),K=E.createElement("a",{...g,...re,href:(me?$:void 0)||D.absoluteURL||k,onClick:me?X:t,ref:cu(S,Z),target:u,"data-discover":!L&&r==="render"?"true":void 0});return v&&!L?E.createElement(E.Fragment,null,K,E.createElement(lu,{page:k})):K});ki.displayName="Link";var hu=E.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:o=!1,style:i,to:a,viewTransition:s,children:l,...u},c){let d=Kt(a,{relative:u.relative}),h=Je(),f=E.useContext(qt),{navigator:g,basename:S}=E.useContext(xe),b=f!=null&&bu(d)&&s===!0,w=g.encodeLocation?g.encodeLocation(d).pathname:d.pathname,P=h.pathname,L=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;r||(P=P.toLowerCase(),L=L?L.toLowerCase():null,w=w.toLowerCase()),L&&S&&(L=$e(L,S)||L);const D=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let k=P===w||!o&&P.startsWith(w)&&P.charAt(D)==="/",H=L!=null&&(L===w||!o&&L.startsWith(w)&&L.charAt(w.length)==="/"),$={isActive:k,isPending:H,isTransitioning:b},v=k?t:void 0,Z;typeof n=="function"?Z=n($):Z=[n,k?"active":null,H?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let re=typeof i=="function"?i($):i;return E.createElement(ki,{...u,"aria-current":v,className:Z,ref:c,style:re,to:a,viewTransition:s},typeof l=="function"?l($):l)});hu.displayName="NavLink";var pu=E.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:i,method:a=dr,action:s,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:h,...f},g)=>{let{unstable_useTransitions:S}=E.useContext(xe),b=Eu(),w=Ru(s,{relative:u}),P=a.toLowerCase()==="get"?"get":"post",L=typeof s=="string"&&Ii.test(s),D=k=>{if(l&&l(k),k.defaultPrevented)return;k.preventDefault();let H=k.nativeEvent.submitter,$=H?.getAttribute("formmethod")||a,v=()=>b(H||k.currentTarget,{fetcherKey:t,method:$,navigate:r,replace:o,state:i,relative:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:h});S&&r!==!1?E.startTransition(()=>v()):v()};return E.createElement("form",{ref:g,method:P,action:w,onSubmit:n?l:D,...f,"data-discover":!L&&e==="render"?"true":void 0})});pu.displayName="Form";function gu(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xi(e){let t=E.useContext(ct);return J(t,gu(e)),t}function _u(e,{target:t,replace:r,unstable_mask:n,state:o,preventScrollReset:i,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:l,unstable_useTransitions:u}={}){let c=Ti(),d=Je(),h=Kt(e,{relative:a});return E.useCallback(f=>{if(qs(f,t)){f.preventDefault();let g=r!==void 0?r:ze(d)===ze(h),S=()=>c(e,{replace:g,unstable_mask:n,state:o,preventScrollReset:i,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:l});u?E.startTransition(()=>S()):S()}},[d,c,h,r,n,o,t,e,i,a,s,l,u])}var yu=0,vu=()=>`__${String(++yu)}__`;function Eu(){let{router:e}=xi("useSubmit"),{basename:t}=E.useContext(xe),r=Os(),n=e.fetch,o=e.navigate;return E.useCallback(async(i,a={})=>{let{action:s,method:l,encType:u,formData:c,body:d}=Js(i,t);if(a.navigate===!1){let h=a.fetcherKey||vu();await n(h,r,a.action||s,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:c,body:d,formMethod:a.method||l,formEncType:a.encType||u,flushSync:a.flushSync})}else await o(a.action||s,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:c,body:d,formMethod:a.method||l,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[n,o,t,r])}function Ru(e,{relative:t}={}){let{basename:r}=E.useContext(xe),n=E.useContext(Be);J(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...Kt(e||".",{relative:t})},a=Je();if(e==null){i.search=a.search;let s=new URLSearchParams(i.search),l=s.getAll("index");if(l.some(c=>c==="")){s.delete("index"),l.filter(d=>d).forEach(d=>s.append("index",d));let c=s.toString();i.search=c?`?${c}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:je([r,i.pathname])),ze(i)}function bu(e,{relative:t}={}){let r=E.useContext(En);J(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=xi("useViewTransitionState"),o=Kt(e,{relative:t});if(!r.isTransitioning)return!1;let i=$e(r.currentLocation.pathname,n)||r.currentLocation.pathname,a=$e(r.nextLocation.pathname,n)||r.nextLocation.pathname;return pr(o.pathname,a)!=null||pr(o.pathname,i)!=null}var wu=za();function Wm(e){return E.createElement(js,{flushSync:wu.flushSync,...e})}const Su="modulepreload",Lu=function(e,t){return new URL(e,t).href},Do={},m=function(t,r,n){let o=Promise.resolve();if(r&&r.length>0){let u=function(c){return Promise.all(c.map(d=>Promise.resolve(d).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};const a=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),l=s?.nonce||s?.getAttribute("nonce");o=u(r.map(c=>{if(c=Lu(c,n),c in Do)return;Do[c]=!0;const d=c.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(n)for(let g=a.length-1;g>=0;g--){const S=a[g];if(S.href===c&&(!d||S.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${h}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":Su,d||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),d)return new Promise((g,S)=>{f.addEventListener("load",g),f.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return o.then(a=>{for(const s of a||[])s.status==="rejected"&&i(s.reason);return t().catch(i)})};let ge=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Pu(e){return Pn(e)}function Pn(e){return Array.isArray(e)?Tu(e):e instanceof RegExp?e:typeof e=="object"?Cu(e):e}function Tu(e){let t=[];for(let r=0,n=e.length;r<n;r++)t[r]=Pn(e[r]);return t}function Cu(e){let t={};for(let r in e)t[r]=Pn(e[r]);return t}function Ni(e,...t){return t.forEach(r=>{for(let n in r)e[n]=r[n]}),e}function Mi(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Mi(e.substring(0,e.length-1)):e.substr(~t+1)}var Wr=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,ar=class{static hasCaptures(e){return e===null?!1:(Wr.lastIndex=0,Wr.test(e))}static replaceCaptures(e,t,r){return e.replace(Wr,(n,o,i,a)=>{let s=r[parseInt(o||i,10)];if(s){let l=t.substring(s.start,s.end);for(;l[0]===".";)l=l.substring(1);switch(a){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return n})}};function Vi(e,t){return e<t?-1:e>t?1:0}function $i(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let r=e.length,n=t.length;if(r===n){for(let o=0;o<r;o++){let i=Vi(e[o],t[o]);if(i!==0)return i}return 0}return r-n}function Io(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function ji(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Bi=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},gr=class{constructor(e,t,r){this._colorMap=e,this._defaults=t,this._root=r}static createFromRawTheme(e,t){return this.createFromParsedTheme(Du(e),t)}static createFromParsedTheme(e,t){return ku(e,t)}_cachedMatchRoot=new Bi(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find(o=>Au(e.parent,o.parentScopes));return n?new Ui(n.fontStyle,n.foreground,n.background):null}},qr=class fr{constructor(t,r){this.parent=t,this.scopeName=r}static push(t,r){for(const n of r)t=new fr(t,n);return t}static from(...t){let r=null;for(let n=0;n<t.length;n++)r=new fr(r,t[n]);return r}push(t){return new fr(this,t)}getSegments(){let t=this;const r=[];for(;t;)r.push(t.scopeName),t=t.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const r=[];let n=this;for(;n&&n!==t;)r.push(n.scopeName),n=n.parent;return n===t?r.reverse():void 0}};function Au(e,t){if(t.length===0)return!0;for(let r=0;r<t.length;r++){let n=t[r],o=!1;if(n===">"){if(r===t.length-1)return!1;n=t[++r],o=!0}for(;e&&!Ou(e.scopeName,n);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Ou(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Ui=class{constructor(e,t,r){this.fontStyle=e,this.foregroundId=t,this.backgroundId=r}};function Du(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,r=[],n=0;for(let o=0,i=t.length;o<i;o++){let a=t[o];if(!a.settings)continue;let s;if(typeof a.scope=="string"){let d=a.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),s=d.split(",")}else Array.isArray(a.scope)?s=a.scope:s=[""];let l=-1;if(typeof a.settings.fontStyle=="string"){l=0;let d=a.settings.fontStyle.split(" ");for(let h=0,f=d.length;h<f;h++)switch(d[h]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let u=null;typeof a.settings.foreground=="string"&&Io(a.settings.foreground)&&(u=a.settings.foreground);let c=null;typeof a.settings.background=="string"&&Io(a.settings.background)&&(c=a.settings.background);for(let d=0,h=s.length;d<h;d++){let g=s[d].trim().split(" "),S=g[g.length-1],b=null;g.length>1&&(b=g.slice(0,g.length-1),b.reverse()),r[n++]=new Iu(S,b,o,l,u,c)}}return r}var Iu=class{constructor(e,t,r,n,o,i){this.scope=e,this.parentScopes=t,this.index=r,this.fontStyle=n,this.foreground=o,this.background=i}},Te=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Te||{});function ku(e,t){e.sort((l,u)=>{let c=Vi(l.scope,u.scope);return c!==0||(c=$i(l.parentScopes,u.parentScopes),c!==0)?c:l.index-u.index});let r=0,n="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(r=l.fontStyle),l.foreground!==null&&(n=l.foreground),l.background!==null&&(o=l.background)}let i=new xu(t),a=new Ui(r,i.getId(n),i.getId(o)),s=new Mu(new nn(0,null,-1,0,0),[]);for(let l=0,u=e.length;l<u;l++){let c=e[l];s.insert(0,c.scope,c.parentScopes,c.fontStyle,i.getId(c.foreground),i.getId(c.background))}return new gr(i,a,s)}var xu=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,r=e.length;t<r;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Nu=Object.freeze([]),nn=class Fi{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,r,n,o,i){this.scopeDepth=t,this.parentScopes=r||Nu,this.fontStyle=n,this.foreground=o,this.background=i}clone(){return new Fi(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let r=[];for(let n=0,o=t.length;n<o;n++)r[n]=t[n].clone();return r}acceptOverwrite(t,r,n,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,r!==-1&&(this.fontStyle=r),n!==0&&(this.foreground=n),o!==0&&(this.background=o)}},Mu=class on{constructor(t,r=[],n={}){this._mainRule=t,this._children=n,this._rulesWithParentScopes=r}_rulesWithParentScopes;static _cmpBySpecificity(t,r){if(t.scopeDepth!==r.scopeDepth)return r.scopeDepth-t.scopeDepth;let n=0,o=0;for(;t.parentScopes[n]===">"&&n++,r.parentScopes[o]===">"&&o++,!(n>=t.parentScopes.length||o>=r.parentScopes.length);){const i=r.parentScopes[o].length-t.parentScopes[n].length;if(i!==0)return i;n++,o++}return r.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let n=t.indexOf("."),o,i;if(n===-1?(o=t,i=""):(o=t.substring(0,n),i=t.substring(n+1)),this._children.hasOwnProperty(o))return this._children[o].match(i)}const r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(on._cmpBySpecificity),r}insert(t,r,n,o,i,a){if(r===""){this._doInsertHere(t,n,o,i,a);return}let s=r.indexOf("."),l,u;s===-1?(l=r,u=""):(l=r.substring(0,s),u=r.substring(s+1));let c;this._children.hasOwnProperty(l)?c=this._children[l]:(c=new on(this._mainRule.clone(),nn.cloneArr(this._rulesWithParentScopes)),this._children[l]=c),c.insert(t+1,u,n,o,i,a)}_doInsertHere(t,r,n,o,i){if(r===null){this._mainRule.acceptOverwrite(t,n,o,i);return}for(let a=0,s=this._rulesWithParentScopes.length;a<s;a++){let l=this._rulesWithParentScopes[a];if($i(l.parentScopes,r)===0){l.acceptOverwrite(t,n,o,i);return}}n===-1&&(n=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new nn(t,r,n,o,i))}},Et=class Me{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const r=Me.getLanguageId(t),n=Me.getTokenType(t),o=Me.getFontStyle(t),i=Me.getForeground(t),a=Me.getBackground(t);console.log({languageId:r,tokenType:n,fontStyle:o,foreground:i,background:a})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,r,n,o,i,a,s){let l=Me.getLanguageId(t),u=Me.getTokenType(t),c=Me.containsBalancedBrackets(t)?1:0,d=Me.getFontStyle(t),h=Me.getForeground(t),f=Me.getBackground(t);return r!==0&&(l=r),n!==8&&(u=n),o!==null&&(c=o?1:0),i!==-1&&(d=i),a!==0&&(h=a),s!==0&&(f=s),(l<<0|u<<8|c<<10|d<<11|h<<15|f<<24)>>>0}};function _r(e,t){const r=[],n=Vu(e);let o=n.next();for(;o!==null;){let l=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=n.next()}let u=a();if(r.push({matcher:u,priority:l}),o!==",")break;o=n.next()}return r;function i(){if(o==="-"){o=n.next();const l=i();return u=>!!l&&!l(u)}if(o==="("){o=n.next();const l=s();return o===")"&&(o=n.next()),l}if(ko(o)){const l=[];do l.push(o),o=n.next();while(ko(o));return u=>t(l,u)}return null}function a(){const l=[];let u=i();for(;u;)l.push(u),u=i();return c=>l.every(d=>d(c))}function s(){const l=[];let u=a();for(;u&&(l.push(u),o==="|"||o===",");){do o=n.next();while(o==="|"||o===",");u=a()}return c=>l.some(d=>d(c))}}function ko(e){return!!e&&!!e.match(/[\w\.:]+/)}function Vu(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=t.exec(e);return{next:()=>{if(!r)return null;const n=r[0];return r=t.exec(e),n}}}function Hi(e){typeof e.dispose=="function"&&e.dispose()}var Bt=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},$u=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},ju=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Bu=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Bt(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new ju;for(const r of e)Uu(r,this.initialScopeName,this.repo,t);for(const r of t.references)if(r instanceof Bt){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function Uu(e,t,r,n){const o=r.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const i=r.lookup(t);e instanceof Bt?hr({baseGrammar:i,selfGrammar:o},n):an(e.ruleName,{baseGrammar:i,selfGrammar:o,repository:o.repository},n);const a=r.injections(e.scopeName);if(a)for(const s of a)n.add(new Bt(s))}function an(e,t,r){if(t.repository&&t.repository[e]){const n=t.repository[e];yr([n],t,r)}}function hr(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&yr(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&yr(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function yr(e,t,r){for(const n of e){if(r.visitedRule.has(n))continue;r.visitedRule.add(n);const o=n.repository?Ni({},t.repository,n.repository):t.repository;Array.isArray(n.patterns)&&yr(n.patterns,{...t,repository:o},r);const i=n.include;if(!i)continue;const a=zi(i);switch(a.kind){case 0:hr({...t,selfGrammar:t.baseGrammar},r);break;case 1:hr(t,r);break;case 2:an(a.ruleName,{...t,repository:o},r);break;case 3:case 4:const s=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(s){const l={baseGrammar:t.baseGrammar,selfGrammar:s,repository:o};a.kind===4?an(a.ruleName,l,r):hr(l,r)}else a.kind===4?r.add(new $u(a.scopeName,a.ruleName)):r.add(new Bt(a.scopeName));break}}}var Fu=class{kind=0},Hu=class{kind=1},zu=class{constructor(e){this.ruleName=e}kind=2},Gu=class{constructor(e){this.scopeName=e}kind=3},Wu=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function zi(e){if(e==="$base")return new Fu;if(e==="$self")return new Hu;const t=e.indexOf("#");if(t===-1)return new Gu(e);if(t===0)return new zu(e.substring(1));{const r=e.substring(0,t),n=e.substring(t+1);return new Wu(r,n)}}var qu=/\\(\d+)/,xo=/\\(\d+)/g,Ku=-1,Gi=-2;var Yt=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,r,n){this.$location=e,this.id=t,this._name=r||null,this._nameIsCapturing=ar.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=ar.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Mi(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:ar.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ar.replaceCaptures(this._contentName,e,t)}},Yu=class extends Yt{retokenizeCapturedWithRuleId;constructor(e,t,r,n,o){super(e,t,r,n),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,r,n){throw new Error("Not supported!")}},Ju=class extends Yt{_match;captures;_cachedCompiledPatterns;constructor(e,t,r,n,o){super(e,t,r,null),this._match=new Ut(n,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ft,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},No=class extends Yt{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,n,o){super(e,t,r,n),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const r of this.patterns)e.getRule(r).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ft,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ln=class extends Yt{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,n,o,i,a,s,l,u){super(e,t,r,n),this._begin=new Ut(o,this.id),this.beginCaptures=i,this._end=new Ut(a||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e,t).compileAG(e,r,n)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ft;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},vr=class extends Yt{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,r,n,o,i,a,s,l){super(e,t,r,n),this._begin=new Ut(o,this.id),this.beginCaptures=i,this.whileCaptures=s,this._while=new Ut(a,Gi),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ft;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,r,n){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,r,n)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Ft,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Wi=class Le{static createCaptureRule(t,r,n,o,i){return t.registerRule(a=>new Yu(r,a,n,o,i))}static getCompiledRuleId(t,r,n){return t.id||r.registerRule(o=>{if(t.id=o,t.match)return new Ju(t.$vscodeTextmateLocation,t.id,t.name,t.match,Le._compileCaptures(t.captures,r,n));if(typeof t.begin>"u"){t.repository&&(n=Ni({},n,t.repository));let i=t.patterns;return typeof i>"u"&&t.include&&(i=[{include:t.include}]),new No(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Le._compilePatterns(i,r,n))}return t.while?new vr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Le._compileCaptures(t.beginCaptures||t.captures,r,n),t.while,Le._compileCaptures(t.whileCaptures||t.captures,r,n),Le._compilePatterns(t.patterns,r,n)):new ln(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Le._compileCaptures(t.beginCaptures||t.captures,r,n),t.end,Le._compileCaptures(t.endCaptures||t.captures,r,n),t.applyEndPatternLast,Le._compilePatterns(t.patterns,r,n))}),t.id}static _compileCaptures(t,r,n){let o=[];if(t){let i=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const s=parseInt(a,10);s>i&&(i=s)}for(let a=0;a<=i;a++)o[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const s=parseInt(a,10);let l=0;t[a].patterns&&(l=Le.getCompiledRuleId(t[a],r,n)),o[s]=Le.createCaptureRule(r,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,l)}}return o}static _compilePatterns(t,r,n){let o=[];if(t)for(let i=0,a=t.length;i<a;i++){const s=t[i];let l=-1;if(s.include){const u=zi(s.include);switch(u.kind){case 0:case 1:l=Le.getCompiledRuleId(n[s.include],r,n);break;case 2:let c=n[u.ruleName];c&&(l=Le.getCompiledRuleId(c,r,n));break;case 3:case 4:const d=u.scopeName,h=u.kind===4?u.ruleName:null,f=r.getExternalGrammar(d,n);if(f)if(h){let g=f.repository[h];g&&(l=Le.getCompiledRuleId(g,r,f.repository))}else l=Le.getCompiledRuleId(f.repository.$self,r,f.repository);break}}else l=Le.getCompiledRuleId(s,r,n);if(l!==-1){const u=r.getRule(l);let c=!1;if((u instanceof No||u instanceof ln||u instanceof vr)&&u.hasMissingPatterns&&u.patterns.length===0&&(c=!0),c)continue;o.push(l)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Ut=class qi{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,r){if(t&&typeof t=="string"){const n=t.length;let o=0,i=[],a=!1;for(let s=0;s<n;s++)if(t.charAt(s)==="\\"&&s+1<n){const u=t.charAt(s+1);u==="z"?(i.push(t.substring(o,s)),i.push("$(?!\\n)(?<!\\n)"),o=s+2):(u==="A"||u==="G")&&(a=!0),s++}this.hasAnchor=a,o===0?this.source=t:(i.push(t.substring(o,n)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=r,typeof this.source=="string"?this.hasBackReferences=qu.test(this.source):this.hasBackReferences=!1}clone(){return new qi(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=r.map(o=>t.substring(o.start,o.end));return xo.lastIndex=0,this.source.replace(xo,(o,i)=>ji(n[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],r=[],n=[],o=[],i,a,s,l;for(i=0,a=this.source.length;i<a;i++)s=this.source.charAt(i),t[i]=s,r[i]=s,n[i]=s,o[i]=s,s==="\\"&&i+1<a&&(l=this.source.charAt(i+1),l==="A"?(t[i+1]="￿",r[i+1]="￿",n[i+1]="A",o[i+1]="A"):l==="G"?(t[i+1]="￿",r[i+1]="G",n[i+1]="￿",o[i+1]="G"):(t[i+1]=l,r[i+1]=l,n[i+1]=l,o[i+1]=l),i++);return{A0_G0:t.join(""),A0_G1:r.join(""),A1_G0:n.join(""),A1_G1:o.join("")}}resolveAnchors(t,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Ft=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(r=>r.source);this._cached=new Mo(e,t,this._items.map(r=>r.ruleId))}return this._cached}compileAG(e,t,r){return this._hasAnchors?t?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,r){let n=this._items.map(o=>o.resolveAnchors(t,r));return new Mo(e,n,this._items.map(o=>o.ruleId))}},Mo=class{constructor(e,t,r){this.regExps=t,this.rules=r,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,r=this.rules.length;t<r;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
6
+ `)}findNextMatchSync(e,t,r){const n=this.scanner.findNextMatchSync(e,t,r);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},Kr=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Xu=class sn{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,r){this._defaultAttributes=new Kr(t,8),this._embeddedLanguagesMatcher=new Qu(Object.entries(r||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?sn._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Kr(0,0);_getBasicScopeAttributes=new Bi(t=>{const r=this._scopeToLanguage(t),n=this._toStandardTokenType(t);return new Kr(r,n)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const r=t.match(sn.STANDARD_TOKEN_TYPE_REGEXP);if(!r)return 8;switch(r[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Qu=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([r,n])=>ji(r));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},Vo=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Ki(e,t,r,n,o,i,a,s){const l=t.content.length;let u=!1,c=-1;if(a){const f=Zu(e,t,r,n,o,i);o=f.stack,n=f.linePos,r=f.isFirstLine,c=f.anchorPosition}const d=Date.now();for(;!u;){if(s!==0&&Date.now()-d>s)return new Vo(o,!0);h()}return new Vo(o,!1);function h(){const f=ec(e,t,r,n,o,c);if(!f){i.produce(o,l),u=!0;return}const g=f.captureIndices,S=f.matchedRuleId,b=g&&g.length>0?g[0].end>n:!1;if(S===Ku){const w=o.getRule(e);i.produce(o,g[0].start),o=o.withContentNameScopesList(o.nameScopesList),xt(e,t,r,o,i,w.endCaptures,g),i.produce(o,g[0].end);const P=o;if(o=o.parent,c=P.getAnchorPos(),!b&&P.getEnterPos()===n){o=P,i.produce(o,l),u=!0;return}}else{const w=e.getRule(S);i.produce(o,g[0].start);const P=o,L=w.getName(t.content,g),D=o.contentNameScopesList.pushAttributed(L,e);if(o=o.push(S,n,c,g[0].end===l,null,D,D),w instanceof ln){const k=w;xt(e,t,r,o,i,k.beginCaptures,g),i.produce(o,g[0].end),c=g[0].end;const H=k.getContentName(t.content,g),$=D.pushAttributed(H,e);if(o=o.withContentNameScopesList($),k.endHasBackReferences&&(o=o.withEndRule(k.getEndWithResolvedBackReferences(t.content,g))),!b&&P.hasSameRuleAs(o)){o=o.pop(),i.produce(o,l),u=!0;return}}else if(w instanceof vr){const k=w;xt(e,t,r,o,i,k.beginCaptures,g),i.produce(o,g[0].end),c=g[0].end;const H=k.getContentName(t.content,g),$=D.pushAttributed(H,e);if(o=o.withContentNameScopesList($),k.whileHasBackReferences&&(o=o.withEndRule(k.getWhileWithResolvedBackReferences(t.content,g))),!b&&P.hasSameRuleAs(o)){o=o.pop(),i.produce(o,l),u=!0;return}}else if(xt(e,t,r,o,i,w.captures,g),i.produce(o,g[0].end),o=o.pop(),!b){o=o.safePop(),i.produce(o,l),u=!0;return}}g[0].end>n&&(n=g[0].end,r=!1)}}function Zu(e,t,r,n,o,i){let a=o.beginRuleCapturedEOL?0:-1;const s=[];for(let l=o;l;l=l.pop()){const u=l.getRule(e);u instanceof vr&&s.push({rule:u,stack:l})}for(let l=s.pop();l;l=s.pop()){const{ruleScanner:u,findOptions:c}=nc(l.rule,e,l.stack.endRule,r,n===a),d=u.findNextMatchSync(t,n,c);if(d){if(d.ruleId!==Gi){o=l.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(i.produce(l.stack,d.captureIndices[0].start),xt(e,t,r,l.stack,i,l.rule.whileCaptures,d.captureIndices),i.produce(l.stack,d.captureIndices[0].end),a=d.captureIndices[0].end,d.captureIndices[0].end>n&&(n=d.captureIndices[0].end,r=!1))}else{o=l.stack.pop();break}}return{stack:o,linePos:n,anchorPosition:a,isFirstLine:r}}function ec(e,t,r,n,o,i){const a=tc(e,t,r,n,o,i),s=e.getInjections();if(s.length===0)return a;const l=rc(s,e,t,r,n,o,i);if(!l)return a;if(!a)return l;const u=a.captureIndices[0].start,c=l.captureIndices[0].start;return c<u||l.priorityMatch&&c===u?l:a}function tc(e,t,r,n,o,i){const a=o.getRule(e),{ruleScanner:s,findOptions:l}=Yi(a,e,o.endRule,r,n===i),u=s.findNextMatchSync(t,n,l);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function rc(e,t,r,n,o,i,a){let s=Number.MAX_VALUE,l=null,u,c=0;const d=i.contentNameScopesList.getScopeNames();for(let h=0,f=e.length;h<f;h++){const g=e[h];if(!g.matcher(d))continue;const S=t.getRule(g.ruleId),{ruleScanner:b,findOptions:w}=Yi(S,t,null,n,o===a),P=b.findNextMatchSync(r,o,w);if(!P)continue;const L=P.captureIndices[0].start;if(!(L>=s)&&(s=L,l=P.captureIndices,u=P.ruleId,c=g.priority,s===o))break}return l?{priorityMatch:c===-1,captureIndices:l,matchedRuleId:u}:null}function Yi(e,t,r,n,o){return{ruleScanner:e.compileAG(t,r,n,o),findOptions:0}}function nc(e,t,r,n,o){return{ruleScanner:e.compileWhileAG(t,r,n,o),findOptions:0}}function xt(e,t,r,n,o,i,a){if(i.length===0)return;const s=t.content,l=Math.min(i.length,a.length),u=[],c=a[0].end;for(let d=0;d<l;d++){const h=i[d];if(h===null)continue;const f=a[d];if(f.length===0)continue;if(f.start>c)break;for(;u.length>0&&u[u.length-1].endPos<=f.start;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?o.produceFromScopes(u[u.length-1].scopes,f.start):o.produce(n,f.start),h.retokenizeCapturedWithRuleId){const S=h.getName(s,a),b=n.contentNameScopesList.pushAttributed(S,e),w=h.getContentName(s,a),P=b.pushAttributed(w,e),L=n.push(h.retokenizeCapturedWithRuleId,f.start,-1,!1,null,b,P),D=e.createOnigString(s.substring(0,f.end));Ki(e,D,r&&f.start===0,f.start,L,o,!1,0),Hi(D);continue}const g=h.getName(s,a);if(g!==null){const b=(u.length>0?u[u.length-1].scopes:n.contentNameScopesList).pushAttributed(g,e);u.push(new oc(b,f.end))}}for(;u.length>0;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var oc=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function ic(e,t,r,n,o,i,a,s){return new lc(e,t,r,n,o,i,a,s)}function $o(e,t,r,n,o){const i=_r(t,Er),a=Wi.getCompiledRuleId(r,n,o.repository);for(const s of i)e.push({debugSelector:t,matcher:s.matcher,ruleId:a,grammar:o,priority:s.priority})}function Er(e,t){if(t.length<e.length)return!1;let r=0;return e.every(n=>{for(let o=r;o<t.length;o++)if(ac(t[o],n))return r=o+1,!0;return!1})}function ac(e,t){if(!e)return!1;if(e===t)return!0;const r=t.length;return e.length>r&&e.substr(0,r)===t&&e[r]==="."}var lc=class{constructor(e,t,r,n,o,i,a,s){if(this._rootScopeName=e,this.balancedBracketSelectors=i,this._onigLib=s,this._basicScopeAttributesProvider=new Xu(r,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=jo(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const l of Object.keys(o)){const u=_r(l,Er);for(const c of u)this._tokenTypeMatchers.push({matcher:c.matcher,type:o[l]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},t=[],r=this._rootScopeName,n=e.lookup(r);if(n){const o=n.injections;if(o)for(let a in o)$o(t,a,o[a],this,n);const i=this._grammarRepository.injections(r);i&&i.forEach(a=>{const s=this.getExternalGrammar(a);if(s){const l=s.injectionSelector;l&&$o(t,l,s,this,s)}})}return t.sort((o,i)=>o.priority-i.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,r=e(t);return this._ruleId2desc[t]=r,r}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const r=this._grammarRepository.lookup(e);if(r)return this._includedGrammars[e]=jo(r,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,r=0){const n=this._tokenize(e,t,!1,r);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(e,t,r=0){const n=this._tokenize(e,t,!0,r);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(e,t,r,n){this._rootId===-1&&(this._rootId=Wi.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===un.NULL){o=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),c=this.themeProvider.getDefaults(),d=Et.set(0,u.languageId,u.tokenType,null,c.fontStyle,c.foregroundId,c.backgroundId),h=this.getRule(this._rootId).getName(null,null);let f;h?f=Mt.createRootAndLookUpScopeName(h,d,this):f=Mt.createRoot("unknown",d),t=new un(null,this._rootId,-1,-1,!1,null,f,f)}else o=!1,t.reset();e=e+`
7
+ `;const i=this.createOnigString(e),a=i.content.length,s=new uc(r,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=Ki(this,i,o,0,t,s,!0,n);return Hi(i),{lineLength:a,lineTokens:s,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function jo(e,t){return e=Pu(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Mt=class Fe{constructor(t,r,n){this.parent=t,this.scopePath=r,this.tokenAttributes=n}static fromExtension(t,r){let n=t,o=t?.scopePath??null;for(const i of r)o=qr.push(o,i.scopeNames),n=new Fe(n,o,i.encodedTokenAttributes);return n}static createRoot(t,r){return new Fe(null,new qr(null,t),r)}static createRootAndLookUpScopeName(t,r,n){const o=n.getMetadataForScope(t),i=new qr(null,t),a=n.themeProvider.themeMatch(i),s=Fe.mergeAttributes(r,o,a);return new Fe(null,i,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Fe.equals(this,t)}static equals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.scopeName!==r.scopeName||t.tokenAttributes!==r.tokenAttributes)return!1;t=t.parent,r=r.parent}while(!0)}static mergeAttributes(t,r,n){let o=-1,i=0,a=0;return n!==null&&(o=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Et.set(t,r.languageId,r.tokenType,null,o,i,a)}pushAttributed(t,r){if(t===null)return this;if(t.indexOf(" ")===-1)return Fe._pushAttributed(this,t,r);const n=t.split(/ /g);let o=this;for(const i of n)o=Fe._pushAttributed(o,i,r);return o}static _pushAttributed(t,r,n){const o=n.getMetadataForScope(r),i=t.scopePath.push(r),a=n.themeProvider.themeMatch(i),s=Fe.mergeAttributes(t.tokenAttributes,o,a);return new Fe(t,i,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const r=[];let n=this;for(;n&&n!==t;)r.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===t?r.reverse():void 0}},un=class lt{constructor(t,r,n,o,i,a,s,l){this.parent=t,this.ruleId=r,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=s,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new lt(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:lt._equals(this,t)}static _equals(t,r){return t===r?!0:this._structuralEquals(t,r)?Mt.equals(t.contentNameScopesList,r.contentNameScopesList):!1}static _structuralEquals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.depth!==r.depth||t.ruleId!==r.ruleId||t.endRule!==r.endRule)return!1;t=t.parent,r=r.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){lt._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,r,n,o,i,a,s){return new lt(this,t,r,n,o,i,a,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,r){return this.parent&&(r=this.parent._writeString(t,r)),t[r++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,r}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new lt(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let r=this;for(;r&&r._enterPos===t._enterPos;){if(r.ruleId===t.ruleId)return!0;r=r.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,r){const n=Mt.fromExtension(t?.nameScopesList??null,r.nameScopesList);return new lt(t,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,n,Mt.fromExtension(n,r.contentNameScopesList))}},sc=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(r=>r==="*"?(this.allowAny=!0,[]):_r(r,Er).map(n=>n.matcher)),this.unbalancedBracketScopes=t.flatMap(r=>_r(r,Er).map(n=>n.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},uc=class{constructor(e,t,r,n){this.balancedBracketSelectors=n,this._emitBinaryTokens=e,this._tokenTypeOverrides=r,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const i=e?.getScopeNames()??[];for(const a of this._tokenTypeOverrides)a.matcher(i)&&(n=Et.set(n,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(i))}if(o&&(n=Et.set(n,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}const r=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:r}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const r=new Uint32Array(this._binaryTokens.length);for(let n=0,o=this._binaryTokens.length;n<o;n++)r[n]=this._binaryTokens[n];return r}},cc=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,r,n,o){if(!this._grammars.has(e)){let i=this._rawGrammars.get(e);if(!i)return null;this._grammars.set(e,ic(e,i,t,r,n,o,this,this._onigLib))}return this._grammars.get(e)}},dc=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new cc(gr.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,r){this._syncRegistry.setTheme(gr.createFromRawTheme(t,r))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,r,n){return this.loadGrammarWithConfiguration(t,r,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,r,n){return this._loadGrammar(t,r,n.embeddedLanguages,n.tokenTypes,new sc(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,r,n,o,i){const a=new Bu(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(s=>this._loadSingleGrammar(s.scopeName)),a.processQueue();return this._grammarForScopeName(t,r,n,o,i)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const r=this._options.loadGrammar(t);if(r){const n=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(r,n)}}addGrammar(t,r=[],n=0,o=null){return this._syncRegistry.addGrammar(t,r),this._grammarForScopeName(t.scopeName,n,o)}_grammarForScopeName(t,r=0,n=null,o=null,i=null){return this._syncRegistry.grammarForScopeName(t,r,n,o,i)}},cn=un.NULL;const mc=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Jt{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}Jt.prototype.normal={};Jt.prototype.property={};Jt.prototype.space=void 0;function Ji(e,t){const r={},n={};for(const o of e)Object.assign(r,o.property),Object.assign(n,o.normal);return new Jt(r,n,t)}function dn(e){return e.toLowerCase()}class De{constructor(t,r){this.attribute=r,this.property=t}}De.prototype.attribute="";De.prototype.booleanish=!1;De.prototype.boolean=!1;De.prototype.commaOrSpaceSeparated=!1;De.prototype.commaSeparated=!1;De.prototype.defined=!1;De.prototype.mustUseProperty=!1;De.prototype.number=!1;De.prototype.overloadedBoolean=!1;De.prototype.property="";De.prototype.spaceSeparated=!1;De.prototype.space=void 0;let fc=0;const W=dt(),pe=dt(),mn=dt(),A=dt(),le=dt(),yt=dt(),Ie=dt();function dt(){return 2**++fc}const fn=Object.freeze(Object.defineProperty({__proto__:null,boolean:W,booleanish:pe,commaOrSpaceSeparated:Ie,commaSeparated:yt,number:A,overloadedBoolean:mn,spaceSeparated:le},Symbol.toStringTag,{value:"Module"})),Yr=Object.keys(fn);class Tn extends De{constructor(t,r,n,o){let i=-1;if(super(t,r),Bo(this,"space",o),typeof n=="number")for(;++i<Yr.length;){const a=Yr[i];Bo(this,Yr[i],(n&fn[a])===fn[a])}}}Tn.prototype.defined=!0;function Bo(e,t,r){r&&(e[t]=r)}function wt(e){const t={},r={};for(const[n,o]of Object.entries(e.properties)){const i=new Tn(n,e.transform(e.attributes||{},n),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(i.mustUseProperty=!0),t[n]=i,r[dn(n)]=n,r[dn(i.attribute)]=n}return new Jt(t,r,e.space)}const Xi=wt({properties:{ariaActiveDescendant:null,ariaAtomic:pe,ariaAutoComplete:null,ariaBusy:pe,ariaChecked:pe,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:le,ariaCurrent:null,ariaDescribedBy:le,ariaDetails:null,ariaDisabled:pe,ariaDropEffect:le,ariaErrorMessage:null,ariaExpanded:pe,ariaFlowTo:le,ariaGrabbed:pe,ariaHasPopup:null,ariaHidden:pe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:le,ariaLevel:A,ariaLive:null,ariaModal:pe,ariaMultiLine:pe,ariaMultiSelectable:pe,ariaOrientation:null,ariaOwns:le,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:pe,ariaReadOnly:pe,ariaRelevant:null,ariaRequired:pe,ariaRoleDescription:le,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:pe,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Qi(e,t){return t in e?e[t]:t}function Zi(e,t){return Qi(e,t.toLowerCase())}const hc=wt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:yt,acceptCharset:le,accessKey:le,action:null,allow:null,allowFullScreen:W,allowPaymentRequest:W,allowUserMedia:W,alt:null,as:null,async:W,autoCapitalize:null,autoComplete:le,autoFocus:W,autoPlay:W,blocking:le,capture:null,charSet:null,checked:W,cite:null,className:le,cols:A,colSpan:null,content:null,contentEditable:pe,controls:W,controlsList:le,coords:A|yt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:W,defer:W,dir:null,dirName:null,disabled:W,download:mn,draggable:pe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:W,formTarget:null,headers:le,height:A,hidden:mn,high:A,href:null,hrefLang:null,htmlFor:le,httpEquiv:le,id:null,imageSizes:null,imageSrcSet:null,inert:W,inputMode:null,integrity:null,is:null,isMap:W,itemId:null,itemProp:le,itemRef:le,itemScope:W,itemType:le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:W,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:W,muted:W,name:null,nonce:null,noModule:W,noValidate:W,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:W,optimum:A,pattern:null,ping:le,placeholder:null,playsInline:W,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:W,referrerPolicy:null,rel:le,required:W,reversed:W,rows:A,rowSpan:A,sandbox:le,scope:null,scoped:W,seamless:W,selected:W,shadowRootClonable:W,shadowRootDelegatesFocus:W,shadowRootMode:null,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:pe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:W,useMap:null,value:pe,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:le,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:W,declare:W,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:W,noHref:W,noShade:W,noWrap:W,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:pe,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:W,disableRemotePlayback:W,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:Zi}),pc=wt({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:Ie,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:le,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:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:W,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,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:yt,g2:yt,glyphName:yt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:Ie,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,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:A,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:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ie,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ie,rev:Ie,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ie,requiredFeatures:Ie,requiredFonts:Ie,requiredFormats:Ie,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:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:Ie,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ie,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ie,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Qi}),ea=wt({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()}}),ta=wt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Zi}),ra=wt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),gc=/[A-Z]/g,Uo=/-[a-z]/g,_c=/^data[-\w.:]+$/i;function yc(e,t){const r=dn(t);let n=t,o=De;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&_c.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Uo,Ec);n="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Uo.test(i)){let a=i.replace(gc,vc);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Tn}return new o(n,t)}function vc(e){return"-"+e.toLowerCase()}function Ec(e){return e.charAt(1).toUpperCase()}const Rc=Ji([Xi,hc,ea,ta,ra],"html"),na=Ji([Xi,pc,ea,ta,ra],"svg"),Fo={}.hasOwnProperty;function bc(e,t){const r=t||{};function n(o,...i){let a=n.invalid;const s=n.handlers;if(o&&Fo.call(o,e)){const l=String(o[e]);a=Fo.call(s,l)?s[l]:n.unknown}if(a)return a.call(this,o,...i)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}const wc=/["&'<>`]/g,Sc=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Lc=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Pc=/[|\\{}()[\]^$+*?.]/g,Ho=new WeakMap;function Tc(e,t){if(e=e.replace(t.subset?Cc(t.subset):wc,n),t.subset||t.escapeOnly)return e;return e.replace(Sc,r).replace(Lc,n);function r(o,i,a){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,a.charCodeAt(i+2),t)}function n(o,i,a){return t.format(o.charCodeAt(0),a.charCodeAt(i+1),t)}}function Cc(e){let t=Ho.get(e);return t||(t=Ac(e),Ho.set(e,t)),t}function Ac(e){const t=[];let r=-1;for(;++r<e.length;)t.push(e[r].replace(Pc,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Oc=/[\dA-Fa-f]/;function Dc(e,t,r){const n="&#x"+e.toString(16).toUpperCase();return r&&t&&!Oc.test(String.fromCharCode(t))?n:n+";"}const Ic=/\d/;function kc(e,t,r){const n="&#"+String(e);return r&&t&&!Ic.test(String.fromCharCode(t))?n:n+";"}const xc=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Jr={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Nc=["cent","copy","divide","gt","lt","not","para","times"],oa={}.hasOwnProperty,hn={};let lr;for(lr in Jr)oa.call(Jr,lr)&&(hn[Jr[lr]]=lr);const Mc=/[^\dA-Za-z]/;function Vc(e,t,r,n){const o=String.fromCharCode(e);if(oa.call(hn,o)){const i=hn[o],a="&"+i;return r&&xc.includes(i)&&!Nc.includes(i)&&(!n||t&&t!==61&&Mc.test(String.fromCharCode(t)))?a:a+";"}return""}function $c(e,t,r){let n=Dc(e,t,r.omitOptionalSemicolons),o;if((r.useNamedReferences||r.useShortestReferences)&&(o=Vc(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!o)&&r.useShortestReferences){const i=kc(e,t,r.omitOptionalSemicolons);i.length<n.length&&(n=i)}return o&&(!r.useShortestReferences||o.length<n.length)?o:n}function vt(e,t){return Tc(e,Object.assign({format:$c},t))}const jc=/^>|^->|<!--|-->|--!>|<!-$/g,Bc=[">"],Uc=["<",">"];function Fc(e,t,r,n){return n.settings.bogusComments?"<?"+vt(e.value,Object.assign({},n.settings.characterReferences,{subset:Bc}))+">":"<!--"+e.value.replace(jc,o)+"-->";function o(i){return vt(i,Object.assign({},n.settings.characterReferences,{subset:Uc}))}}function Hc(e,t,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}function zo(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,o=r.indexOf(t);for(;o!==-1;)n++,o=r.indexOf(t,o+t.length);return n}function zc(e,t){const r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}function Gc(e){return e.join(" ").trim()}const Wc=/[ \t\n\f\r]/g;function Cn(e){return typeof e=="object"?e.type==="text"?Go(e.value):!1:Go(e)}function Go(e){return e.replace(Wc,"")===""}const ye=aa(1),ia=aa(-1),qc=[];function aa(e){return t;function t(r,n,o){const i=r?r.children:qc;let a=(n||0)+e,s=i[a];if(!o)for(;s&&Cn(s);)a+=e,s=i[a];return s}}const Kc={}.hasOwnProperty;function la(e){return t;function t(r,n,o){return Kc.call(e,r.tagName)&&e[r.tagName](r,n,o)}}const An=la({body:Jc,caption:Xr,colgroup:Xr,dd:ed,dt:Zc,head:Xr,html:Yc,li:Qc,optgroup:td,option:rd,p:Xc,rp:Wo,rt:Wo,tbody:od,td:qo,tfoot:id,th:qo,thead:nd,tr:ad});function Xr(e,t,r){const n=ye(r,t,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&Cn(n.value.charAt(0)))}function Yc(e,t,r){const n=ye(r,t);return!n||n.type!=="comment"}function Jc(e,t,r){const n=ye(r,t);return!n||n.type!=="comment"}function Xc(e,t,r){const n=ye(r,t);return n?n.type==="element"&&(n.tagName==="address"||n.tagName==="article"||n.tagName==="aside"||n.tagName==="blockquote"||n.tagName==="details"||n.tagName==="div"||n.tagName==="dl"||n.tagName==="fieldset"||n.tagName==="figcaption"||n.tagName==="figure"||n.tagName==="footer"||n.tagName==="form"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6"||n.tagName==="header"||n.tagName==="hgroup"||n.tagName==="hr"||n.tagName==="main"||n.tagName==="menu"||n.tagName==="nav"||n.tagName==="ol"||n.tagName==="p"||n.tagName==="pre"||n.tagName==="section"||n.tagName==="table"||n.tagName==="ul"):!r||!(r.type==="element"&&(r.tagName==="a"||r.tagName==="audio"||r.tagName==="del"||r.tagName==="ins"||r.tagName==="map"||r.tagName==="noscript"||r.tagName==="video"))}function Qc(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&n.tagName==="li"}function Zc(e,t,r){const n=ye(r,t);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}function ed(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}function Wo(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}function td(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&n.tagName==="optgroup"}function rd(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}function nd(e,t,r){const n=ye(r,t);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}function od(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}function id(e,t,r){return!ye(r,t)}function ad(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&n.tagName==="tr"}function qo(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}const ld=la({body:cd,colgroup:dd,head:ud,html:sd,tbody:md});function sd(e){const t=ye(e,-1);return!t||t.type!=="comment"}function ud(e){const t=new Set;for(const n of e.children)if(n.type==="element"&&(n.tagName==="base"||n.tagName==="title")){if(t.has(n.tagName))return!1;t.add(n.tagName)}const r=e.children[0];return!r||r.type==="element"}function cd(e){const t=ye(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Cn(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function dd(e,t,r){const n=ia(r,t),o=ye(e,-1,!0);return r&&n&&n.type==="element"&&n.tagName==="colgroup"&&An(n,r.children.indexOf(n),r)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function md(e,t,r){const n=ia(r,t),o=ye(e,-1);return r&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&An(n,r.children.indexOf(n),r)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const sr={name:[[`
8
+ \f\r &/=>`.split(""),`
9
+ \f\r "&'/=>\``.split("")],[`\0
10
+ \f\r "&'/<=>`.split(""),`\0
11
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
12
+ \f\r &>`.split(""),`\0
13
+ \f\r "&'<=>\``.split("")],[`\0
14
+ \f\r "&'<=>\``.split(""),`\0
15
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function fd(e,t,r,n){const o=n.schema,i=o.space==="svg"?!1:n.settings.omitOptionalTags;let a=o.space==="svg"?n.settings.closeEmptyElements:n.settings.voids.includes(e.tagName.toLowerCase());const s=[];let l;o.space==="html"&&e.tagName==="svg"&&(n.schema=na);const u=hd(n,e.properties),c=n.all(o.space==="html"&&e.tagName==="template"?e.content:e);return n.schema=o,c&&(a=!1),(u||!i||!ld(e,t,r))&&(s.push("<",e.tagName,u?" "+u:""),a&&(o.space==="svg"||n.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!n.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&s.push(" "),s.push("/")),s.push(">")),s.push(c),!a&&(!i||!An(e,t,r))&&s.push("</"+e.tagName+">"),s.join("")}function hd(e,t){const r=[];let n=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const i=pd(e,o,t[o]);i&&r.push(i)}}for(;++n<r.length;){const i=e.settings.tightAttributes?r[n].charAt(r[n].length-1):void 0;n!==r.length-1&&i!=='"'&&i!=="'"&&(r[n]+=" ")}return r.join("")}function pd(e,t,r){const n=yc(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,i=e.settings.allowDangerousCharacters?0:1;let a=e.quote,s;if(n.overloadedBoolean&&(r===n.attribute||r==="")?r=!0:(n.boolean||n.overloadedBoolean)&&(typeof r!="string"||r===n.attribute||r==="")&&(r=!!r),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";const l=vt(n.attribute,Object.assign({},e.settings.characterReferences,{subset:sr.name[o][i]}));return r===!0||(r=Array.isArray(r)?(n.commaSeparated?zc:Gc)(r,{padLeft:!e.settings.tightCommaSeparatedLists}):String(r),e.settings.collapseEmptyAttributes&&!r)?l:(e.settings.preferUnquoted&&(s=vt(r,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:sr.unquoted[o][i]}))),s!==r&&(e.settings.quoteSmart&&zo(r,a)>zo(r,e.alternative)&&(a=e.alternative),s=a+vt(r,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?sr.single:sr.double)[o][i],attribute:!0}))+a),l+(s&&"="+s))}const gd=["<","&"];function sa(e,t,r,n){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?e.value:vt(e.value,Object.assign({},n.settings.characterReferences,{subset:gd}))}function _d(e,t,r,n){return n.settings.allowDangerousHtml?e.value:sa(e,t,r,n)}function yd(e,t,r,n){return n.all(e)}const vd=bc("type",{invalid:Ed,unknown:Rd,handlers:{comment:Fc,doctype:Hc,element:fd,raw:_d,root:yd,text:sa}});function Ed(e){throw new Error("Expected node, not `"+e+"`")}function Rd(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const bd={},wd={},Sd=[];function Ld(e,t){const r=t||bd,n=r.quote||'"',o=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");return{one:Pd,all:Td,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||mc,characterReferences:r.characterReferences||wd,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?na:Rc,quote:n,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Pd(e,t,r){return vd(e,t,r,this)}function Td(e){const t=[],r=e&&e.children||Sd;let n=-1;for(;++n<r.length;)t[n]=this.one(r[n],n,e);return t.join("")}function Rr(e,t){const r=typeof e=="string"?{}:{...e.colorReplacements},n=typeof e=="string"?e:e.name;for(const[o,i]of Object.entries(t?.colorReplacements||{}))typeof i=="string"?r[o]=i:o===n&&Object.assign(r,i);return r}function tt(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Cd(e){return Array.isArray(e)?e:[e]}async function ua(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function On(e){return!e||["plaintext","txt","text","plain"].includes(e)}function ca(e){return e==="ansi"||On(e)}function Dn(e){return e==="none"}function da(e){return Dn(e)}function ma(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const r=Array.isArray(t)?t:t.split(/\s+/g);for(const n of r)n&&!e.properties.class.includes(n)&&e.properties.class.push(n);return e}function Ar(e,t=!1){if(e.length===0)return[["",0]];const r=e.split(/(\r?\n)/g);let n=0;const o=[];for(let i=0;i<r.length;i+=2){const a=t?r[i]+(r[i+1]||""):r[i];o.push([a,n]),n+=r[i].length,n+=r[i+1]?.length||0}return o}function Ad(e){const t=Ar(e,!0).map(([o])=>o);function r(o){if(o===e.length)return{line:t.length-1,character:t[t.length-1].length};let i=o,a=0;for(const s of t){if(i<s.length)break;i-=s.length,a++}return{line:a,character:i}}function n(o,i){let a=0;for(let s=0;s<o;s++)a+=t[s].length;return a+=i,a}return{lines:t,indexToPos:r,posToIndex:n}}const In="light-dark()",Od=["color","background-color"];function Dd(e,t){let r=0;const n=[];for(const o of t)o>r&&n.push({...e,content:e.content.slice(r,o),offset:e.offset+r}),r=o;return r<e.content.length&&n.push({...e,content:e.content.slice(r),offset:e.offset+r}),n}function Id(e,t){const r=Array.from(t instanceof Set?t:new Set(t)).sort((n,o)=>n-o);return r.length?e.map(n=>n.flatMap(o=>{const i=r.filter(a=>o.offset<a&&a<o.offset+o.content.length).map(a=>a-o.offset).sort((a,s)=>a-s);return i.length?Dd(o,i):o})):e}function kd(e,t,r,n,o="css-vars"){const i={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(c=>br(e.variants[c])),s=new Set(a.flatMap(c=>Object.keys(c))),l={},u=(c,d)=>{const h=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return r+t[c]+(d==="color"?"":h)};return a.forEach((c,d)=>{for(const h of s){const f=c[h]||"inherit";if(d===0&&n&&Od.includes(h))if(n===In&&a.length>1){const g=t.findIndex(P=>P==="light"),S=t.findIndex(P=>P==="dark");if(g===-1||S===-1)throw new ge('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const b=a[g][h]||"inherit",w=a[S][h]||"inherit";l[h]=`light-dark(${b}, ${w})`,o==="css-vars"&&(l[u(d,h)]=f)}else l[h]=f;else o==="css-vars"&&(l[u(d,h)]=f)}}),i.htmlStyle=l,i}function br(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Te.Italic&&(t["font-style"]="italic"),e.fontStyle&Te.Bold&&(t["font-weight"]="bold");const r=[];e.fontStyle&Te.Underline&&r.push("underline"),e.fontStyle&Te.Strikethrough&&r.push("line-through"),r.length&&(t["text-decoration"]=r.join(" "))}return t}function pn(e){return typeof e=="string"?e:Object.entries(e).map(([t,r])=>`${t}:${r}`).join(";")}const fa=new WeakMap;function Or(e,t){fa.set(e,t)}function Ht(e){return fa.get(e)}class St{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,r){return new St(Object.fromEntries(Cd(r).map(n=>[n,cn])),t)}constructor(...t){if(t.length===2){const[r,n]=t;this.lang=n,this._stacks=r}else{const[r,n,o]=t;this.lang=n,this._stacks={[o]:r}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return xd(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function xd(e){const t=[],r=new Set;function n(o){if(r.has(o))return;r.add(o);const i=o?.nameScopesList?.scopeName;i&&t.push(i),o.parent&&n(o.parent)}return n(e),t}function Nd(e,t){if(!(e instanceof St))throw new ge("Invalid grammar state");return e.getInternalStack(t)}function Md(){const e=new WeakMap;function t(r){if(!e.has(r.meta)){let n=function(a){if(typeof a=="number"){if(a<0||a>r.source.length)throw new ge(`Invalid decoration offset: ${a}. Code length: ${r.source.length}`);return{...o.indexToPos(a),offset:a}}else{const s=o.lines[a.line];if(s===void 0)throw new ge(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${o.lines.length}`);let l=a.character;if(l<0&&(l=s.length+l),l<0||l>s.length)throw new ge(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${s.length}`);return{...a,character:l,offset:o.posToIndex(a.line,l)}}};const o=Ad(r.source),i=(r.options.decorations||[]).map(a=>({...a,start:n(a.start),end:n(a.end)}));Vd(i),e.set(r.meta,{decorations:i,converter:o,source:r.source})}return e.get(r.meta)}return{name:"shiki:decorations",tokens(r){if(!this.options.decorations?.length)return;const o=t(this).decorations.flatMap(a=>[a.start.offset,a.end.offset]);return Id(r,o)},code(r){if(!this.options.decorations?.length)return;const n=t(this),o=Array.from(r.children).filter(c=>c.type==="element"&&c.tagName==="span");if(o.length!==n.converter.lines.length)throw new ge(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(c,d,h,f){const g=o[c];let S="",b=-1,w=-1;if(d===0&&(b=0),h===0&&(w=0),h===Number.POSITIVE_INFINITY&&(w=g.children.length),b===-1||w===-1)for(let L=0;L<g.children.length;L++)S+=ha(g.children[L]),b===-1&&S.length===d&&(b=L+1),w===-1&&S.length===h&&(w=L+1);if(b===-1)throw new ge(`Failed to find start index for decoration ${JSON.stringify(f.start)}`);if(w===-1)throw new ge(`Failed to find end index for decoration ${JSON.stringify(f.end)}`);const P=g.children.slice(b,w);if(!f.alwaysWrap&&P.length===g.children.length)s(g,f,"line");else if(!f.alwaysWrap&&P.length===1&&P[0].type==="element")s(P[0],f,"token");else{const L={type:"element",tagName:"span",properties:{},children:P};s(L,f,"wrapper"),g.children.splice(b,P.length,L)}}function a(c,d){o[c]=s(o[c],d,"line")}function s(c,d,h){const f=d.properties||{},g=d.transform||(S=>S);return c.tagName=d.tagName||"span",c.properties={...c.properties,...f,class:c.properties.class},d.properties?.class&&ma(c,d.properties.class),c=g(c,h)||c,c}const l=[],u=n.decorations.sort((c,d)=>d.start.offset-c.start.offset||c.end.offset-d.end.offset);for(const c of u){const{start:d,end:h}=c;if(d.line===h.line)i(d.line,d.character,h.character,c);else if(d.line<h.line){i(d.line,d.character,Number.POSITIVE_INFINITY,c);for(let f=d.line+1;f<h.line;f++)l.unshift(()=>a(f,c));i(h.line,0,h.character,c)}}l.forEach(c=>c())}}}function Vd(e){for(let t=0;t<e.length;t++){const r=e[t];if(r.start.offset>r.end.offset)throw new ge(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let n=t+1;n<e.length;n++){const o=e[n],i=r.start.offset<=o.start.offset&&o.start.offset<r.end.offset,a=r.start.offset<o.end.offset&&o.end.offset<=r.end.offset,s=o.start.offset<=r.start.offset&&r.start.offset<o.end.offset,l=o.start.offset<r.end.offset&&r.end.offset<=o.end.offset;if(i||a||s||l){if(i&&a||s&&l||s&&r.start.offset===r.end.offset||a&&o.start.offset===o.end.offset)continue;throw new ge(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function ha(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(ha).join(""):""}const $d=[Md()];function wr(e){const t=jd(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...$d]}function jd(e){const t=[],r=[],n=[];for(const o of e)switch(o.enforce){case"pre":t.push(o);break;case"post":r.push(o);break;default:n.push(o)}return{pre:t,post:r,normal:n}}var ut=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Qr={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Bd(e,t){const r=e.indexOf("\x1B",t);if(r!==-1&&e[r+1]==="["){const n=e.indexOf("m",r);if(n!==-1)return{sequence:e.substring(r+2,n).split(";"),startPosition:r,position:n+1}}return{position:e.length}}function Ko(e){const t=e.shift();if(t==="2"){const r=e.splice(0,3).map(n=>Number.parseInt(n));return r.length!==3||r.some(n=>Number.isNaN(n))?void 0:{type:"rgb",rgb:r}}else if(t==="5"){const r=e.shift();if(r)return{type:"table",index:Number(r)}}}function Ud(e){const t=[];for(;e.length>0;){const r=e.shift();if(!r)continue;const n=Number.parseInt(r);if(!Number.isNaN(n))if(n===0)t.push({type:"resetAll"});else if(n<=9)Qr[n]&&t.push({type:"setDecoration",value:Qr[n]});else if(n<=29){const o=Qr[n-20];o&&(t.push({type:"resetDecoration",value:o}),o==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(n<=37)t.push({type:"setForegroundColor",value:{type:"named",name:ut[n-30]}});else if(n===38){const o=Ko(e);o&&t.push({type:"setForegroundColor",value:o})}else if(n===39)t.push({type:"resetForegroundColor"});else if(n<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:ut[n-40]}});else if(n===48){const o=Ko(e);o&&t.push({type:"setBackgroundColor",value:o})}else n===49?t.push({type:"resetBackgroundColor"}):n===53?t.push({type:"setDecoration",value:"overline"}):n===55?t.push({type:"resetDecoration",value:"overline"}):n>=90&&n<=97?t.push({type:"setForegroundColor",value:{type:"named",name:ut[n-90+8]}}):n>=100&&n<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:ut[n-100+8]}})}return t}function Fd(){let e=null,t=null,r=new Set;return{parse(n){const o=[];let i=0;do{const a=Bd(n,i),s=a.sequence?n.substring(i,a.startPosition):n.substring(i);if(s.length>0&&o.push({value:s,foreground:e,background:t,decorations:new Set(r)}),a.sequence){const l=Ud(a.sequence);for(const u of l)u.type==="resetAll"?(e=null,t=null,r.clear()):u.type==="resetForegroundColor"?e=null:u.type==="resetBackgroundColor"?t=null:u.type==="resetDecoration"&&r.delete(u.value);for(const u of l)u.type==="setForegroundColor"?e=u.value:u.type==="setBackgroundColor"?t=u.value:u.type==="setDecoration"&&r.add(u.value)}i=a.position}while(i<n.length);return o}}}var Hd={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function zd(e=Hd){function t(s){return e[s]}function r(s){return`#${s.map(l=>Math.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let n;function o(){if(n)return n;n=[];for(let u=0;u<ut.length;u++)n.push(t(ut[u]));let s=[0,95,135,175,215,255];for(let u=0;u<6;u++)for(let c=0;c<6;c++)for(let d=0;d<6;d++)n.push(r([s[u],s[c],s[d]]));let l=8;for(let u=0;u<24;u++,l+=10)n.push(r([l,l,l]));return n}function i(s){return o()[s]}function a(s){switch(s.type){case"named":return t(s.name);case"rgb":return r(s.rgb);case"table":return i(s.index)}}return{value:a}}const Gd={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function Wd(e,t,r){const n=Rr(e,r),o=Ar(t),i=Object.fromEntries(ut.map(l=>{const u=`terminal.ansi${l[0].toUpperCase()}${l.substring(1)}`,c=e.colors?.[u];return[l,c||Gd[l]]})),a=zd(i),s=Fd();return o.map(l=>s.parse(l[0]).map(u=>{let c,d;u.decorations.has("reverse")?(c=u.background?a.value(u.background):e.bg,d=u.foreground?a.value(u.foreground):e.fg):(c=u.foreground?a.value(u.foreground):e.fg,d=u.background?a.value(u.background):void 0),c=tt(c,n),d=tt(d,n),u.decorations.has("dim")&&(c=qd(c));let h=Te.None;return u.decorations.has("bold")&&(h|=Te.Bold),u.decorations.has("italic")&&(h|=Te.Italic),u.decorations.has("underline")&&(h|=Te.Underline),u.decorations.has("strikethrough")&&(h|=Te.Strikethrough),{content:u.value,offset:l[1],color:c,bgColor:d,fontStyle:h}}))}function qd(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const n=t[1];if(n.length===8){const o=Math.round(Number.parseInt(n.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${n.slice(0,6)}${o}`}else{if(n.length===6)return`#${n}80`;if(n.length===4){const o=n[0],i=n[1],a=n[2],s=n[3],l=Math.round(Number.parseInt(`${s}${s}`,16)/2).toString(16).padStart(2,"0");return`#${o}${o}${i}${i}${a}${a}${l}`}else if(n.length===3){const o=n[0],i=n[1],a=n[2];return`#${o}${o}${i}${i}${a}${a}80`}}}const r=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return r?`var(${r[1]}-dim)`:e}function kn(e,t,r={}){const{theme:n=e.getLoadedThemes()[0]}=r,o=e.resolveLangAlias(r.lang||"text");if(On(o)||Dn(n))return Ar(t).map(l=>[{content:l[0],offset:l[1]}]);const{theme:i,colorMap:a}=e.setTheme(n);if(o==="ansi")return Wd(i,t,r);const s=e.getLanguage(r.lang||"text");if(r.grammarState){if(r.grammarState.lang!==s.name)throw new ge(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${s.name}"`);if(!r.grammarState.themes.includes(i.name))throw new ge(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Yd(t,s,i,a,r)}function Kd(...e){if(e.length===2)return Ht(e[1]);const[t,r,n={}]=e,{lang:o="text",theme:i=t.getLoadedThemes()[0]}=n;if(On(o)||Dn(i))throw new ge("Plain language does not have grammar state");if(o==="ansi")throw new ge("ANSI language does not have grammar state");const{theme:a,colorMap:s}=t.setTheme(i),l=t.getLanguage(o);return new St(xn(r,l,a,s,n).stateStack,l.name,a.name)}function Yd(e,t,r,n,o){const i=xn(e,t,r,n,o),a=new St(i.stateStack,t.name,r.name);return Or(i.tokens,a),i.tokens}function xn(e,t,r,n,o){const i=Rr(r,o),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:s=500}=o,l=Ar(e);let u=o.grammarState?Nd(o.grammarState,r.name)??cn:o.grammarContextCode!=null?xn(o.grammarContextCode,t,r,n,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:cn,c=[];const d=[];for(let h=0,f=l.length;h<f;h++){const[g,S]=l[h];if(g===""){c=[],d.push([]);continue}if(a>0&&g.length>=a){c=[],d.push([{content:g,offset:S,color:"",fontStyle:0}]);continue}let b,w,P;o.includeExplanation&&(b=t.tokenizeLine(g,u,s),w=b.tokens,P=0);const L=t.tokenizeLine2(g,u,s),D=L.tokens.length/2;for(let k=0;k<D;k++){const H=L.tokens[2*k],$=k+1<D?L.tokens[2*k+2]:g.length;if(H===$)continue;const v=L.tokens[2*k+1],Z=tt(n[Et.getForeground(v)],i),re=Et.getFontStyle(v),se={content:g.substring(H,$),offset:S+H,color:Z,fontStyle:re};if(o.includeExplanation){const X=[];if(o.includeExplanation!=="scopeName")for(const K of r.settings){let G;switch(typeof K.scope){case"string":G=K.scope.split(/,/).map(ne=>ne.trim());break;case"object":G=K.scope;break;default:continue}X.push({settings:K,selectors:G.map(ne=>ne.split(/ /))})}se.explanation=[];let me=0;for(;H+me<$;){const K=w[P],G=g.substring(K.startIndex,K.endIndex);me+=G.length,se.explanation.push({content:G,scopes:o.includeExplanation==="scopeName"?Jd(K.scopes):Xd(X,K.scopes)}),P+=1}}c.push(se)}d.push(c),c=[],u=L.ruleStack}return{tokens:d,stateStack:u}}function Jd(e){return e.map(t=>({scopeName:t}))}function Xd(e,t){const r=[];for(let n=0,o=t.length;n<o;n++){const i=t[n];r[n]={scopeName:i,themeMatches:Zd(e,i,t.slice(0,n))}}return r}function Yo(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function Qd(e,t,r){if(!Yo(e[e.length-1],t))return!1;let n=e.length-2,o=r.length-1;for(;n>=0&&o>=0;)Yo(e[n],r[o])&&(n-=1),o-=1;return n===-1}function Zd(e,t,r){const n=[];for(const{selectors:o,settings:i}of e)for(const a of o)if(Qd(a,t,r)){n.push(i);break}return n}function pa(e,t,r){const n=Object.entries(r.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),o=n.map(l=>{const u=kn(e,t,{...r,theme:l.theme}),c=Ht(u),d=typeof l.theme=="string"?l.theme:l.theme.name;return{tokens:u,state:c,theme:d}}),i=em(...o.map(l=>l.tokens)),a=i[0].map((l,u)=>l.map((c,d)=>{const h={content:c.content,variants:{},offset:c.offset};return"includeExplanation"in r&&r.includeExplanation&&(h.explanation=c.explanation),i.forEach((f,g)=>{const{content:S,explanation:b,offset:w,...P}=f[u][d];h.variants[n[g].color]=P}),h})),s=o[0].state?new St(Object.fromEntries(o.map(l=>[l.theme,l.state?.getInternalStack(l.theme)])),o[0].state.lang):void 0;return s&&Or(a,s),a}function em(...e){const t=e.map(()=>[]),r=e.length;for(let n=0;n<e[0].length;n++){const o=e.map(l=>l[n]),i=t.map(()=>[]);t.forEach((l,u)=>l.push(i[u]));const a=o.map(()=>0),s=o.map(l=>l[0]);for(;s.every(l=>l);){const l=Math.min(...s.map(u=>u.content.length));for(let u=0;u<r;u++){const c=s[u];c.content.length===l?(i[u].push(c),a[u]+=1,s[u]=o[u][a[u]]):(i[u].push({...c,content:c.content.slice(0,l)}),s[u]={...c,content:c.content.slice(l),offset:c.offset+l})}}}return t}function Sr(e,t,r){let n,o,i,a,s,l;if("themes"in r){const{defaultColor:u="light",cssVariablePrefix:c="--shiki-",colorsRendering:d="css-vars"}=r,h=Object.entries(r.themes).filter(w=>w[1]).map(w=>({color:w[0],theme:w[1]})).sort((w,P)=>w.color===u?-1:P.color===u?1:0);if(h.length===0)throw new ge("`themes` option must not be empty");const f=pa(e,t,r);if(l=Ht(f),u&&In!==u&&!h.find(w=>w.color===u))throw new ge(`\`themes\` option must contain the defaultColor key \`${u}\``);const g=h.map(w=>e.getTheme(w.theme)),S=h.map(w=>w.color);i=f.map(w=>w.map(P=>kd(P,S,c,u,d))),l&&Or(i,l);const b=h.map(w=>Rr(w.theme,r));o=Jo(h,g,b,c,u,"fg",d),n=Jo(h,g,b,c,u,"bg",d),a=`shiki-themes ${g.map(w=>w.name).join(" ")}`,s=u?void 0:[o,n].join(";")}else if("theme"in r){const u=Rr(r.theme,r);i=kn(e,t,r);const c=e.getTheme(r.theme);n=tt(c.bg,u),o=tt(c.fg,u),a=c.name,l=Ht(i)}else throw new ge("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:o,bg:n,themeName:a,rootStyle:s,grammarState:l}}function Jo(e,t,r,n,o,i,a){return e.map((s,l)=>{const u=tt(t[l][i],r[l])||"inherit",c=`${n+s.color}${i==="bg"?"-bg":""}:${u}`;if(l===0&&o){if(o===In&&e.length>1){const d=e.findIndex(S=>S.color==="light"),h=e.findIndex(S=>S.color==="dark");if(d===-1||h===-1)throw new ge('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const f=tt(t[d][i],r[d])||"inherit",g=tt(t[h][i],r[h])||"inherit";return`light-dark(${f}, ${g});${c}`}return u}return a==="css-vars"?c:null}).filter(s=>!!s).join(";")}function Lr(e,t,r,n={meta:{},options:r,codeToHast:(o,i)=>Lr(e,o,i),codeToTokens:(o,i)=>Sr(e,o,i)}){let o=t;for(const g of wr(r))o=g.preprocess?.call(n,o,r)||o;let{tokens:i,fg:a,bg:s,themeName:l,rootStyle:u,grammarState:c}=Sr(e,o,r);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:h=!1}=r;d===!0?i=rm(i):d==="never"&&(i=nm(i)),h&&(i=om(i));const f={...n,get source(){return o}};for(const g of wr(r))i=g.tokens?.call(f,i)||i;return tm(i,{...r,fg:a,bg:s,themeName:l,rootStyle:r.rootStyle===!1?!1:r.rootStyle??u},f,c)}function tm(e,t,r,n=Ht(e)){const o=wr(t),i=[],a={type:"root",children:[]},{structure:s="classic",tabindex:l="0"}=t,u={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?u.style=t.rootStyle:u.style=`background-color:${t.bg};color:${t.fg}`),l!==!1&&l!=null&&(u.tabindex=l.toString());for(const[S,b]of Object.entries(t.meta||{}))S.startsWith("_")||(u[S]=b);let c={type:"element",tagName:"pre",properties:u,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:i};const h=[],f={...r,structure:s,addClassToHast:ma,get source(){return r.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return c},get code(){return d},get lines(){return h}};if(e.forEach((S,b)=>{b&&(s==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):s==="classic"&&i.push({type:"text",value:`
16
+ `}));let w={type:"element",tagName:"span",properties:{class:"line"},children:[]},P=0;for(const L of S){let D={type:"element",tagName:"span",properties:{...L.htmlAttrs},children:[{type:"text",value:L.content}]};const k=pn(L.htmlStyle||br(L));k&&(D.properties.style=k);for(const H of o)D=H?.span?.call(f,D,b+1,P,w,L)||D;s==="inline"?a.children.push(D):s==="classic"&&w.children.push(D),P+=L.content.length}if(s==="classic"){for(const L of o)w=L?.line?.call(f,w,b+1)||w;h.push(w),i.push(w)}else s==="inline"&&h.push(w)}),s==="classic"){for(const S of o)d=S?.code?.call(f,d)||d;c.children.push(d);for(const S of o)c=S?.pre?.call(f,c)||c;a.children.push(c)}else if(s==="inline"){const S=[];let b={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const L of a.children)L.type==="element"&&L.tagName==="br"?(S.push(b),b={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(L.type==="element"||L.type==="text")&&b.children.push(L);S.push(b);let P={type:"element",tagName:"code",properties:{},children:S};for(const L of o)P=L?.code?.call(f,P)||P;a.children=[];for(let L=0;L<P.children.length;L++){L>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const D=P.children[L];D.type==="element"&&a.children.push(...D.children)}}let g=a;for(const S of o)g=S?.root?.call(f,g)||g;return n&&Or(g,n),g}function rm(e){return e.map(t=>{const r=[];let n="",o;return t.forEach((i,a)=>{const l=!(i.fontStyle&&(i.fontStyle&Te.Underline||i.fontStyle&Te.Strikethrough));l&&i.content.match(/^\s+$/)&&t[a+1]?(o===void 0&&(o=i.offset),n+=i.content):n?(l?r.push({...i,offset:o,content:n+i.content}):r.push({content:n,offset:o},i),o=void 0,n=""):r.push(i)}),r})}function nm(e){return e.map(t=>t.flatMap(r=>{if(r.content.match(/^\s+$/))return r;const n=r.content.match(/^(\s*)(.*?)(\s*)$/);if(!n)return r;const[,o,i,a]=n;if(!o&&!a)return r;const s=[{...r,offset:r.offset+o.length,content:i}];return o&&s.unshift({content:o,offset:r.offset}),a&&s.push({content:a,offset:r.offset+o.length+i.length}),s}))}function om(e){return e.map(t=>{const r=[];for(const n of t){if(r.length===0){r.push({...n});continue}const o=r[r.length-1],i=pn(o.htmlStyle||br(o)),a=pn(n.htmlStyle||br(n)),s=o.fontStyle&&(o.fontStyle&Te.Underline||o.fontStyle&Te.Strikethrough),l=n.fontStyle&&(n.fontStyle&Te.Underline||n.fontStyle&Te.Strikethrough);!s&&!l&&i===a?o.content+=n.content:r.push({...n})}return r})}const im=Ld;function am(e,t,r){const n={meta:{},options:r,codeToHast:(i,a)=>Lr(e,i,a),codeToTokens:(i,a)=>Sr(e,i,a)};let o=im(Lr(e,t,r,n));for(const i of wr(r))o=i.postprocess?.call(n,o,r)||o;return o}const Xo={light:"#333333",dark:"#bbbbbb"},Qo={light:"#fffffe",dark:"#1e1e1e"},Zo="__shiki_resolved";function Nn(e){if(e?.[Zo])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:r,fg:n}=t;if(!r||!n){const s=t.settings?t.settings.find(l=>!l.name&&!l.scope):void 0;s?.settings?.foreground&&(n=s.settings.foreground),s?.settings?.background&&(r=s.settings.background),!n&&t?.colors?.["editor.foreground"]&&(n=t.colors["editor.foreground"]),!r&&t?.colors?.["editor.background"]&&(r=t.colors["editor.background"]),n||(n=t.type==="light"?Xo.light:Xo.dark),r||(r=t.type==="light"?Qo.light:Qo.dark),t.fg=n,t.bg=r}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let o=0;const i=new Map;function a(s){if(i.has(s))return i.get(s);o+=1;const l=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${l}`]?a(s):(i.set(s,l),l)}t.settings=t.settings.map(s=>{const l=s.settings?.foreground&&!s.settings.foreground.startsWith("#"),u=s.settings?.background&&!s.settings.background.startsWith("#");if(!l&&!u)return s;const c={...s,settings:{...s.settings}};if(l){const d=a(s.settings.foreground);t.colorReplacements[d]=s.settings.foreground,c.settings.foreground=d}if(u){const d=a(s.settings.background);t.colorReplacements[d]=s.settings.background,c.settings.background=d}return c});for(const s of Object.keys(t.colors||{}))if((s==="editor.foreground"||s==="editor.background"||s.startsWith("terminal.ansi"))&&!t.colors[s]?.startsWith("#")){const l=a(t.colors[s]);t.colorReplacements[l]=t.colors[s],t.colors[s]=l}return Object.defineProperty(t,Zo,{enumerable:!1,writable:!1,value:!0}),t}async function ga(e){return Array.from(new Set((await Promise.all(e.filter(t=>!ca(t)).map(async t=>await ua(t).then(r=>Array.isArray(r)?r:[r])))).flat()))}async function _a(e){return(await Promise.all(e.map(async r=>da(r)?null:Nn(await ua(r))))).filter(r=>!!r)}let lm=3;function sm(e,t=3){t>lm||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let gt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function ya(e,t){if(!t)return e;if(t[e]){const r=new Set([e]);for(;t[e];){if(e=t[e],r.has(e))throw new gt(`Circular alias \`${Array.from(r).join(" -> ")} -> ${e}\``);r.add(e)}}return e}class um extends dc{constructor(t,r,n,o={}){super(t),this._resolver=t,this._themes=r,this._langs=n,this._alias=o,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const r=Nn(t);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let r=this._textmateThemeCache.get(t);r||(r=gr.createFromRawTheme(t),this._textmateThemeCache.set(t,r)),this._syncRegistry.setTheme(r)}getGrammar(t){return t=ya(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const r=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const o=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(o.name=t.name,this._resolvedGrammars.set(t.name,o),t.aliases&&t.aliases.forEach(i=>{this._alias[i]=t.name}),this._loadedLanguagesCache=null,r.size)for(const i of r)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const o of t)this.resolveEmbeddedLanguages(o);const r=Array.from(this._langGraph.entries()),n=r.filter(([o,i])=>!i);if(n.length){const o=r.filter(([i,a])=>a?(a.embeddedLanguages||a.embeddedLangs)?.some(l=>n.map(([u])=>u).includes(l)):!1).filter(i=>!n.includes(i));throw new gt(`Missing languages ${n.map(([i])=>`\`${i}\``).join(", ")}, required by ${o.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[o,i]of r)this._resolver.addLanguage(i);for(const[o,i]of r)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const r=t.embeddedLanguages??t.embeddedLangs;if(r)for(const n of r)this._langGraph.set(n,this._langMap.get(n))}}class cm{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,r){this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},r.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(r=>{this._langs.set(r,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(r=>{this._injections.get(r)||this._injections.set(r,[]),this._injections.get(r).push(t.scopeName)})}getInjections(t){const r=t.split(".");let n=[];for(let o=1;o<=r.length;o++){const i=r.slice(0,o).join(".");n=[...n,...this._injections.get(i)||[]]}return n}}let Dt=0;function dm(e){Dt+=1,e.warnings!==!1&&Dt>=10&&Dt%10===0&&console.warn(`[Shiki] ${Dt} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new gt("`engine` option is required for synchronous mode");const r=(e.langs||[]).flat(1),n=(e.themes||[]).flat(1).map(Nn),o=new cm(e.engine,r),i=new um(o,n,r,e.langAlias);let a;function s(L){return ya(L,e.langAlias)}function l(L){w();const D=i.getGrammar(typeof L=="string"?L:L.name);if(!D)throw new gt(`Language \`${L}\` not found, you may need to load it first`);return D}function u(L){if(L==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};w();const D=i.getTheme(L);if(!D)throw new gt(`Theme \`${L}\` not found, you may need to load it first`);return D}function c(L){w();const D=u(L);a!==L&&(i.setTheme(D),a=L);const k=i.getColorMap();return{theme:D,colorMap:k}}function d(){return w(),i.getLoadedThemes()}function h(){return w(),i.getLoadedLanguages()}function f(...L){w(),i.loadLanguages(L.flat(1))}async function g(...L){return f(await ga(L))}function S(...L){w();for(const D of L.flat(1))i.loadTheme(D)}async function b(...L){return w(),S(await _a(L))}function w(){if(t)throw new gt("Shiki instance has been disposed")}function P(){t||(t=!0,i.dispose(),Dt-=1)}return{setTheme:c,getTheme:u,getLanguage:l,getLoadedThemes:d,getLoadedLanguages:h,resolveLangAlias:s,loadLanguage:g,loadLanguageSync:f,loadTheme:b,loadThemeSync:S,dispose:P,[Symbol.dispose]:P}}async function mm(e){e.engine||sm("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,r,n]=await Promise.all([_a(e.themes||[]),ga(e.langs||[]),e.engine]);return dm({...e,themes:t,langs:r,engine:n})}async function fm(e){const t=await mm(e);return{getLastGrammarState:(...r)=>Kd(t,...r),codeToTokensBase:(r,n)=>kn(t,r,n),codeToTokensWithThemes:(r,n)=>pa(t,r,n),codeToTokens:(r,n)=>Sr(t,r,n),codeToHast:(r,n)=>Lr(t,r,n),codeToHtml:(r,n)=>am(t,r,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function hm(e){const t=e.langs,r=e.themes,n=e.engine;async function o(i){function a(d){if(typeof d=="string"){if(d=i.langAlias?.[d]||d,ca(d))return[];const h=t[d];if(!h)throw new ge(`Language \`${d}\` is not included in this bundle. You may want to load it from external source.`);return h}return d}function s(d){if(da(d))return"none";if(typeof d=="string"){const h=r[d];if(!h)throw new ge(`Theme \`${d}\` is not included in this bundle. You may want to load it from external source.`);return h}return d}const l=(i.themes??[]).map(d=>s(d)),u=(i.langs??[]).map(d=>a(d)),c=await fm({engine:i.engine??n(),...i,themes:l,langs:u});return{...c,loadLanguage(...d){return c.loadLanguage(...d.map(a))},loadTheme(...d){return c.loadTheme(...d.map(s))},getBundledLanguages(){return t},getBundledThemes(){return r}}}return o}const va=[{id:"abap",name:"ABAP",import:(()=>m(()=>import("./abap-BdImnpbu.js"),[],import.meta.url))},{id:"actionscript-3",name:"ActionScript",import:(()=>m(()=>import("./actionscript-3-CoDkCxhg.js"),[],import.meta.url))},{id:"ada",name:"Ada",import:(()=>m(()=>import("./ada-bCR0ucgS.js"),[],import.meta.url))},{id:"angular-html",name:"Angular HTML",import:(()=>m(()=>import("./angular-html-CU67Zn6k.js").then(e=>e.f),__vite__mapDeps([0,1,2,3]),import.meta.url))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>m(()=>import("./angular-ts-BwZT4LLn.js"),__vite__mapDeps([4,0,1,2,3,5]),import.meta.url))},{id:"apache",name:"Apache Conf",import:(()=>m(()=>import("./apache-Pmp26Uib.js"),[],import.meta.url))},{id:"apex",name:"Apex",import:(()=>m(()=>import("./apex-D8_7TLub.js"),[],import.meta.url))},{id:"apl",name:"APL",import:(()=>m(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([6,1,2,3,7,8,9]),import.meta.url))},{id:"applescript",name:"AppleScript",import:(()=>m(()=>import("./applescript-Co6uUVPk.js"),[],import.meta.url))},{id:"ara",name:"Ara",import:(()=>m(()=>import("./ara-BRHolxvo.js"),[],import.meta.url))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>m(()=>import("./asciidoc-Ve4PFQV2.js"),[],import.meta.url))},{id:"asm",name:"Assembly",import:(()=>m(()=>import("./asm-D_Q5rh1f.js"),[],import.meta.url))},{id:"astro",name:"Astro",import:(()=>m(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([10,9,2,11,3,12,13]),import.meta.url))},{id:"awk",name:"AWK",import:(()=>m(()=>import("./awk-DMzUqQB5.js"),[],import.meta.url))},{id:"ballerina",name:"Ballerina",import:(()=>m(()=>import("./ballerina-BFfxhgS-.js"),[],import.meta.url))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>m(()=>import("./bat-BkioyH1T.js"),[],import.meta.url))},{id:"beancount",name:"Beancount",import:(()=>m(()=>import("./beancount-k_qm7-4y.js"),[],import.meta.url))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>m(()=>import("./berry-uYugtg8r.js"),[],import.meta.url))},{id:"bibtex",name:"BibTeX",import:(()=>m(()=>import("./bibtex-CHM0blh-.js"),[],import.meta.url))},{id:"bicep",name:"Bicep",import:(()=>m(()=>import("./bicep-Bmn6On1c.js"),[],import.meta.url))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>m(()=>import("./bird2-DPOp833l.js"),[],import.meta.url))},{id:"blade",name:"Blade",import:(()=>m(()=>import("./blade-D4QpJJKB.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9]),import.meta.url))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>m(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18]),import.meta.url))},{id:"c",name:"C",import:(()=>m(()=>import("./c-BIGW1oBm.js"),[],import.meta.url))},{id:"c3",name:"C3",import:(()=>m(()=>import("./c3-eo99z4R2.js"),[],import.meta.url))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>m(()=>import("./cadence-Bv_4Rxtq.js"),[],import.meta.url))},{id:"cairo",name:"Cairo",import:(()=>m(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20]),import.meta.url))},{id:"clarity",name:"Clarity",import:(()=>m(()=>import("./clarity-D53aC0YG.js"),[],import.meta.url))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>m(()=>import("./clojure-P80f7IUj.js"),[],import.meta.url))},{id:"cmake",name:"CMake",import:(()=>m(()=>import("./cmake-D1j8_8rp.js"),[],import.meta.url))},{id:"cobol",name:"COBOL",import:(()=>m(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([21,1,2,3,8]),import.meta.url))},{id:"codeowners",name:"CODEOWNERS",import:(()=>m(()=>import("./codeowners-Bp6g37R7.js"),[],import.meta.url))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>m(()=>import("./codeql-DsOJ9woJ.js"),[],import.meta.url))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>m(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2]),import.meta.url))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>m(()=>import("./common-lisp-Cg-RD9OK.js"),[],import.meta.url))},{id:"coq",name:"Coq",import:(()=>m(()=>import("./coq-DkFqJrB1.js"),[],import.meta.url))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>m(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16]),import.meta.url))},{id:"crystal",name:"Crystal",import:(()=>m(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([27,1,2,3,16,26,28]),import.meta.url))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>m(()=>import("./csharp-COcwbKMJ.js"),[],import.meta.url))},{id:"css",name:"CSS",import:(()=>m(()=>import("./css-DPfMkruS.js"),[],import.meta.url))},{id:"csv",name:"CSV",import:(()=>m(()=>import("./csv-fuZLfV_i.js"),[],import.meta.url))},{id:"cue",name:"CUE",import:(()=>m(()=>import("./cue-D82EKSYY.js"),[],import.meta.url))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>m(()=>import("./cypher-COkxafJQ.js"),[],import.meta.url))},{id:"d",name:"D",import:(()=>m(()=>import("./d-85-TOEBH.js"),[],import.meta.url))},{id:"dart",name:"Dart",import:(()=>m(()=>import("./dart-CF10PKvl.js"),[],import.meta.url))},{id:"dax",name:"DAX",import:(()=>m(()=>import("./dax-CEL-wOlO.js"),[],import.meta.url))},{id:"desktop",name:"Desktop",import:(()=>m(()=>import("./desktop-BmXAJ9_W.js"),[],import.meta.url))},{id:"diff",name:"Diff",import:(()=>m(()=>import("./diff-D97Zzqfu.js"),[],import.meta.url))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>m(()=>import("./docker-BcOcwvcX.js"),[],import.meta.url))},{id:"dotenv",name:"dotEnv",import:(()=>m(()=>import("./dotenv-Da5cRb03.js"),[],import.meta.url))},{id:"dream-maker",name:"Dream Maker",import:(()=>m(()=>import("./dream-maker-BtqSS_iP.js"),[],import.meta.url))},{id:"edge",name:"Edge",import:(()=>m(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([29,11,1,2,3,15]),import.meta.url))},{id:"elixir",name:"Elixir",import:(()=>m(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([30,1,2,3]),import.meta.url))},{id:"elm",name:"Elm",import:(()=>m(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26]),import.meta.url))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>m(()=>import("./emacs-lisp-C9XAeP06.js"),[],import.meta.url))},{id:"erb",name:"ERB",import:(()=>m(()=>import("./erb-B12qg9BL.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38]),import.meta.url))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>m(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40]),import.meta.url))},{id:"fennel",name:"Fennel",import:(()=>m(()=>import("./fennel-BYunw83y.js"),[],import.meta.url))},{id:"fish",name:"Fish",import:(()=>m(()=>import("./fish-BvzEVeQv.js"),[],import.meta.url))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>m(()=>import("./fluent-C4IJs8-o.js"),[],import.meta.url))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>m(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42]),import.meta.url))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>m(()=>import("./fortran-free-form-BxgE0vQu.js"),[],import.meta.url))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>m(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40]),import.meta.url))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>m(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46]),import.meta.url))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>m(()=>import("./gdscript-C5YyOfLZ.js"),[],import.meta.url))},{id:"gdshader",name:"GDShader",import:(()=>m(()=>import("./gdshader-DkwncUOv.js"),[],import.meta.url))},{id:"genie",name:"Genie",import:(()=>m(()=>import("./genie-D0YGMca9.js"),[],import.meta.url))},{id:"gherkin",name:"Gherkin",import:(()=>m(()=>import("./gherkin-DyxjwDmM.js"),[],import.meta.url))},{id:"git-commit",name:"Git Commit Message",import:(()=>m(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48]),import.meta.url))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>m(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28]),import.meta.url))},{id:"gleam",name:"Gleam",import:(()=>m(()=>import("./gleam-BspZqrRM.js"),[],import.meta.url))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>m(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([50,2,11,3,1]),import.meta.url))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>m(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([51,11,3,2,1]),import.meta.url))},{id:"glsl",name:"GLSL",import:(()=>m(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26]),import.meta.url))},{id:"gn",name:"GN",import:(()=>m(()=>import("./gn-n2N0HUVH.js"),[],import.meta.url))},{id:"gnuplot",name:"Gnuplot",import:(()=>m(()=>import("./gnuplot-DdkO51Og.js"),[],import.meta.url))},{id:"go",name:"Go",import:(()=>m(()=>import("./go-CxLEBnE3.js"),[],import.meta.url))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>m(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13]),import.meta.url))},{id:"groovy",name:"Groovy",import:(()=>m(()=>import("./groovy-gcz8RCvz.js"),[],import.meta.url))},{id:"hack",name:"Hack",import:(()=>m(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([52,1,2,3,16]),import.meta.url))},{id:"haml",name:"Ruby Haml",import:(()=>m(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([34,2,3]),import.meta.url))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>m(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([53,1,2,3,38]),import.meta.url))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>m(()=>import("./haskell-Df6bDoY_.js"),[],import.meta.url))},{id:"haxe",name:"Haxe",import:(()=>m(()=>import("./haxe-CzTSHFRz.js"),[],import.meta.url))},{id:"hcl",name:"HashiCorp HCL",import:(()=>m(()=>import("./hcl-BWvSN4gD.js"),[],import.meta.url))},{id:"hjson",name:"Hjson",import:(()=>m(()=>import("./hjson-D5-asLiD.js"),[],import.meta.url))},{id:"hlsl",name:"HLSL",import:(()=>m(()=>import("./hlsl-D3lLCCz7.js"),[],import.meta.url))},{id:"html",name:"HTML",import:(()=>m(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([1,2,3]),import.meta.url))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>m(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([15,1,2,3]),import.meta.url))},{id:"http",name:"HTTP",import:(()=>m(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13]),import.meta.url))},{id:"hurl",name:"Hurl",import:(()=>m(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56]),import.meta.url))},{id:"hxml",name:"HXML",import:(()=>m(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58]),import.meta.url))},{id:"hy",name:"Hy",import:(()=>m(()=>import("./hy-DFXneXwc.js"),[],import.meta.url))},{id:"imba",name:"Imba",import:(()=>m(()=>import("./imba-DGztddWO.js"),[],import.meta.url))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>m(()=>import("./ini-BEwlwnbL.js"),[],import.meta.url))},{id:"java",name:"Java",import:(()=>m(()=>import("./java-CylS5w8V.js"),[],import.meta.url))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>m(()=>import("./javascript-wDzz0qaB.js"),[],import.meta.url))},{id:"jinja",name:"Jinja",import:(()=>m(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([59,1,2,3]),import.meta.url))},{id:"jison",name:"Jison",import:(()=>m(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2]),import.meta.url))},{id:"json",name:"JSON",import:(()=>m(()=>import("./json-Cp-IABpG.js"),[],import.meta.url))},{id:"json5",name:"JSON5",import:(()=>m(()=>import("./json5-C9tS-k6U.js"),[],import.meta.url))},{id:"jsonc",name:"JSON with Comments",import:(()=>m(()=>import("./jsonc-Des-eS-w.js"),[],import.meta.url))},{id:"jsonl",name:"JSON Lines",import:(()=>m(()=>import("./jsonl-DcaNXYhu.js"),[],import.meta.url))},{id:"jsonnet",name:"Jsonnet",import:(()=>m(()=>import("./jsonnet-DFQXde-d.js"),[],import.meta.url))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>m(()=>import("./jssm-C2t-YnRu.js"),[],import.meta.url))},{id:"jsx",name:"JSX",import:(()=>m(()=>import("./jsx-g9-lgVsj.js"),[],import.meta.url))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>m(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62]),import.meta.url))},{id:"just",name:"Just",import:(()=>m(()=>import("./just-Cw27pwNe.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38]),import.meta.url))},{id:"kdl",name:"KDL",import:(()=>m(()=>import("./kdl-DV7GczEv.js"),[],import.meta.url))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>m(()=>import("./kotlin-BdnUsdx6.js"),[],import.meta.url))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>m(()=>import("./kusto-DZf3V79B.js"),[],import.meta.url))},{id:"latex",name:"LaTeX",import:(()=>m(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([65,66,62]),import.meta.url))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>m(()=>import("./lean-BZvkOJ9d.js"),[],import.meta.url))},{id:"less",name:"Less",import:(()=>m(()=>import("./less-B1dDrJ26.js"),[],import.meta.url))},{id:"liquid",name:"Liquid",import:(()=>m(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([67,1,2,3,9]),import.meta.url))},{id:"llvm",name:"LLVM IR",import:(()=>m(()=>import("./llvm-DjAJT7YJ.js"),[],import.meta.url))},{id:"log",name:"Log file",import:(()=>m(()=>import("./log-2UxHyX5q.js"),[],import.meta.url))},{id:"logo",name:"Logo",import:(()=>m(()=>import("./logo-BtOb2qkB.js"),[],import.meta.url))},{id:"lua",name:"Lua",import:(()=>m(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26]),import.meta.url))},{id:"luau",name:"Luau",import:(()=>m(()=>import("./luau-C-HG3fhB.js"),[],import.meta.url))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>m(()=>import("./make-CHLpvVh8.js"),[],import.meta.url))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>m(()=>import("./markdown-Cvjx9yec.js"),[],import.meta.url))},{id:"marko",name:"Marko",import:(()=>m(()=>import("./marko-CnJfTvn9.js"),__vite__mapDeps([68,3,69,5,11]),import.meta.url))},{id:"matlab",name:"MATLAB",import:(()=>m(()=>import("./matlab-D7o27uSR.js"),[],import.meta.url))},{id:"mdc",name:"MDC",import:(()=>m(()=>import("./mdc-BMNejdWA.js"),__vite__mapDeps([70,40,38,15,1,2,3]),import.meta.url))},{id:"mdx",name:"MDX",import:(()=>m(()=>import("./mdx-Cmh6b_Ma.js"),[],import.meta.url))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>m(()=>import("./mermaid-mWjccvbQ.js"),[],import.meta.url))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>m(()=>import("./mipsasm-CKIfxQSi.js"),[],import.meta.url))},{id:"mojo",name:"Mojo",import:(()=>m(()=>import("./mojo-rZm6bMo-.js"),[],import.meta.url))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>m(()=>import("./moonbit-_H4v1dQx.js"),[],import.meta.url))},{id:"move",name:"Move",import:(()=>m(()=>import("./move-IF9eRakj.js"),[],import.meta.url))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>m(()=>import("./narrat-DRg8JJMk.js"),[],import.meta.url))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>m(()=>import("./nextflow-Zz6hmt5N.js"),__vite__mapDeps([71,72]),import.meta.url))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>m(()=>import("./nextflow-groovy-BeH2EWoN.js"),[],import.meta.url))},{id:"nginx",name:"Nginx",import:(()=>m(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26]),import.meta.url))},{id:"nim",name:"Nim",import:(()=>m(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40]),import.meta.url))},{id:"nix",name:"Nix",import:(()=>m(()=>import("./nix-CwoSXNpI.js"),[],import.meta.url))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>m(()=>import("./nushell-Cz2AlsmD.js"),[],import.meta.url))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>m(()=>import("./objective-c-DXmwc3jG.js"),[],import.meta.url))},{id:"objective-cpp",name:"Objective-C++",import:(()=>m(()=>import("./objective-cpp-CLxacb5B.js"),[],import.meta.url))},{id:"ocaml",name:"OCaml",import:(()=>m(()=>import("./ocaml-C0hk2d4L.js"),[],import.meta.url))},{id:"odin",name:"Odin",import:(()=>m(()=>import("./odin-BBf5iR-q.js"),[],import.meta.url))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>m(()=>import("./openscad-C4EeE6gA.js"),[],import.meta.url))},{id:"pascal",name:"Pascal",import:(()=>m(()=>import("./pascal-D93ZcfNL.js"),[],import.meta.url))},{id:"perl",name:"Perl",import:(()=>m(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([64,1,2,3,7,8,16]),import.meta.url))},{id:"php",name:"PHP",import:(()=>m(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([75,1,2,3,7,8,16,9]),import.meta.url))},{id:"pkl",name:"Pkl",import:(()=>m(()=>import("./pkl-u5AG7uiY.js"),[],import.meta.url))},{id:"plsql",name:"PL/SQL",import:(()=>m(()=>import("./plsql-ChMvpjG-.js"),[],import.meta.url))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>m(()=>import("./po-BTJTHyun.js"),[],import.meta.url))},{id:"polar",name:"Polar",import:(()=>m(()=>import("./polar-C0HS_06l.js"),[],import.meta.url))},{id:"postcss",name:"PostCSS",import:(()=>m(()=>import("./postcss-CXtECtnM.js"),[],import.meta.url))},{id:"powerquery",name:"PowerQuery",import:(()=>m(()=>import("./powerquery-CEu0bR-o.js"),[],import.meta.url))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>m(()=>import("./powershell-Dpen1YoG.js"),[],import.meta.url))},{id:"prisma",name:"Prisma",import:(()=>m(()=>import("./prisma-Dd19v3D-.js"),[],import.meta.url))},{id:"prolog",name:"Prolog",import:(()=>m(()=>import("./prolog-CbFg5uaA.js"),[],import.meta.url))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>m(()=>import("./proto-C7zT0LnQ.js"),[],import.meta.url))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>m(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([76,2,3,1]),import.meta.url))},{id:"puppet",name:"Puppet",import:(()=>m(()=>import("./puppet-BMWR74SV.js"),[],import.meta.url))},{id:"purescript",name:"PureScript",import:(()=>m(()=>import("./purescript-CklMAg4u.js"),[],import.meta.url))},{id:"python",name:"Python",aliases:["py"],import:(()=>m(()=>import("./python-B6aJPvgy.js"),[],import.meta.url))},{id:"qml",name:"QML",import:(()=>m(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2]),import.meta.url))},{id:"qmldir",name:"QML Directory",import:(()=>m(()=>import("./qmldir-C8lEn-DE.js"),[],import.meta.url))},{id:"qss",name:"Qt Style Sheets",import:(()=>m(()=>import("./qss-IeuSbFQv.js"),[],import.meta.url))},{id:"r",name:"R",import:(()=>m(()=>import("./r-Dspwwk_N.js"),[],import.meta.url))},{id:"racket",name:"Racket",import:(()=>m(()=>import("./racket-BqYA7rlc.js"),[],import.meta.url))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>m(()=>import("./raku-DXvB9xmW.js"),[],import.meta.url))},{id:"razor",name:"ASP.NET Razor",import:(()=>m(()=>import("./razor-Uh8Bk_45.js"),__vite__mapDeps([78,1,2,3,79]),import.meta.url))},{id:"reg",name:"Windows Registry Script",import:(()=>m(()=>import("./reg-C-SQnVFl.js"),[],import.meta.url))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>m(()=>import("./regexp-CDVJQ6XC.js"),[],import.meta.url))},{id:"rel",name:"Rel",import:(()=>m(()=>import("./rel-C3B-1QV4.js"),[],import.meta.url))},{id:"riscv",name:"RISC-V",import:(()=>m(()=>import("./riscv-BM1_JUlF.js"),[],import.meta.url))},{id:"ron",name:"RON",import:(()=>m(()=>import("./ron-D8l8udqQ.js"),[],import.meta.url))},{id:"rosmsg",name:"ROS Interface",import:(()=>m(()=>import("./rosmsg-BJDFO7_C.js"),[],import.meta.url))},{id:"rst",name:"reStructuredText",import:(()=>m(()=>import("./rst-BrH8l1NY.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37]),import.meta.url))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>m(()=>import("./ruby-Dw2BHqvy.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38]),import.meta.url))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>m(()=>import("./rust-B1yitclQ.js"),[],import.meta.url))},{id:"sas",name:"SAS",import:(()=>m(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([82,16]),import.meta.url))},{id:"sass",name:"Sass",import:(()=>m(()=>import("./sass-Cj5Yp3dK.js"),[],import.meta.url))},{id:"scala",name:"Scala",import:(()=>m(()=>import("./scala-C151Ov-r.js"),[],import.meta.url))},{id:"scheme",name:"Scheme",import:(()=>m(()=>import("./scheme-C98Dy4si.js"),[],import.meta.url))},{id:"scss",name:"SCSS",import:(()=>m(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3]),import.meta.url))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>m(()=>import("./sdbl-DVxCFoDh.js"),[],import.meta.url))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>m(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84]),import.meta.url))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>m(()=>import("./shellscript-Yzrsuije.js"),[],import.meta.url))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>m(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28]),import.meta.url))},{id:"smalltalk",name:"Smalltalk",import:(()=>m(()=>import("./smalltalk-BERRCDM3.js"),[],import.meta.url))},{id:"solidity",name:"Solidity",import:(()=>m(()=>import("./solidity-rGO070M0.js"),[],import.meta.url))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>m(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([86,1,2,3]),import.meta.url))},{id:"sparql",name:"SPARQL",import:(()=>m(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88]),import.meta.url))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>m(()=>import("./splunk-BtCnVYZw.js"),[],import.meta.url))},{id:"sql",name:"SQL",import:(()=>m(()=>import("./sql-BLtJtn59.js"),[],import.meta.url))},{id:"ssh-config",name:"SSH Config",import:(()=>m(()=>import("./ssh-config-_ykCGR6B.js"),[],import.meta.url))},{id:"stata",name:"Stata",import:(()=>m(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([89,16]),import.meta.url))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>m(()=>import("./stylus-BEDo0Tqx.js"),[],import.meta.url))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>m(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2]),import.meta.url))},{id:"svelte",name:"Svelte",import:(()=>m(()=>import("./svelte-C_ipcX3V.js"),__vite__mapDeps([91,2,11,3,12]),import.meta.url))},{id:"swift",name:"Swift",import:(()=>m(()=>import("./swift-D82vCrfD.js"),[],import.meta.url))},{id:"system-verilog",name:"SystemVerilog",import:(()=>m(()=>import("./system-verilog-CnnmHF94.js"),[],import.meta.url))},{id:"systemd",name:"Systemd Units",import:(()=>m(()=>import("./systemd-4A_iFExJ.js"),[],import.meta.url))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>m(()=>import("./talonscript-CkByrt1z.js"),[],import.meta.url))},{id:"tasl",name:"Tasl",import:(()=>m(()=>import("./tasl-QIJgUcNo.js"),[],import.meta.url))},{id:"tcl",name:"Tcl",import:(()=>m(()=>import("./tcl-dwOrl1Do.js"),[],import.meta.url))},{id:"templ",name:"Templ",import:(()=>m(()=>import("./templ-P3uqSqPl.js"),__vite__mapDeps([92,93,2,3]),import.meta.url))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>m(()=>import("./terraform-BETggiCN.js"),[],import.meta.url))},{id:"tex",name:"TeX",import:(()=>m(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62]),import.meta.url))},{id:"toml",name:"TOML",import:(()=>m(()=>import("./toml-vGWfd6FD.js"),[],import.meta.url))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>m(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8]),import.meta.url))},{id:"tsv",name:"TSV",import:(()=>m(()=>import("./tsv-B_m7g4N7.js"),[],import.meta.url))},{id:"tsx",name:"TSX",import:(()=>m(()=>import("./tsx-COt5Ahok.js"),[],import.meta.url))},{id:"turtle",name:"Turtle",import:(()=>m(()=>import("./turtle-BsS91CYL.js"),[],import.meta.url))},{id:"twig",name:"Twig",import:(()=>m(()=>import("./twig-DNn4PbVi.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38]),import.meta.url))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>m(()=>import("./typescript-BPQ3VLAy.js"),[],import.meta.url))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>m(()=>import("./typespec-BGHnOYBU.js"),[],import.meta.url))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>m(()=>import("./typst-DHCkPAjA.js"),[],import.meta.url))},{id:"v",name:"V",import:(()=>m(()=>import("./v-BcVCzyr7.js"),[],import.meta.url))},{id:"vala",name:"Vala",import:(()=>m(()=>import("./vala-CsfeWuGM.js"),[],import.meta.url))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>m(()=>import("./vb-D17OF-Vu.js"),[],import.meta.url))},{id:"verilog",name:"Verilog",import:(()=>m(()=>import("./verilog-BQ8w6xss.js"),[],import.meta.url))},{id:"vhdl",name:"VHDL",import:(()=>m(()=>import("./vhdl-CeAyd5Ju.js"),[],import.meta.url))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>m(()=>import("./viml-CJc9bBzg.js"),[],import.meta.url))},{id:"vue",name:"Vue",import:(()=>m(()=>import("./vue-DN_0RTcg.js"),__vite__mapDeps([96,3,2,11,9,1,15]),import.meta.url))},{id:"vue-html",name:"Vue HTML",import:(()=>m(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2]),import.meta.url))},{id:"vue-vine",name:"Vue Vine",import:(()=>m(()=>import("./vue-vine-CQOfvN7w.js"),__vite__mapDeps([98,3,5,69,99,12,2]),import.meta.url))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>m(()=>import("./vyper-CDx5xZoG.js"),[],import.meta.url))},{id:"wasm",name:"WebAssembly",import:(()=>m(()=>import("./wasm-MzD3tlZU.js"),[],import.meta.url))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>m(()=>import("./wenyan-BV7otONQ.js"),[],import.meta.url))},{id:"wgsl",name:"WGSL",import:(()=>m(()=>import("./wgsl-Dx-B1_4e.js"),[],import.meta.url))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>m(()=>import("./wikitext-BhOHFoWU.js"),[],import.meta.url))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>m(()=>import("./wit-5i3qLPDT.js"),[],import.meta.url))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>m(()=>import("./wolfram-lXgVvXCa.js"),[],import.meta.url))},{id:"xml",name:"XML",import:(()=>m(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8]),import.meta.url))},{id:"xsl",name:"XSL",import:(()=>m(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8]),import.meta.url))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>m(()=>import("./yaml-Buea-lGh.js"),[],import.meta.url))},{id:"zenscript",name:"ZenScript",import:(()=>m(()=>import("./zenscript-DVFEvuxE.js"),[],import.meta.url))},{id:"zig",name:"Zig",import:(()=>m(()=>import("./zig-VOosw3JB.js"),[],import.meta.url))}],pm=Object.fromEntries(va.map(e=>[e.id,e.import])),gm=Object.fromEntries(va.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),_m={...pm,...gm},ym=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>m(()=>import("./andromeeda-C4gqWexZ.js"),[],import.meta.url))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>m(()=>import("./aurora-x-D-2ljcwZ.js"),[],import.meta.url))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>m(()=>import("./ayu-dark-DYE7WIF3.js"),[],import.meta.url))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>m(()=>import("./ayu-light-BA47KaF1.js"),[],import.meta.url))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>m(()=>import("./ayu-mirage-32ctXXKs.js"),[],import.meta.url))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>m(()=>import("./catppuccin-frappe-DFWUc33u.js"),[],import.meta.url))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>m(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[],import.meta.url))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>m(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[],import.meta.url))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>m(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[],import.meta.url))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>m(()=>import("./dark-plus-C3mMm8J8.js"),[],import.meta.url))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>m(()=>import("./dracula-BzJJZx-M.js"),[],import.meta.url))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>m(()=>import("./dracula-soft-BXkSAIEj.js"),[],import.meta.url))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>m(()=>import("./everforest-dark-BgDCqdQA.js"),[],import.meta.url))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>m(()=>import("./everforest-light-C8M2exoo.js"),[],import.meta.url))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>m(()=>import("./github-dark-DHJKELXO.js"),[],import.meta.url))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>m(()=>import("./github-dark-default-Cuk6v7N8.js"),[],import.meta.url))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>m(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[],import.meta.url))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>m(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[],import.meta.url))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>m(()=>import("./github-light-DAi9KRSo.js"),[],import.meta.url))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>m(()=>import("./github-light-default-D7oLnXFd.js"),[],import.meta.url))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>m(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[],import.meta.url))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>m(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[],import.meta.url))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>m(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[],import.meta.url))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>m(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[],import.meta.url))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>m(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[],import.meta.url))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>m(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[],import.meta.url))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>m(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[],import.meta.url))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>m(()=>import("./horizon-BUw7H-hv.js"),[],import.meta.url))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>m(()=>import("./horizon-bright-Cn-bp-IR.js"),[],import.meta.url))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>m(()=>import("./houston-DnULxvSX.js"),[],import.meta.url))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>m(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[],import.meta.url))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>m(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[],import.meta.url))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>m(()=>import("./kanagawa-wave-DWedfzmr.js"),[],import.meta.url))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>m(()=>import("./laserwave-DUszq2jm.js"),[],import.meta.url))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>m(()=>import("./light-plus-B7mTdjB0.js"),[],import.meta.url))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>m(()=>import("./material-theme-D5KoaKCx.js"),[],import.meta.url))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>m(()=>import("./material-theme-darker-BfHTSMKl.js"),[],import.meta.url))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>m(()=>import("./material-theme-lighter-B0m2ddpp.js"),[],import.meta.url))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>m(()=>import("./material-theme-ocean-CyktbL80.js"),[],import.meta.url))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>m(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[],import.meta.url))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>m(()=>import("./min-dark-CafNBF8u.js"),[],import.meta.url))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>m(()=>import("./min-light-CTRr51gU.js"),[],import.meta.url))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>m(()=>import("./monokai-D4h5O-jR.js"),[],import.meta.url))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>m(()=>import("./night-owl-C39BiMTA.js"),[],import.meta.url))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>m(()=>import("./night-owl-light-CMTm3GFP.js"),[],import.meta.url))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>m(()=>import("./nord-Ddv68eIx.js"),[],import.meta.url))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>m(()=>import("./one-dark-pro-DVMEJ2y_.js"),[],import.meta.url))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>m(()=>import("./one-light-C3Wv6jpd.js"),[],import.meta.url))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>m(()=>import("./plastic-3e1v2bzS.js"),[],import.meta.url))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>m(()=>import("./poimandres-CS3Unz2-.js"),[],import.meta.url))},{id:"red",displayName:"Red",type:"dark",import:(()=>m(()=>import("./red-bN70gL4F.js"),[],import.meta.url))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>m(()=>import("./rose-pine-qdsjHGoJ.js"),[],import.meta.url))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>m(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[],import.meta.url))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>m(()=>import("./rose-pine-moon-D4_iv3hh.js"),[],import.meta.url))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>m(()=>import("./slack-dark-BthQWCQV.js"),[],import.meta.url))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>m(()=>import("./slack-ochin-DqwNpetd.js"),[],import.meta.url))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>m(()=>import("./snazzy-light-Bw305WKR.js"),[],import.meta.url))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>m(()=>import("./solarized-dark-DXbdFlpD.js"),[],import.meta.url))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>m(()=>import("./solarized-light-L9t79GZl.js"),[],import.meta.url))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>m(()=>import("./synthwave-84-CbfX1IO0.js"),[],import.meta.url))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>m(()=>import("./tokyo-night-hegEt444.js"),[],import.meta.url))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>m(()=>import("./vesper-DU1UobuO.js"),[],import.meta.url))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>m(()=>import("./vitesse-black-Bkuqu6BP.js"),[],import.meta.url))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>m(()=>import("./vitesse-dark-D0r3Knsf.js"),[],import.meta.url))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>m(()=>import("./vitesse-light-CVO1_9PV.js"),[],import.meta.url))}],vm=Object.fromEntries(ym.map(e=>[e.id,e.import]));class Mn extends Error{constructor(t){super(t),this.name="ShikiError"}}function Em(){return 2147483648}function Rm(){return typeof performance<"u"?performance.now():Date.now()}const bm=(e,t)=>e+(t-e%t)%t;async function wm(e){let t,r;const n={};function o(f){r=f,n.HEAPU8=new Uint8Array(f),n.HEAPU32=new Uint32Array(f)}function i(f,g,S){n.HEAPU8.copyWithin(f,g,g+S)}function a(f){try{return t.grow(f-r.byteLength+65535>>>16),o(t.buffer),1}catch{}}function s(f){const g=n.HEAPU8.length;f=f>>>0;const S=Em();if(f>S)return!1;for(let b=1;b<=4;b*=2){let w=g*(1+.2/b);w=Math.min(w,f+100663296);const P=Math.min(S,bm(Math.max(f,w),65536));if(a(P))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(f,g,S=1024){const b=g+S;let w=g;for(;f[w]&&!(w>=b);)++w;if(w-g>16&&f.buffer&&l)return l.decode(f.subarray(g,w));let P="";for(;g<w;){let L=f[g++];if(!(L&128)){P+=String.fromCharCode(L);continue}const D=f[g++]&63;if((L&224)===192){P+=String.fromCharCode((L&31)<<6|D);continue}const k=f[g++]&63;if((L&240)===224?L=(L&15)<<12|D<<6|k:L=(L&7)<<18|D<<12|k<<6|f[g++]&63,L<65536)P+=String.fromCharCode(L);else{const H=L-65536;P+=String.fromCharCode(55296|H>>10,56320|H&1023)}}return P}function c(f,g){return f?u(n.HEAPU8,f,g):""}const d={emscripten_get_now:Rm,emscripten_memcpy_big:i,emscripten_resize_heap:s,fd_write:()=>0};async function h(){const g=await e({env:d,wasi_snapshot_preview1:d});t=g.memory,o(t.buffer),Object.assign(n,g),n.UTF8ToString=c}return await h(),n}var Sm=Object.defineProperty,Lm=(e,t,r)=>t in e?Sm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_e=(e,t,r)=>Lm(e,typeof t!="symbol"?t+"":t,r);let Ee=null;function Pm(e){throw new Mn(e.UTF8ToString(e.getLastOnigError()))}class Dr{constructor(t){_e(this,"utf16Length"),_e(this,"utf8Length"),_e(this,"utf16Value"),_e(this,"utf8Value"),_e(this,"utf16OffsetToUtf8"),_e(this,"utf8OffsetToUtf16");const r=t.length,n=Dr._utf8ByteLength(t),o=n!==r,i=o?new Uint32Array(r+1):null;o&&(i[r]=n);const a=o?new Uint32Array(n+1):null;o&&(a[n]=r);const s=new Uint8Array(n);let l=0;for(let u=0;u<r;u++){const c=t.charCodeAt(u);let d=c,h=!1;if(c>=55296&&c<=56319&&u+1<r){const f=t.charCodeAt(u+1);f>=56320&&f<=57343&&(d=(c-55296<<10)+65536|f-56320,h=!0)}o&&(i[u]=l,h&&(i[u+1]=l),d<=127?a[l+0]=u:d<=2047?(a[l+0]=u,a[l+1]=u):d<=65535?(a[l+0]=u,a[l+1]=u,a[l+2]=u):(a[l+0]=u,a[l+1]=u,a[l+2]=u,a[l+3]=u)),d<=127?s[l++]=d:d<=2047?(s[l++]=192|(d&1984)>>>6,s[l++]=128|(d&63)>>>0):d<=65535?(s[l++]=224|(d&61440)>>>12,s[l++]=128|(d&4032)>>>6,s[l++]=128|(d&63)>>>0):(s[l++]=240|(d&1835008)>>>18,s[l++]=128|(d&258048)>>>12,s[l++]=128|(d&4032)>>>6,s[l++]=128|(d&63)>>>0),h&&u++}this.utf16Length=r,this.utf8Length=n,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=a}static _utf8ByteLength(t){let r=0;for(let n=0,o=t.length;n<o;n++){const i=t.charCodeAt(n);let a=i,s=!1;if(i>=55296&&i<=56319&&n+1<o){const l=t.charCodeAt(n+1);l>=56320&&l<=57343&&(a=(i-55296<<10)+65536|l-56320,s=!0)}a<=127?r+=1:a<=2047?r+=2:a<=65535?r+=3:r+=4,s&&n++}return r}createString(t){const r=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,r),r}}const Ir=class He{constructor(t){if(_e(this,"id",++He.LAST_ID),_e(this,"_onigBinding"),_e(this,"content"),_e(this,"utf16Length"),_e(this,"utf8Length"),_e(this,"utf16OffsetToUtf8"),_e(this,"utf8OffsetToUtf16"),_e(this,"ptr"),!Ee)throw new Mn("Must invoke loadWasm first.");this._onigBinding=Ee,this.content=t;const r=new Dr(t);this.utf16Length=r.utf16Length,this.utf8Length=r.utf8Length,this.utf16OffsetToUtf8=r.utf16OffsetToUtf8,this.utf8OffsetToUtf16=r.utf8OffsetToUtf16,this.utf8Length<1e4&&!He._sharedPtrInUse?(He._sharedPtr||(He._sharedPtr=Ee.omalloc(1e4)),He._sharedPtrInUse=!0,Ee.HEAPU8.set(r.utf8Value,He._sharedPtr),this.ptr=He._sharedPtr):this.ptr=r.createString(Ee)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===He._sharedPtr?He._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};_e(Ir,"LAST_ID",0);_e(Ir,"_sharedPtr",0);_e(Ir,"_sharedPtrInUse",!1);let Ea=Ir;class Tm{constructor(t){if(_e(this,"_onigBinding"),_e(this,"_ptr"),!Ee)throw new Mn("Must invoke loadWasm first.");const r=[],n=[];for(let s=0,l=t.length;s<l;s++){const u=new Dr(t[s]);r[s]=u.createString(Ee),n[s]=u.utf8Length}const o=Ee.omalloc(4*t.length);Ee.HEAPU32.set(r,o/4);const i=Ee.omalloc(4*t.length);Ee.HEAPU32.set(n,i/4);const a=Ee.createOnigScanner(o,i,t.length);for(let s=0,l=t.length;s<l;s++)Ee.ofree(r[s]);Ee.ofree(i),Ee.ofree(o),a===0&&Pm(Ee),this._onigBinding=Ee,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,r,n){let o=0;if(typeof n=="number"&&(o=n),typeof t=="string"){t=new Ea(t);const i=this._findNextMatchSync(t,r,!1,o);return t.dispose(),i}return this._findNextMatchSync(t,r,!1,o)}_findNextMatchSync(t,r,n,o){const i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(r),o);if(a===0)return null;const s=i.HEAPU32;let l=a/4;const u=s[l++],c=s[l++],d=[];for(let h=0;h<c;h++){const f=t.convertUtf8OffsetToUtf16(s[l++]),g=t.convertUtf8OffsetToUtf16(s[l++]);d[h]={start:f,end:g,length:g-f}}return{index:u,captureIndices:d}}}function Cm(e){return typeof e.instantiator=="function"}function Am(e){return typeof e.default=="function"}function Om(e){return typeof e.data<"u"}function Dm(e){return typeof Response<"u"&&e instanceof Response}function Im(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let ur;function km(e){if(ur)return ur;async function t(){Ee=await wm(async r=>{let n=e;return n=await n,typeof n=="function"&&(n=await n(r)),typeof n=="function"&&(n=await n(r)),Cm(n)?n=await n.instantiator(r):Am(n)?n=await n.default(r):(Om(n)&&(n=n.data),Dm(n)?typeof WebAssembly.instantiateStreaming=="function"?n=await xm(n)(r):n=await Nm(n)(r):Im(n)?n=await Zr(n)(r):n instanceof WebAssembly.Module?n=await Zr(n)(r):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await Zr(n.default)(r))),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}return ur=t(),ur}function Zr(e){return t=>WebAssembly.instantiate(e,t)}function xm(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Nm(e){return async t=>{const r=await e.arrayBuffer();return WebAssembly.instantiate(r,t)}}async function Mm(e){return e&&await km(e),{createScanner(t){return new Tm(t.map(r=>typeof r=="string"?r:r.source))},createString(t){return new Ea(t)}}}const Jm=hm({langs:_m,themes:vm,engine:()=>Mm(m(()=>import("./wasm-CG6Dc4jp.js"),[],import.meta.url))});export{$m as C,hu as N,Um as P,Ua as R,za as a,E as b,Bm as c,Jm as d,_m as e,vm as f,Vm as g,jm as h,Hm as i,zm as j,Fm as k,Gm as l,Wm as m,ei as r,Je as u};